[Intel-gfx] [PATCH i-g-t 1/3] lib/tests: add a test for igt_set_timeout

Thomas Wood thomas.wood at intel.com
Thu Nov 13 12:59:03 CET 2014


Signed-off-by: Thomas Wood <thomas.wood at intel.com>
---
 lib/tests/.gitignore       | 1 +
 lib/tests/Makefile.sources | 2 ++
 lib/tests/igt_timeout.c    | 8 ++++++++
 3 files changed, 11 insertions(+)
 create mode 100644 lib/tests/igt_timeout.c

diff --git a/lib/tests/.gitignore b/lib/tests/.gitignore
index caf5348..9fd8580 100644
--- a/lib/tests/.gitignore
+++ b/lib/tests/.gitignore
@@ -5,3 +5,4 @@ igt_no_exit
 igt_no_exit_list_only
 igt_no_subtest
 igt_simulation
+igt_timeout
diff --git a/lib/tests/Makefile.sources b/lib/tests/Makefile.sources
index d64c89c..4208a26 100644
--- a/lib/tests/Makefile.sources
+++ b/lib/tests/Makefile.sources
@@ -5,6 +5,7 @@ check_PROGRAMS = \
 	igt_list_only \
 	igt_no_subtest \
 	igt_simulation \
+	igt_timeout \
 	$(NULL)
 
 check_SCRIPTS = \
@@ -22,4 +23,5 @@ XFAIL_TESTS = \
 	igt_no_exit \
 	igt_no_exit_list_only \
 	igt_no_subtest \
+	igt_timeout \
 	$(NULL)
diff --git a/lib/tests/igt_timeout.c b/lib/tests/igt_timeout.c
new file mode 100644
index 0000000..8affa61
--- /dev/null
+++ b/lib/tests/igt_timeout.c
@@ -0,0 +1,8 @@
+#include "igt_core.h"
+#include <unistd.h>
+
+igt_simple_main
+{
+	igt_set_timeout(1);
+	sleep(5);
+}
-- 
2.1.0




More information about the Intel-gfx mailing list