mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tests: detect racy systemd version
Systemd 222 has a bug - where it's sometimes umount unpredictibly just mounted device - skip testing when this happens.
This commit is contained in:
parent
2172115379
commit
d6473b2018
@ -43,6 +43,17 @@ cleanup_mounted_and_teardown()
|
||||
aux teardown
|
||||
}
|
||||
|
||||
check_mounted()
|
||||
{
|
||||
mount | tee out
|
||||
grep $vg out || {
|
||||
# older versions of systemd sometimes umount volume by mistake
|
||||
# skip further test when this case happens
|
||||
systemctl --version | grep "systemd 222" && \
|
||||
skip "System is running old racy systemd version."
|
||||
}
|
||||
}
|
||||
|
||||
# Test for block sizes != 1024 (rhbz #480022)
|
||||
trap 'cleanup_mounted_and_teardown' EXIT
|
||||
|
||||
@ -81,11 +92,10 @@ aux udev_wait
|
||||
|
||||
lvrename $vg_lv $vg_lv_ren
|
||||
|
||||
mount | tee out
|
||||
grep $vg out
|
||||
check_mounted
|
||||
|
||||
# fails on renamed LV
|
||||
fail lvresize -L+10M -r $vg_lv_ren
|
||||
fail lvresize -y -L+10M -r $vg_lv_ren
|
||||
|
||||
# fails on unknown mountpoint (FIXME: umount)
|
||||
not umount "$dev_vg_lv"
|
||||
@ -97,15 +107,13 @@ aux udev_wait
|
||||
|
||||
mount "$dev_vg_lv" "$mount_dolar_dir"
|
||||
|
||||
mount | tee out
|
||||
grep $vg out
|
||||
check_mounted
|
||||
|
||||
not lvresize -L+10M -r $vg_lv_ren
|
||||
|
||||
umount "$mount_dir"
|
||||
|
||||
# FIXME: lvresize CANNOT handle/propagage '--yes' to fsadm
|
||||
echo y | lvresize -L+10M -r $vg_lv
|
||||
lvresize -y -L+10M -r $vg_lv
|
||||
|
||||
aux udev_wait
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user