dcavalca / rpms / util-linux

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