Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

system tests: fix racey sdnotify test #17944

Merged
merged 1 commit into from
Mar 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions test/system/260-sdnotify.bats
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ spec:
restartPolicy: "Never"
containers:
- command:
- true
- /bin/sh
- -c
- 'while :; do if test -e /tearsinrain; then exit 0; fi; sleep 1; done'
image: $IMAGE
name: test
resources: {}
Expand All @@ -225,7 +227,8 @@ EOF
run_podman container inspect $service_container --format "{{.State.ConmonPid}}"
main_pid="$output"

# Will run until all containers have stopped.
# Tell pod to finish, then wait for all containers to stop
run_podman exec test_pod-test touch /tearsinrain
run_podman container wait $service_container test_pod-test

# Make sure the containers have the correct policy.
Expand Down