673c78
From a4d1feed2803a5c0596877b64487734bcdb781ef Mon Sep 17 00:00:00 2001
673c78
From: Karel Zak <kzak@redhat.com>
673c78
Date: Mon, 23 Aug 2021 16:28:52 +0200
673c78
Subject: tests: make mount/fstab-all more robust
673c78
673c78
Upstream: http://github.com/karelzak/util-linux/commit/85ae61dd6d956e7c9fe2b22b8c46bb1d0bfd13da
673c78
Signed-off-by: Karel Zak <kzak@redhat.com>
673c78
---
673c78
 tests/ts/mount/fstab-all | 6 ++++++
673c78
 1 file changed, 6 insertions(+)
673c78
673c78
diff --git a/tests/ts/mount/fstab-all b/tests/ts/mount/fstab-all
673c78
index acc64e462..6b7018823 100755
673c78
--- a/tests/ts/mount/fstab-all
673c78
+++ b/tests/ts/mount/fstab-all
673c78
@@ -79,6 +79,7 @@ echo  "${TS_DEVICE}4 ${MOUNTPOINT}D ext4 rw,defaults 0 0" >> $MY_FSTAB
673c78
 ts_init_subtest "basic"
673c78
 $TS_CMD_MOUNT --all --fstab $MY_FSTAB >> $TS_OUTPUT 2>> $TS_ERRLOG
673c78
 [ $? == 0 ] || ts_log "mount failed"
673c78
+udevadm settle
673c78
 $TS_CMD_UMOUNT ${MOUNTPOINT}{A,B,C,D}
673c78
 [ $? == 0 ] || ts_log "umount failed"
673c78
 ts_finalize_subtest
673c78
@@ -87,6 +88,7 @@ ts_finalize_subtest
673c78
 ts_init_subtest "filter-type"
673c78
 $TS_CMD_MOUNT --all --fstab $MY_FSTAB -t ext4 >> $TS_OUTPUT 2>> $TS_ERRLOG
673c78
 [ $? == 0 ] || ts_log "mount failed"
673c78
+udevadm settle
673c78
 $TS_CMD_UMOUNT ${MOUNTPOINT}D
673c78
 [ $? == 0 ] || ts_log "umount failed"
673c78
 ts_finalize_subtest
673c78
@@ -95,6 +97,7 @@ ts_finalize_subtest
673c78
 ts_init_subtest "filter-notype"
673c78
 $TS_CMD_MOUNT --all --fstab $MY_FSTAB -t noext4 >> $TS_OUTPUT 2>> $TS_ERRLOG
673c78
 [ $? == 0 ] || ts_log "mount failed"
673c78
+udevadm settle
673c78
 $TS_CMD_UMOUNT ${MOUNTPOINT}{A,B,C}
673c78
 [ $? == 0 ] || ts_log "umount failed"
673c78
 ts_finalize_subtest
673c78
@@ -103,6 +106,7 @@ ts_finalize_subtest
673c78
 ts_init_subtest "filter-option"
673c78
 $TS_CMD_MOUNT --all --fstab $MY_FSTAB -O ro >> $TS_OUTPUT 2>> $TS_ERRLOG
673c78
 [ $? == 0 ] || ts_log "mount failed"
673c78
+udevadm settle
673c78
 $TS_CMD_UMOUNT ${MOUNTPOINT}C
673c78
 [ $? == 0 ] || ts_log "umount failed"
673c78
 ts_finalize_subtest
673c78
@@ -111,6 +115,7 @@ ts_finalize_subtest
673c78
 ts_init_subtest "override-option"
673c78
 $TS_CMD_MOUNT --all --fstab $MY_FSTAB -o ro >> $TS_OUTPUT 2>> $TS_ERRLOG
673c78
 [ $? == 0 ] || ts_log "mount failed"
673c78
+udevadm settle
673c78
 $TS_CMD_UMOUNT ${MOUNTPOINT}{A,B,C,D}
673c78
 [ $? == 0 ] || ts_log "umount failed"
673c78
 ts_finalize_subtest
673c78
@@ -132,6 +137,7 @@ $TS_CMD_MOUNT	--all \
673c78
 		--target-prefix $MY_ROOT \
673c78
 		-o X-mount.mkdir >> $TS_OUTPUT 2>> $TS_ERRLOG
673c78
 [ $? == 0 ] || ts_log "mount failed"
673c78
+udevadm settle
673c78
 $TS_CMD_UMOUNT $MY_ROOT/foo/{A,B,C,D}
673c78
 [ $? == 0 ] || ts_log "umount failed"
673c78
 ts_finalize_subtest
673c78
-- 
673c78
2.34.1
673c78