fix up various tmpfs failures
v2 cover fix up various tmpfs failures
This patch series should address all of the review comments from v1.
In particular, I've added a sanity check to make sure there is enough memory available for creating the scratch file system in _scratch_mkfs_sized. I've also removed generic/125, and dropped the patch to disable generic/027 for tmpfs.
Hugh Dickins (7):
common: _scratch_mkfs_sized() for tmpfs
generic: use mount point instead of device name
generic: require fiemap for generic/009
xfstests: remove dependency on /proc/partitions for generic/312
xfstests: generic/079 and generic/277 requires chattr, not xattrs
xfstests: add executable permission to tests
xfstests: increase tmpfs memory size
Junho Ryu (2):
xfstests: do not unmount tmpfs during remount
generic: do not unmount before calling _check_scratch_fs()
Theodore Ts'o (4):
check: avoid spurious complaints that tests/$FSTYP/group does not
exist
generic: remove the generic/125 test
generic: add _require_odirect to generic/113 and generic/214
common: remove unneeded mount options for ext4
check | 6 +++++ common/config | 7 ++++-- common/rc | 54 +++++++++++++++++++++++++++++++++++++++- tests/btrfs/026 | 0 tests/btrfs/104 | 0 tests/btrfs/114 | 0 tests/generic/003 | 12 +++------ tests/generic/009 | 2 ++ tests/generic/053 | 2 -- tests/generic/053.out | 2 -- tests/generic/058 | 0 tests/generic/060 | 0 tests/generic/061 | 0 tests/generic/063 | 0 tests/generic/079 | 2 +- tests/generic/092 | 0 tests/generic/094 | 0 tests/generic/103 | 0 tests/generic/113 | 1 + tests/generic/125 | 68 --------------------------------------------------- tests/generic/135 | 17 +++---------- tests/generic/169 | 20 +++++---------- tests/generic/169.out | 6 ++--- tests/generic/192 | 3 +-- tests/generic/214 | 1 + tests/generic/226 | 3 +-- tests/generic/258 | 3 +-- tests/generic/273 | 2 +- tests/generic/277 | 2 +- tests/generic/306 | 3 +-- tests/generic/312 | 13 ++++++---- tests/generic/317 | 3 +-- tests/generic/318 | 3 +-- tests/generic/group | 1 - tests/xfs/140 | 0 35 files changed, 100 insertions(+), 136 deletions(-) mode change 100644 => 100755 tests/btrfs/026 mode change 100644 => 100755 tests/btrfs/104 mode change 100644 => 100755 tests/btrfs/114 mode change 100644 => 100755 tests/generic/058 mode change 100644 => 100755 tests/generic/060 mode change 100644 => 100755 tests/generic/061 mode change 100644 => 100755 tests/generic/063 mode change 100644 => 100755 tests/generic/092 mode change 100644 => 100755 tests/generic/094 mode change 100644 => 100755 tests/generic/103 delete mode 100755 tests/generic/125 mode change 100644 => 100755 tests/xfs/140
Signature · 1 line
2.5.0
PATCH v2 1/13 check: avoid spurious complaints that tests/$FSTYP/group does not exist
There are no tmpfs specific tests, so tests/tmpfs does not exist. This commit avoids printing a spurious error message when running specifying a group of tests (e.g., "check -g quick"):
DEVICE: test:/tmp
MK2FS OPTIONS:
MOUNT OPTIONS: -o block_validity
./check: line 96: tests/tmpfs/group: No such file or directory
FSTYP -- tmpfs PLATFORM -- Linux/i686 kvm-xfstests 4.5.0-rc2ext4-00002-g6df2762 MKFS_OPTIONS -- test:/scratch
MOUNT_OPTIONS -- -o size=1G test:/scratch /test/scratch
generic/001 [10:31:10][ 5.811742] run fstests generic/001
...
Similar problems have been reported when testing nfs using xfstests.
--- check | 6 ++++++ 1 file changed, 6 insertions(+)
check +6 -0
@@ -90,6 +90,9 @@ get_group_list() grp=$1 for d in $SRC_GROUPS $FSTYP; do + if ! test -d "$SRC_DIR/$d" ; then + continue + fi l=$(sed -n < $SRC_DIR/$d/group \ -e 's/#.*//' \ -e 's/$/ /' \
@@ -105,6 +108,9 @@ get_all_tests() { touch $tmp.list for d in $SRC_GROUPS $FSTYP; do + if ! test -d "$SRC_DIR/$d" ; then + continue + fi ls $SRC_DIR/$d/* | \ grep -v "\..*" | \ grep "^$SRC_DIR/$d/$VALID_TEST_NAME"| \
Signature · 1 line
2.5.0
PATCH v2 2/13 common: _scratch_mkfs_sized() for tmpfs
In reply to Theodore Ts'oFrom: Hugh Dickins <[email protected]>
Enable _scratch_mkfs_sized() for use with tmpfs, so that tests which use this helper can now run.
--- common/rc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
common/rc +14 -1
@@ -783,6 +783,12 @@ _scratch_pool_mkfs() esac } +# Return the amount of free memory available on the system +_free_memory_bytes() +{ + free -b | grep ^Mem | awk '{print $4}' +} + # Create fs of certain size on scratch device # _scratch_mkfs_sized <size in bytes> [optional blocksize] _scratch_mkfs_sized()
@@ -813,7 +819,7 @@ _scratch_mkfs_sized() blocks=`expr $fssize / $blocksize` - if [ "$HOSTOS" == "Linux" ]; then + if [ "$HOSTOS" == "Linux" -a -b "$SCRATCH_DEV" ]; then devsize=`blockdev --getsize64 $SCRATCH_DEV` [ "$fssize" -gt "$devsize" ] && _notrun "Scratch device too small" fi
@@ -849,6 +855,13 @@ _scratch_mkfs_sized() sector_size=`blockdev --getss $SCRATCH_DEV` $MKFS_F2FS_PROG $MKFS_OPTIONS $SCRATCH_DEV `expr $fssize / $sector_size` ;; + tmpfs) + free_mem=`_free_memory_bytes` + if [ "$free_mem" -lt "$fssize" ] ; then + _notrun "Not enough memory ($free_mem) for tmpfs with $fssize bytes" + fi + export MOUNT_OPTIONS="-o size=$fssize $TMPFS_MOUNT_OPTIONS" + ;; *) _notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized" ;;
Signature · 1 line
2.5.0
PATCH v2 3/13 generic: use mount point instead of device name
In reply to Theodore Ts'oFrom: Hugh Dickins <[email protected]>
A tmpfs mount does not involve any block device, its $SCRATCH_DEV is nothing but a place-holder, so apply 'df' or 'stat' to its mount point $SCRATCH_MNT instead of to $SCRATCH_DEV.
--- tests/generic/273 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/generic/273 +1 -1
@@ -68,7 +68,7 @@ _file_create() cd $SCRATCH_MNT/origin - _disksize=`$DF_PROG -B 1 $SCRATCH_DEV | tail -1 | $AWK_PROG '{ print $5 }'` + _disksize=`$DF_PROG -B 1 $SCRATCH_MNT | tail -1 | $AWK_PROG '{ print $5 }'` _disksize=$(($_disksize / 3)) _num=$(($_disksize / $count / $threads / 4096)) _count=$count
Signature · 1 line
2.5.0
PATCH v2 4/13 generic: remove the generic/125 test
In reply to Theodore Ts'oDave Chinner has pointed out this test is largely pointless:
Perhaps one should question whether generic/125 is actually testing anything useful in the first place.
i.e. it's writing 16k, then truncating it back to 1000 bytes, then reading it with direct IO for 60s to see if it returns the correct data for that entire time.
What, exactly, is going to cause that test to fail?
Keep in mind this was ported from a CXFS test, where the metadata server did the truncation operation (including the data zeroing), but the reads are being done from the client. i.e. it was designed to test whether a remote machine is doing a truncate correctly on a access shared disk.
IMO, I think we just remove the test, src/trunc.c and src/ftrunc.c because it's 60s of testing that doesn't actually provide any value to us.
--- tests/generic/125 | 68 ----------------------------------------------------- tests/generic/group | 1 - 2 files changed, 69 deletions(-) delete mode 100755 tests/generic/125
tests/generic/125 deleted +0 -68
@@ -1,68 +0,0 @@ -#! /bin/bash -# FSQA Test No. 125 -# -# ftruncate test, modified from CXFSQA tests cxfs_ftrunc and cxfs_trunc -# -#----------------------------------------------------------------------- -# Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -#----------------------------------------------------------------------- -# - -seq=`basename $0` -seqres=$RESULT_DIR/$seq -echo "QA output created by $seq" - -here=`pwd` -tmp=/tmp/$$ -status=1 # failure is the default! -trap "exit \$status" 0 1 2 3 15 - -# get standard environment, filters and checks -. ./common/rc -. ./common/filter - -# real QA test starts here -_supported_fs generic -_supported_os Linux - -_require_test -_require_user - -TESTDIR=$TEST_DIR/ftrunc -TESTFILE=$TESTDIR/ftrunc.tmp - -[ -d $TESTDIR ] && rm -r $TESTDIR -mkdir $TESTDIR - -# ftrunc must be run as a mortal user. -touch $TESTFILE - -chmod a+rw $TESTDIR -chmod a+rw $TESTFILE - -su $qa_user -c "./src/ftrunc -f $TESTFILE" - -if [ "$?" != "0" ]; then - echo src/ftrunc returned non 0 status! -fi - -src/trunc -f $TESTFILE -if (test $? -eq 0 ) then - status=0 -fi - -exit
tests/generic/group +0 -1
@@ -127,7 +127,6 @@ 122 auto quick clone dedupe 123 perms auto quick 124 pattern auto quick -125 other auto 126 perms auto quick 127 rw auto 128 perms auto quick
Signature · 1 line
2.5.0
PATCH v2 7/13 generic: do not unmount before calling _check_scratch_fs()
In reply to Theodore Ts'oFrom: Junho Ryu <[email protected]>
Fix generic/053 so it works on tmpfs by relying on _check_scratch_fs to unmount before checking the file system and remounting it afterwards. Many other tests rely on this, and since tmpfs does not have a file system consistency checker, this allows the test to succeed because the files don't disappear when the tmpfs file system is unmounted.
--- tests/generic/053 | 2 -- tests/generic/053.out | 2 -- 2 files changed, 4 deletions(-)
tests/generic/053 +0 -2
@@ -81,9 +81,7 @@ list_acls() echo "acls before repair:" list_acls -_do 'unmount $SCRATCH_DEV' '_scratch_unmount' _do 'repair filesystem' '_check_scratch_fs' -_do 'mount filesytem' '_scratch_mount' echo "acls after repair: " list_acls
tests/generic/053.out +0 -2
@@ -10,9 +10,7 @@ $SCRATCH_MNT/test.4 [u::---,g::r-x,o::rwx] $SCRATCH_MNT/test.5 [u::---,u:id2:r-x,g::---,m::rwx,o::---] $SCRATCH_MNT/test.6 [u::rwx,g::r-x,o::r--] $SCRATCH_MNT/test.7 [u::---,g::---,g:id2:r-x,m::-w-,o::---] -unmount $SCRATCH_DEV... done repair filesystem... done -mount filesytem... done acls after repair: $SCRATCH_MNT/test.0 [u::r--,g::rwx,o::rw-] $SCRATCH_MNT/test.1 [u::r-x,g::---,o::---]
Signature · 1 line
2.5.0
PATCH v2 9/13 xfstests: remove dependency on /proc/partitions for generic/312
In reply to Theodore Ts'oFrom: Hugh Dickins <[email protected]>
This allows this test to work with tmpfs, if the system has at least 5G of free memory.
--- tests/generic/312 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
tests/generic/312 +8 -5
@@ -51,12 +51,15 @@ _require_scratch # 5G in byte fssize=$((2**30 * 5)) -required_blocks=$(($fssize / 1024)) -dev_blocks=$(grep -w $(_short_dev $SCRATCH_DEV) /proc/partitions | $AWK_PROG '{print $3}') -if [ $required_blocks -gt $dev_blocks ];then - _notrun "this test requires \$SCRATCH_DEV has ${fssize}B space" -fi +# We don't need to do this check for tmpfs because _scratch_mkfs_size +# will validate the size against the available memory +if [ "$FSTYP" != "tmpfs" ]; then + _scratch_mkfs + _scratch_mount + _require_fs_space $SCRATCH_MNT $(($fssize / 1024)) + _scratch_unmount +fi rm -f $seqres.full _scratch_mkfs_sized $fssize >>$seqres.full 2>&1 _scratch_mount >>$seqres.full 2>&1
Signature · 1 line
2.5.0
PATCH v2 10/13 xfstests: generic/079 and generic/277 requires chattr, not xattrs
In reply to Theodore Ts'oFrom: Hugh Dickins <[email protected]>
Add a new helper, _require_chattr, which allows the test to explicitly check to see if the file system supports a specific chattr flag, as not all file systems support chattr +A or chattr +i, and the presence of extended attribute support is has nothing to do with a specific chattr flag being supported.
--- common/rc | 16 ++++++++++++++++ tests/generic/079 | 2 +- tests/generic/277 | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-)
common/rc +16 -0
@@ -3018,6 +3018,22 @@ _require_test_lsattr() _notrun "lsattr not supported by test filesystem type: $FSTYP" } +_require_chattr() +{ + attribute=$1 + + touch $TEST_DIR/syscalltest + chattr "+$attribute" $TEST_DIR/syscalltest > $TEST_DIR/syscalltest.out 2>&1 + status=$? + chattr "-$attribute" $TEST_DIR/syscalltest > $TEST_DIR/syscalltest.out 2>&1 + if [ "$status" -ne 0 ]; then + _notrun "file system doesn't support chattr +$attribute" + fi + cat $TEST_DIR/syscalltest.out >> $seqres.full + + rm -f $TEST_DIR/syscalltest.out +} + _get_total_inode() { if [ -z "$1" ]; then
tests/generic/079 +1 -1
@@ -48,7 +48,7 @@ _cleanup() _supported_fs generic _supported_os Linux -_require_attrs +_require_chattr i _require_scratch [ -x $timmutable ] || _notrun "t_immutable was not built for this platform"
tests/generic/277 +1 -1
@@ -44,7 +44,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15 _supported_fs generic _supported_os Linux _require_scratch -_require_attrs +_require_chattr A _scratch_mkfs > /dev/null 2>&1 _scratch_mount
Signature · 1 line
2.5.0
PATCH v2 11/13 xfstests: add executable permission to tests
In reply to Theodore Ts'oFrom: Hugh Dickins <[email protected]>
--- tests/btrfs/026 | 0 tests/btrfs/104 | 0 tests/btrfs/114 | 0 tests/generic/058 | 0 tests/generic/060 | 0 tests/generic/061 | 0 tests/generic/063 | 0 tests/generic/092 | 0 tests/generic/094 | 0 tests/generic/103 | 0 tests/xfs/140 | 0 11 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tests/btrfs/026 mode change 100644 => 100755 tests/btrfs/104 mode change 100644 => 100755 tests/btrfs/114 mode change 100644 => 100755 tests/generic/058 mode change 100644 => 100755 tests/generic/060 mode change 100644 => 100755 tests/generic/061 mode change 100644 => 100755 tests/generic/063 mode change 100644 => 100755 tests/generic/092 mode change 100644 => 100755 tests/generic/094 mode change 100644 => 100755 tests/generic/103 mode change 100644 => 100755 tests/xfs/140
tests/btrfs/026 +0 -0
tests/btrfs/104 +0 -0
tests/btrfs/114 +0 -0
tests/generic/058 +0 -0
tests/generic/060 +0 -0
tests/generic/061 +0 -0
tests/generic/063 +0 -0
tests/generic/092 +0 -0
tests/generic/094 +0 -0
tests/generic/103 +0 -0
tests/xfs/140 +0 -0
Signature · 1 line
2.5.0
PATCH v2 12/13 xfstests: increase tmpfs memory size
In reply to Theodore Ts'oFrom: Hugh Dickins <[email protected]>
512M is not enough for generic/129. Raise default tmpfs size to 1G.
--- common/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
common/config +2 -2
@@ -316,8 +316,8 @@ _mount_opts() export MOUNT_OPTIONS="-o acl $GFS2_MOUNT_OPTIONS" ;; tmpfs) - # We need to specify the size at mount, use 512 MB by default - export MOUNT_OPTIONS="-o size=512M $TMPFS_MOUNT_OPTIONS" + # We need to specify the size at mount, use 1G by default + export MOUNT_OPTIONS="-o size=1G $TMPFS_MOUNT_OPTIONS" ;; *) ;;
Signature · 1 line
2.5.0
PATCH v2 13/13 common: remove unneeded mount options for ext4
In reply to Theodore Ts'oExt4 has turned on acls and xattrs by default for a long, long time (even the 3.10 kernel has it on by default).
--- common/config | 3 +++ 1 file changed, 3 insertions(+)
common/config +3 -0
@@ -300,6 +300,9 @@ _mount_opts() # acls & xattrs aren't turned on by default on ext$FOO export MOUNT_OPTIONS="-o acl,user_xattr $EXT_MOUNT_OPTIONS" ;; + ext4|ext4dev) + export MOUNT_OPTIONS="$EXT_MOUNT_OPTIONS" + ;; f2fs) export MOUNT_OPTIONS="-o acl,user_xattr $F2FS_MOUNT_OPTIONS" ;;
Signature · 1 line
2.5.0
PATCH v2 5/13 generic: add _require_odirect to generic/113 and generic/214
In reply to Theodore Ts'ogeneric/113 and generic/214 both use O_DIRECT at some stage in their tests, so check O_DIRECT support before running them.
--- tests/generic/113 | 1 + tests/generic/214 | 1 + 2 files changed, 2 insertions(+)
tests/generic/113 +1 -0
@@ -77,6 +77,7 @@ _do_test() _supported_fs generic _supported_os Linux _require_test +_require_odirect [ -x $here/ltp/aio-stress ] || _notrun "aio-stress not built for this platform"
tests/generic/214 +1 -0
@@ -55,6 +55,7 @@ rm -f $seqres.full rm -f $TEST_DIR/ouch* _require_xfs_io_command "falloc" +_require_odirect # Ok, off we go.
Signature · 1 line
2.5.0
PATCH v2 6/13 xfstests: do not unmount tmpfs during remount
In reply to Theodore Ts'oFrom: Junho Ryu <[email protected]>
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.
--- common/rc | 23 +++++++++++++++++++++++ tests/generic/003 | 12 ++++-------- tests/generic/135 | 17 +++-------------- tests/generic/169 | 20 ++++++-------------- tests/generic/169.out | 6 ++---- tests/generic/192 | 3 +-- tests/generic/226 | 3 +-- tests/generic/258 | 3 +-- tests/generic/306 | 3 +-- tests/generic/317 | 3 +-- tests/generic/318 | 3 +-- 11 files changed, 44 insertions(+), 52 deletions(-)
common/rc +23 -0
@@ -331,10 +331,30 @@ _scratch_unmount() _scratch_remount() { + if [ "$FSTYP" = tmpfs ]; then + return + fi _scratch_unmount _scratch_mount } +_scratch_change_mount_opts() +{ + case $FSTYP in + tmpfs) + OPTS="$@" + if test -n "$OPTS"; then + OPTS=$(echo $OPTS | sed -e 's/-o /-o remount,/') + mount $OPTS $SCRATCH_MNT + fi + ;; + *) + _scratch_unmount + _scratch_mount "$@" + ;; + esac +} + _test_mount() { if [ "$FSTYP" == "overlay" ]; then
@@ -356,6 +376,9 @@ _test_unmount() _test_remount() { + if [ "$FSTYP" = tmpfs ]; then + return + fi _test_unmount _test_mount }
tests/generic/003 +4 -8
@@ -108,8 +108,7 @@ _compare_stat_times NNN "$file1_stat_after_first_access" \ "$file1_stat_after_second_access" "after accessing file1 second time" # Remounting with nodiratime option -_scratch_unmount -_scratch_mount "-o nodiratime" +_scratch_change_mount_opts "-o nodiratime" file1_stat_after_remount=`_stat $TPATH/dir1/file1` _compare_stat_times NNN "$file1_stat_after_second_access" \ "$file1_stat_after_remount" "for file1 after remount"
@@ -135,8 +134,7 @@ _compare_stat_times NNN "$dir2_stat_after_file_creation" \ "$dir2_stat_after_file_access" "for dir2 after file access" # Remounting with noatime option, creating a file and accessing it -_scratch_unmount -_scratch_mount "-o noatime" +_scratch_change_mount_opts "-o noatime" echo "ccc" > $TPATH/dir2/file3 file3_stat_before_first_access=`_stat $TPATH/dir2/file3` sleep 1
@@ -160,8 +158,7 @@ _compare_stat_times NNY "$file1_stat_after_modify" \ # Remounting with strictatime option and # accessing a previously created file twice -_scratch_unmount -_scratch_mount "-o strictatime" +_scratch_change_mount_opts "-o strictatime" cat $TPATH/dir2/file3 > /dev/null file3_stat_after_second_access=`_stat $TPATH/dir2/file3` _compare_stat_times YNN "$file3_stat_after_first_access" \
@@ -194,8 +191,7 @@ fi sleep 1 dir2_stat_before_ro_mount=`_stat $TPATH/dir2` file3_stat_before_ro_mount=`_stat $TPATH/dir2/file3` -_scratch_unmount -_scratch_mount "-o ro,strictatime" +_scratch_change_mount_opts "-o ro,strictatime" ls $TPATH/dir2 > /dev/null cat $TPATH/dir2/file3 > /dev/null dir2_stat_after_ro_mount=`_stat $TPATH/dir2`
tests/generic/135 +3 -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,7 @@ $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 +_scratch_remount # check file size and contents od -Ad -x async_file
tests/generic/169 +6 -14
@@ -73,13 +73,9 @@ $XFS_IO_PROG -a -c "pwrite 0 5k" -c "fsync" \ $SCRATCH_MNT/testfile \ | _show_wrote_and_stat_only -echo "# unmounting scratch" -_scratch_unmount>>$seqres.full 2>&1 \ - || _fail "unmount failed" - -echo "# mounting scratch" -_scratch_mount >>$seqres.full 2>&1 \ - || _fail "mount failed: $MOUNT_OPTIONS" +echo "# remounting scratch" +_scratch_remount >>$seqres.full 2>&1 \ + || _fail "remount failed: $MOUNT_OPTIONS" echo "# stating file to confirm correct size" $XFS_IO_PROG -r -c "stat" $SCRATCH_MNT/testfile \
@@ -90,13 +86,9 @@ $XFS_IO_PROG -f -c "pwrite 0 5" -c s -c "pwrite 5 5" \ -c "stat" $SCRATCH_MNT/nextfile \ | _show_wrote_and_stat_only -echo "# unmounting scratch" -_scratch_unmount>>$seqres.full 2>&1 \ - || _fail "unmount failed" - -echo "# mounting scratch" -_scratch_mount >>$seqres.full 2>&1 \ - || _fail "mount failed: $MOUNT_OPTIONS" +echo "# remounting scratch" +_scratch_remount >>$seqres.full 2>&1 \ + || _fail "remount failed: $MOUNT_OPTIONS" echo "# stating file to confirm correct size" $XFS_IO_PROG -r -c "stat" $SCRATCH_MNT/nextfile \
tests/generic/169.out +2 -4
@@ -5,15 +5,13 @@ wrote 5120/5120 bytes at offset 0 wrote 5120/5120 bytes at offset 5120 wrote 5120/5120 bytes at offset 10240 stat.size = 15360 -# unmounting scratch -# mounting scratch +# remounting scratch # stating file to confirm correct size stat.size = 15360 # appending 10 bytes to new file, sync at 5 bytes wrote 5/5 bytes at offset 0 wrote 5/5 bytes at offset 5 stat.size = 10 -# unmounting scratch -# mounting scratch +# remounting scratch # stating file to confirm correct size stat.size = 10
tests/generic/192 +1 -2
@@ -78,8 +78,7 @@ cat $testfile time2=`_access_time $testfile | tee -a $seqres.full` cd / -_test_unmount -_test_mount +_test_remount time3=`_access_time $testfile | tee -a $seqres.full` delta1=`expr $time2 - $time1`
tests/generic/226 +1 -2
@@ -61,8 +61,7 @@ for I in `seq 1 $loops`; do done echo -_scratch_unmount -_scratch_mount +_scratch_remount echo "--> $loops direct 64m writes in a loop" for I in `seq 1 $loops`; do
tests/generic/258 +1 -2
@@ -62,8 +62,7 @@ fi # unmount, remount, and check the timestamp echo "Remounting to flush cache" -_test_unmount -_test_mount +_test_remount # Should yield -315593940 (prior to epoch) echo "Testing for negative seconds since epoch"
tests/generic/306 +1 -2
@@ -67,8 +67,7 @@ touch $BINDFILE || _fail "Could not create bind mount file" touch $TARGET || _fail "Could not create symlink target" ln -s $TARGET $SYMLINK -_scratch_unmount || _fail "Could not unmount scratch device" -_scratch_mount -o ro || _fail "Could not mount scratch readonly" +_scratch_change_mount_opts -o ro || _fail "Could not remount scratch readonly" # We should be able to read & write to/from these devices even on an RO fs echo "== try to create new file"
tests/generic/317 +1 -2
@@ -96,8 +96,7 @@ echo "" echo "*** Remounting ***" echo "" sync -_scratch_unmount >>$seqres.full 2>&1 -_scratch_mount >>$seqres.full 2>&1 || _fail "mount failed" +_scratch_remount >>$seqres.full 2>&1 || _fail "remount failed" _print_numeric_uid
tests/generic/318 +1 -2
@@ -109,8 +109,7 @@ _print_getfacls echo "*** Remounting ***" echo "" sync -_scratch_unmount >>$seqres.full 2>&1 -_scratch_mount >>$seqres.full 2>&1 || _fail "mount failed" +_scratch_remount >>$seqres.full 2>&1 || _fail "remount failed" _print_getfacls
Signature · 1 line
2.5.0
PATCH v2 8/13 generic: require fiemap for generic/009
In reply to Theodore Ts'oFrom: Hugh Dickins <[email protected]>
Require xfs_io commands fiemap and falloc as well as fzero: fzero without falloc is unlikely, but tmpfs may later support fzero, though probably never fiemap (and in v3.15 wrongly claimed to support fzero).
--- tests/generic/009 | 2 ++ 1 file changed, 2 insertions(+)
tests/generic/009 +2 -0
@@ -45,6 +45,8 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15 # real QA test starts here _supported_os Linux _require_xfs_io_command "fzero" +_require_xfs_io_command "fiemap" +_require_xfs_io_command "falloc" _require_test testfile=$TEST_DIR/009.$$
Signature · 1 line
2.5.0
Re: [PATCH 13/13] common: remove unneeded mount options for ext4
In reply to Theodore Ts'oQuoted 4 lines · Theodore Ts'o
Ext4 has turned on acls and xattrs by default for a long, long time (even the 3.10 kernel has it on by default).
Signed-off-by Theodore Ts'o <[email protected]>
Hmmm - aren't these really there for transparent support of older distros that still require these mount options? e.g. RHEL6, older SLES kernels, etc?
Cheers,
Dave.
Signature · 2 lines
Dave Chinner [email protected]
Re: [PATCH 04/13] generic: remove the generic/125 test
In reply to Theodore Ts'oQuoted 21 lines · Theodore Ts'o
Dave Chinner has pointed out this test is largely pointless:
Perhaps one should question whether generic/125 is actually testing anything useful in the first place.
i.e. it's writing 16k, then truncating it back to 1000 bytes, then reading it with direct IO for 60s to see if it returns the correct data for that entire time.
What, exactly, is going to cause that test to fail?
Keep in mind this was ported from a CXFS test, where the metadata server did the truncation operation (including the data zeroing), but the reads are being done from the client. i.e. it was designed to test whether a remote machine is doing a truncate correctly on a access shared disk.
IMO, I think we just remove the test,
src/trunc.candsrc/ftrunc.cbecause it's 60s of testing that doesn't actually provide any value to us.
Quoted 6 lines
Signed-off-by Theodore Ts'o <[email protected]>--- tests/generic/125 | 68 ----------------------------------------------------- tests/generic/group | 1 - 2 files changed, 69 deletions(-) delete mode 100755 tests/generic/125
Also remove 125.out ?
Thanks,
Eryu
Re: [PATCH 13/13] common: remove unneeded mount options for ext4
In reply to Dave ChinnerQuoted 9 lines · Dave Chinner
Quoted 4 lines · Theodore Ts'o
Ext4 has turned on acls and xattrs by default for a long, long time (even the 3.10 kernel has it on by default).
Signed-off-by Theodore Ts'o <[email protected]>Hmmm - aren't these really there for transparent support of older distros that still require these mount options? e.g. RHEL6, older SLES kernels, etc?
Good point. I had forgotten (traumatic memory suppression, no doubt) that there are poor souls who still have to support 2.6.32 kernels. Only four more years before it goes EOL --- in 2020. I'm so glad I don't work in the enterprise space any more. And I thought things were bad with cell phones shipping with 3.10 kernels in 2016. :-)
- Ted