From: Yu Watanabe Date: Mon, 10 Mar 2025 19:21:11 +0000 (+0900) Subject: TEST-23-UNIT-FILE: skip verifying masked unit X-Git-Tag: v257.8~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=08b9cf43ea940ed484d660a8a4a83b8b42c9af61;p=thirdparty%2Fsystemd.git TEST-23-UNIT-FILE: skip verifying masked unit This fixes the following failure: TEST-23-UNIT-FILE.sh[2408]: + systemd-analyze --recursive-errors=no --man=no verify /usr/lib/systemd/system/sysinit.target.wants/systemd-hwdb-update.service systemd-analyze[2737]: sys-kernel-config.mount: symlinks are not allowed for units of this type, rejecting. systemd-analyze[2737]: proc-sys-fs-binfmt_misc.automount: symlinks are not allowed for units of this type, rejecting. systemd-analyze[2737]: dev-hugepages.mount: symlinks are not allowed for units of this type, rejecting. systemd-analyze[2737]: sys-kernel-tracing.mount: symlinks are not allowed for units of this type, rejecting. systemd-analyze[2737]: sys-kernel-debug.mount: symlinks are not allowed for units of this type, rejecting. systemd-analyze[2737]: sys-fs-fuse-connections.mount: symlinks are not allowed for units of this type, rejecting. systemd-analyze[2737]: dev-mqueue.mount: symlinks are not allowed for units of this type, rejecting. systemd-analyze[2737]: Unit systemd-hwdb-update.service is masked. TEST-23-UNIT-FILE.sh[166]: + : TEST-23-UNIT-FILE.sh[166]: + kill -0 2408 TEST-23-UNIT-FILE.sh[166]: + wait 2408 TEST-23-UNIT-FILE.sh[166]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/TEST-23-UNIT-FILE.verify-unit-files.sh failed' TEST-23-UNIT-FILE.sh[166]: Subtest /usr/lib/systemd/tests/testdata/units/TEST-23-UNIT-FILE.verify-unit-files.sh failed (cherry picked from commit e5e7cc9a98155b031d9855527da08ac87617f427) --- diff --git a/test/units/TEST-23-UNIT-FILE.verify-unit-files.sh b/test/units/TEST-23-UNIT-FILE.verify-unit-files.sh index 3e83d44607b..200e7582bdd 100755 --- a/test/units/TEST-23-UNIT-FILE.verify-unit-files.sh +++ b/test/units/TEST-23-UNIT-FILE.verify-unit-files.sh @@ -41,5 +41,12 @@ for unit_file in "${UNIT_FILES[@]}"; do continue fi + # Skip masked unit files + resolved=$(readlink -f "$unit_file") + if [[ "$resolved" == "/dev/null" || "$(systemctl is-enabled "${resolved##*/}" 2>/dev/null || :)" == "masked" ]]; then + echo "$unit_file is masked, skipping" + continue + fi + systemd-analyze --recursive-errors=no --man=no verify "$unit_file" done