summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-09 15:37:16 -0400
committerGitHub <noreply@github.com>2021-09-09 15:37:16 -0400
commit536951c1d23cd792e5e4ca8616f219d1cc08d39b (patch)
tree6f82662c4043f6b9690c97fa4ef8a1db48eb1cc5 /test/system
parent784e1ae137587ba7130eff315ebd6965e444da03 (diff)
parent7cf22279d9499bfb7b2688cd2a6cb71617feba6e (diff)
downloadpodman-536951c1d23cd792e5e4ca8616f219d1cc08d39b.tar.gz
podman-536951c1d23cd792e5e4ca8616f219d1cc08d39b.tar.bz2
podman-536951c1d23cd792e5e4ca8616f219d1cc08d39b.zip
Merge pull request #11503 from Luap99/remote-attach
Fix conmon attach socket buffer size
Diffstat (limited to 'test/system')
-rw-r--r--test/system/075-exec.bats28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/system/075-exec.bats b/test/system/075-exec.bats
index 3e8c3c1ea..b7367d153 100644
--- a/test/system/075-exec.bats
+++ b/test/system/075-exec.bats
@@ -101,4 +101,32 @@ load helpers
run_podman rm $cid
}
+# #11496: podman-remote loses output
+@test "podman exec/run - missing output" {
+ local bigfile=${PODMAN_TMPDIR}/bigfile
+ local newfile=${PODMAN_TMPDIR}/newfile
+ # create a big file, bigger than the 8K buffer size
+ base64 /dev/urandom | head -c 20K > $bigfile
+
+ run_podman run --rm -v $bigfile:/tmp/test:Z $IMAGE cat /tmp/test
+ printf "%s" "$output" > $newfile
+ # use cmp to compare the files, this is very helpful since it will
+ # tell us the first wrong byte in case this fails
+ run cmp $bigfile $newfile
+ is "$output" "" "run output is identical with the file"
+
+ run_podman run -d --stop-timeout 0 -v $bigfile:/tmp/test:Z $IMAGE sleep inf
+ cid="$output"
+
+ run_podman exec $cid cat /tmp/test
+ printf "%s" "$output" > $newfile
+ # use cmp to compare the files, this is very helpful since it will
+ # tell us the first wrong byte in case this fails
+ run cmp $bigfile $newfile
+ is "$output" "" "exec output is identical with the file"
+
+ # Clean up
+ run_podman rm -f $cid
+}
+
# vim: filetype=sh