diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2022-02-16 15:55:09 +0100 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2022-02-17 15:45:21 +0100 |
commit | 93c3b6989b17825850c3b41687b0955b6c32c53b (patch) | |
tree | f4d518a669c1d746879fc8928f6706d64dfe479a | |
parent | Merge pull request #22540 from yuwata/network-call-ethtool-after-initialized (diff) | |
download | systemd-93c3b6989b17825850c3b41687b0955b6c32c53b.tar.xz systemd-93c3b6989b17825850c3b41687b0955b6c32c53b.zip |
test: set `ReadWritePaths=` only for units from TEST-20
as setting it system-wide has some undesirable side-effects.
Follow-up to b6fc524.
-rw-r--r-- | test/test-functions | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/test-functions b/test/test-functions index c8bf96d65a..e815ce1c58 100644 --- a/test/test-functions +++ b/test/test-functions @@ -1168,11 +1168,16 @@ install_systemd() { # When built with gcov, disable ProtectSystem= and ProtectHome= in the test # images, since it prevents gcov to write the coverage reports (*.gcda - # files). Similarly, set ReadWritePaths= to the $BUIL_DIR in the test image - # to make the coverage work with units utilizing DynamicUser=yes. + # files) if get_bool "$IS_BUILT_WITH_COVERAGE"; then mkdir -p "$initdir/etc/systemd/system/service.d/" - echo -e "[Service]\nProtectSystem=no\nProtectHome=no\nReadWritePaths=${BUILD_DIR:?}\n" >"$initdir/etc/systemd/system/service.d/gcov-override.conf" + echo -e "[Service]\nProtectSystem=no\nProtectHome=no\n" >"$initdir/etc/systemd/system/service.d/99-gcov-override.conf" + # Similarly, set ReadWritePaths= to the $BUILD_DIR in the test image + # to make the coverage work with units utilizing DynamicUser=yes. Do + # this only for services from TEST-20, as setting this system-wide + # has many undesirable side-effects + mkdir -p "$initdir/etc/systemd/system/test20-.service.d/" + echo -e "[Service]\nReadWritePaths=${BUILD_DIR:?}\n" >"$initdir/etc/systemd/system/test20-.service.d/99-gcov-rwpaths-override.conf" fi # If we're built with -Dportabled=false, tests with systemd-analyze |