[PATCH i-g-t 4/4] syncobj: Add a test for SYNCOBJ_CREATE_SIGNALED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 tests/syncobj_basic.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tests/syncobj_basic.c b/tests/syncobj_basic.c
index 0a304f1..acc4a64 100644
--- a/tests/syncobj_basic.c
+++ b/tests/syncobj_basic.c
@@ -146,6 +146,16 @@ test_bad_create_flags(int fd)
 	igt_assert(ret == -1 && errno == EINVAL);
 }
 
+static void
+test_create_signaled(int fd)
+{
+	uint32_t syncobj = syncobj_create(fd, LOCAL_SYNCOBJ_CREATE_SIGNALED);
+
+	igt_assert_eq(syncobj_wait_err(fd, &syncobj, 1, 0, 0), 0);
+
+	syncobj_destroy(fd, syncobj);
+}
+
 /*
  * currently don't do handle deduplication
  * test we get a different handle back.
@@ -215,6 +225,9 @@ igt_main
 	igt_subtest("bad-destroy-pad")
 		test_bad_destroy_pad(fd);
 
+	igt_subtest("create-signaled")
+		test_create_signaled(fd);
+
 	igt_subtest("test-valid-cycle")
 		test_valid_cycle(fd);
 
-- 
2.5.0.400.gff86faf

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux