Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZTS: Exit status 256+signum is actually baked in to ksh #10137

Merged
merged 1 commit into from
Mar 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions tests/test-runner/include/logapi.shlib
Original file line number Diff line number Diff line change
Expand Up @@ -165,26 +165,20 @@ function log_mustnot_expect
(( $? != 0 )) && log_fail
}

# Exit status encoding is platform-dependent
# Signal numbers are platform-dependent
case $(uname) in
Darwin|FreeBSD)
EXIT_SIGNAL=128
SIGBUS=10
SIGSEGV=11
;;
illumos)
EXIT_SIGNAL=256
SIGBUS=7
SIGSEGV=11
;;
Linux|*)
EXIT_SIGNAL=128
illumos|Linux|*)
SIGBUS=7
SIGSEGV=11
;;
esac
EXIT_SUCCESS=0
EXIT_NOTFOUND=127
EXIT_SIGNAL=256
EXIT_SIGBUS=$((EXIT_SIGNAL + SIGBUS))
EXIT_SIGSEGV=$((EXIT_SIGNAL + SIGSEGV))

Expand Down