summaryrefslogtreecommitdiff
path: root/lib/igt_core.c
diff options
context:
space:
mode:
authorThomas Wood <thomas.wood@intel.com>2015-04-09 09:27:54 +0100
committerThomas Wood <thomas.wood@intel.com>2015-04-14 17:43:05 +0100
commitcff102ebb264eb86554651c7cbf259b4342b76c3 (patch)
tree0310b44d3e1aa5ea618602a36c49342f40d71df7 /lib/igt_core.c
parentb47032e191f0afb8d2dabf90889eee6dac8fc0e1 (diff)
lib: use test failure status for igt_set_timeout
Use a failure status code for timeout to avoid confusion between tests that take too long to execute versus a failure due to an operation taking longer than expected. v2: Add a "timed out" message before exiting. (Daniel Vetter) Fix the timeout library check by disabling hard errors in xfail tests, since these share the same exit status as test failure. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'lib/igt_core.c')
-rw-r--r--lib/igt_core.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c
index f9e92c9f..daef8c69 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1705,15 +1705,17 @@ out:
static void igt_alarm_handler(int signal)
{
- /* exit with timeout status */
- igt_fail(IGT_EXIT_TIMEOUT);
+ igt_info("Timed out\n");
+
+ /* exit with failure status */
+ igt_fail(IGT_EXIT_FAILURE);
}
/**
* igt_set_timeout:
* @seconds: number of seconds before timeout
*
- * Fail a test and exit with #IGT_EXIT_TIMEOUT status after the specified
+ * Fail a test and exit with #IGT_EXIT_FAILURE status after the specified
* number of seconds have elapsed. If the current test has subtests and the
* timeout occurs outside a subtest, subsequent subtests will be skipped and
* marked as failed.