All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] fstests: test updates for XFS 5.19 kernel mods
@ 2022-05-16  6:08 Dave Chinner
  2022-05-16  6:08 ` [PATCH 1/3] fstests: filter quota warnings Dave Chinner
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Dave Chinner @ 2022-05-16  6:08 UTC (permalink / raw)
  To: fstests

Hi folks,

These are patches to fix test failures after upstream kernel changes
have been merged to the for-next branch. We've remove quota warning
functionality altogether, the inode fork format verification is
stricter, and there's new log format items we need to check sizes
of.

You'll need the latest kernel and the latest larp xfsprogs branch
from Allison's tree (will be merged in upcoming 5.19 xfsprogs cycle)
for these tests to pass now.

Cheers,

Dave.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] fstests: filter quota warnings
  2022-05-16  6:08 [PATCH 0/3] fstests: test updates for XFS 5.19 kernel mods Dave Chinner
@ 2022-05-16  6:08 ` Dave Chinner
  2022-05-16 15:26   ` Darrick J. Wong
  2022-05-16  6:08 ` [PATCH 2/3] xfs/122: add attribute log formats to test output Dave Chinner
  2022-05-16  6:08 ` [PATCH 3/3] xfs/348: golden output is not correct Dave Chinner
  2 siblings, 1 reply; 9+ messages in thread
From: Dave Chinner @ 2022-05-16  6:08 UTC (permalink / raw)
  To: fstests

From: Dave Chinner <dchinner@redhat.com>

Quota warning code has been removed from the upstream kernel and now
returns -EINVAL errors. Seeing as we can't set warnings anymore and
they have always been non-functional in the kernel, just remove the
calls to set warnings filter those errors out so those tests pass
again.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 tests/xfs/050 | 9 ---------
 tests/xfs/153 | 9 ---------
 tests/xfs/299 | 9 ---------
 3 files changed, 27 deletions(-)

diff --git a/tests/xfs/050 b/tests/xfs/050
index 1847611b..2220e470 100755
--- a/tests/xfs/050
+++ b/tests/xfs/050
@@ -84,9 +84,6 @@ _exercise()
 	_qsetup $1
 
 	echo "Using type=$type id=$id" >>$seqres.full
-
-	$XFS_QUOTA_PROG -x -c "warn -$type 65535 -d" $SCRATCH_DEV
-
 	echo
 	echo "*** report no quota settings" | tee -a $seqres.full
 	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
@@ -113,7 +110,6 @@ _exercise()
 	_file_as_id $SCRATCH_MNT/softie3 $id $type 1024 0
 	_file_as_id $SCRATCH_MNT/softie4 $id $type 1024 0
 	_qmount
-	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" $SCRATCH_DEV
 	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
 		-c "repquota -birnN -$type" $SCRATCH_DEV |
 		_filter_quota_report | LC_COLLATE=POSIX sort -ru
@@ -122,8 +118,6 @@ _exercise()
 	echo "*** push past the soft block limit" | tee -a $seqres.full
 	_file_as_id $SCRATCH_MNT/softie $id $type $bsize 300
 	_qmount
-	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" \
-		-c "warn -b -$type 0 $id" $SCRATCH_DEV
 	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
 		-c "repquota -birnN -$type" $SCRATCH_DEV |
 		_filter_quota_report | LC_COLLATE=POSIX sort -ru
@@ -136,8 +130,6 @@ _exercise()
 		_file_as_id $SCRATCH_MNT/hard$i $id $type 1024 0
 	done
 	_qmount
-	$XFS_QUOTA_PROG -x  -c "warn -b -$type 0 $id" \
-		-c "warn -i -$type 0 $id" $SCRATCH_DEV
 	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
 		-c "repquota -birnN -$type" $SCRATCH_DEV |
 		_filter_quota_report | LC_COLLATE=POSIX sort -ru
@@ -149,7 +141,6 @@ _exercise()
 	echo "ls -l $SCRATCH_MNT" >>$seqres.full
 	ls -l $SCRATCH_MNT >>$seqres.full
 	_qmount
-	$XFS_QUOTA_PROG -x -c "warn -b -$type 0 $id" $SCRATCH_DEV
 	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
 		-c "repquota -birnN -$type" $SCRATCH_DEV |
 		_filter_and_check_blks | LC_COLLATE=POSIX sort -ru
diff --git a/tests/xfs/153 b/tests/xfs/153
index 8e1430c0..dbe26b68 100755
--- a/tests/xfs/153
+++ b/tests/xfs/153
@@ -89,9 +89,6 @@ run_tests()
 	_qsetup $1
 
 	echo "Using type=$type id=$id" >>$seqres.full
-
-	$XFS_QUOTA_PROG -x -c "warn -$type 65535 -d" $SCRATCH_DEV
-
 	echo
 	echo "*** report no quota settings" | tee -a $seqres.full
 	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
@@ -122,7 +119,6 @@ run_tests()
 	_file_as_id $SCRATCH_MNT/softie4 0 $type 1024 0
 	_scratch_umount_idmapped
 	_qmount
-	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" $SCRATCH_DEV
 	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
 		-c "repquota -birnN -$type" $SCRATCH_DEV |
 		_filter_quota_report | LC_COLLATE=POSIX sort -ru
@@ -133,8 +129,6 @@ run_tests()
 	_file_as_id $SCRATCH_MNT/softie 0 $type $bsize 300
 	_scratch_umount_idmapped
 	_qmount
-	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" \
-		-c "warn -b -$type 0 $id" $SCRATCH_DEV
 	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
 		-c "repquota -birnN -$type" $SCRATCH_DEV |
 		_filter_quota_report | LC_COLLATE=POSIX sort -ru
@@ -149,8 +143,6 @@ run_tests()
 		_scratch_umount_idmapped
 	done
 	_qmount
-	$XFS_QUOTA_PROG -x  -c "warn -b -$type 0 $id" \
-		-c "warn -i -$type 0 $id" $SCRATCH_DEV
 	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
 		-c "repquota -birnN -$type" $SCRATCH_DEV |
 		_filter_quota_report | LC_COLLATE=POSIX sort -ru
@@ -164,7 +156,6 @@ run_tests()
 	echo "ls -l $SCRATCH_MNT" >>$seqres.full
 	ls -l $SCRATCH_MNT >>$seqres.full
 	_qmount
-	$XFS_QUOTA_PROG -x -c "warn -b -$type 0 $id" $SCRATCH_DEV
 	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
 		-c "repquota -birnN -$type" $SCRATCH_DEV |
 		_filter_and_check_blks | LC_COLLATE=POSIX sort -ru
diff --git a/tests/xfs/299 b/tests/xfs/299
index a3077b0c..4b9df3c6 100755
--- a/tests/xfs/299
+++ b/tests/xfs/299
@@ -70,9 +70,6 @@ _exercise()
 	_qsetup $1
 
 	echo "Using type=$type id=$id" >>$seqres.full
-
-	$XFS_QUOTA_PROG -x -c "warn -$type 65535 -d" $SCRATCH_DEV
-
 	echo
 	echo "*** report no quota settings" | tee -a $seqres.full
 	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
@@ -99,7 +96,6 @@ _exercise()
 	_file_as_id $SCRATCH_MNT/softie3 $id $type 1024 0
 	_file_as_id $SCRATCH_MNT/softie4 $id $type 1024 0
 	_qmount
-	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" $SCRATCH_DEV
 	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
 		-c "repquota -birnN -$type" $SCRATCH_DEV |
 		_filter_quota_report | LC_COLLATE=POSIX sort -ru
@@ -108,8 +104,6 @@ _exercise()
 	echo "*** push past the soft block limit" | tee -a $seqres.full
 	_file_as_id $SCRATCH_MNT/softie $id $type $bsize 200
 	_qmount
-	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" \
-		-c "warn -b -$type 0 $id" $SCRATCH_DEV
 	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
 		-c "repquota -birnN -$type" $SCRATCH_DEV |
 		_filter_quota_report | LC_COLLATE=POSIX sort -ru
@@ -122,8 +116,6 @@ _exercise()
 		_file_as_id $SCRATCH_MNT/hard$i $id $type 1024 0
 	done
 	_qmount
-	$XFS_QUOTA_PROG -x  -c "warn -b -$type 0 $id" \
-		-c "warn -i -$type 0 $id" $SCRATCH_DEV
 	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
 		-c "repquota -birnN -$type" $SCRATCH_DEV |
 		_filter_quota_report | LC_COLLATE=POSIX sort -ru
@@ -135,7 +127,6 @@ _exercise()
 	echo "ls -l $SCRATCH_MNT" >>$seqres.full
 	ls -l $SCRATCH_MNT >>$seqres.full
 	_qmount
-	$XFS_QUOTA_PROG -x -c "warn -b -$type 0 $id" $SCRATCH_DEV
 	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
 		-c "repquota -birnN -$type" $SCRATCH_DEV |
 		_filter_and_check_blks | LC_COLLATE=POSIX sort -ru
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] xfs/122: add attribute log formats to test output.
  2022-05-16  6:08 [PATCH 0/3] fstests: test updates for XFS 5.19 kernel mods Dave Chinner
  2022-05-16  6:08 ` [PATCH 1/3] fstests: filter quota warnings Dave Chinner
