From 666f555aa52b9f82da9d6ca64cf11e4f5e1e78e8 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 15 Jun 2021 11:05:00 +0200 Subject: Fix resize race with podman exec -it When starting a process with `podman exec -it` the terminal is resized after the process is started. To fix this allow exec start to accept the terminal height and width as parameter and let it resize right before the process is started. Fixes #10560 Signed-off-by: Paul Holzinger --- test/system/450-interactive.bats | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/system/450-interactive.bats b/test/system/450-interactive.bats index a2db39492..53925b3c8 100644 --- a/test/system/450-interactive.bats +++ b/test/system/450-interactive.bats @@ -57,7 +57,16 @@ function teardown() { # ...and make sure stty under podman reads that. run_podman run -it --name mystty $IMAGE stty size <$PODMAN_TEST_PTY - is "$output" "$rows $cols" "stty under podman reads the correct dimensions" + is "$output" "$rows $cols" "stty under podman run reads the correct dimensions" + + run_podman rm -f mystty + + # check that the same works for podman exec + run_podman run -d --name mystty $IMAGE top + run_podman exec -it mystty stty size <$PODMAN_TEST_PTY + is "$output" "$rows $cols" "stty under podman exec reads the correct dimensions" + + run_podman rm -f mystty } -- cgit v1.2.3-54-g00ecf