test/system: fix "quadlet kube - start error" flake

The test flakes on the socat pid kill when the pid already exited.
Because the timeout is just 10s we can just bump it to something loinger
to ensure the process is still alive when we kill it. Also move it up a
bit so the kill happens earlier.

I observed multiple time failing with test times of 11s+. This should be
enough to make it work properly.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger 2026-06-01 21:02:30 +02:00
parent 48594b61c8
commit c1ffafe5b7
No known key found for this signature in database
GPG key ID: EB145DD938A3CAF2

View file

@ -1322,7 +1322,7 @@ spec:
EOF
# Bind the port to force a an error when starting the pod
timeout --foreground -v --kill=10 10 socat TCP-LISTEN:$port,bind=127.0.0.1,fork - &
timeout --foreground -v --kill=10 20 socat TCP-LISTEN:$port,bind=127.0.0.1,fork - &
socat_pid=$!
# Create the Quadlet file
@ -1341,14 +1341,14 @@ EOF
echo $output
assert $status -eq 1 "systemctl start should report failure"
kill "$socat_pid"
run -0 systemctl show --property=ActiveState $QUADLET_SERVICE_NAME
assert "$output" == "ActiveState=failed" "unit must be in failed state"
echo "$_LOG_PROMPT journalctl -u $QUADLET_SERVICE_NAME"
run -0 journalctl -eu $QUADLET_SERVICE_NAME
assert "$output" =~ "$port.*ddress already in use" "journal contains the real podman start error"
kill "$socat_pid"
}
# https://github.com/containers/podman/issues/25786