@ 2022-05-16  6:08 ` Dave Chinner
  2022-05-16 15:27   ` Darrick J. Wong
  2022-05-16  6:08 ` [PATCH 3/3] xfs/348: golden output is not correct Dave Chinner
  2 siblings, 1 reply; 9+ messages in thread
From: Dave Chinner @ 2022-05-16  6:08 UTC (permalink / raw)
  To: fstests

From: Dave Chinner <dchinner@redhat.com>

Now that we have merged logged attributes, add the attribute log
format sizes to the on-disk structure size checking.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 tests/xfs/122.out | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/xfs/122.out b/tests/xfs/122.out
index 608faa4b..a56cbee8 100644
--- a/tests/xfs/122.out
+++ b/tests/xfs/122.out
@@ -63,6 +63,8 @@ sizeof(struct xfs_attr3_leaf_hdr) = 80
 sizeof(struct xfs_attr3_leafblock) = 88
 sizeof(struct xfs_attr3_rmt_hdr) = 56
 sizeof(struct xfs_attr_shortform) = 8
+sizeof(struct xfs_attrd_log_format) = 16
+sizeof(struct xfs_attri_log_format) = 40
 sizeof(struct xfs_btree_block) = 72
 sizeof(struct xfs_btree_block_lhdr) = 64
 sizeof(struct xfs_btree_block_shdr) = 48
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] xfs/348: golden output is not correct
  2022-05-16  6:08 [PATCH 0/3] fstests: test updates for XFS 5.19 kernel mods Dave Chinner
  2022-05-16  6:08 ` [PATCH 1/3] fstests: filter quota warnings Dave Chinner
  2022-05-16  6:08 ` [PATCH 2/3] xfs/122: add attribute log formats to test output Dave Chinner
@ 2022-05-16  6:08 ` Dave Chinner
  2022-05-16 15:29   ` Darrick J. Wong
  2 siblings, 1 reply; 9+ messages in thread
From: Dave Chinner @ 2022-05-16  6:08 UTC (permalink / raw)
  To: fstests

From: Dave Chinner <dchinner@redhat.com>

The output of xfs/348 encodes the observed behaviour at the time the
test was written, not the correct behaviour that should occur.
Recent improvements in verification checking in the upstream kernel
(1eb70f54c445 "xfs: validate inode fork size against fork format")
have resulted in the kernel having correct behaviour and now the
test fails. Fix the test output to reflect correct behaviour.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 tests/xfs/348.out | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/xfs/348.out b/tests/xfs/348.out
index 0d407718..9130f42a 100644
--- a/tests/xfs/348.out
+++ b/tests/xfs/348.out
@@ -108,7 +108,7 @@ would have junked entry "DATA" in directory PARENT_INO
 would have junked entry "EMPTY" in directory PARENT_INO
 would have junked entry "FIFO" in directory PARENT_INO
 stat: 'SCRATCH_MNT/test/DIR' is a directory
-stat: 'SCRATCH_MNT/test/DATA' is a directory
+stat: cannot statx 'SCRATCH_MNT/test/DATA': Structure needs cleaning
 stat: cannot statx 'SCRATCH_MNT/test/EMPTY': Structure needs cleaning
 stat: cannot statx 'SCRATCH_MNT/test/SYMLINK': Structure needs cleaning
 stat: cannot statx 'SCRATCH_MNT/test/CHRDEV': Structure needs cleaning
@@ -240,7 +240,7 @@ would have junked entry "DIR" in directory PARENT_INO
 would have junked entry "EMPTY" in directory PARENT_INO
 would have junked entry "FIFO" in directory PARENT_INO
 stat: cannot statx 'SCRATCH_MNT/test/DIR': Structure needs cleaning
-stat: 'SCRATCH_MNT/test/DATA' is a symbolic link
+stat: cannot statx 'SCRATCH_MNT/test/DATA': Structure needs cleaning
 stat: cannot statx 'SCRATCH_MNT/test/EMPTY': Structure needs cleaning
 stat: 'SCRATCH_MNT/test/SYMLINK' is a symbolic link
 stat: cannot statx 'SCRATCH_MNT/test/CHRDEV': Structure needs cleaning
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] fstests: filter quota warnings
  2022-05-16  6:08 ` [PATCH 1/3] fstests: filter quota warnings Dave Chinner
