]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - test/TEST-28-PERCENTJ-WANTEDBY/test.sh
test: add function to reduce copied setup boilerplate
[thirdparty/systemd.git] / test / TEST-28-PERCENTJ-WANTEDBY / test.sh
index cc34efe074d6fcd505014af77ced7101f837cbd1..3427ba7a91de2306308d53311b8c626159ddad99 100755 (executable)
@@ -14,6 +14,7 @@ test_setup() {
         eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
 
         setup_basic_environment
+        mask_supporting_services
 
         # Set up the services.
         cat >$initdir/etc/systemd/system/specifier-j-wants.service << EOF
@@ -48,14 +49,8 @@ EOF
 
         setup_testsuite
     )
-    setup_nspawn_root
 
-        # mask some services that we do not want to run in these tests
-        ln -s /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
-        ln -s /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
-        ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.service
-        ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
-        ln -s /dev/null $initdir/etc/systemd/system/systemd-resolved.service
+    setup_nspawn_root
 }
 
 do_test "$@"