dcavalca / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone

Blame SOURCES/0003-tests-make-mount-fstab-all-more-robust.patch

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