aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-06-15 11:05:00 +0200
committerMatthew Heon <mheon@redhat.com>2021-06-24 13:48:48 -0400
commit6ba9617be69fe5c525b62db0af55d72205f8e5a1 (patch)
tree7a380d425aaa4c24d467faed0a879a9529d304b6 /test
parenteb6d4b0cfe385a1d1f2b8cd2b90acb3ae2145ef7 (diff)
downloadpodman-6ba9617be69fe5c525b62db0af55d72205f8e5a1.tar.gz
podman-6ba9617be69fe5c525b62db0af55d72205f8e5a1.tar.bz2
podman-6ba9617be69fe5c525b62db0af55d72205f8e5a1.zip
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 <pholzing@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/system/450-interactive.bats11
1 files changed, 10 insertions, 1 deletions
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
}