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 a25f433..7fc0c1e 100644
--- a/framework/exectest.py
+++ b/framework/exectest.py
@@ -116,24 +116,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

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to