]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - test/test-functions
Merge pull request #23021 from fbuihuu/tmpfiles-fix-precedence-with-plus-sign
[thirdparty/systemd.git] / test / test-functions
index e1d6ed646f1de5be2daedaf3db1659dc866a6ade..7155e99c0e779bbd3c813f211046b11691e9211c 100644 (file)
@@ -1055,6 +1055,29 @@ install_iscsi() {
     fi
 }
 
+install_mdadm() {
+    local unit
+    local mdadm_units=(
+        system/mdadm-grow-continue@.service
+        system/mdadm-last-resort@.service
+        system/mdadm-last-resort@.timer
+        system/mdmon@.service
+        system/mdmonitor-oneshot.service
+        system/mdmonitor-oneshot.timer
+        system/mdmonitor.service
+        system-shutdown/mdadm.shutdown
+    )
+
+    image_install mdadm mdmon
+    inst_rules 01-md-raid-creating.rules 63-md-raid-arrays.rules 64-md-raid-assembly.rules 69-md-clustered-confirm-device.rules
+    # Fedora/CentOS/RHEL ships this rule file
+    [[ -f /lib/udev/rules.d/65-md-incremental.rules ]] && inst_rules 65-md-incremental.rules
+
+    for unit in "${mdadm_units[@]}"; do
+        image_install "${ROOTLIBDIR:?}/$unit"
+    done
+}
+
 install_compiled_systemd() {
     dinfo "Install compiled systemd"
 
@@ -1406,8 +1429,8 @@ check_coverage_reports() {
     # usually due to the sandbox being too restrictive (e.g. ProtectSystem=yes,
     # ProtectHome=yes) or the $BUILD_DIR being inaccessible to non-root users - see
     # `setfacl` stuff in install_compiled_systemd().
-
-    if "${JOURNALCTL:?}" -q --no-pager -D "${root:?}/var/log/journal" --grep "profiling:.+?gcda:[Cc]annot open"; then
+    if ! get_bool "${IGNORE_MISSING_COVERAGE:=}" && \
+       "${JOURNALCTL:?}" -q --no-pager -D "${root:?}/var/log/journal" --grep "profiling:.+?gcda:[Cc]annot open"; then
         derror "Detected possibly missing coverage, check the journal"
         return 1
     fi