From e4c822e9acbee9dda3f1821056af81eb090f2265 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Mon, 14 Feb 2022 11:58:54 +0100 Subject: [PATCH] test: set ACLs for the build dir when built with coverage Otherwise unprivileged processes (like systemd-resolved) can't write coverage data. --- test/test-functions | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test-functions b/test/test-functions index a7b0be0c2b..84f1e4f5d5 100644 --- a/test/test-functions +++ b/test/test-functions @@ -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 }