Skip to contentSkip to conversation

lib/sysfs: Handle EINTR from vfprintf()

PATCH New Chris Wilson 2 participants 3 messages Dec 14, 2017 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/sysfs: Handle EINTR from vfprintf()

Some write operations into sysfs may be slow and potentially interrupted by a signal. So handle EINTR by repeating the vfprintf(). A partial is reported back to the caller, as is any other error.

---
 lib/igt_sysfs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
lib/igt_sysfs.c +3 -1
index e7c67dae3..030d1c6a5 100644
@@ -399,7 +399,9 @@ int igt_sysfs_vprintf(int dir, const char *attr, const char *fmt, va_list ap)
 
 	file = fdopen(fd, "w");
 	if (file) {
-		ret = vfprintf(file, fmt, ap);
+		do {
+			ret = vfprintf(file, fmt, ap);
+		} while (ret == -1 && errno == EINTR);
 		fclose(file);
 	}
 	close(fd);
Signature · 6 lines
2.15.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✓ Fi.CI.BAT: success for lib/sysfs: Handle EINTR from vfprintf()

== Series Details ==

== Series Details ==

Series: lib/sysfs: Handle EINTR from vfprintf()
URL : https://patchwork.freedesktop.org/series/35378/
State : success

== Summary ==

IGT patchset tested on top of latest successful build 103af7286e2d1014e3d7126691fe046ab2c9f73e lib: Ask the kernel to quiesce the GPU

with latest DRM-Tip kernel build CI_DRM_3521
ad43db157c69 drm-tip: 2017y-12m-14d-20h-09m-53s UTC integration manifest

No testlist changes.

Test debugfs_test:

        Subgroup read_all_entries:
                dmesg-fail -> PASS       (fi-elk-e7500) fdo#103989 +2
                incomplete -> PASS       (fi-snb-2520m) fdo#103713
Test gem_sync:
        Subgroup basic-all:
                dmesg-fail -> FAIL       (fi-blb-e6850) fdo#104259
        Subgroup basic-each:
                skip       -> PASS       (fi-blb-e6850)
        Subgroup basic-many-each:
                skip       -> PASS       (fi-blb-e6850)
        Subgroup basic-store-all:
                skip       -> PASS       (fi-blb-e6850)
        Subgroup basic-store-each:
                skip       -> PASS       (fi-blb-e6850)
Test gem_tiled_blits:
        Subgroup basic:
                skip       -> PASS       (fi-blb-e6850)
Test gem_tiled_fence_blits:
        Subgroup basic:
                skip       -> PASS       (fi-blb-e6850)
Test gem_wait:
        Subgroup basic-busy-all:
                skip       -> PASS       (fi-blb-e6850)
        Subgroup basic-wait-all:
                skip       -> PASS       (fi-blb-e6850)
        Subgroup basic-await-all:
                skip       -> PASS       (fi-blb-e6850)
Test kms_busy:
        Subgroup basic-flip-a:
                skip       -> PASS       (fi-blb-e6850)
        Subgroup basic-flip-b:
                skip       -> PASS       (fi-blb-e6850)
Test kms_cursor_legacy:
        Subgroup basic-busy-flip-before-cursor-legacy:
                skip       -> PASS       (fi-blb-e6850)
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-a:
                pass       -> DMESG-WARN (fi-kbl-r) fdo#104172 +1

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104259 https://bugs.freedesktop.org/show_bug.cgi?id=104259
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:437s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:443s
fi-blb-e6850     total:288  pass:222  dwarn:1   dfail:0   fail:1   skip:64  time:387s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:508s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:280s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:497s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:497s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:484s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:476s
fi-elk-e7500     total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 time:264s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:530s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:414s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:416s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:398s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:481s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:425s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:478s
fi-kbl-7560u     total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  time:520s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:470s
fi-kbl-r         total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  time:522s
fi-pnv-d510      total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  time:595s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:446s
fi-skl-6600u     total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  time:537s
fi-skl-6700hq    total:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  time:556s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:496s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:444s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:554s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:419s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:588s
fi-cnl-y         total:218  pass:197  dwarn:0   dfail:0   fail:0   skip:20 
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:485s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_673/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✗ Fi.CI.IGT: failure for lib/sysfs: Handle EINTR from vfprintf()

In reply to Chris Wilson
== Series Details ==

== Series Details ==

Series: lib/sysfs: Handle EINTR from vfprintf()
URL : https://patchwork.freedesktop.org/series/35378/
State : failure

== Summary ==

Test gem_exec_reloc:

        Subgroup basic-wc-active:
                pass       -> FAIL       (shard-hsw)
Test kms_plane:
        Subgroup plane-panning-bottom-right-pipe-b-planes:
                pass       -> INCOMPLETE (shard-hsw)
Test drv_module_reload:
        Subgroup basic-reload-inject:
                pass       -> DMESG-WARN (shard-snb) fdo#102707
Test kms_cursor_crc:
        Subgroup cursor-128x128-suspend:
                pass       -> INCOMPLETE (shard-hsw) fdo#103375 +1
Test gem_tiled_pread_basic:
                incomplete -> PASS       (shard-hsw) fdo#104218 +1

fdo#102707 https://bugs.freedesktop.org/show_bug.cgi?id=102707
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218

shard-hsw        total:2567 pass:1449 dwarn:1   dfail:0   fail:10  skip:1105 time:8981s
shard-snb        total:2712 pass:1307 dwarn:2   dfail:0   fail:12  skip:1391 time:8054s
Blacklisted hosts:
shard-apl        total:2690 pass:1658 dwarn:2   dfail:0   fail:27  skip:1002 time:13485s
shard-kbl        total:2712 pass:1799 dwarn:3   dfail:0   fail:31  skip:879 time:10978s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_673/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx