Re: [PATCH] xfs/187: remove the test

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Thu, Aug 19, 2021 at 04:00:44PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> Upstream changes mean that "-o noattr2" no longer removes the
> on-disk ATTR2 feature bit from the superblock and so the failure
> case this test exercises is no longer guaranteed to be a failure
> case. Hence the test is now useless as a regression test, so remove
> it.
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>

Confirmed, we're removing the ability to *downgrade* deprecated V4
filesystems from attr2 to attr1, so this test is no longer useful.

Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>

--D

> ---
>  tests/xfs/187     | 117 ----------------------------------------------
>  tests/xfs/187.out |  39 ----------------
>  2 files changed, 156 deletions(-)
>  delete mode 100755 tests/xfs/187
>  delete mode 100644 tests/xfs/187.out
> 
> diff --git a/tests/xfs/187 b/tests/xfs/187
> deleted file mode 100755
> index 3f8c7ef8..00000000
> --- a/tests/xfs/187
> +++ /dev/null
> @@ -1,117 +0,0 @@
> -#! /bin/bash
> -# SPDX-License-Identifier: GPL-2.0
> -# Copyright (c) 2008 Silicon Graphics, Inc.  All Rights Reserved.
> -#
> -# FS QA Test No. 187
> -#
> -# To test out the noattr2 flag which is broken in pv#980021
> -# Given an existing attr2 filesystem, we should be able to mount
> -# as noattr2 and go back to an attr1 filesystem.
> -#
> -# Test the case where there are no more features2 bits on and
> -# so the morebitsbit should be off.
> -#
> -. ./common/preamble
> -_begin_fstest attr auto quick
> -
> -_filter_version()
> -{
> -	tee -a $seqres.full | tr ',' '\n' | egrep 'ATTR|MORE|LAZY'
> -}
> -
> -# Import common functions.
> -. ./common/filter
> -. ./common/attr
> -
> -# real QA test starts here
> -_supported_fs xfs
> -
> -_require_scratch
> -_require_attrs
> -_require_attr_v1
> -_require_projid16bit
> -
> -# Reset the options so that we can control what is going on here
> -export MKFS_OPTIONS=""
> -export MOUNT_OPTIONS=""
> -
> -# lazysb, attr2 and other feature bits are held in features2 and will require
> -# morebitsbit on So test with lazysb and without it to see if the morebitsbit is
> -# okay etc. If the mkfs defaults change, these need to change as well.
> -MKFS_NO_LAZY="-m crc=0 -l lazy-count=0 -i projid32bit=0"
> -MKFS_LAZY="-m crc=0 -l lazy-count=1 -i projid32bit=0"
> -
> -# ftype is also stored in features2, so we have to detect its presence in
> -# mkfs and disable it here too.
> -if _scratch_mkfs --help 2>&1 | grep -q "ftype="; then
> -	MKFS_NO_LAZY="$MKFS_NO_LAZY -n ftype=0"
> -	MKFS_LAZY="$MKFS_LAZY -n ftype=0"
> -fi
> -
> -# Make sure that when we think we are testing with morebits off
> -# that we really are.
> -_scratch_mkfs -i attr=1 $MKFS_NO_LAZY  >/dev/null 2>&1
> -_scratch_xfs_db -c version 2>&1 >$tmp.db
> -if grep -i morebits $tmp.db
> -then
> -	echo ""
> -	echo "Need to update test $seq so that initial subtests do not use features2"
> -	echo ""
> -	exit
> -fi
> -
> -echo ""
> -echo "*** 1. test attr2 mkfs and then noattr2 mount ***"
> -echo ""
> -echo "attr2 fs"
> -echo ""
> -_scratch_mkfs -i attr=2 $MKFS_NO_LAZY >/dev/null 2>&1
> -_scratch_xfs_db -r -c version 2>&1 | _filter_version
> -echo ""
> -echo "noattr2 fs"
> -echo ""
> -_scratch_mount -o noattr2
> -$UMOUNT_PROG $SCRATCH_MNT
> -_scratch_xfs_db -r -c version 2>&1 | _filter_version
> -
> -# adding an EA will ensure the ATTR1 flag is turned on
> -echo ""
> -echo "*** 2. test attr2 mkfs and then noattr2 mount with 1 EA ***"
> -echo ""
> -echo "attr2 fs"
> -echo ""
> -_scratch_mkfs -i attr=2 $MKFS_NO_LAZY >/dev/null 2>&1
> -_scratch_xfs_db -r -c version 2>&1 | _filter_version
> -echo ""
> -echo "noattr2 fs"
> -echo ""
> -_scratch_mount -o noattr2
> -cd $SCRATCH_MNT
> -touch testfile
> -$SETFATTR_PROG -n user.test -v 0xbabe testfile
> -_getfattr testfile
> -cd $here
> -$UMOUNT_PROG $SCRATCH_MNT
> -_scratch_xfs_db -r -c version 2>&1 | _filter_version
> -
> -echo ""
> -echo "*** 3. test noattr2 mount and lazy sb ***"
> -echo ""
> -echo ""
> -echo "attr2 fs"
> -echo ""
> -_scratch_mkfs -i attr=2 $MKFS_LAZY >/dev/null 2>&1
> -_scratch_xfs_db -r -c version 2>&1 | _filter_version
> -echo ""
> -echo "noattr2 fs"
> -echo ""
> -_scratch_mount -o noattr2
> -cd $SCRATCH_MNT
> -touch testfile
> -cd $here
> -$UMOUNT_PROG $SCRATCH_MNT
> -_scratch_xfs_db -r -c version 2>&1 | _filter_version
> -
> -# success, all done
> -status=0
> -exit
> diff --git a/tests/xfs/187.out b/tests/xfs/187.out
> deleted file mode 100644
> index e7e20212..00000000
> --- a/tests/xfs/187.out
> +++ /dev/null
> @@ -1,39 +0,0 @@
> -QA output created by 187
> -
> -*** 1. test attr2 mkfs and then noattr2 mount ***
> -
> -attr2 fs
> -
> -MOREBITS
> -ATTR2
> -
> -noattr2 fs
> -
> -
> -*** 2. test attr2 mkfs and then noattr2 mount with 1 EA ***
> -
> -attr2 fs
> -
> -MOREBITS
> -ATTR2
> -
> -noattr2 fs
> -
> -# file: testfile
> -user.test
> -
> -ATTR
> -
> -*** 3. test noattr2 mount and lazy sb ***
> -
> -
> -attr2 fs
> -
> -MOREBITS
> -ATTR2
> -LAZYSBCOUNT
> -
> -noattr2 fs
> -
> -MOREBITS
> -LAZYSBCOUNT
> -- 
> 2.31.1
> 



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux