[Piglit] [PATCH 16/20] framework: Treat all termination by signal as crashes.
Jon Severinsson
jon at severinsson.net
Wed Apr 17 09:14:55 PDT 2013
This commit removes the crash_codes list, instead treating all termination
by signal as crashes. Notably this means glean test manually terminated
using kill(1) will now be reported as "crash" rather than "pass".
---
framework/exectest.py | 23 ++++++-----------------
1 fil ändrad, 6 tillägg(+), 17 borttagningar(-)
diff --git a/framework/exectest.py b/framework/exectest.py
index 1236fea..c30726c 100644
--- a/framework/exectest.py
+++ b/framework/exectest.py
@@ -115,24 +115,13 @@ class ExecTest(Test):
results['result'] = 'fail'
out = self.interpretResult(out, returncode, results)
- crash_codes = [
- # Unix: terminated by a signal
- -5, # SIGTRAP
- -6, # SIGABRT
- -8, # SIGFPE (Floating point exception)
- -10, # SIGUSR1
- -11, # SIGSEGV (Segmentation fault)
- # Windows:
- # EXCEPTION_ACCESS_VIOLATION (0xc0000005):
- -1073741819,
- # EXCEPTION_INT_DIVIDE_BY_ZERO (0xc0000094):
- -1073741676
- ]
-
- if returncode in crash_codes:
- results['result'] = 'crash'
- elif returncode != 0:
+ if returncode is None:
+ pass
+ elif returncode > 0:
results['note'] = 'Returncode was {0}'.format(returncode)
+ elif returncode < 0:
+ results['note'] = 'Terminated by signal {0}'.format(-returncode)
+ results['result'] = 'crash'
if valgrind:
# If the underlying test failed, simply report
--
1.7.10.4
More information about the Piglit
mailing list