]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: set ACLs for the build dir when built with coverage
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 14 Feb 2022 10:58:54 +0000 (11:58 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 14 Feb 2022 10:58:54 +0000 (11:58 +0100)
Otherwise unprivileged processes (like systemd-resolved) can't write
coverage data.

test/test-functions

index a7b0be0c2b8e041fef10f3d983899a47fb3bc7c1..84f1e4f5d58ad12496fb6afefc6cf714651cda80 100644 (file)
@@ -1070,6 +1070,9 @@ install_compiled_systemd() {
     if get_bool "$IS_BUILT_WITH_COVERAGE"; then
         mkdir -p "${initdir}/${BUILD_DIR:?}/"
         rsync -am --include='*/' --include='*.gcno' --exclude='*' "${BUILD_DIR:?}/" "${initdir}/${BUILD_DIR:?}/"
+        # Set effective & default ACLs for the build dir so unprivileged
+        # processes can write gcda files with coverage stats
+        setfacl -R -m 'd:o:rwX' -m 'o:rwX' "${initdir}/${BUILD_DIR:?}/"
     fi
 }