mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tests: add basic validation of running services
For determinist test results lvm2/dm service shall not be present and running in the system as it may randomize test results. In case they are found present, this test ends with warning (not failure).
This commit is contained in:
parent
9bcc76b63c
commit
85fae836c0
@ -34,3 +34,15 @@ get_devs
|
||||
# ensure we do not crash on a bug in config file
|
||||
aux lvmconf 'log/prefix = 1""'
|
||||
not lvs "${DEVICES[@]}"
|
||||
|
||||
# validate testing machine with its services is in expected state and will not interfere with tests
|
||||
if systemctl -a >out 2>/dev/null ; then
|
||||
for i in dm-event lvm2-lvmpolld lvm2-monitor ; do
|
||||
echo $i
|
||||
grep $i out | not grep -v masked || {
|
||||
cat out
|
||||
should not echo "Present unmasked $i service/socket may randomize testing results!"
|
||||
echo "+++++ Stop & Mask with systemctl +++++"
|
||||
}
|
||||
done
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user