diff mbox

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

Message ID 1415879945-3975-1-git-send-email-thomas.wood@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thomas Wood Nov. 13, 2014, 11:59 a.m. UTC
Signed-off-by: Thomas Wood <thomas.wood@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 mbox

Patch

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);
+}