diff options
author | Derek Morton <derek.j.morton@intel.com> | 2015-05-18 14:37:31 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-05-28 13:37:11 +0200 |
commit | f49723872bf02788872f02e37df3e48682b5ef9b (patch) | |
tree | 1de20a1291f3bc510e5c9fbbbbbc0830ea12ede4 | |
parent | 95019c2a3c4ed5943ad16e17c8dcf36fd6492adc (diff) |
lib/igt_core.c: Flag the test as failing after a segfault
fatal_signal_handler() was trapping fatal errors but not
flagging the test as failing or setting an exit code.
The result was that the test would return Ok or Skipped
depending on what the other subtests did even though one
of the subtests had segfaulted.
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | lib/igt_core.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c index 6dd7af39..2cf23934 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -1438,8 +1438,15 @@ static void fatal_sig_handler(int sig) igt_assert_eq(write(STDERR_FILENO, ".\n", 2), 2); } - if (in_subtest && crash_signal(sig)) + if (in_subtest && crash_signal(sig)) { + /* Linux standard to return exit code as 128 + signal */ + if (!failed_one) + igt_exitcode = 128 + sig; + + failed_one = true; + exit_subtest("CRASH"); + } break; } |