From: Zbigniew Jędrzejewski-Szmek Date: Sun, 14 Feb 2021 14:08:49 +0000 (+0100) Subject: TEST-15-DROPINS: add test for linked units X-Git-Tag: v248-rc1~117^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3b5ab021196038299418a56521d25ef3256c280f;p=thirdparty%2Fsystemd.git TEST-15-DROPINS: add test for linked units --- diff --git a/test/units/testsuite-15.sh b/test/units/testsuite-15.sh index b872a24c200..bf6a5c7a876 100755 --- a/test/units/testsuite-15.sh +++ b/test/units/testsuite-15.sh @@ -124,6 +124,32 @@ EOF clear_services test15-a test15-b test15-c } +test_linked_units () { + echo "Testing linked units..." + echo "*** test linked unit (same basename)" + + create_service test15-a + mv /etc/systemd/system/test15-a.service / + ln -s /test15-a.service /etc/systemd/system/ + ln -s test15-a.service /etc/systemd/system/test15-b.service + + check_ok test15-a Names test15-a.service + check_ok test15-a Names test15-b.service + + echo "*** test linked unit (cross basename)" + + mv /test15-a.service /test15-a@.scope + ln -fs /test15-a@.scope /etc/systemd/system/test15-a.service + systemctl daemon-reload + + check_ok test15-a Names test15-a.service + check_ok test15-a Names test15-b.service + check_ko test15-a Names test15-b@ + + rm /test15-a@.scope + clear_services test15-a test15-b +} + test_hierarchical_dropins () { echo "Testing hierarchical dropins..." echo "*** test service.d/ top level drop-in" @@ -465,6 +491,7 @@ test_invalid_dropins () { } test_basic_dropins +test_linked_units test_hierarchical_dropins test_template_dropins test_alias_dropins