Skip to content

Commit

Permalink
Merge pull request #24127 from edsantiago/wait-for-sock
Browse files Browse the repository at this point in the history
System tests: sdnotify: wait for socket file creation
  • Loading branch information
openshift-merge-bot[bot] authored Oct 2, 2024
2 parents 857a47d + 4105378 commit 8d7bdc9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/system/260-sdnotify.bats
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ function _start_socat() {
(exec socat unix-recvfrom:"$NOTIFY_SOCKET",fork \
system:"(cat;echo) >> $_SOCAT_LOG" 3>&-) &
_SOCAT_PID=$!

# Wait for socat to create the socket file. This _should_ be
# instantaneous, but can take a few seconds under high load
for try in $(seq 1 10); do
if [[ -e "$NOTIFY_SOCKET" ]]; then
return
fi
sleep 0.5
done
die "Timed out waiting for socat to create $NOTIFY_SOCKET"
}

# Stop the socat background process and clean up logs
Expand Down

1 comment on commit 8d7bdc9

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

podman-next COPR build failed. @containers/packit-build please check.

Please sign in to comment.