]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: wait a moment between mount and umount
authorKarel Zak <kzak@redhat.com>
Fri, 2 Mar 2012 12:33:46 +0000 (13:33 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 2 Mar 2012 12:33:46 +0000 (13:33 +0100)
It seems that without sleep between mount and umount are the test
unstable, because kernel is not able to provide updated
/proc/self/mountinfo so quickly (really?).

Signed-off-by: Karel Zak <kzak@redhat.com>
tests/ts/libmount/context-utab

index aa4980637f94b56bf4a2e5de72b1cff5b4dee503..4c1d1174fafc3276b366e2aae6c81a56b2fc118b 100755 (executable)
@@ -67,6 +67,8 @@ grep -q $DEVICE /proc/mounts || \
        echo "(by device) cannot find $DEVICE in /proc/mounts" >> $TS_OUTPUT 2>&1
 ts_finalize_subtest
 
+sleep 1
+
 ts_init_subtest "umount-by-devname"
 ts_valgrind $TESTPROG --umount $DEVICE >> $TS_OUTPUT 2>&1
 grep -q $DEVICE /proc/mounts &&
@@ -81,6 +83,8 @@ grep -q $DEVICE $LIBMOUNT_UTAB || \
        echo "(by label) cannot find $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1
 ts_finalize_subtest
 
+sleep 1
+
 ts_init_subtest "umount"
 ts_valgrind $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1
 grep -q $DEVICE $LIBMOUNT_UTAB && \
@@ -94,6 +98,8 @@ if [ -x "/sbin/mkfs.btrfs" ]; then
        /sbin/btrfsctl -S sub $MOUNTPOINT &> /dev/null
        umount $MOUNTPOINT &> /dev/null
 
+       sleep 1
+
        ts_init_subtest "mount-uhelper-subvol"
        mkdir -p $MOUNTPOINT &>  /dev/null
        ts_valgrind $TESTPROG --mount -o uhelper=foo,rw,subvol=sub $DEVICE  $MOUNTPOINT >> $TS_OUTPUT 2>&1
@@ -105,6 +111,8 @@ if [ -x "/sbin/mkfs.btrfs" ]; then
        $TS_CMD_FINDMNT --mtab $MOUNTPOINT -o OPTIONS -n >> $TS_OUTPUT 2>&1
        ts_log "---"
 
+       sleep 1
+
        ts_init_subtest "umount-subvol"
        ts_valgrind $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1
        grep -q $DEVICE $LIBMOUNT_UTAB && \