]> granicus.if.org Git - zfs/commitdiff
Fix ZTS killed processes detection
authorAttila Fülöp <attila@fueloep.org>
Wed, 10 Jul 2019 18:44:52 +0000 (20:44 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 10 Jul 2019 18:44:52 +0000 (11:44 -0700)
log_neg_expect was using the wrong exit status to detect if a process
got killed by SIGSEGV or SIGBUS, resulting in false positives.

Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Attila Fülöp <attila@fueloep.org>
Closes #9003

tests/test-runner/include/logapi.shlib

index 32fc00616180785d8c5d7c3d2745f9926069c7fa..cd7982a94a0b0696bb8ac45f95d822687376a46d 100644 (file)
@@ -198,12 +198,12 @@ function log_neg_expect
        elif (( $status == 127 )); then
                print -u2 $($out)
                _printerror "$@" "unexpectedly exited $status (File not found)"
-       # bus error - core dump
-       elif (( $status == 138 )); then
+       # bus error - core dump (256+signal, SIGBUS=7)
+       elif (( $status == 263 )); then
                print -u2 $($out)
                _printerror "$@" "unexpectedly exited $status (Bus Error)"
-       # segmentation violation - core dump
-       elif (( $status == 139 )); then
+       # segmentation violation - core dump (256+signal, SIGSEGV=11)
+       elif (( $status == 267 )); then
                print -u2 $($out)
                _printerror "$@" "unexpectedly exited $status (SEGV)"
        else