Skip to content

Commit

Permalink
flake fix in 700: allow 137 status code from timeout command
Browse files Browse the repository at this point in the history
Signed-off-by: Ed Santiago <[email protected]>
  • Loading branch information
edsantiago committed Sep 19, 2024
1 parent 0261686 commit 0cd7a7d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions test/system/700-play.bats
Original file line number Diff line number Diff line change
Expand Up @@ -662,13 +662,20 @@ spec:
- top
" > $fname

# force a timeout to happen so that the kube play command is killed
# and expect the timeout code 124 to happen so that we can clean up
# force a timeout to happen so that the kube play command is killed.
# We *expect* a timeout exit status (124), but as of September 2024,
# when run in parallel, we often see 137.
local t0=$SECONDS
PODMAN_TIMEOUT=2 run_podman 124 kube play --wait $fname
PODMAN_TIMEOUT=2 run_podman '?' kube play --wait $fname
local t1=$SECONDS
local delta_t=$((t1 - t0))

if [[ $status -eq 137 ]]; then
echo "# FIXME-someday: timeout command exited $status" >&3
else
assert "$status" -eq 124 "Exit status from podman"
fi

# Expectation (in seconds) of when we should time out. When running
# parallel, allow 4 more seconds due to system load
local expect=4
Expand Down
2 changes: 1 addition & 1 deletion test/system/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ function run_podman() {
if [ "$status" -eq 124 ]; then
if expr "$output" : ".*timeout: sending" >/dev/null; then
# It's possible for a subtest to _want_ a timeout
if [[ "$expected_rc" != "124" ]]; then
if [[ -n "$expected_rc" ]] && [[ "$expected_rc" != "124" ]]; then
echo "*** TIMED OUT ***"
false
fi
Expand Down

0 comments on commit 0cd7a7d

Please sign in to comment.