From 7a8b9a2ebee70997b0c1bd472da3cd74c18a9f9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Attila=20F=C3=BCl=C3=B6p?= <attila@fueloep.org>
Date: Sun, 7 Jul 2019 01:07:53 +0200
Subject: [PATCH] Fix ZTS killed processes detection.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

log_neg_expect was using the wrong exit status to detect if a process
got killed by SIGSEGV or SIGBUS, resulting in false positives.

Signed-off-by: Attila Fülöp <attila@fueloep.org>
---
 tests/test-runner/include/logapi.shlib | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/test-runner/include/logapi.shlib b/tests/test-runner/include/logapi.shlib
index 32fc00616180..cd7982a94a0b 100644
--- a/tests/test-runner/include/logapi.shlib
+++ b/tests/test-runner/include/logapi.shlib
@@ -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