diff options
| author | Pádraig Brady <P@draigBrady.com> | 2022-08-27 17:50:20 +0100 |
|---|---|---|
| committer | Pádraig Brady <P@draigBrady.com> | 2022-08-27 17:50:20 +0100 |
| commit | ea3ee6df279bdde37389406b66ec242647fd07c4 (patch) | |
| tree | 011643fa783bc8fd22e09dbb18367a02d45a38c9 /tests | |
| parent | doc: README: split out ancillary information (diff) | |
| download | coreutils-ea3ee6df279bdde37389406b66ec242647fd07c4.tar.gz coreutils-ea3ee6df279bdde37389406b66ec242647fd07c4.zip | |
runcon: distinguish runcon specific errors in exit status
* src/runcon.c: Use EXIT_CANCELED (125) instead of EXIT_FAILURE (1),
so that errors specific to runcon can be distinguished,
from those of the invoked program.
* doc/coreutils.texi (runcon invocation): Fix the Exit status
description to say we return 125 (not 127) for internal errors.
* tests/misc/runcon-no-reorder.sh: Add a test case.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/misc/runcon-no-reorder.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/misc/runcon-no-reorder.sh b/tests/misc/runcon-no-reorder.sh index cc5ff1b3c..b72274c05 100755 --- a/tests/misc/runcon-no-reorder.sh +++ b/tests/misc/runcon-no-reorder.sh @@ -28,6 +28,8 @@ echo "$diag" > exp || framework_failure_ # Before the no-reorder change, it would have failed with a diagnostic # about -j being an invalid option. runcon $(id -Z) true -j 2> out && > exp +# Ensure we fail appropriately for invalid options +returns_ 125 runcon -j true || fail=1 # When run on a system with no /selinux/context (i.e., in a chroot), # it fails with this: "runcon: invalid context: \ |
