From 51b582d0ea42e618954ab78332e6866317bb2c29 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Wed, 12 Apr 2023 14:58:20 -0600 Subject: [PATCH] system tests: address COPY-hardlink flake Possible cause: on Debian, maybe because of fuse-overlayfs(??), we sometimes see unexpected inode numbers. This PR tightens the test logic, so it runs one 'stat' command in only one podman invocation, then cross-checks multiple lines of output. I don't know if this will really fix the flake, but even if it doesn't, it will at least give us much more useful diagnostic output than before. And, as long as I'm in here, clean up test, remove duplication, make error messages distinct (hence more useful), and comment. Fixes: #17979 Signed-off-by: Ed Santiago --- test/system/070-build.bats | 46 ++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/test/system/070-build.bats b/test/system/070-build.bats index fa318a3e6d..728b5ba7bd 100644 --- a/test/system/070-build.bats +++ b/test/system/070-build.bats @@ -941,29 +941,41 @@ EOF } @test "podman build COPY hardlinks " { - tmpdir=$PODMAN_TMPDIR/build-test - subdir=$tmpdir/subdir - subsubdir=$subdir/subsubdir - mkdir -p $subsubdir + local build_dir=$PODMAN_TMPDIR/build-test - dockerfile=$tmpdir/Dockerfile + mkdir -p $build_dir + dockerfile=$build_dir/Dockerfile cat >$dockerfile <