diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-05-24 15:41:51 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2021-05-25 15:27:22 -0400 |
commit | 934f36df5e94dd976e73f4a5cd99f092ecba052a (patch) | |
tree | 91ce264a1dddfcdae4d7b2e4450ac05d46f434ac /test/system | |
parent | 5eecc2761b4439d8b8f41da38e7669415354d63f (diff) | |
download | podman-934f36df5e94dd976e73f4a5cd99f092ecba052a.tar.gz podman-934f36df5e94dd976e73f4a5cd99f092ecba052a.tar.bz2 podman-934f36df5e94dd976e73f4a5cd99f092ecba052a.zip |
Handle hard links in different directories
Fixes: https://github.com/containers/podman/issues/10444
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/system')
-rw-r--r-- | test/system/070-build.bats | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test/system/070-build.bats b/test/system/070-build.bats index 9e1559013..0f3f3fa7f 100644 --- a/test/system/070-build.bats +++ b/test/system/070-build.bats @@ -768,19 +768,27 @@ EOF @test "podman build COPY hardlinks " { tmpdir=$PODMAN_TMPDIR/build-test - mkdir -p $tmpdir + subdir=$tmpdir/subdir + subsubdir=$subdir/subsubdir + mkdir -p $subsubdir dockerfile=$tmpdir/Dockerfile cat >$dockerfile <<EOF FROM $IMAGE COPY . /test EOF - ln $dockerfile $tmpdir/hardlink + ln $dockerfile $tmpdir/hardlink1 + ln $dockerfile $subdir/hardlink2 + ln $dockerfile $subsubdir/hardlink3 run_podman build -t build_test $tmpdir run_podman run --rm build_test stat -c '%i' /test/Dockerfile dinode=$output - run_podman run --rm build_test stat -c '%i' /test/hardlink + run_podman run --rm build_test stat -c '%i' /test/hardlink1 + is "$output" "$dinode" "COPY hardlinks work" + run_podman run --rm build_test stat -c '%i' /test/subdir/hardlink2 + is "$output" "$dinode" "COPY hardlinks work" + run_podman run --rm build_test stat -c '%i' /test/subdir/subsubdir/hardlink3 is "$output" "$dinode" "COPY hardlinks work" run_podman rmi -f build_test |