@ 2022-05-16 15:26   ` Darrick J. Wong
  2022-05-16 21:09     ` Dave Chinner
  2022-05-16 21:09     ` Darrick J. Wong
  0 siblings, 2 replies; 9+ messages in thread
From: Darrick J. Wong @ 2022-05-16 15:26 UTC (permalink / raw)
  To: Dave Chinner; +Cc: fstests

On Mon, May 16, 2022 at 04:08:05PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> Quota warning code has been removed from the upstream kernel and now
> returns -EINVAL errors. Seeing as we can't set warnings anymore and
> they have always been non-functional in the kernel, just remove the
> calls to set warnings filter those errors out so those tests pass
> again.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---
>  tests/xfs/050 | 9 ---------
>  tests/xfs/153 | 9 ---------
>  tests/xfs/299 | 9 ---------
>  3 files changed, 27 deletions(-)
> 
> diff --git a/tests/xfs/050 b/tests/xfs/050
> index 1847611b..2220e470 100755
> --- a/tests/xfs/050
> +++ b/tests/xfs/050
> @@ -84,9 +84,6 @@ _exercise()
>  	_qsetup $1
>  
>  	echo "Using type=$type id=$id" >>$seqres.full
> -
> -	$XFS_QUOTA_PROG -x -c "warn -$type 65535 -d" $SCRATCH_DEV
> -
>  	echo
>  	echo "*** report no quota settings" | tee -a $seqres.full
>  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> @@ -113,7 +110,6 @@ _exercise()
>  	_file_as_id $SCRATCH_MNT/softie3 $id $type 1024 0
>  	_file_as_id $SCRATCH_MNT/softie4 $id $type 1024 0
>  	_qmount
> -	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" $SCRATCH_DEV

I don't think we can revert this line from commit e5bbd47e
("xfs/{050,299}: clear quota warnings in between checks") because any
kernel released in the past two years will increment the warning
counter, and not resetting it to zero between tests means the golden
output will break.

We could, however, use more sed magic to force the warning counts in the
repquota output to be zero, which (I think) enables these changes to
move forward.

--D

>  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
>  		-c "repquota -birnN -$type" $SCRATCH_DEV |
>  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> @@ -122,8 +118,6 @@ _exercise()
>  	echo "*** push past the soft block limit" | tee -a $seqres.full
>  	_file_as_id $SCRATCH_MNT/softie $id $type $bsize 300
>  	_qmount
> -	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" \
> -		-c "warn -b -$type 0 $id" $SCRATCH_DEV
>  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
>  		-c "repquota -birnN -$type" $SCRATCH_DEV |
>  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> @@ -136,8 +130,6 @@ _exercise()
>  		_file_as_id $SCRATCH_MNT/hard$i $id $type 1024 0
>  	done
>  	_qmount
> -	$XFS_QUOTA_PROG -x  -c "warn -b -$type 0 $id" \
> -		-c "warn -i -$type 0 $id" $SCRATCH_DEV
>  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
>  		-c "repquota -birnN -$type" $SCRATCH_DEV |
>  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> @@ -149,7 +141,6 @@ _exercise()
>  	echo "ls -l $SCRATCH_MNT" >>$seqres.full
>  	ls -l $SCRATCH_MNT >>$seqres.full
>  	_qmount
> -	$XFS_QUOTA_PROG -x -c "warn -b -$type 0 $id" $SCRATCH_DEV
>  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
>  		-c "repquota -birnN -$type" $SCRATCH_DEV |
>  		_filter_and_check_blks | LC_COLLATE=POSIX sort -ru
> diff --git a/tests/xfs/153 b/tests/xfs/153
> index 8e1430c0..dbe26b68 100755
> --- a/tests/xfs/153
> +++ b/tests/xfs/153
> @@ -89,9 +89,6 @@ run_tests()
>  	_qsetup $1
>  
>  	echo "Using type=$type id=$id" >>$seqres.full
> -
> -	$XFS_QUOTA_PROG -x -c "warn -$type 65535 -d" $SCRATCH_DEV
> -
>  	echo
>  	echo "*** report no quota settings" | tee -a $seqres.full
>  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> @@ -122,7 +119,6 @@ run_tests()
>  	_file_as_id $SCRATCH_MNT/softie4 0 $type 1024 0
>  	_scratch_umount_idmapped
>  	_qmount
> -	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" $SCRATCH_DEV
>  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
>  		-c "repquota -birnN -$type" $SCRATCH_DEV |
>  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> @@ -133,8 +129,6 @@ run_tests()
>  	_file_as_id $SCRATCH_MNT/softie 0 $type $bsize 300
>  	_scratch_umount_idmapped
>  	_qmount
> -	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" \
> -		-c "warn -b -$type 0 $id" $SCRATCH_DEV
>  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
>  		-c "repquota -birnN -$type" $SCRATCH_DEV |
>  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> @@ -149,8 +143,6 @@ run_tests()
>  		_scratch_umount_idmapped
>  	done
>  	_qmount
> -	$XFS_QUOTA_PROG -x  -c "warn -b -$type 0 $id" \
> -		-c "warn -i -$type 0 $id" $SCRATCH_DEV
>  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
>  		-c "repquota -birnN -$type" $SCRATCH_DEV |
>  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> @@ -164,7 +156,6 @@ run_tests()
>  	echo "ls -l $SCRATCH_MNT" >>$seqres.full
>  	ls -l $SCRATCH_MNT >>$seqres.full
>  	_qmount
> -	$XFS_QUOTA_PROG -x -c "warn -b -$type 0 $id" $SCRATCH_DEV
>  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
>  		-c "repquota -birnN -$type" $SCRATCH_DEV |
>  		_filter_and_check_blks | LC_COLLATE=POSIX sort -ru
> diff --git a/tests/xfs/299 b/tests/xfs/299
> index a3077b0c..4b9df3c6 100755
> --- a/tests/xfs/299
> +++ b/tests/xfs/299
> @@ -70,9 +70,6 @@ _exercise()
>  	_qsetup $1
>  
>  	echo "Using type=$type id=$id" >>$seqres.full
> -
> -	$XFS_QUOTA_PROG -x -c "warn -$type 65535 -d" $SCRATCH_DEV
> -
>  	echo
>  	echo "*** report no quota settings" | tee -a $seqres.full
>  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> @@ -99,7 +96,6 @@ _exercise()
>  	_file_as_id $SCRATCH_MNT/softie3 $id $type 1024 0
>  	_file_as_id $SCRATCH_MNT/softie4 $id $type 1024 0
>  	_qmount
> -	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" $SCRATCH_DEV
>  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
>  		-c "repquota -birnN -$type" $SCRATCH_DEV |
>  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> @@ -108,8 +104,6 @@ _exercise()
>  	echo "*** push past the soft block limit" | tee -a $seqres.full
>  	_file_as_id $SCRATCH_MNT/softie $id $type $bsize 200
>  	_qmount
> -	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" \
> -		-c "warn -b -$type 0 $id" $SCRATCH_DEV
>  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
>  		-c "repquota -birnN -$type" $SCRATCH_DEV |
>  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> @@ -122,8 +116,6 @@ _exercise()
>  		_file_as_id $SCRATCH_MNT/hard$i $id $type 1024 0
>  	done
>  	_qmount
> -	$XFS_QUOTA_PROG -x  -c "warn -b -$type 0 $id" \
> -		-c "warn -i -$type 0 $id" $SCRATCH_DEV
>  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
>  		-c "repquota -birnN -$type" $SCRATCH_DEV |
>  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> @@ -135,7 +127,6 @@ _exercise()
>  	echo "ls -l $SCRATCH_MNT" >>$seqres.full
>  	ls -l $SCRATCH_MNT >>$seqres.full
>  	_qmount
> -	$XFS_QUOTA_PROG -x -c "warn -b -$type 0 $id" $SCRATCH_DEV
>  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
>  		-c "repquota -birnN -$type" $SCRATCH_DEV |
>  		_filter_and_check_blks | LC_COLLATE=POSIX sort -ru
> -- 
> 2.35.1
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] xfs/122: add attribute log formats to test output.
  2022-05-16  6:08 ` [PATCH 2/3] xfs/122: add attribute log formats to test output Dave Chinner
