diff options
author | Ed Santiago <santiago@redhat.com> | 2020-05-28 13:43:59 -0600 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2020-06-01 12:00:47 -0600 |
commit | 03d32d05ac15c7b542d8761d8a7839865f362386 (patch) | |
tree | 0e2251c8cb31a0d91a9888bf8a1c20ec1181e171 /test/system/075-exec.bats | |
parent | 5f1c23dba9f6e02ed2551aabda371d007e9057e2 (diff) | |
download | podman-03d32d05ac15c7b542d8761d8a7839865f362386.tar.gz podman-03d32d05ac15c7b542d8761d8a7839865f362386.tar.bz2 podman-03d32d05ac15c7b542d8761d8a7839865f362386.zip |
system tests : more tests
- exec: add test for #5046, in which conmon swallowed chars
on a large byte transfer
- pod: add 'pod exists' tests, both positive and negative;
consolidate tests; add '--label', and check in 'pod inspect'
add 'pod ps' tests
- networking: add test for #5466, in which detached run
with --userns=keep-id would not forward a port
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/system/075-exec.bats')
-rw-r--r-- | test/system/075-exec.bats | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/system/075-exec.bats b/test/system/075-exec.bats index 36e9d57ec..f8c7f2766 100644 --- a/test/system/075-exec.bats +++ b/test/system/075-exec.bats @@ -50,6 +50,7 @@ load helpers } # Issue #4785 - piping to exec statement - fixed in #4818 +# Issue #5046 - piping to exec truncates results (actually a conmon issue) @test "podman exec - cat from stdin" { skip_if_remote @@ -60,6 +61,20 @@ load helpers run_podman exec -i $cid cat < <(echo $echo_string) is "$output" "$echo_string" "output read back from 'exec cat'" + # #5046 - large file content gets lost via exec + # Generate a large file with random content; get a hash of its content + local bigfile=${PODMAN_TMPDIR}/bigfile + dd if=/dev/urandom of=$bigfile bs=1024 count=1500 + expect=$(sha512sum $bigfile | awk '{print $1}') + # Transfer it to container, via exec, make sure correct #bytes are sent + run_podman exec -i $cid dd of=/tmp/bigfile bs=512 <$bigfile + is "${lines[0]}" "3000+0 records in" "dd: number of records in" + is "${lines[1]}" "3000+0 records out" "dd: number of records out" + # Verify sha. '% *' strips off the path, keeping only the SHA + run_podman exec $cid sha512sum /tmp/bigfile + is "${output% *}" "$expect" "SHA of file in container" + + # Clean up run_podman exec $cid touch /stop run_podman wait $cid run_podman rm $cid |