* [igt-dev] [PATCH i-g-t] lib/igt_sysfs: Return errno from igt_sysfs_printf
@ 2018-08-29 13:13 Katarzyna Dec
2018-08-29 13:22 ` Chris Wilson
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Katarzyna Dec @ 2018-08-29 13:13 UTC (permalink / raw)
To: igt-dev
Let's add returning errno on failure instead of -1.
Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
lib/igt_sysfs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
index 8efe889b..6cc7ba44 100644
--- a/lib/igt_sysfs.c
+++ b/lib/igt_sysfs.c
@@ -417,7 +417,7 @@ int igt_sysfs_vprintf(int dir, const char *attr, const char *fmt, va_list ap)
* printf() wrapper for sysfs.
*
* Returns:
- * Number of characters written, negative value on error.
+ * Number of characters written, errno on error.
*/
int igt_sysfs_printf(int dir, const char *attr, const char *fmt, ...)
{
@@ -427,6 +427,8 @@ int igt_sysfs_printf(int dir, const char *attr, const char *fmt, ...)
va_start(ap, fmt);
ret = igt_sysfs_vprintf(dir, attr, fmt, ap);
va_end(ap);
+ if (ret < 0)
+ return errno;
return ret;
}
--
2.17.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] lib/igt_sysfs: Return errno from igt_sysfs_printf
2018-08-29 13:13 [igt-dev] [PATCH i-g-t] lib/igt_sysfs: Return errno from igt_sysfs_printf Katarzyna Dec
@ 2018-08-29 13:22 ` Chris Wilson
2018-08-30 8:12 ` Katarzyna Dec
2018-08-30 8:08 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
2018-08-30 8:23 ` [igt-dev] ✓ Fi.CI.BAT: " Patchwork
2 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2018-08-29 13:22 UTC (permalink / raw)
To: Katarzyna Dec, igt-dev
Quoting Katarzyna Dec (2018-08-29 14:13:49)
> Let's add returning errno on failure instead of -1.
But not as a positive value and not from that function. vprintf is not
documented as setting errno.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for lib/igt_sysfs: Return errno from igt_sysfs_printf
2018-08-29 13:13 [igt-dev] [PATCH i-g-t] lib/igt_sysfs: Return errno from igt_sysfs_printf Katarzyna Dec
2018-08-29 13:22 ` Chris Wilson
@ 2018-08-30 8:08 ` Patchwork
2018-08-30 8:23 ` [igt-dev] ✓ Fi.CI.BAT: " Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-08-30 8:08 UTC (permalink / raw)
To: Katarzyna Dec; +Cc: igt-dev
== Series Details ==
Series: lib/igt_sysfs: Return errno from igt_sysfs_printf
URL : https://patchwork.freedesktop.org/series/48874/
State : success
== Summary ==
= CI Bug Log - changes from IGT_4610_full -> IGTPW_1754_full =
== Summary - WARNING ==
Minor unknown changes coming with IGTPW_1754_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_1754_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48874/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1754_full:
=== IGT changes ===
==== Warnings ====
igt@kms_draw_crc@draw-method-xrgb2101010-mmap-wc-untiled:
shard-snb: SKIP -> PASS
igt@kms_vblank@pipe-a-query-idle-hang:
shard-snb: PASS -> SKIP +4
== Known issues ==
Here are the changes found in IGTPW_1754_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_big:
shard-hsw: PASS -> INCOMPLETE (fdo#103540)
igt@gem_exec_fence@basic-await-default:
shard-snb: PASS -> INCOMPLETE (fdo#105411)
igt@kms_flip@flip-vs-expired-vblank:
shard-glk: PASS -> FAIL (fdo#105363, fdo#102887)
igt@kms_plane@pixel-format-pipe-a-planes:
shard-snb: PASS -> FAIL (fdo#107161)
igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping:
shard-kbl: PASS -> DMESG-WARN (fdo#105604)
igt@kms_setmode@basic:
shard-glk: NOTRUN -> FAIL (fdo#99912)
shard-kbl: PASS -> FAIL (fdo#99912)
==== Possible fixes ====
igt@gem_ctx_isolation@vcs0-s3:
shard-kbl: INCOMPLETE (fdo#103665, fdo#107556) -> PASS
igt@gem_ctx_isolation@vcs1-none:
shard-snb: INCOMPLETE (fdo#105411) -> SKIP
igt@gem_ppgtt@blt-vs-render-ctx0:
shard-kbl: INCOMPLETE (fdo#103665, fdo#106023) -> PASS
igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
shard-snb: FAIL (fdo#103166) -> PASS
igt@kms_setmode@basic:
shard-apl: FAIL (fdo#99912) -> PASS
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105604 https://bugs.freedesktop.org/show_bug.cgi?id=105604
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#107161 https://bugs.freedesktop.org/show_bug.cgi?id=107161
fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* IGT: IGT_4610 -> IGTPW_1754
* Linux: CI_DRM_4706 -> CI_DRM_4715
CI_DRM_4706: 6d5687919f3a3426243041b99111b576dd0576d0 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4715: 1b73a69651beab39192502181c83e77a1022014a @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1754: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1754/
IGT_4610: c40743d3fce5055682d31610519758dd7379c0f8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1754/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] lib/igt_sysfs: Return errno from igt_sysfs_printf
2018-08-29 13:22 ` Chris Wilson
@ 2018-08-30 8:12 ` Katarzyna Dec
0 siblings, 0 replies; 5+ messages in thread
From: Katarzyna Dec @ 2018-08-30 8:12 UTC (permalink / raw)
To: Chris Wilson, igt-dev
On Wed, Aug 29, 2018 at 02:22:45PM +0100, Chris Wilson wrote:
> Quoting Katarzyna Dec (2018-08-29 14:13:49)
> > Let's add returning errno on failure instead of -1.
>
> But not as a positive value and not from that function. vprintf is not
> documented as setting errno.
> -Chris
You're right about positive value, my bet. And after more digging into code
it looks like the only function that could return errno is open(), vprintf/vfprinf
return only negative value. I think it could be better to leave it as it is now.
Kasia
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_sysfs: Return errno from igt_sysfs_printf
2018-08-29 13:13 [igt-dev] [PATCH i-g-t] lib/igt_sysfs: Return errno from igt_sysfs_printf Katarzyna Dec
2018-08-29 13:22 ` Chris Wilson
2018-08-30 8:08 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
@ 2018-08-30 8:23 ` Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-08-30 8:23 UTC (permalink / raw)
To: Katarzyna Dec; +Cc: igt-dev
== Series Details ==
Series: lib/igt_sysfs: Return errno from igt_sysfs_printf
URL : https://patchwork.freedesktop.org/series/48874/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4715 -> IGTPW_1754 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48874/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1754:
=== IGT changes ===
==== Possible regressions ====
{igt@pm_rpm@module-reload}:
fi-kbl-7567u: PASS -> FAIL
== Known issues ==
Here are the changes found in IGTPW_1754 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_hangcheck:
fi-skl-guc: PASS -> DMESG-FAIL (fdo#107710, fdo#107174)
fi-kbl-7567u: PASS -> DMESG-FAIL (fdo#106947, fdo#106560)
igt@kms_chamelium@dp-edid-read:
fi-kbl-7500u: PASS -> FAIL (fdo#103841)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-snb-2520m: NOTRUN -> INCOMPLETE (fdo#103713)
==== Possible fixes ====
igt@debugfs_test@read_all_entries:
fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS
{igt@pm_rpm@module-reload}:
fi-cnl-psr: WARN (fdo#107708, fdo#107602) -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
fdo#107174 https://bugs.freedesktop.org/show_bug.cgi?id=107174
fdo#107602 https://bugs.freedesktop.org/show_bug.cgi?id=107602
fdo#107708 https://bugs.freedesktop.org/show_bug.cgi?id=107708
fdo#107710 https://bugs.freedesktop.org/show_bug.cgi?id=107710
== Participating hosts (53 -> 48) ==
Additional (1): fi-bxt-dsi
Missing (6): fi-hsw-4770r fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600
== Build changes ==
* IGT: IGT_4610 -> IGTPW_1754
CI_DRM_4715: 1b73a69651beab39192502181c83e77a1022014a @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1754: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1754/
IGT_4610: c40743d3fce5055682d31610519758dd7379c0f8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1754/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-08-30 8:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-29 13:13 [igt-dev] [PATCH i-g-t] lib/igt_sysfs: Return errno from igt_sysfs_printf Katarzyna Dec
2018-08-29 13:22 ` Chris Wilson
2018-08-30 8:12 ` Katarzyna Dec
2018-08-30 8:08 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
2018-08-30 8:23 ` [igt-dev] ✓ Fi.CI.BAT: " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).