@ 2022-05-16 15:27   ` Darrick J. Wong
  0 siblings, 0 replies; 9+ messages in thread
From: Darrick J. Wong @ 2022-05-16 15:27 UTC (permalink / raw)
  To: Dave Chinner; +Cc: fstests

On Mon, May 16, 2022 at 04:08:06PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> Now that we have merged logged attributes, add the attribute log
> format sizes to the on-disk structure size checking.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>

Looks correct,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  tests/xfs/122.out | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/xfs/122.out b/tests/xfs/122.out
> index 608faa4b..a56cbee8 100644
> --- a/tests/xfs/122.out
> +++ b/tests/xfs/122.out
> @@ -63,6 +63,8 @@ sizeof(struct xfs_attr3_leaf_hdr) = 80
>  sizeof(struct xfs_attr3_leafblock) = 88
>  sizeof(struct xfs_attr3_rmt_hdr) = 56
>  sizeof(struct xfs_attr_shortform) = 8
> +sizeof(struct xfs_attrd_log_format) = 16
> +sizeof(struct xfs_attri_log_format) = 40
>  sizeof(struct xfs_btree_block) = 72
>  sizeof(struct xfs_btree_block_lhdr) = 64
>  sizeof(struct xfs_btree_block_shdr) = 48
> -- 
> 2.35.1
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] xfs/348: golden output is not correct
  2022-05-16  6:08 ` [PATCH 3/3] xfs/348: golden output is not correct Dave Chinner
