From 94ee5c6c23168ebcaa96e992414af4049844e933 Mon Sep 17 00:00:00 2001 From: Michal Domonkos Date: Thu, 17 Aug 2023 15:40:06 +0200 Subject: [PATCH] Prevent build dir from becoming annoyingly sticky With OverlayFS and unshare(1) being used in the test-suite, some of the directories in the test tree, sandbox and rpmtests.dir/ end up missing read/write or execute (for directories) permissions which means removing them requires excessive force in the form of "unshare -r rm -rf". CMake is clever enough to adjust the permissions behind the scenes on "make clean" but manual removal should just work too, so fix that with chmod(1) in the clean_up() trap. --- tests/mktree.fedora | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/mktree.fedora b/tests/mktree.fedora index fe1e0b711..f8d2e3e22 100755 --- a/tests/mktree.fedora +++ b/tests/mktree.fedora @@ -79,6 +79,7 @@ mount_tree() clean_up() { [ -n "$RPMTEST" ] && snapshot umount + chmod -Rf u+rwX $BASE_DIR $SANDBOX_DIR rpmtests.dir } # Run CMD in a user namespace (if not root already)