xfstests: do not unmount tmpfs during remount

Several tests unmount then re-mount the scratch filesystem, to check
that the content is unchanged; but unmounting a tmpfs is designed to
lose its content, which causes such tests to fail unnecessarily.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Junho Ryu <jayr@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Junho Ryu
2016-02-19 10:45:35 +11:00
committed by Dave Chinner
parent dddae984bc
commit 4a5cda8102
11 changed files with 49 additions and 57 deletions
+5 -14
View File
@@ -41,19 +41,8 @@ _supported_os Linux IRIX
_require_odirect
_require_scratch
_scratch_mkfs >/dev/null 2>&1
_umount_mount()
{
CWD=`pwd`
cd /
# pipe error into /dev/null, in case not mounted (after _require_scratch)
_scratch_unmount 2>/dev/null
_scratch_mount
cd "$CWD"
}
_umount_mount
_scratch_mkfs >/dev/null
_scratch_mount
cd $SCRATCH_MNT
@@ -71,7 +60,9 @@ $XFS_IO_PROG -f -c 'pwrite -b 4k -S 0x78 0 4k' trunc_file > /dev/null
$XFS_IO_PROG -f -c 'truncate 2k' trunc_file > /dev/null
$XFS_IO_PROG -c 'pwrite 1k 0 1k' trunc_file > /dev/null
_umount_mount
pushd / > /dev/null
_scratch_cycle_mount
popd > /dev/null
# check file size and contents
od -Ad -x async_file