-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: Use correct signal numbers for status checks #10121
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Different operating systems encode exit status in different ways. The logapi shell library assumes the Solaris meaning of exit codes, which is not correct on other platforms. Define the needed constants according to the platform we are running on and use those to decode process exit status. Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
ghost
added
Component: Test Suite
Indicates an issue with the test framework or a test case
Status: Code Review Needed
Ready for review and testing
labels
Mar 11, 2020
behlendorf
approved these changes
Mar 11, 2020
Codecov Report
@@ Coverage Diff @@
## master #10121 +/- ##
===========================================
+ Coverage 49.72% 76.04% +26.32%
===========================================
Files 324 385 +61
Lines 97160 122389 +25229
===========================================
+ Hits 48309 93070 +44761
+ Misses 48851 29319 -19532
Continue to review full report at Codecov.
|
behlendorf
added
Status: Accepted
Ready to integrate (reviewed, tested)
and removed
Status: Code Review Needed
Ready for review and testing
labels
Mar 12, 2020
ghost
deleted the
zts-logapi-status
branch
March 12, 2020 18:44
ghost
pushed a commit
to zfsonfreebsd/ZoF
that referenced
this pull request
Mar 16, 2020
While openzfs#10121 did fix the signal numbers for FreeBSD/Darwin, it incorrectly changed the expected encoding of exit status for commands that exited on a signal. The encoding 256+signum is a feature of the shell. Only the signal numbers themselves are platform-dependent. Always use the encoding 256+signum when checking exit status for signal exits. Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
ghost
mentioned this pull request
Mar 16, 2020
12 tasks
behlendorf
pushed a commit
that referenced
this pull request
Mar 17, 2020
While #10121 did fix the signal numbers for FreeBSD/Darwin, it incorrectly changed the expected encoding of exit status for commands that exited on a signal. The encoding 256+signum is a feature of the shell. Only the signal numbers themselves are platform-dependent. Always use the encoding 256+signum when checking exit status for signal exits. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10137
jsai20
pushed a commit
to jsai20/zfs
that referenced
this pull request
Mar 30, 2021
Different operating systems encode exit status in different ways. The logapi shell library assumes the Solaris meaning of exit codes, which is not correct on other platforms. Define the needed constants according to the platform we are running on and use those to decode process exit status. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes openzfs#10121
jsai20
pushed a commit
to jsai20/zfs
that referenced
this pull request
Mar 30, 2021
While openzfs#10121 did fix the signal numbers for FreeBSD/Darwin, it incorrectly changed the expected encoding of exit status for commands that exited on a signal. The encoding 256+signum is a feature of the shell. Only the signal numbers themselves are platform-dependent. Always use the encoding 256+signum when checking exit status for signal exits. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes openzfs#10137
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Component: Test Suite
Indicates an issue with the test framework or a test case
Status: Accepted
Ready to integrate (reviewed, tested)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Different operating systems encode exit status in different ways.
The logapi shell library assumes the Solaris meaning of exit codes,
which is not correct on other platforms.
Description
Define the needed constants according to the platform we are running
on and use those to decode process exit status.
How Has This Been Tested?
ZTS on FreeBSD
Types of changes
Checklist:
Signed-off-by
.