diff --git a/test/shell/fsadm-renamed.sh b/test/shell/fsadm-renamed.sh index 5142e519c..9f3cd3c90 100644 --- a/test/shell/fsadm-renamed.sh +++ b/test/shell/fsadm-renamed.sh @@ -64,8 +64,19 @@ esac echo "$i" "$i" $MKFS_ARGS "$dev_vg_lv" +# Adding couple udev wait ops as some older systemd +# might get confused and was 'randomly/racy' umounting +# devices just mounted. +# +# See for explanation: +# https://github.com/systemd/systemd/commit/628c89cc68ab96fce2de7ebba5933725d147aecc +# https://github.com/systemd/systemd/pull/2017 +aux udev_wait + mount "$dev_vg_lv" "$mount_dir" +aux udev_wait + lvrename $vg_lv $vg_lv_ren mount | tee out @@ -80,9 +91,12 @@ not umount "$dev_vg_lv" lvcreate -L20 -n $lv1 $vg "$i" $MKFS_ARGS "$dev_vg_lv" +aux udev_wait + mount "$dev_vg_lv" "$mount_dolar_dir" -mount | grep $vg +mount | tee out +grep $vg out not lvresize -L+10M -r $vg_lv_ren @@ -91,6 +105,8 @@ umount "$mount_dir" # FIXME: lvresize CANNOT handle/propagage '--yes' to fsadm echo y | lvresize -L+10M -r $vg_lv +aux udev_wait + umount "$mount_dolar_dir" lvremove -ff $vg