From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Zorro Lang <zlang@redhat.com>
Cc: fstests@vger.kernel.org, linux-xfs@vger.kernel.org,
Eric Sandeen <sandeen@redhat.com>
Subject: Re: [PATCH v2] xfstests: xfs mount option sanity test
Date: Mon, 13 Jan 2020 10:23:56 -0800 [thread overview]
Message-ID: <20200113182356.GJ8247@magnolia> (raw)
In-Reply-To: <20200113180036.GH8247@magnolia>
On Mon, Jan 13, 2020 at 10:00:36AM -0800, Darrick J. Wong wrote:
> On Wed, Oct 30, 2019 at 06:34:10PM +0800, Zorro Lang wrote:
> > XFS is changing to suit the new mount API, so add this case to make
> > sure the changing won't bring in regression issue on xfs mount option
> > parse phase, and won't change some default behaviors either.
>
> This testcase examines the intersection of some mkfs options and a large
> number of mount options, but it doesn't log any breadcrumbs of which
> scenario it's testing at any given time. When something goes wrong,
> it's /very/ difficult to map that back to the do_mkfs/do_test call.
>
> (FWIW I added this test as xfs/997 and attached the diff I needed to
HAH I lied. Here's the patch.
--D
From: Darrick J. Wong <darrick.wong@oracle.com>
Subject: [PATCH] xfs/997: fix problems with test
Fix problems with Zorro Lang's new mount options test.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
tests/xfs/997 | 19 ++++++-----
tests/xfs/997.out | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 105 insertions(+), 8 deletions(-)
diff --git a/tests/xfs/997 b/tests/xfs/997
index a662f6f7..9d59b4f4 100755
--- a/tests/xfs/997
+++ b/tests/xfs/997
@@ -65,7 +65,8 @@ mkdir -p $LOOP_MNT || _fail "cannot create loopback mount point"
MKFS_OPTIONS=""
do_mkfs()
{
- $MKFS_XFS_PROG -f $* $LOOP_DEV | _filter_mkfs >$seqres.full 2>$tmp.mkfs
+ echo "FORMAT: $@" | tee -a $seqres.full
+ $MKFS_XFS_PROG -f $* $LOOP_DEV | _filter_mkfs >>$seqres.full 2>$tmp.mkfs
if [ "${PIPESTATUS[0]}" -ne 0 ]; then
_fail "Fails on _mkfs_dev $* $LOOP_DEV"
fi
@@ -99,12 +100,12 @@ _do_test()
local info
# mount test
- _mount $LOOP_DEV $LOOP_MNT $opts 2>/dev/null
+ _mount $LOOP_DEV $LOOP_MNT $opts 2>>$seqres.full
rc=$?
if [ $rc -eq 0 ];then
if [ "${mounted}" = "fail" ];then
echo "[FAILED]: mount $LOOP_DEV $LOOP_MNT $opts"
- echo "ERROR: expect ${mounted}, but pass"
+ echo "ERROR: expect mount to fail, but it succeeded"
return 1
fi
is_dev_mounted
@@ -114,9 +115,9 @@ _do_test()
return 1
fi
else
- if [ "${mount_ret}" = "pass" ];then
+ if [ "${mounted}" = "pass" ];then
echo "[FAILED]: mount $LOOP_DEV $LOOP_MNT $opts"
- echo "ERROR: expect ${mounted}, but fail"
+ echo "ERROR: expect mount to succeed, but it failed"
return 1
fi
is_dev_mounted
@@ -133,18 +134,18 @@ _do_test()
fi
# Check the mount options after fs mounted.
info=`get_mount_info`
- echo $info | grep -q "${key}"
+ echo "${info}" | grep -q "${key}"
rc=$?
if [ $rc -eq 0 ];then
if [ "$found" != "true" ];then
echo "[FAILED]: mount $LOOP_DEV $LOOP_MNT $opts"
- echo "ERROR: expect there's not $key in $info, but not found"
+ echo "ERROR: expected to find \"$key\" in mount info \"$info\""
return 1
fi
else
if [ "$found" != "false" ];then
echo "[FAILED]: mount $LOOP_DEV $LOOP_MNT $opts"
- echo "ERROR: expect there's $key in $info, but found"
+ echo "ERROR: did not expect to find \"$key\" in \"$info\""
return 1
fi
fi
@@ -154,6 +155,8 @@ _do_test()
do_test()
{
+ echo "TEST: $@" | tee -a $seqres.full
+
# force unmount before testing
force_unmount
_do_test "$@"
diff --git a/tests/xfs/997.out b/tests/xfs/997.out
index f2fc684f..c6624925 100644
--- a/tests/xfs/997.out
+++ b/tests/xfs/997.out
@@ -3,4 +3,98 @@ QA output created by 997
** create loop log device
** create loop mount point
** start xfs mount testing ...
+FORMAT:
+TEST: pass allocsize false
+TEST: -o allocsize=4k pass allocsize=4k true
+TEST: -o allocsize=1048576k pass allocsize=1048576k true
+TEST: -o allocsize=2048 fail
+TEST: -o allocsize=2g fail
+FORMAT: -m crc=1
+TEST: pass attr2 true
+TEST: -o attr2 pass attr2 true
+TEST: -o noattr2 fail
+FORMAT: -m crc=0
+TEST: pass attr2 true
+TEST: -o attr2 pass attr2 true
+TEST: -o noattr2 pass attr2 false
+FORMAT:
+TEST: pass discard false
+TEST: -o discard pass discard true
+TEST: -o nodiscard pass discard false
+TEST: pass grpid false
+TEST: -o grpid pass grpid true
+TEST: -o bsdgroups pass grpid true
+TEST: -o nogrpid pass grpid false
+TEST: -o sysvgroups pass grpid false
+TEST: pass filestreams false
+TEST: -o filestreams pass filestreams true
+TEST: pass ikeep false
+TEST: -o ikeep pass ikeep true
+TEST: -o noikeep pass ikeep false
+TEST: pass inode64 true
+TEST: -o inode32 pass inode32 true
+TEST: -o inode64 pass inode64 true
+TEST: pass largeio false
+TEST: -o largeio pass largeio true
+TEST: -o nolargeio pass largeio false
+TEST: -o logbufs=8 pass logbufs=8 true
+TEST: -o logbufs=2 pass logbufs=2 true
+TEST: -o logbufs=1 fail
+TEST: -o logbufs=9 fail
+TEST: -o logbufs=99999999999999 fail
+FORMAT: -m crc=1 -l version=2
+TEST: -o logbsize=16384 pass logbsize=16k true
+TEST: -o logbsize=16k pass logbsize=16k true
+TEST: -o logbsize=32k pass logbsize=32k true
+TEST: -o logbsize=64k pass logbsize=64k true
+TEST: -o logbsize=128k pass logbsize=128k true
+TEST: -o logbsize=256k pass logbsize=256k true
+TEST: -o logbsize=8k fail
+TEST: -o logbsize=512k fail
+FORMAT: -m crc=0 -l version=1
+TEST: -o logbsize=16384 pass logbsize=16k true
+TEST: -o logbsize=16k pass logbsize=16k true
+TEST: -o logbsize=32k pass logbsize=32k true
+TEST: -o logbsize=64k fail
+FORMAT:
+TEST: pass logdev false
+TEST: -o logdev=/dev/loop1 fail
+FORMAT: -l logdev=/dev/loop1
+TEST: -o logdev=/dev/loop1 pass logdev=/dev/loop1 true
+TEST: fail
+FORMAT:
+TEST: pass noalign false
+TEST: -o noalign pass noalign true
+TEST: pass norecovery false
+TEST: -o norecovery,ro pass norecovery true
+TEST: -o norecovery fail
+TEST: pass nouuid false
+TEST: -o nouuid pass nouuid true
+TEST: pass noquota true
+TEST: -o noquota pass noquota true
+TEST: pass usrquota false
+TEST: -o uquota pass usrquota true
+TEST: -o usrquota pass usrquota true
+TEST: -o quota pass usrquota true
+TEST: -o uqnoenforce pass usrquota true
+TEST: -o qnoenforce pass usrquota true
+TEST: pass grpquota false
+TEST: -o gquota pass grpquota true
+TEST: -o grpquota pass grpquota true
+TEST: -o gqnoenforce pass gqnoenforce true
+TEST: pass prjquota false
+TEST: -o pquota pass prjquota true
+TEST: -o prjquota pass prjquota true
+TEST: -o pqnoenforce pass pqnoenforce true
+FORMAT: -d sunit=128,swidth=128
+TEST: -o sunit=8,swidth=8 pass sunit=8,swidth=8 true
+TEST: -o sunit=8,swidth=64 pass sunit=8,swidth=64 true
+TEST: -o sunit=128,swidth=128 pass sunit=128,swidth=128 true
+TEST: -o sunit=256,swidth=256 pass sunit=256,swidth=256 true
+TEST: -o sunit=2,swidth=2 fail
+FORMAT:
+TEST: pass swalloc false
+TEST: -o swalloc pass swalloc true
+TEST: pass wsync false
+TEST: -o wsync pass wsync true
** end of testing
next prev parent reply other threads:[~2020-01-13 18:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 10:34 [PATCH v2] xfstests: xfs mount option sanity test Zorro Lang
2019-10-30 16:39 ` Darrick J. Wong
2019-10-30 23:24 ` Zorro Lang
2019-12-11 6:42 ` Zorro Lang
2019-12-11 8:33 ` Ian Kent
2019-12-16 9:17 ` Zorro Lang
2019-12-16 9:36 ` Zorro Lang
2020-01-13 15:40 ` Zorro Lang
2020-01-13 17:33 ` Darrick J. Wong
2019-12-16 10:42 ` Ian Kent
2020-01-13 18:00 ` Darrick J. Wong
2020-01-13 18:23 ` Darrick J. Wong [this message]
2020-01-14 6:44 ` Zorro Lang
2020-01-14 6:41 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200113182356.GJ8247@magnolia \
--to=darrick.wong@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=zlang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox