From: Zbigniew Jędrzejewski-Szmek Date: Tue, 15 Mar 2022 09:13:18 +0000 (+0100) Subject: test-systemctl-enable: extend the test for repeated WantedBy/RequiredBy X-Git-Tag: v251-rc1~3^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c003e8305188f25429938c7c4d09c0a5dfc961b;p=thirdparty%2Fsystemd.git test-systemctl-enable: extend the test for repeated WantedBy/RequiredBy I was considering deduplicating the list of target units in WantedBy/RequiredBy. But to do this meaningfully, we'd need to do alias expansion first, i.e. after the initial parsing is done. This seems to be more trouble than it would be worth. Instead, I added tests that we're doing the right thing and creating symlinks as expected. For duplicate links, we create the link, and on the second time we see that the link is already there, so the output is correct. --- diff --git a/test/test-systemctl-enable.sh b/test/test-systemctl-enable.sh index 0ed08a9da3b..0a0123b9d77 100644 --- a/test/test-systemctl-enable.sh +++ b/test/test-systemctl-enable.sh @@ -285,39 +285,53 @@ test ! -h "$root/etc/systemd/system/services.target.wants/templ1@one.service" test ! -h "$root/etc/systemd/system/services.target.wants/templ1@two.service" : -------template enablement w/ default instance-------------- -cat >>"$root/etc/systemd/system/templ1@.service" <"$root/etc/systemd/system/templ1@.service" <"$root/etc/systemd/system/templ2@.service" <