* [PATCH 0/3] xfstest random fixes @ 2021-06-28 8:52 Anju T Sudhakar 2021-06-28 8:52 ` [PATCH 1/3] xfs/504: Add scratch_mount before checking for xfs_scrub unicode support Anju T Sudhakar ` (2 more replies) 0 siblings, 3 replies; 9+ messages in thread From: Anju T Sudhakar @ 2021-06-28 8:52 UTC (permalink / raw) To: fstests; +Cc: anju Below are some of xfstest fixes with 4k blocksize(ppc64) and xfs filesystem. Anju T Sudhakar (3): xfs/504: Add scratch_mount before checking for xfs_scrub unicode support. xfs/514: Check xfsprogs version for verifying the xfs_db commands xfs/515: Check xfsprogs version for testing xfs_quota commands tests/xfs/504 | 3 +++ tests/xfs/514 | 12 +++++++++++- tests/xfs/515 | 15 +++++++++++++-- 3 files changed, 27 insertions(+), 3 deletions(-) -- 2.31.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/3] xfs/504: Add scratch_mount before checking for xfs_scrub unicode support. 2021-06-28 8:52 [PATCH 0/3] xfstest random fixes Anju T Sudhakar @ 2021-06-28 8:52 ` Anju T Sudhakar 2021-06-28 15:43 ` Darrick J. Wong 2021-06-28 8:52 ` [PATCH 2/3] xfs/514: Check xfsprogs version for verifying the xfs_db commands Anju T Sudhakar 2021-06-28 8:52 ` [PATCH 3/3] xfs/515: Check xfsprogs version for testing xfs_quota commands Anju T Sudhakar 2 siblings, 1 reply; 9+ messages in thread From: Anju T Sudhakar @ 2021-06-28 8:52 UTC (permalink / raw) To: fstests; +Cc: anju We may not detect the error `Inappropriate ioctl for device`, while running `$XFS_IO_PROG -c "scrub probe" "$mountpoint"`, if scratch device is not mounted before invoking _check_xfs_scrub_does_unicode(). So do _scratch_mount before checking for xfs_scrub support. Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com> --- tests/xfs/504 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/xfs/504 b/tests/xfs/504 index 40318314..291ee4e4 100755 --- a/tests/xfs/504 +++ b/tests/xfs/504 @@ -21,8 +21,11 @@ _require_xfs_io_command 'label' echo "Silence is golden." +_scratch_mkfs > /dev/null +_scratch_mount want_scrub= _check_xfs_scrub_does_unicode "$SCRATCH_MNT" "$SCRATCH_DEV" && want_scrub=yes +_scratch_unmount filter_scrub() { grep 'Unicode' | sed -e 's/^.*Duplicate/Duplicate/g' -- 2.31.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] xfs/504: Add scratch_mount before checking for xfs_scrub unicode support. 2021-06-28 8:52 ` [PATCH 1/3] xfs/504: Add scratch_mount before checking for xfs_scrub unicode support Anju T Sudhakar @ 2021-06-28 15:43 ` Darrick J. Wong 0 siblings, 0 replies; 9+ messages in thread From: Darrick J. Wong @ 2021-06-28 15:43 UTC (permalink / raw) To: Anju T Sudhakar; +Cc: fstests On Mon, Jun 28, 2021 at 02:22:57PM +0530, Anju T Sudhakar wrote: > We may not detect the error `Inappropriate ioctl for device`, while running > `$XFS_IO_PROG -c "scrub probe" "$mountpoint"`, if scratch device is not > mounted before invoking _check_xfs_scrub_does_unicode(). So do > _scratch_mount before checking for xfs_scrub support. > > Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com> Oops, heh, good catch! Reviewed-by: Darrick J. Wong <djwong@kernel.org> --D > --- > tests/xfs/504 | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tests/xfs/504 b/tests/xfs/504 > index 40318314..291ee4e4 100755 > --- a/tests/xfs/504 > +++ b/tests/xfs/504 > @@ -21,8 +21,11 @@ _require_xfs_io_command 'label' > > echo "Silence is golden." > > +_scratch_mkfs > /dev/null > +_scratch_mount > want_scrub= > _check_xfs_scrub_does_unicode "$SCRATCH_MNT" "$SCRATCH_DEV" && want_scrub=yes > +_scratch_unmount > > filter_scrub() { > grep 'Unicode' | sed -e 's/^.*Duplicate/Duplicate/g' > -- > 2.31.1 > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/3] xfs/514: Check xfsprogs version for verifying the xfs_db commands 2021-06-28 8:52 [PATCH 0/3] xfstest random fixes Anju T Sudhakar 2021-06-28 8:52 ` [PATCH 1/3] xfs/504: Add scratch_mount before checking for xfs_scrub unicode support Anju T Sudhakar @ 2021-06-28 8:52 ` Anju T Sudhakar 2021-06-28 14:16 ` Zorro Lang 2021-06-28 15:35 ` Darrick J. Wong 2021-06-28 8:52 ` [PATCH 3/3] xfs/515: Check xfsprogs version for testing xfs_quota commands Anju T Sudhakar 2 siblings, 2 replies; 9+ messages in thread From: Anju T Sudhakar @ 2021-06-28 8:52 UTC (permalink / raw) To: fstests; +Cc: anju xfs_db commands like `attr_remove, attr_set, btheight, and logformat`, are documented only in xfsprogs version v5.5 and later. So skip checking for these commands in xfs_db manpage,if the test is running with xfsprogs version less than v5.5. Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com> --- Query: The reason to add this check is, while running xfstest with an older version of xfsprogs, this test case flags as failure, though xfs_db is not expected to have those commands. Otherwise upon failure we should ask the user to use the latest version of xfsprogs. OR is there any better solution for this? tests/xfs/514 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/xfs/514 b/tests/xfs/514 index a9c67645..8da66f41 100755 --- a/tests/xfs/514 +++ b/tests/xfs/514 @@ -27,6 +27,11 @@ _require_test echo "Silence is golden" MANPAGE=$($MAN_PROG --path xfs_db) +# xfs_db commands - attr_remove, attr_set, btheight, and logformat +# are documented in 5.5.0 and later versions only. So skip checking for +# those commands if the version is less than 5.5.0. +command_list="attr_set attr_remove btheight logformat" +req_version=$($XFS_DB_PROG -V | cut -d" " -f3) case "$MANPAGE" in *.gz|*.z\|*.Z) CAT=zcat;; @@ -41,7 +46,12 @@ truncate -s 128m $file $MKFS_XFS_PROG $file >> /dev/null for COMMAND in `$XFS_DB_PROG -x -c help $file | awk '{print $1}' | grep -v "^Use"`; do - $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \ + if [ "$req_version" \< "5.5.0" ]; then + if (echo $command_list | tr ' ' '\n' | grep -F -x -q "$COMMAND");then + continue + fi + fi + $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \ echo "$COMMAND not documented in the xfs_db manpage" done -- 2.31.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] xfs/514: Check xfsprogs version for verifying the xfs_db commands 2021-06-28 8:52 ` [PATCH 2/3] xfs/514: Check xfsprogs version for verifying the xfs_db commands Anju T Sudhakar @ 2021-06-28 14:16 ` Zorro Lang 2021-06-28 15:35 ` Darrick J. Wong 1 sibling, 0 replies; 9+ messages in thread From: Zorro Lang @ 2021-06-28 14:16 UTC (permalink / raw) To: Anju T Sudhakar; +Cc: fstests On Mon, Jun 28, 2021 at 02:22:58PM +0530, Anju T Sudhakar wrote: > xfs_db commands like `attr_remove, attr_set, btheight, and logformat`, > are documented only in xfsprogs version v5.5 and later. So skip checking > for these commands in xfs_db manpage,if the test is running with > xfsprogs version less than v5.5. > > Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com> > --- > Query: The reason to add this check is, while running xfstest with an > older version of xfsprogs, this test case flags as failure, though > xfs_db is not expected to have those commands. Otherwise upon failure we > should ask the user to use the latest version of xfsprogs. > OR is there any better solution for this? > > tests/xfs/514 | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/tests/xfs/514 b/tests/xfs/514 > index a9c67645..8da66f41 100755 > --- a/tests/xfs/514 > +++ b/tests/xfs/514 > @@ -27,6 +27,11 @@ _require_test > echo "Silence is golden" > > MANPAGE=$($MAN_PROG --path xfs_db) > +# xfs_db commands - attr_remove, attr_set, btheight, and logformat > +# are documented in 5.5.0 and later versions only. So skip checking for > +# those commands if the version is less than 5.5.0. > +command_list="attr_set attr_remove btheight logformat" > +req_version=$($XFS_DB_PROG -V | cut -d" " -f3) Generally I think it's a known "bug"(doc missing), and this case hit this bug in old xfsprogs, that's as expected. Thanks, Zorro > > case "$MANPAGE" in > *.gz|*.z\|*.Z) CAT=zcat;; > @@ -41,7 +46,12 @@ truncate -s 128m $file > $MKFS_XFS_PROG $file >> /dev/null > > for COMMAND in `$XFS_DB_PROG -x -c help $file | awk '{print $1}' | grep -v "^Use"`; do > - $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \ > + if [ "$req_version" \< "5.5.0" ]; then > + if (echo $command_list | tr ' ' '\n' | grep -F -x -q "$COMMAND");then > + continue > + fi > + fi > + $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \ > echo "$COMMAND not documented in the xfs_db manpage" > done > > -- > 2.31.1 > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] xfs/514: Check xfsprogs version for verifying the xfs_db commands 2021-06-28 8:52 ` [PATCH 2/3] xfs/514: Check xfsprogs version for verifying the xfs_db commands Anju T Sudhakar 2021-06-28 14:16 ` Zorro Lang @ 2021-06-28 15:35 ` Darrick J. Wong 2021-07-04 7:29 ` Anju T Sudhakar 1 sibling, 1 reply; 9+ messages in thread From: Darrick J. Wong @ 2021-06-28 15:35 UTC (permalink / raw) To: Anju T Sudhakar; +Cc: fstests On Mon, Jun 28, 2021 at 02:22:58PM +0530, Anju T Sudhakar wrote: > xfs_db commands like `attr_remove, attr_set, btheight, and logformat`, > are documented only in xfsprogs version v5.5 and later. So skip checking > for these commands in xfs_db manpage,if the test is running with > xfsprogs version less than v5.5. > > Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com> > --- > Query: The reason to add this check is, while running xfstest with an > older version of xfsprogs, this test case flags as failure, though > xfs_db is not expected to have those commands. Otherwise upon failure we > should ask the user to use the latest version of xfsprogs. > OR is there any better solution for this? If you're shipping xfsprogs 5.5 in a product, why not update the manpage to document the functionality that's in your product? If you aren't shipping 5.5, then why run such an old version? --D > > tests/xfs/514 | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/tests/xfs/514 b/tests/xfs/514 > index a9c67645..8da66f41 100755 > --- a/tests/xfs/514 > +++ b/tests/xfs/514 > @@ -27,6 +27,11 @@ _require_test > echo "Silence is golden" > > MANPAGE=$($MAN_PROG --path xfs_db) > +# xfs_db commands - attr_remove, attr_set, btheight, and logformat > +# are documented in 5.5.0 and later versions only. So skip checking for > +# those commands if the version is less than 5.5.0. > +command_list="attr_set attr_remove btheight logformat" > +req_version=$($XFS_DB_PROG -V | cut -d" " -f3) > > case "$MANPAGE" in > *.gz|*.z\|*.Z) CAT=zcat;; > @@ -41,7 +46,12 @@ truncate -s 128m $file > $MKFS_XFS_PROG $file >> /dev/null > > for COMMAND in `$XFS_DB_PROG -x -c help $file | awk '{print $1}' | grep -v "^Use"`; do > - $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \ > + if [ "$req_version" \< "5.5.0" ]; then > + if (echo $command_list | tr ' ' '\n' | grep -F -x -q "$COMMAND");then > + continue > + fi > + fi > + $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \ > echo "$COMMAND not documented in the xfs_db manpage" > done > > -- > 2.31.1 > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] xfs/514: Check xfsprogs version for verifying the xfs_db commands 2021-06-28 15:35 ` Darrick J. Wong @ 2021-07-04 7:29 ` Anju T Sudhakar 0 siblings, 0 replies; 9+ messages in thread From: Anju T Sudhakar @ 2021-07-04 7:29 UTC (permalink / raw) To: Darrick J. Wong; +Cc: fstests, zlang Hi, On 6/28/21 9:05 PM, Darrick J. Wong wrote: > On Mon, Jun 28, 2021 at 02:22:58PM +0530, Anju T Sudhakar wrote: >> xfs_db commands like `attr_remove, attr_set, btheight, and logformat`, >> are documented only in xfsprogs version v5.5 and later. So skip checking >> for these commands in xfs_db manpage,if the test is running with >> xfsprogs version less than v5.5. >> >> Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com> >> --- >> Query: The reason to add this check is, while running xfstest with an >> older version of xfsprogs, this test case flags as failure, though >> xfs_db is not expected to have those commands. Otherwise upon failure we >> should ask the user to use the latest version of xfsprogs. >> OR is there any better solution for this? > If you're shipping xfsprogs 5.5 in a product, why not update the manpage > to document the functionality that's in your product? If you aren't > shipping 5.5, then why run such an old version? > > --D OK. Then I think we can drop patch 2/3 and 3/3 in this series, as both checks for the xfsprogs version to run the test. Thanks, Anju ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/3] xfs/515: Check xfsprogs version for testing xfs_quota commands 2021-06-28 8:52 [PATCH 0/3] xfstest random fixes Anju T Sudhakar 2021-06-28 8:52 ` [PATCH 1/3] xfs/504: Add scratch_mount before checking for xfs_scrub unicode support Anju T Sudhakar 2021-06-28 8:52 ` [PATCH 2/3] xfs/514: Check xfsprogs version for verifying the xfs_db commands Anju T Sudhakar @ 2021-06-28 8:52 ` Anju T Sudhakar 2021-06-28 14:19 ` Zorro Lang 2 siblings, 1 reply; 9+ messages in thread From: Anju T Sudhakar @ 2021-06-28 8:52 UTC (permalink / raw) To: fstests; +Cc: anju xfs_quota command 'limit' is reformated in xfsprogs version v5.5.0, to make it suitable for this(xfs/515) test case. So the test case will flag failure while running with xfsprogs version less than v5.5, even though `limit` is documented in xfs_quota manpage. So skip this test for xfsprogs versions less than v5.5. Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com> --- tests/xfs/515 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/xfs/515 b/tests/xfs/515 index 32216fe6..5eb97aff 100755 --- a/tests/xfs/515 +++ b/tests/xfs/515 @@ -27,6 +27,11 @@ _require_test echo "Silence is golden" MANPAGE=$($MAN_PROG --path xfs_quota) +# xfs_quota command 'limit' is reformated in xfsprogs version v5.5.0, +# to make it suitable for this test case. For xfprogs versions less than +# v5.5.0, this test case can not detect the command 'limit'. +req_version=$($XFS_DB_PROG -V | cut -d" " -f3) +req_command="limit" case "$MANPAGE" in *.gz|*.z\|*.Z) CAT=zcat;; @@ -36,8 +41,14 @@ case "$MANPAGE" in esac _require_command `which $CAT` $CAT -for COMMAND in `$XFS_QUOTA_PROG -x -c help $file | awk '{print $1}' | grep -v "^Use"`; do - $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \ +for COMMAND in `$XFS_QUOTA_PROG -x -c help $file | awk '{print $1}' | grep -v "^Use"`; +do + if [ "$req_version" \< "5.5.0" ]; then + if [ "$COMMAND" == "$req_command" ];then + continue + fi + fi + $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \ echo "$COMMAND not documented in the xfs_quota manpage" done -- 2.31.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] xfs/515: Check xfsprogs version for testing xfs_quota commands 2021-06-28 8:52 ` [PATCH 3/3] xfs/515: Check xfsprogs version for testing xfs_quota commands Anju T Sudhakar @ 2021-06-28 14:19 ` Zorro Lang 0 siblings, 0 replies; 9+ messages in thread From: Zorro Lang @ 2021-06-28 14:19 UTC (permalink / raw) To: Anju T Sudhakar; +Cc: fstests On Mon, Jun 28, 2021 at 02:22:59PM +0530, Anju T Sudhakar wrote: > xfs_quota command 'limit' is reformated in xfsprogs version v5.5.0, to > make it suitable for this(xfs/515) test case. So the test case will > flag failure while running with xfsprogs version less than v5.5, even > though `limit` is documented in xfs_quota manpage. So skip this test for > xfsprogs versions less than v5.5. > > Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com> > --- > tests/xfs/515 | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > > diff --git a/tests/xfs/515 b/tests/xfs/515 > index 32216fe6..5eb97aff 100755 > --- a/tests/xfs/515 > +++ b/tests/xfs/515 > @@ -27,6 +27,11 @@ _require_test > echo "Silence is golden" > > MANPAGE=$($MAN_PROG --path xfs_quota) > +# xfs_quota command 'limit' is reformated in xfsprogs version v5.5.0, > +# to make it suitable for this test case. For xfprogs versions less than > +# v5.5.0, this test case can not detect the command 'limit'. > +req_version=$($XFS_DB_PROG -V | cut -d" " -f3) > +req_command="limit" It's similar as the patch of [2/3], and I have similar review points. And checking program version isn't a good way to judge the expect behavior of a program, especially downstream always backport patches of upstream. Thanks, Zorro > > case "$MANPAGE" in > *.gz|*.z\|*.Z) CAT=zcat;; > @@ -36,8 +41,14 @@ case "$MANPAGE" in > esac > _require_command `which $CAT` $CAT > > -for COMMAND in `$XFS_QUOTA_PROG -x -c help $file | awk '{print $1}' | grep -v "^Use"`; do > - $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \ > +for COMMAND in `$XFS_QUOTA_PROG -x -c help $file | awk '{print $1}' | grep -v "^Use"`; > +do > + if [ "$req_version" \< "5.5.0" ]; then > + if [ "$COMMAND" == "$req_command" ];then > + continue > + fi > + fi > + $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \ > echo "$COMMAND not documented in the xfs_quota manpage" > done > > -- > 2.31.1 > ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-07-04 7:29 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-06-28 8:52 [PATCH 0/3] xfstest random fixes Anju T Sudhakar 2021-06-28 8:52 ` [PATCH 1/3] xfs/504: Add scratch_mount before checking for xfs_scrub unicode support Anju T Sudhakar 2021-06-28 15:43 ` Darrick J. Wong 2021-06-28 8:52 ` [PATCH 2/3] xfs/514: Check xfsprogs version for verifying the xfs_db commands Anju T Sudhakar 2021-06-28 14:16 ` Zorro Lang 2021-06-28 15:35 ` Darrick J. Wong 2021-07-04 7:29 ` Anju T Sudhakar 2021-06-28 8:52 ` [PATCH 3/3] xfs/515: Check xfsprogs version for testing xfs_quota commands Anju T Sudhakar 2021-06-28 14:19 ` Zorro Lang
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.