summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@redhat.com>2021-06-16 10:49:49 -0400
committerFrank Ch. Eigler <fche@redhat.com>2021-06-16 10:49:49 -0400
commit3b8f0874295355da9aba504345be1663fe28abcb (patch)
tree56d8b738e5b25c887fe3f5b7370fc973f744bfb9
parente644d84d6651b70ac9704560ba6b0f6aae26b71a (diff)
downloadelfutils-3b8f0874295355da9aba504345be1663fe28abcb.tar.gz
debuginfod tests: tolerate 000-perm files in cache-copy test
It appears possible for 000-permission files to sneak into the test debuginfod-cache, which cp (or find|cpio) refuse to copy. These files are OK not to copy, so ignore the error and proceed. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
-rwxr-xr-xtests/run-debuginfod-find.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/run-debuginfod-find.sh b/tests/run-debuginfod-find.sh
index 6e9c4875..c9ee11b1 100755
--- a/tests/run-debuginfod-find.sh
+++ b/tests/run-debuginfod-find.sh
@@ -260,7 +260,9 @@ fi
# A cache at the old default location ($HOME/.debuginfod_client_cache) should take
# priority over $HOME/.cache, $XDG_CACHE_HOME.
-cp -r $DEBUGINFOD_CACHE_PATH tmphome/.debuginfod_client_cache
+cp -vr $DEBUGINFOD_CACHE_PATH tmphome/.debuginfod_client_cache || true
+# ||true is for tolerating errors, such a valgrind or something else
+# leaving 000-perm files in there
# Add a file that doesn't exist in $HOME/.cache, $XDG_CACHE_HOME.
mkdir tmphome/.debuginfod_client_cache/deadbeef