]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: mask mdmonitor when building image
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 13 Dec 2023 05:28:00 +0000 (14:28 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 13 Dec 2023 05:28:03 +0000 (14:28 +0900)
Follow-up for 22e31655f3f9f54d932d4f48b92b36698e701729.

test/test-functions
test/units/testsuite-64.sh

index b2a83f155bf18f0f01274559793586f80b55a690..f613dc215da109505201379d41e5b037d63c8a74 100644 (file)
@@ -1289,6 +1289,10 @@ install_mdadm() {
     for unit in "${mdadm_units[@]}"; do
         image_install "${ROOTLIBDIR:?}/$unit"
     done
+
+    # Disable the mdmonitor service, since it fails if there's no valid email address
+    # configured in /etc/mdadm.conf, which just unnecessarily pollutes the logs
+    "${SYSTEMCTL:?}" mask --root "${initdir:?}" mdmonitor.service || :
 }
 
 install_compiled_systemd() {
index 0e598cc6b3ec3523673ef1e9d2d44327b7c7b358..81edb0ab7a154bf8c50f2a0b3a8f020407d70fb8 100755 (executable)
@@ -1159,10 +1159,6 @@ testcase_mdadm_lvm() {
     helper_check_device_units
 }
 
-# Disable the mdmonitor service, since it fails if there's no valid email address
-# configured in /etc/mdadm.conf, which just unnecessarily pollutes the logs
-systemctl list-unit-files mdmonitor.service >/dev/null && systemctl mask --runtime mdmonitor.service
-
 udevadm settle
 udevadm control --log-level debug
 lsblk -a