From: Karel Zak Date: Fri, 2 Mar 2012 12:33:46 +0000 (+0100) Subject: tests: wait a moment between mount and umount X-Git-Tag: v2.22-rc1~722 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc6b879105771a4c09c80a92ebd189b2ea266739;p=thirdparty%2Futil-linux.git tests: wait a moment between mount and umount 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 --- diff --git a/tests/ts/libmount/context-utab b/tests/ts/libmount/context-utab index aa4980637f..4c1d1174fa 100755 --- a/tests/ts/libmount/context-utab +++ b/tests/ts/libmount/context-utab @@ -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 && \