mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
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
This commit is contained in:
parent
16771b505e
commit
e5e7cc9a98
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user