@ 2022-05-16 15:29   ` Darrick J. Wong
  0 siblings, 0 replies; 9+ messages in thread
From: Darrick J. Wong @ 2022-05-16 15:29 UTC (permalink / raw)
  To: Dave Chinner; +Cc: fstests

On Mon, May 16, 2022 at 04:08:07PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> The output of xfs/348 encodes the observed behaviour at the time the
> test was written, not the correct behaviour that should occur.
> Recent improvements in verification checking in the upstream kernel
> (1eb70f54c445 "xfs: validate inode fork size against fork format")
> have resulted in the kernel having correct behaviour and now the
> test fails. Fix the test output to reflect correct behaviour.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>

Heh, I've long wondered (but never had the time) to go figure out why
more things weren't failing.  Thx for fixing the kernel.

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

--D

> ---
>  tests/xfs/348.out | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/xfs/348.out b/tests/xfs/348.out
> index 0d407718..9130f42a 100644
> --- a/tests/xfs/348.out
> +++ b/tests/xfs/348.out
> @@ -108,7 +108,7 @@ would have junked entry "DATA" in directory PARENT_INO
>  would have junked entry "EMPTY" in directory PARENT_INO
>  would have junked entry "FIFO" in directory PARENT_INO
>  stat: 'SCRATCH_MNT/test/DIR' is a directory
> -stat: 'SCRATCH_MNT/test/DATA' is a directory
> +stat: cannot statx 'SCRATCH_MNT/test/DATA': Structure needs cleaning
>  stat: cannot statx 'SCRATCH_MNT/test/EMPTY': Structure needs cleaning
>  stat: cannot statx 'SCRATCH_MNT/test/SYMLINK': Structure needs cleaning
>  stat: cannot statx 'SCRATCH_MNT/test/CHRDEV': Structure needs cleaning
> @@ -240,7 +240,7 @@ would have junked entry "DIR" in directory PARENT_INO
>  would have junked entry "EMPTY" in directory PARENT_INO
>  would have junked entry "FIFO" in directory PARENT_INO
>  stat: cannot statx 'SCRATCH_MNT/test/DIR': Structure needs cleaning
> -stat: 'SCRATCH_MNT/test/DATA' is a symbolic link
> +stat: cannot statx 'SCRATCH_MNT/test/DATA': Structure needs cleaning
>  stat: cannot statx 'SCRATCH_MNT/test/EMPTY': Structure needs cleaning
>  stat: 'SCRATCH_MNT/test/SYMLINK' is a symbolic link
>  stat: cannot statx 'SCRATCH_MNT/test/CHRDEV': Structure needs cleaning
> -- 
> 2.35.1
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] fstests: filter quota warnings
  2022-05-16 15:26   ` Darrick J. Wong
