Skip to content

Commit

Permalink
test/system/260-sdnotify.bats: fix test flake
Browse files Browse the repository at this point in the history
The `exec` session somestimes exits with 137 as the exec session races
with the cleanup process of the exiting container.  Fix the flake by
running a detached exec session.

Fixes: containers#10825
Signed-off-by: Valentin Rothberg <[email protected]>
  • Loading branch information
vrothberg committed Apr 24, 2023
1 parent d05a980 commit b4eecd9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/system/260-sdnotify.bats
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,10 @@ ignore"
# potential issues.
run_podman exec --env NOTIFY_SOCKET="/run/notify/notify.sock" $container_a /usr/bin/systemd-notify --ready

# Instruct the container to stop
run_podman exec $container_a /bin/touch /stop
# Instruct the container to stop.
# Run detached as the `exec` session races with the cleanup process
# of the exiting container (see #10825).
run_podman exec -d $container_a /bin/touch /stop

run_podman container wait $container_a
run_podman container inspect $container_a --format "{{.State.ExitCode}}"
Expand Down

0 comments on commit b4eecd9

Please sign in to comment.