diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-05-19 11:45:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-19 11:45:55 -0400 |
commit | 46832259a878a7e6438c7022be83a2170734eb48 (patch) | |
tree | ca6e4710bd3b6894c736b33f45199bd9519f012d /test/system | |
parent | 18efc5a3a78ba7352e42517ba251212833b4583d (diff) | |
parent | bc0e12a047cce2cc717320257545663073383f48 (diff) | |
download | podman-46832259a878a7e6438c7022be83a2170734eb48.tar.gz podman-46832259a878a7e6438c7022be83a2170734eb48.tar.bz2 podman-46832259a878a7e6438c7022be83a2170734eb48.zip |
Merge pull request #10327 from rhatdan/copy
Fix problem copying files when container is in host pid namespace
Diffstat (limited to 'test/system')
-rw-r--r-- | test/system/065-cp.bats | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/system/065-cp.bats b/test/system/065-cp.bats index 679cdc209..24ac8118e 100644 --- a/test/system/065-cp.bats +++ b/test/system/065-cp.bats @@ -130,6 +130,22 @@ load helpers } +@test "podman cp file from/to host while --pid=host" { + if is_rootless && ! is_cgroupsv2; then + skip "'podman cp --pid=host' (rootless) only works with cgroups v2" + fi + + srcdir=$PODMAN_TMPDIR/cp-pid-equals-host + mkdir -p $srcdir + touch $srcdir/hostfile + + run_podman run --pid=host -d --name cpcontainer $IMAGE sleep infinity + run_podman cp $srcdir/hostfile cpcontainer:/tmp/hostfile + run_podman cp cpcontainer:/tmp/hostfile $srcdir/hostfile1 + run_podman kill cpcontainer + run_podman rm -f cpcontainer +} + @test "podman cp file from container to host" { srcdir=$PODMAN_TMPDIR/cp-test-file-ctr-to-host mkdir -p $srcdir |