@ 2022-05-16 21:09     ` Dave Chinner
  2022-05-16 21:09     ` Darrick J. Wong
  1 sibling, 0 replies; 9+ messages in thread
From: Dave Chinner @ 2022-05-16 21:09 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: fstests

On Mon, May 16, 2022 at 08:26:18AM -0700, Darrick J. Wong wrote:
> On Mon, May 16, 2022 at 04:08:05PM +1000, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> > 
> > Quota warning code has been removed from the upstream kernel and now
> > returns -EINVAL errors. Seeing as we can't set warnings anymore and
> > they have always been non-functional in the kernel, just remove the
> > calls to set warnings filter those errors out so those tests pass
> > again.
> > 
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
> > ---
> >  tests/xfs/050 | 9 ---------
> >  tests/xfs/153 | 9 ---------
> >  tests/xfs/299 | 9 ---------
> >  3 files changed, 27 deletions(-)
> > 
> > diff --git a/tests/xfs/050 b/tests/xfs/050
> > index 1847611b..2220e470 100755
> > --- a/tests/xfs/050
> > +++ b/tests/xfs/050
> > @@ -84,9 +84,6 @@ _exercise()
> >  	_qsetup $1
> >  
> >  	echo "Using type=$type id=$id" >>$seqres.full
> > -
> > -	$XFS_QUOTA_PROG -x -c "warn -$type 65535 -d" $SCRATCH_DEV
> > -
> >  	echo
> >  	echo "*** report no quota settings" | tee -a $seqres.full
> >  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> > @@ -113,7 +110,6 @@ _exercise()
> >  	_file_as_id $SCRATCH_MNT/softie3 $id $type 1024 0
> >  	_file_as_id $SCRATCH_MNT/softie4 $id $type 1024 0
> >  	_qmount
> > -	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" $SCRATCH_DEV
> 
> I don't think we can revert this line from commit e5bbd47e
> ("xfs/{050,299}: clear quota warnings in between checks") because any
> kernel released in the past two years will increment the warning
> counter, and not resetting it to zero between tests means the golden
> output will break.

That's a feature, not a bug. i.e. it tells the people running the
tests that there are fixes they need to backport to the kernel they
are testing. Otherwise the moment a user sets warning limits they
will end up with a broken system.

If we want to make sure distros and LTS kernels backport fixes for
this issue, this is the way to make sure their QE/test environments
notice that these is something that needs fixing...

> We could, however, use more sed magic to force the warning counts in the
> repquota output to be zero, which (I think) enables these changes to
> move forward.

I think that's less good that the situation as it doesn't tell
anyone they are running a kernel with broken quota functionality
that needs fixing....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] fstests: filter quota warnings
  2022-05-16 15:26   ` Darrick J. Wong
  2022-05-16 21:09     ` Dave Chinner
