debuginfod tests: tolerate 000-perm files in cache-copy test
authorFrank Ch. Eigler <fche@redhat.com>
Wed, 16 Jun 2021 14:49:49 +0000 (10:49 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Wed, 16 Jun 2021 14:49:49 +0000 (10:49 -0400)
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>
tests/run-debuginfod-find.sh

index 6e9c487..c9ee11b 100755 (executable)
@@ -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