From 7776b22521d12d899e47cabc01fa36df03e849e6 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Fri, 30 Apr 2021 21:02:41 +0200 Subject: [PATCH 1/2] test: don't mask "supporting" services in TEST-01-BASIC This got lost during one of the code de-duplication attempts. --- test/test-functions | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/test/test-functions b/test/test-functions index 8bae7a9911e..c6ea580eaae 100644 --- a/test/test-functions +++ b/test/test-functions @@ -1551,11 +1551,11 @@ setup_basic_dirs() { mask_supporting_services() { # mask some services that we do not want to run in these tests - ln -fs /dev/null "${initdir:?}/etc/systemd/system/systemd-hwdb-update.service" - ln -fs /dev/null "$initdir/etc/systemd/system/systemd-journal-catalog-update.service" - ln -fs /dev/null "$initdir/etc/systemd/system/systemd-networkd.service" - ln -fs /dev/null "$initdir/etc/systemd/system/systemd-networkd.socket" - ln -fs /dev/null "$initdir/etc/systemd/system/systemd-resolved.service" + ln -fsv /dev/null "${initdir:?}/etc/systemd/system/systemd-hwdb-update.service" + ln -fsv /dev/null "$initdir/etc/systemd/system/systemd-journal-catalog-update.service" + ln -fsv /dev/null "$initdir/etc/systemd/system/systemd-networkd.service" + ln -fsv /dev/null "$initdir/etc/systemd/system/systemd-networkd.socket" + ln -fsv /dev/null "$initdir/etc/systemd/system/systemd-resolved.service" } inst_libs() { @@ -2335,7 +2335,13 @@ test_create_image() { ( LOG_LEVEL=5 setup_basic_environment - mask_supporting_services + + # We want to test all services in TEST-01-BASIC, but mask them in + # all other tests + if [[ "$TESTID" != "01" ]]; then + dinfo "Masking supporting services" + mask_supporting_services + fi ) } From 0868f6d4e641d17a7f5dfc9b3e17f38d59e2bcb2 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Fri, 30 Apr 2021 21:04:15 +0200 Subject: [PATCH 2/2] test: explicitly pull resolved/networkd in TEST-01-BASIC to give them at least a basic coverage. --- test/units/testsuite-01.service | 1 + 1 file changed, 1 insertion(+) diff --git a/test/units/testsuite-01.service b/test/units/testsuite-01.service index 85b9cf5a969..cdd6b343622 100644 --- a/test/units/testsuite-01.service +++ b/test/units/testsuite-01.service @@ -1,6 +1,7 @@ [Unit] Description=TEST-01-BASIC After=multi-user.target +Wants=systemd-resolved.service systemd-networkd.service [Service] ExecStartPre=rm -f /failed /testok