From 0d8177aec0088c60f068c0182a983ce6015ab067 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 18 Apr 2024 20:18:04 +0100 Subject: [PATCH] tests: Fix a misleading comment 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: 84984e49 "test-run: Add a reproducer for CVE-2024-32462" Signed-off-by: Simon McVittie (cherry picked from commit 0982a4a93fd451d6411855413f972eaf9642dac5) (cherry picked from commit 26948d65a9dd68d61b180e9e17eca39eac883351) (cherry picked from commit 19cdba24288abe40e1e8d679734f85ca60739145) --- tests/test-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-run.sh b/tests/test-run.sh index 324c0fef..608826ea 100644 --- a/tests/test-run.sh +++ b/tests/test-run.sh @@ -75,7 +75,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=$?