@ 2022-05-16 21:09     ` Darrick J. Wong
  1 sibling, 0 replies; 9+ messages in thread
From: Darrick J. Wong @ 2022-05-16 21:09 UTC (permalink / raw)
  To: Dave Chinner; +Cc: fstests

On Mon, May 16, 2022 at 08:26:18AM -0700, Darrick J. Wong wrote:
> On Mon, May 16, 2022 at 04:08:05PM +1000, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> > 
> > Quota warning code has been removed from the upstream kernel and now
> > returns -EINVAL errors. Seeing as we can't set warnings anymore and
> > they have always been non-functional in the kernel, just remove the
> > calls to set warnings filter those errors out so those tests pass
> > again.
> > 
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
> > ---
> >  tests/xfs/050 | 9 ---------
> >  tests/xfs/153 | 9 ---------
> >  tests/xfs/299 | 9 ---------
> >  3 files changed, 27 deletions(-)
> > 
> > diff --git a/tests/xfs/050 b/tests/xfs/050
> > index 1847611b..2220e470 100755
> > --- a/tests/xfs/050
> > +++ b/tests/xfs/050
> > @@ -84,9 +84,6 @@ _exercise()
> >  	_qsetup $1
> >  
> >  	echo "Using type=$type id=$id" >>$seqres.full
> > -
> > -	$XFS_QUOTA_PROG -x -c "warn -$type 65535 -d" $SCRATCH_DEV
> > -
> >  	echo
> >  	echo "*** report no quota settings" | tee -a $seqres.full
> >  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> > @@ -113,7 +110,6 @@ _exercise()
> >  	_file_as_id $SCRATCH_MNT/softie3 $id $type 1024 0
> >  	_file_as_id $SCRATCH_MNT/softie4 $id $type 1024 0
> >  	_qmount
> > -	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" $SCRATCH_DEV
> 
> I don't think we can revert this line from commit e5bbd47e
> ("xfs/{050,299}: clear quota warnings in between checks") because any
> kernel released in the past two years will increment the warning
> counter, and not resetting it to zero between tests means the golden
> output will break.
> 
> We could, however, use more sed magic to force the warning counts in the
> repquota output to be zero, which (I think) enables these changes to
> move forward.

...or, redirecting stdout and stderr to /dev/null makes the test pass on
really old, 5.18, and 5.19-next kernels:

	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" $SCRATCH_DEV &>> /dev/null

--D

> --D
> 
> >  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> >  		-c "repquota -birnN -$type" $SCRATCH_DEV |
> >  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> > @@ -122,8 +118,6 @@ _exercise()
> >  	echo "*** push past the soft block limit" | tee -a $seqres.full
> >  	_file_as_id $SCRATCH_MNT/softie $id $type $bsize 300
> >  	_qmount
> > -	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" \
> > -		-c "warn -b -$type 0 $id" $SCRATCH_DEV
> >  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> >  		-c "repquota -birnN -$type" $SCRATCH_DEV |
> >  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> > @@ -136,8 +130,6 @@ _exercise()
> >  		_file_as_id $SCRATCH_MNT/hard$i $id $type 1024 0
> >  	done
> >  	_qmount
> > -	$XFS_QUOTA_PROG -x  -c "warn -b -$type 0 $id" \
> > -		-c "warn -i -$type 0 $id" $SCRATCH_DEV
> >  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> >  		-c "repquota -birnN -$type" $SCRATCH_DEV |
> >  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> > @@ -149,7 +141,6 @@ _exercise()
> >  	echo "ls -l $SCRATCH_MNT" >>$seqres.full
> >  	ls -l $SCRATCH_MNT >>$seqres.full
> >  	_qmount
> > -	$XFS_QUOTA_PROG -x -c "warn -b -$type 0 $id" $SCRATCH_DEV
> >  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> >  		-c "repquota -birnN -$type" $SCRATCH_DEV |
> >  		_filter_and_check_blks | LC_COLLATE=POSIX sort -ru
> > diff --git a/tests/xfs/153 b/tests/xfs/153
> > index 8e1430c0..dbe26b68 100755
> > --- a/tests/xfs/153
> > +++ b/tests/xfs/153
> > @@ -89,9 +89,6 @@ run_tests()
> >  	_qsetup $1
> >  
> >  	echo "Using type=$type id=$id" >>$seqres.full
> > -
> > -	$XFS_QUOTA_PROG -x -c "warn -$type 65535 -d" $SCRATCH_DEV
> > -
> >  	echo
> >  	echo "*** report no quota settings" | tee -a $seqres.full
> >  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> > @@ -122,7 +119,6 @@ run_tests()
> >  	_file_as_id $SCRATCH_MNT/softie4 0 $type 1024 0
> >  	_scratch_umount_idmapped
> >  	_qmount
> > -	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" $SCRATCH_DEV
> >  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> >  		-c "repquota -birnN -$type" $SCRATCH_DEV |
> >  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> > @@ -133,8 +129,6 @@ run_tests()
> >  	_file_as_id $SCRATCH_MNT/softie 0 $type $bsize 300
> >  	_scratch_umount_idmapped
> >  	_qmount
> > -	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" \
> > -		-c "warn -b -$type 0 $id" $SCRATCH_DEV
> >  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> >  		-c "repquota -birnN -$type" $SCRATCH_DEV |
> >  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> > @@ -149,8 +143,6 @@ run_tests()
> >  		_scratch_umount_idmapped
> >  	done
> >  	_qmount
> > -	$XFS_QUOTA_PROG -x  -c "warn -b -$type 0 $id" \
> > -		-c "warn -i -$type 0 $id" $SCRATCH_DEV
> >  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> >  		-c "repquota -birnN -$type" $SCRATCH_DEV |
> >  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> > @@ -164,7 +156,6 @@ run_tests()
> >  	echo "ls -l $SCRATCH_MNT" >>$seqres.full
> >  	ls -l $SCRATCH_MNT >>$seqres.full
> >  	_qmount
> > -	$XFS_QUOTA_PROG -x -c "warn -b -$type 0 $id" $SCRATCH_DEV
> >  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> >  		-c "repquota -birnN -$type" $SCRATCH_DEV |
> >  		_filter_and_check_blks | LC_COLLATE=POSIX sort -ru
> > diff --git a/tests/xfs/299 b/tests/xfs/299
> > index a3077b0c..4b9df3c6 100755
> > --- a/tests/xfs/299
> > +++ b/tests/xfs/299
> > @@ -70,9 +70,6 @@ _exercise()
> >  	_qsetup $1
> >  
> >  	echo "Using type=$type id=$id" >>$seqres.full
> > -
> > -	$XFS_QUOTA_PROG -x -c "warn -$type 65535 -d" $SCRATCH_DEV
> > -
> >  	echo
> >  	echo "*** report no quota settings" | tee -a $seqres.full
> >  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> > @@ -99,7 +96,6 @@ _exercise()
> >  	_file_as_id $SCRATCH_MNT/softie3 $id $type 1024 0
> >  	_file_as_id $SCRATCH_MNT/softie4 $id $type 1024 0
> >  	_qmount
> > -	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" $SCRATCH_DEV
> >  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> >  		-c "repquota -birnN -$type" $SCRATCH_DEV |
> >  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> > @@ -108,8 +104,6 @@ _exercise()
> >  	echo "*** push past the soft block limit" | tee -a $seqres.full
> >  	_file_as_id $SCRATCH_MNT/softie $id $type $bsize 200
> >  	_qmount
> > -	$XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" \
> > -		-c "warn -b -$type 0 $id" $SCRATCH_DEV
> >  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> >  		-c "repquota -birnN -$type" $SCRATCH_DEV |
> >  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> > @@ -122,8 +116,6 @@ _exercise()
> >  		_file_as_id $SCRATCH_MNT/hard$i $id $type 1024 0
> >  	done
> >  	_qmount
> > -	$XFS_QUOTA_PROG -x  -c "warn -b -$type 0 $id" \
> > -		-c "warn -i -$type 0 $id" $SCRATCH_DEV
> >  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> >  		-c "repquota -birnN -$type" $SCRATCH_DEV |
> >  		_filter_quota_report | LC_COLLATE=POSIX sort -ru
> > @@ -135,7 +127,6 @@ _exercise()
> >  	echo "ls -l $SCRATCH_MNT" >>$seqres.full
> >  	ls -l $SCRATCH_MNT >>$seqres.full
> >  	_qmount
> > -	$XFS_QUOTA_PROG -x -c "warn -b -$type 0 $id" $SCRATCH_DEV
> >  	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
> >  		-c "repquota -birnN -$type" $SCRATCH_DEV |
> >  		_filter_and_check_blks | LC_COLLATE=POSIX sort -ru
> > -- 
> > 2.35.1
> > 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-05-16 21:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16  6:08 [PATCH 0/3] fstests: test updates for XFS 5.19 kernel mods Dave Chinner
2022-05-16  6:08 ` [PATCH 1/3] fstests: filter quota warnings Dave Chinner
2022-05-16 15:26   ` Darrick J. Wong
2022-05-16 21:09     ` Dave Chinner
2022-05-16 21:09     ` Darrick J. Wong
2022-05-16  6:08 ` [PATCH 2/3] xfs/122: add attribute log formats to test output Dave Chinner
2022-05-16 15:27   ` Darrick J. Wong
2022-05-16  6:08 ` [PATCH 3/3] xfs/348: golden output is not correct Dave Chinner
2022-05-16 15:29   ` Darrick J. Wong

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.