Skip to content

Commit efea09b

Browse files
bjorn3squell
authored andcommitted
Fix spurious sigwinch_works_* failures with podman
Podman is significantly slower than docker at running the test suite, causing change-size.sh to sometimes try to change the tty size before print-sizes.sh has written /tmp/tty_path.
1 parent 51f5235 commit efea09b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Wait for `print-sizes.sh` to write to `/tmp/tty_path`
2-
sleep 0.5
1+
# Wait for `print-sizes.sh` to write to `/tmp/tty_path` and report the old tty size.
2+
until [ -f /tmp/barrier1 ]; do sleep 0.1; done
33
# Resize the terminal
44
stty -F$(cat /tmp/tty_path) rows 42 cols 69
5+
# Notify `print-sizes.sh` that the tty size has changed.
6+
touch /tmp/barrier2

test-framework/sudo-compliance-tests/src/sudo/child_process/signal_handling/print-sizes.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
tty > /tmp/tty_path
33
# Print the current terminal size
44
stty size
5-
# Print the terminal size, wait for `change-size.sh` to run and then print the terminal size again.
6-
sudo sh -c "stty size; sleep 1; stty size"
5+
# Print the terminal size, notify `change-size.sh` that it can change the tty size, wait for it to
6+
# finish and then print the terminal size again.
7+
sudo sh -c "stty size; touch /tmp/barrier1; until [ -f /tmp/barrier2 ]; do sleep 0.1; done; stty size"

0 commit comments

Comments
 (0)