mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-13 02:46:23 +00:00
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>
This commit is contained in:
parent
b47032e191
commit
cff102ebb2
@ -1705,15 +1705,17 @@ out:
|
|||||||
|
|
||||||
static void igt_alarm_handler(int signal)
|
static void igt_alarm_handler(int signal)
|
||||||
{
|
{
|
||||||
/* exit with timeout status */
|
igt_info("Timed out\n");
|
||||||
igt_fail(IGT_EXIT_TIMEOUT);
|
|
||||||
|
/* exit with failure status */
|
||||||
|
igt_fail(IGT_EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* igt_set_timeout:
|
* igt_set_timeout:
|
||||||
* @seconds: number of seconds before 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
|
* number of seconds have elapsed. If the current test has subtests and the
|
||||||
* timeout occurs outside a subtest, subsequent subtests will be skipped and
|
* timeout occurs outside a subtest, subsequent subtests will be skipped and
|
||||||
* marked as failed.
|
* marked as failed.
|
||||||
|
@ -21,6 +21,7 @@ TESTS = \
|
|||||||
|
|
||||||
# Test that exercise specific asserts in the test framework library and are
|
# Test that exercise specific asserts in the test framework library and are
|
||||||
# hence expected to fail.
|
# hence expected to fail.
|
||||||
|
DISABLE_HARD_ERRORS=1
|
||||||
XFAIL_TESTS = \
|
XFAIL_TESTS = \
|
||||||
igt_no_exit \
|
igt_no_exit \
|
||||||
igt_no_exit_list_only \
|
igt_no_exit_list_only \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user