Skip to content

Commit

Permalink
tests: also accept exit code 159
Browse files Browse the repository at this point in the history
Which is the exit code on GitHub Actions
  • Loading branch information
stfsy committed Jan 4, 2025
1 parent 1163727 commit 75ea670
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions test-e2e/configuration/enforce-on-log-match-with-error.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ $main_path run \
--on-syscall-denied=kill \
bash -c $script_path/log-match.bash

# https://specificlanguages.com/posts/2022-07/14-exit-code-137/
# Exit code 137 is Linux-specific and means that your process was killed by a signal, namely SIGKILL.
# The main reason for a process getting killed by SIGKILL on Linux (unless you do it yourself) is running out of memory.1

if [[ $? -ne 137 ]]; then
if [[ $? -ne 4 && $? -ne 159 ]]; then
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion test-e2e/configuration/enforce-on-log-match-with-kill.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ bash -c $script_path/log-match.bash
# This is the list of exit codes for wget:
# 4 Network failure

if [[ $? -ne 4 ]]; then
if [[ $? -ne 4 ]] || [[ $? -eq 159 ]]; then
exit 1
fi

Expand Down

0 comments on commit 75ea670

Please sign in to comment.