diff options
author | Pádraig Brady <P@draigBrady.com> | 2022-08-27 22:15:44 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2022-08-27 22:15:44 +0100 |
commit | b3bb2b707c0364dde7be23603544ea6db01ea487 (patch) | |
tree | 2f4c9e9c38be9fa41d0ed95c107a64df37880998 /tests | |
parent | af231b6c4fc81a4f7fe9227670430dc019ea1170 (diff) | |
download | coreutils-b3bb2b707c0364dde7be23603544ea6db01ea487.tar.gz |
tests: runcon: fix new test to skip on non SELinux systems
* tests/misc/runcon-compute.sh: Use our new internal error
125 status to detect SELinux errors, and skip in this case.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/misc/runcon-compute.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/misc/runcon-compute.sh b/tests/misc/runcon-compute.sh index 1c4e0c060..4db24ac4b 100755 --- a/tests/misc/runcon-compute.sh +++ b/tests/misc/runcon-compute.sh @@ -23,6 +23,8 @@ print_ver_ runcon printf '%s\n' '#!/bin/sh' 'exit 1' >> 'true' || framework_failure_ chmod a+x 'true' || framework_failure_ -returns_ 1 runcon -c true || fail=1 +runcon -c true; ret=$? +test "$ret" = 125 && skip_ 'runcon setup failed' +test "$ret" = 1 || fail=1 Exit $fail |