Skip to content

Commit

Permalink
tests: Fix a misleading comment
Browse files Browse the repository at this point in the history
Arguably bwrap should exit with status 127 if it can't find the
executable, but right now it exits 1, so we accept any nonzero status.
The implementation was correct, but the comment was wrong.

Fixes: 84984e4 "test-run: Add a reproducer for CVE-2024-32462"
Signed-off-by: Simon McVittie <[email protected]>
  • Loading branch information
smcv authored and GeorgesStavracas committed Apr 18, 2024
1 parent 925c80f commit 0982a4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test-run.sh
Expand Up @@ -77,7 +77,7 @@ assert_file_has_content hello_out '^Hello world, from a sandbox$'
ok "hello"

# This should try and fail to run e.g. /usr/bin/--tmpfs, which will
# exit with status 127 because there is no such executable.
# exit with a nonzero status because there is no such executable.
# It should not pass "--tmpfs /blah hello.sh" as bwrap options.
exit_status=0
run --command=--tmpfs org.test.Hello /blah hello.sh >&2 || exit_status=$?
Expand Down

0 comments on commit 0982a4a

Please sign in to comment.