mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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:
+5
-14
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user