summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArkadiusz Hiler <arkadiusz.hiler@intel.com>2020-02-25 18:55:10 +0200
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2020-03-23 15:47:34 +0200
commitcf80b710838c2bdb48c629ab85cd295ed74423c6 (patch)
tree9bd4ba75898fdbb743d79de90e1df53a68e0526f /tests
parentdc8911099bbf2894da2f04a6dcfe0499320666d9 (diff)
lib: Make it possible to abort the whole execution from inside of a test
igt_abort_on_f() is introduced which does very little cleanup and causes a hard exit() of the test binary with a unique exit code (IGT_EXIT_ABORT). The exit code informs the monitoring process that there is a critical issue with the testing environment which may have an impact on the results if testing continues. v2: Add a meta_test Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/meta_test.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/meta_test.c b/tests/meta_test.c
index a67b4c5e..c37610c7 100644
--- a/tests/meta_test.c
+++ b/tests/meta_test.c
@@ -149,6 +149,9 @@ igt_main
igt_subtest("piglit-timeout")
test_piglit_timeout();
+ igt_subtest("abort")
+ igt_abort_on_f(true, "ojoj\n");
+
igt_subtest("generate-panic")
test_panic();
}