Skip to contentSkip to conversation

igt/syncobj_wait: Don't close the timeline early in wait_snapshot

PATCH In review Jason Ekstrand 3 participants 5 messages Oct 10, 2017 – Oct 11, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igt/syncobj_wait: Don't close the timeline early in wait_snapshot

Closing the sw_sync timeline now signals any remaining fences upon it; but test_wait_snapshot requires the fence to continue to be busy so that the __syncobj_wait() will return with -ETIME.

---
 tests/syncobj_wait.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tests/syncobj_wait.c +3 -3
index 385d8cd..1842f9c 100644
@@ -525,7 +525,7 @@ test_wait_snapshot(int fd, uint32_t test_flags)
 {
 	struct wait_thread_data wait = { 0 };
 	uint32_t syncobjs[2];
-	int timelines[2] = { -1, -1 };
+	int timelines[3] = { -1, -1, -1 };
 	pthread_t thread;
 
 	syncobjs[0] = syncobj_create(fd, 0);
@@ -570,8 +570,7 @@ test_wait_snapshot(int fd, uint32_t test_flags)
 	 * the kernel picks up on the new fence (it shouldn't), we'll get a
 	 * timeout.
 	 */
-	close(timelines[0]);
-	timelines[0] = syncobj_attach_sw_sync(fd, syncobjs[0]);
+	timelines[2] = syncobj_attach_sw_sync(fd, syncobjs[0]);
 
 	sleep_nsec(SHORT_TIME_NSEC / 5);
 
@@ -589,6 +588,7 @@ test_wait_snapshot(int fd, uint32_t test_flags)
 
 	close(timelines[0]);
 	close(timelines[1]);
+	close(timelines[2]);
 	syncobj_destroy(fd, syncobjs[0]);
 	syncobj_destroy(fd, syncobjs[1]);
 }
Signature · 6 lines
2.5.0.400.gff86faf

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

Quoting Jason Ekstrand (2017-10-10 21:02:20)

Quoted 3 lines

Closing the sw_sync timeline now signals any remaining fences upon it; but test_wait_snapshot requires the fence to continue to be busy so that the __syncobj_wait() will return with -ETIME.

Snap!

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

#2 lore raw
In reply to Jason Ekstrand

Quoting Jason Ekstrand (2017-10-10 21:02:20)

Quoted 3 lines

Closing the sw_sync timeline now signals any remaining fences upon it; but test_wait_snapshot requires the fence to continue to be busy so that the __syncobj_wait() will return with -ETIME.

Fwiw, you are not going mad as it did used to work. The change was kernel commit ea4d5a270b57 ("dma-buf/sw_sync: force signal all unsignaled fences on dying timeline")
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

✓ Fi.CI.BAT: success for igt/syncobj_wait: Don't close the timeline early in wait_snapshot

In reply to Jason Ekstrand
== Series Details ==

== Series Details ==

Series: igt/syncobj_wait: Don't close the timeline early in wait_snapshot
URL : https://patchwork.freedesktop.org/series/31679/
State : success

== Summary ==

IGT patchset tested on top of latest successful build d7c88290ab6a8393dc341b30c7fb5e27d2952901 syncobj: Add a test for SYNCOBJ_CREATE_SIGNALED

with latest DRM-Tip kernel build CI_DRM_3208
c880c004bb05 drm-tip: 2017y-10m-10d-20h-31m-39s UTC integration manifest

No testlist changes.

Test chamelium:

        Subgroup dp-crc-fast:
                pass       -> DMESG-FAIL (fi-kbl-7500u) fdo#102514

fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:454s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:468s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:395s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:578s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:289s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:525s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:525s
fi-byt-j1900     total:289  pass:253  dwarn:1   dfail:0   fail:0   skip:35  time:543s
fi-byt-n2820     total:289  pass:249  dwarn:1   dfail:0   fail:0   skip:39  time:534s
fi-cfl-s         total:289  pass:253  dwarn:4   dfail:0   fail:0   skip:32  time:571s
fi-cnl-y         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:642s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:435s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:602s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:439s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:421s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:465s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:499s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:474s
fi-kbl-7500u     total:289  pass:263  dwarn:1   dfail:1   fail:0   skip:24  time:502s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:588s
fi-kbl-7567u     total:289  pass:265  dwarn:4   dfail:0   fail:0   skip:20  time:489s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:594s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:480s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:656s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:514s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:477s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:586s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:440s

== Logs ==

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

#4 lore raw

✓ Fi.CI.IGT: success for igt/syncobj_wait: Don't close the timeline early in wait_snapshot

In reply to Jason Ekstrand
== Series Details ==

== Series Details ==

Series: igt/syncobj_wait: Don't close the timeline early in wait_snapshot
URL : https://patchwork.freedesktop.org/series/31679/
State : success

== Summary ==

Test syncobj_wait:

        Subgroup wait-any-snapshot:
                fail       -> PASS       (shard-hsw) fdo#103188 +1
Test gem_eio:
        Subgroup wait:
                pass       -> DMESG-WARN (shard-hsw) fdo#102886 +2
Test kms_setmode:
        Subgroup basic:
                fail       -> PASS       (shard-hsw) fdo#99912
Test perf:
        Subgroup blocking:
                pass       -> FAIL       (shard-hsw) fdo#102252

fdo#103188 https://bugs.freedesktop.org/show_bug.cgi?id=103188
fdo#102886 https://bugs.freedesktop.org/show_bug.cgi?id=102886
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252

shard-hsw total:2552 pass:1432 dwarn:6 dfail:0 fail:11 skip:1103 time:9649s

== Logs ==

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