Merge pull request #20539 from edsantiago/stty_flake

systests: stty test: retry once on flake
This commit is contained in:
openshift-ci[bot] 2023-10-31 07:55:49 +00:00 committed by GitHub
commit 735e243319
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -56,7 +56,14 @@ function teardown() {
CR=$'\r'
# ...and make sure stty under podman reads that.
# This flakes often ("stty: standard input"), so, retry.
run_podman run -it --name mystty $IMAGE stty size <$PODMAN_TEST_PTY
if [[ "$output" =~ stty ]]; then
echo "# stty flaked, retrying: $output" >&3
run_podman rm -f mystty
sleep 1
run_podman run -it --name mystty $IMAGE stty size <$PODMAN_TEST_PTY
fi
is "$output" "$rows $cols$CR" "stty under podman run reads the correct dimensions"
run_podman rm -t 0 -f mystty