mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
Merge pull request #32957 from mrc0mmand/fix-coverage-builds
test: make TEST-65-ANALYZE happy when built with gcov
This commit is contained in:
commit
dcbf670430
|
@ -132,6 +132,9 @@ machinectl show-image clone1
|
||||||
machinectl rename clone1 clone2
|
machinectl rename clone1 clone2
|
||||||
(! machinectl show-image clone1)
|
(! machinectl show-image clone1)
|
||||||
machinectl show-image clone2
|
machinectl show-image clone2
|
||||||
|
# `machinectl read-only` uses chattr (ioctl(FS_IOC_SETFLAGS)) when the container is backed by a directory,
|
||||||
|
# and this operation might not be implemented on certain filesystems (i.e. tmpfs on older kernels), so check
|
||||||
|
# if we have chattr support before running following tests
|
||||||
if lsattr -d /var/lib/machines >/dev/null; then
|
if lsattr -d /var/lib/machines >/dev/null; then
|
||||||
[[ "$(machinectl show-image --property=ReadOnly --value clone2)" == no ]]
|
[[ "$(machinectl show-image --property=ReadOnly --value clone2)" == no ]]
|
||||||
machinectl read-only clone2 yes
|
machinectl read-only clone2 yes
|
||||||
|
|
|
@ -303,7 +303,9 @@ systemd-analyze security --offline=true /tmp/testfile.service
|
||||||
systemd-analyze security --offline=true /tmp/testfile.service | grep -q -F "/dev/sda"
|
systemd-analyze security --offline=true /tmp/testfile.service | grep -q -F "/dev/sda"
|
||||||
|
|
||||||
# Make sure that running generators under systemd-analyze verify works.
|
# Make sure that running generators under systemd-analyze verify works.
|
||||||
systemd-analyze verify --generators /tmp/testfile.service
|
# Note: sd-analyze spawns generators in a sandbox which makes gcov unhapy, so temporarily override
|
||||||
|
# $GCOV_PREFIX to make it skip generating any coverage reports
|
||||||
|
GCOV_PREFIX=/tmp systemd-analyze verify --generators /tmp/testfile.service
|
||||||
|
|
||||||
rm /tmp/testfile.service
|
rm /tmp/testfile.service
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue