All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] xfs/018: fix LARP testing for small block sizes
@ 2022-07-19 22:25 Catherine Hoang
  2022-07-20  1:23 ` Alli
  2022-07-20 17:25 ` Darrick J. Wong
  0 siblings, 2 replies; 4+ messages in thread
From: Catherine Hoang @ 2022-07-19 22:25 UTC (permalink / raw)
  To: linux-xfs, fstests

From: "Darrick J. Wong" <djwong@kernel.org>

Fix this test to work properly when the filesystem block size is less
than 4k.  Tripping the error injection points on shape changes in the
xattr structure must be done dynamically.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
---
 tests/xfs/018     | 14 +++++++++-----
 tests/xfs/018.out | 47 ++++-------------------------------------------
 2 files changed, 13 insertions(+), 48 deletions(-)

diff --git a/tests/xfs/018 b/tests/xfs/018
index 041a3b24..323279b5 100755
--- a/tests/xfs/018
+++ b/tests/xfs/018
@@ -47,7 +47,8 @@ test_attr_replay()
 	touch $testfile
 
 	# Verify attr recovery
-	$ATTR_PROG -l $testfile | _filter_scratch
+	$ATTR_PROG -l $testfile >> $seqres.full
+	echo "Checking contents of $attr_name" >> $seqres.full
 	echo -n "$attr_name: "
 	$ATTR_PROG -q -g $attr_name $testfile 2> /dev/null | md5sum;
 
@@ -98,6 +99,9 @@ attr64k="$attr32k$attr32k"
 echo "*** mkfs"
 _scratch_mkfs >/dev/null
 
+blk_sz=$(_scratch_xfs_get_sb_field blocksize)
+multiplier=$(( $blk_sz / 276 )) # 256 + 20 to account for attr name
+
 echo "*** mount FS"
 _scratch_mount
 
@@ -140,12 +144,12 @@ test_attr_replay extent_file1 "attr_name2" $attr1k "s" "larp"
 test_attr_replay extent_file1 "attr_name2" $attr1k "r" "larp"
 
 # extent, inject error on split
-create_test_file extent_file2 3 $attr1k
-test_attr_replay extent_file2 "attr_name4" $attr1k "s" "da_leaf_split"
+create_test_file extent_file2 $multiplier $attr256
+test_attr_replay extent_file2 "attr_nameXXXX" $attr256 "s" "da_leaf_split"
 
 # extent, inject error on fork transition
-create_test_file extent_file3 3 $attr1k
-test_attr_replay extent_file3 "attr_name4" $attr1k "s" "attr_leaf_to_node"
+create_test_file extent_file3 $multiplier $attr256
+test_attr_replay extent_file3 "attr_nameXXXX" $attr256 "s" "attr_leaf_to_node"
 
 # extent, remote
 create_test_file extent_file4 1 $attr1k
diff --git a/tests/xfs/018.out b/tests/xfs/018.out
index 022b0ca3..57dc448a 100644
--- a/tests/xfs/018.out
+++ b/tests/xfs/018.out
@@ -4,7 +4,6 @@ QA output created by 018
 attr_set: Input/output error
 Could not set "attr_name" for SCRATCH_MNT/testdir/empty_file1
 touch: cannot touch 'SCRATCH_MNT/testdir/empty_file1': Input/output error
-Attribute "attr_name" has a 65 byte value for SCRATCH_MNT/testdir/empty_file1
 attr_name: cfbe2a33be4601d2b655d099a18378fc  -
 
 attr_remove: Input/output error
@@ -15,7 +14,6 @@ attr_name: d41d8cd98f00b204e9800998ecf8427e  -
 attr_set: Input/output error
 Could not set "attr_name" for SCRATCH_MNT/testdir/empty_file2
 touch: cannot touch 'SCRATCH_MNT/testdir/empty_file2': Input/output error
-Attribute "attr_name" has a 1025 byte value for SCRATCH_MNT/testdir/empty_file2
 attr_name: 9fd415c49d67afc4b78fad4055a3a376  -
 
 attr_remove: Input/output error
@@ -26,7 +24,6 @@ attr_name: d41d8cd98f00b204e9800998ecf8427e  -
 attr_set: Input/output error
 Could not set "attr_name" for SCRATCH_MNT/testdir/empty_file3
 touch: cannot touch 'SCRATCH_MNT/testdir/empty_file3': Input/output error
-Attribute "attr_name" has a 65536 byte value for SCRATCH_MNT/testdir/empty_file3
 attr_name: 7f6fd1b6d872108bd44bd143cbcdfa19  -
 
 attr_remove: Input/output error
@@ -37,132 +34,96 @@ attr_name: d41d8cd98f00b204e9800998ecf8427e  -
 attr_set: Input/output error
 Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file1
 touch: cannot touch 'SCRATCH_MNT/testdir/inline_file1': Input/output error
-Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file1
-Attribute "attr_name2" has a 65 byte value for SCRATCH_MNT/testdir/inline_file1
 attr_name2: cfbe2a33be4601d2b655d099a18378fc  -
 
 attr_remove: Input/output error
 Could not remove "attr_name2" for SCRATCH_MNT/testdir/inline_file1
 touch: cannot touch 'SCRATCH_MNT/testdir/inline_file1': Input/output error
-Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file1
 attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
 
 attr_set: Input/output error
 Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file2
 touch: cannot touch 'SCRATCH_MNT/testdir/inline_file2': Input/output error
-Attribute "attr_name2" has a 1025 byte value for SCRATCH_MNT/testdir/inline_file2
-Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file2
 attr_name2: 9fd415c49d67afc4b78fad4055a3a376  -
 
 attr_remove: Input/output error
 Could not remove "attr_name2" for SCRATCH_MNT/testdir/inline_file2
 touch: cannot touch 'SCRATCH_MNT/testdir/inline_file2': Input/output error
-Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file2
 attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
 
 attr_set: Input/output error
 Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file3
 touch: cannot touch 'SCRATCH_MNT/testdir/inline_file3': Input/output error
-Attribute "attr_name2" has a 65536 byte value for SCRATCH_MNT/testdir/inline_file3
-Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file3
 attr_name2: 7f6fd1b6d872108bd44bd143cbcdfa19  -
 
 attr_remove: Input/output error
 Could not remove "attr_name2" for SCRATCH_MNT/testdir/inline_file3
 touch: cannot touch 'SCRATCH_MNT/testdir/inline_file3': Input/output error
-Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file3
 attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
 
 attr_set: Input/output error
 Could not set "attr_name2" for SCRATCH_MNT/testdir/extent_file1
 touch: cannot touch 'SCRATCH_MNT/testdir/extent_file1': Input/output error
-Attribute "attr_name2" has a 1025 byte value for SCRATCH_MNT/testdir/extent_file1
-Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file1
 attr_name2: 9fd415c49d67afc4b78fad4055a3a376  -
 
 attr_remove: Input/output error
 Could not remove "attr_name2" for SCRATCH_MNT/testdir/extent_file1
 touch: cannot touch 'SCRATCH_MNT/testdir/extent_file1': Input/output error
-Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file1
 attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
 
 attr_set: Input/output error
-Could not set "attr_name4" for SCRATCH_MNT/testdir/extent_file2
+Could not set "attr_nameXXXX" for SCRATCH_MNT/testdir/extent_file2
 touch: cannot touch 'SCRATCH_MNT/testdir/extent_file2': Input/output error
-Attribute "attr_name4" has a 1025 byte value for SCRATCH_MNT/testdir/extent_file2
-Attribute "attr_name2" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file2
-Attribute "attr_name3" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file2
-Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file2
-attr_name4: 9fd415c49d67afc4b78fad4055a3a376  -
+attr_nameXXXX: f4ea5799d72a0a9bf2d56a685c9cba7a  -
 
 attr_set: Input/output error
-Could not set "attr_name4" for SCRATCH_MNT/testdir/extent_file3
+Could not set "attr_nameXXXX" for SCRATCH_MNT/testdir/extent_file3
 touch: cannot touch 'SCRATCH_MNT/testdir/extent_file3': Input/output error
-Attribute "attr_name4" has a 1025 byte value for SCRATCH_MNT/testdir/extent_file3
-Attribute "attr_name2" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file3
-Attribute "attr_name3" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file3
-Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file3
-attr_name4: 9fd415c49d67afc4b78fad4055a3a376  -
+attr_nameXXXX: f4ea5799d72a0a9bf2d56a685c9cba7a  -
 
 attr_set: Input/output error
 Could not set "attr_name2" for SCRATCH_MNT/testdir/extent_file4
 touch: cannot touch 'SCRATCH_MNT/testdir/extent_file4': Input/output error
-Attribute "attr_name2" has a 65536 byte value for SCRATCH_MNT/testdir/extent_file4
-Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file4
 attr_name2: 7f6fd1b6d872108bd44bd143cbcdfa19  -
 
 attr_remove: Input/output error
 Could not remove "attr_name2" for SCRATCH_MNT/testdir/extent_file4
 touch: cannot touch 'SCRATCH_MNT/testdir/extent_file4': Input/output error
-Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file4
 attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
 
 attr_set: Input/output error
 Could not set "attr_name2" for SCRATCH_MNT/testdir/remote_file1
 touch: cannot touch 'SCRATCH_MNT/testdir/remote_file1': Input/output error
-Attribute "attr_name2" has a 1025 byte value for SCRATCH_MNT/testdir/remote_file1
-Attribute "attr_name1" has a 65536 byte value for SCRATCH_MNT/testdir/remote_file1
 attr_name2: 9fd415c49d67afc4b78fad4055a3a376  -
 
 attr_remove: Input/output error
 Could not remove "attr_name2" for SCRATCH_MNT/testdir/remote_file1
 touch: cannot touch 'SCRATCH_MNT/testdir/remote_file1': Input/output error
-Attribute "attr_name1" has a 65536 byte value for SCRATCH_MNT/testdir/remote_file1
 attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
 
 attr_set: Input/output error
 Could not set "attr_name2" for SCRATCH_MNT/testdir/remote_file2
 touch: cannot touch 'SCRATCH_MNT/testdir/remote_file2': Input/output error
-Attribute "attr_name2" has a 65536 byte value for SCRATCH_MNT/testdir/remote_file2
-Attribute "attr_name1" has a 65536 byte value for SCRATCH_MNT/testdir/remote_file2
 attr_name2: 7f6fd1b6d872108bd44bd143cbcdfa19  -
 
 attr_remove: Input/output error
 Could not remove "attr_name2" for SCRATCH_MNT/testdir/remote_file2
 touch: cannot touch 'SCRATCH_MNT/testdir/remote_file2': Input/output error
-Attribute "attr_name1" has a 65536 byte value for SCRATCH_MNT/testdir/remote_file2
 attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
 
 attr_set: Input/output error
 Could not set "attr_name2" for SCRATCH_MNT/testdir/sf_file
 touch: cannot touch 'SCRATCH_MNT/testdir/sf_file': Input/output error
-Attribute "attr_name1" has a 64 byte value for SCRATCH_MNT/testdir/sf_file
-Attribute "attr_name2" has a 17 byte value for SCRATCH_MNT/testdir/sf_file
 attr_name2: 9a6eb1bc9da3c66a9b495dfe2fe8a756  -
 
 attr_set: Input/output error
 Could not set "attr_name2" for SCRATCH_MNT/testdir/leaf_file
 touch: cannot touch 'SCRATCH_MNT/testdir/leaf_file': Input/output error
-Attribute "attr_name2" has a 257 byte value for SCRATCH_MNT/testdir/leaf_file
-Attribute "attr_name3" has a 1024 byte value for SCRATCH_MNT/testdir/leaf_file
-Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/leaf_file
 attr_name2: f4ea5799d72a0a9bf2d56a685c9cba7a  -
 
 attr_set: Input/output error
 Could not set "attr_name2" for SCRATCH_MNT/testdir/node_file
 touch: cannot touch 'SCRATCH_MNT/testdir/node_file': Input/output error
-Attribute "attr_name2" has a 257 byte value for SCRATCH_MNT/testdir/node_file
-Attribute "attr_name1" has a 65536 byte value for SCRATCH_MNT/testdir/node_file
 attr_name2: f4ea5799d72a0a9bf2d56a685c9cba7a  -
 
 *** done
-- 
2.25.1


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

* Re: [PATCH v2] xfs/018: fix LARP testing for small block sizes
  2022-07-19 22:25 [PATCH v2] xfs/018: fix LARP testing for small block sizes Catherine Hoang
@ 2022-07-20  1:23 ` Alli
  2022-07-20 17:25 ` Darrick J. Wong
  1 sibling, 0 replies; 4+ messages in thread
From: Alli @ 2022-07-20  1:23 UTC (permalink / raw)
  To: Catherine Hoang, linux-xfs, fstests

On Tue, 2022-07-19 at 15:25 -0700, Catherine Hoang wrote:
> From: "Darrick J. Wong" <djwong@kernel.org>
> 
> Fix this test to work properly when the filesystem block size is less
> than 4k.  Tripping the error injection points on shape changes in the
> xattr structure must be done dynamically.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Looks good to me
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>

> ---
>  tests/xfs/018     | 14 +++++++++-----
>  tests/xfs/018.out | 47 ++++-----------------------------------------
> --
>  2 files changed, 13 insertions(+), 48 deletions(-)
> 
> diff --git a/tests/xfs/018 b/tests/xfs/018
> index 041a3b24..323279b5 100755
> --- a/tests/xfs/018
> +++ b/tests/xfs/018
> @@ -47,7 +47,8 @@ test_attr_replay()
>  	touch $testfile
>  
>  	# Verify attr recovery
> -	$ATTR_PROG -l $testfile | _filter_scratch
> +	$ATTR_PROG -l $testfile >> $seqres.full
> +	echo "Checking contents of $attr_name" >> $seqres.full
>  	echo -n "$attr_name: "
>  	$ATTR_PROG -q -g $attr_name $testfile 2> /dev/null | md5sum;
>  
> @@ -98,6 +99,9 @@ attr64k="$attr32k$attr32k"
>  echo "*** mkfs"
>  _scratch_mkfs >/dev/null
>  
> +blk_sz=$(_scratch_xfs_get_sb_field blocksize)
> +multiplier=$(( $blk_sz / 276 )) # 256 + 20 to account for attr name
> +
>  echo "*** mount FS"
>  _scratch_mount
>  
> @@ -140,12 +144,12 @@ test_attr_replay extent_file1 "attr_name2"
> $attr1k "s" "larp"
>  test_attr_replay extent_file1 "attr_name2" $attr1k "r" "larp"
>  
>  # extent, inject error on split
> -create_test_file extent_file2 3 $attr1k
> -test_attr_replay extent_file2 "attr_name4" $attr1k "s"
> "da_leaf_split"
> +create_test_file extent_file2 $multiplier $attr256
> +test_attr_replay extent_file2 "attr_nameXXXX" $attr256 "s"
> "da_leaf_split"
>  
>  # extent, inject error on fork transition
> -create_test_file extent_file3 3 $attr1k
> -test_attr_replay extent_file3 "attr_name4" $attr1k "s"
> "attr_leaf_to_node"
> +create_test_file extent_file3 $multiplier $attr256
> +test_attr_replay extent_file3 "attr_nameXXXX" $attr256 "s"
> "attr_leaf_to_node"
>  
>  # extent, remote
>  create_test_file extent_file4 1 $attr1k
> diff --git a/tests/xfs/018.out b/tests/xfs/018.out
> index 022b0ca3..57dc448a 100644
> --- a/tests/xfs/018.out
> +++ b/tests/xfs/018.out
> @@ -4,7 +4,6 @@ QA output created by 018
>  attr_set: Input/output error
>  Could not set "attr_name" for SCRATCH_MNT/testdir/empty_file1
>  touch: cannot touch 'SCRATCH_MNT/testdir/empty_file1': Input/output
> error
> -Attribute "attr_name" has a 65 byte value for
> SCRATCH_MNT/testdir/empty_file1
>  attr_name: cfbe2a33be4601d2b655d099a18378fc  -
>  
>  attr_remove: Input/output error
> @@ -15,7 +14,6 @@ attr_name: d41d8cd98f00b204e9800998ecf8427e  -
>  attr_set: Input/output error
>  Could not set "attr_name" for SCRATCH_MNT/testdir/empty_file2
>  touch: cannot touch 'SCRATCH_MNT/testdir/empty_file2': Input/output
> error
> -Attribute "attr_name" has a 1025 byte value for
> SCRATCH_MNT/testdir/empty_file2
>  attr_name: 9fd415c49d67afc4b78fad4055a3a376  -
>  
>  attr_remove: Input/output error
> @@ -26,7 +24,6 @@ attr_name: d41d8cd98f00b204e9800998ecf8427e  -
>  attr_set: Input/output error
>  Could not set "attr_name" for SCRATCH_MNT/testdir/empty_file3
>  touch: cannot touch 'SCRATCH_MNT/testdir/empty_file3': Input/output
> error
> -Attribute "attr_name" has a 65536 byte value for
> SCRATCH_MNT/testdir/empty_file3
>  attr_name: 7f6fd1b6d872108bd44bd143cbcdfa19  -
>  
>  attr_remove: Input/output error
> @@ -37,132 +34,96 @@ attr_name: d41d8cd98f00b204e9800998ecf8427e  -
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file1
>  touch: cannot touch 'SCRATCH_MNT/testdir/inline_file1': Input/output
> error
> -Attribute "attr_name1" has a 16 byte value for
> SCRATCH_MNT/testdir/inline_file1
> -Attribute "attr_name2" has a 65 byte value for
> SCRATCH_MNT/testdir/inline_file1
>  attr_name2: cfbe2a33be4601d2b655d099a18378fc  -
>  
>  attr_remove: Input/output error
>  Could not remove "attr_name2" for SCRATCH_MNT/testdir/inline_file1
>  touch: cannot touch 'SCRATCH_MNT/testdir/inline_file1': Input/output
> error
> -Attribute "attr_name1" has a 16 byte value for
> SCRATCH_MNT/testdir/inline_file1
>  attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file2
>  touch: cannot touch 'SCRATCH_MNT/testdir/inline_file2': Input/output
> error
> -Attribute "attr_name2" has a 1025 byte value for
> SCRATCH_MNT/testdir/inline_file2
> -Attribute "attr_name1" has a 16 byte value for
> SCRATCH_MNT/testdir/inline_file2
>  attr_name2: 9fd415c49d67afc4b78fad4055a3a376  -
>  
>  attr_remove: Input/output error
>  Could not remove "attr_name2" for SCRATCH_MNT/testdir/inline_file2
>  touch: cannot touch 'SCRATCH_MNT/testdir/inline_file2': Input/output
> error
> -Attribute "attr_name1" has a 16 byte value for
> SCRATCH_MNT/testdir/inline_file2
>  attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file3
>  touch: cannot touch 'SCRATCH_MNT/testdir/inline_file3': Input/output
> error
> -Attribute "attr_name2" has a 65536 byte value for
> SCRATCH_MNT/testdir/inline_file3
> -Attribute "attr_name1" has a 16 byte value for
> SCRATCH_MNT/testdir/inline_file3
>  attr_name2: 7f6fd1b6d872108bd44bd143cbcdfa19  -
>  
>  attr_remove: Input/output error
>  Could not remove "attr_name2" for SCRATCH_MNT/testdir/inline_file3
>  touch: cannot touch 'SCRATCH_MNT/testdir/inline_file3': Input/output
> error
> -Attribute "attr_name1" has a 16 byte value for
> SCRATCH_MNT/testdir/inline_file3
>  attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/extent_file1
>  touch: cannot touch 'SCRATCH_MNT/testdir/extent_file1': Input/output
> error
> -Attribute "attr_name2" has a 1025 byte value for
> SCRATCH_MNT/testdir/extent_file1
> -Attribute "attr_name1" has a 1024 byte value for
> SCRATCH_MNT/testdir/extent_file1
>  attr_name2: 9fd415c49d67afc4b78fad4055a3a376  -
>  
>  attr_remove: Input/output error
>  Could not remove "attr_name2" for SCRATCH_MNT/testdir/extent_file1
>  touch: cannot touch 'SCRATCH_MNT/testdir/extent_file1': Input/output
> error
> -Attribute "attr_name1" has a 1024 byte value for
> SCRATCH_MNT/testdir/extent_file1
>  attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>  
>  attr_set: Input/output error
> -Could not set "attr_name4" for SCRATCH_MNT/testdir/extent_file2
> +Could not set "attr_nameXXXX" for SCRATCH_MNT/testdir/extent_file2
>  touch: cannot touch 'SCRATCH_MNT/testdir/extent_file2': Input/output
> error
> -Attribute "attr_name4" has a 1025 byte value for
> SCRATCH_MNT/testdir/extent_file2
> -Attribute "attr_name2" has a 1024 byte value for
> SCRATCH_MNT/testdir/extent_file2
> -Attribute "attr_name3" has a 1024 byte value for
> SCRATCH_MNT/testdir/extent_file2
> -Attribute "attr_name1" has a 1024 byte value for
> SCRATCH_MNT/testdir/extent_file2
> -attr_name4: 9fd415c49d67afc4b78fad4055a3a376  -
> +attr_nameXXXX: f4ea5799d72a0a9bf2d56a685c9cba7a  -
>  
>  attr_set: Input/output error
> -Could not set "attr_name4" for SCRATCH_MNT/testdir/extent_file3
> +Could not set "attr_nameXXXX" for SCRATCH_MNT/testdir/extent_file3
>  touch: cannot touch 'SCRATCH_MNT/testdir/extent_file3': Input/output
> error
> -Attribute "attr_name4" has a 1025 byte value for
> SCRATCH_MNT/testdir/extent_file3
> -Attribute "attr_name2" has a 1024 byte value for
> SCRATCH_MNT/testdir/extent_file3
> -Attribute "attr_name3" has a 1024 byte value for
> SCRATCH_MNT/testdir/extent_file3
> -Attribute "attr_name1" has a 1024 byte value for
> SCRATCH_MNT/testdir/extent_file3
> -attr_name4: 9fd415c49d67afc4b78fad4055a3a376  -
> +attr_nameXXXX: f4ea5799d72a0a9bf2d56a685c9cba7a  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/extent_file4
>  touch: cannot touch 'SCRATCH_MNT/testdir/extent_file4': Input/output
> error
> -Attribute "attr_name2" has a 65536 byte value for
> SCRATCH_MNT/testdir/extent_file4
> -Attribute "attr_name1" has a 1024 byte value for
> SCRATCH_MNT/testdir/extent_file4
>  attr_name2: 7f6fd1b6d872108bd44bd143cbcdfa19  -
>  
>  attr_remove: Input/output error
>  Could not remove "attr_name2" for SCRATCH_MNT/testdir/extent_file4
>  touch: cannot touch 'SCRATCH_MNT/testdir/extent_file4': Input/output
> error
> -Attribute "attr_name1" has a 1024 byte value for
> SCRATCH_MNT/testdir/extent_file4
>  attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/remote_file1
>  touch: cannot touch 'SCRATCH_MNT/testdir/remote_file1': Input/output
> error
> -Attribute "attr_name2" has a 1025 byte value for
> SCRATCH_MNT/testdir/remote_file1
> -Attribute "attr_name1" has a 65536 byte value for
> SCRATCH_MNT/testdir/remote_file1
>  attr_name2: 9fd415c49d67afc4b78fad4055a3a376  -
>  
>  attr_remove: Input/output error
>  Could not remove "attr_name2" for SCRATCH_MNT/testdir/remote_file1
>  touch: cannot touch 'SCRATCH_MNT/testdir/remote_file1': Input/output
> error
> -Attribute "attr_name1" has a 65536 byte value for
> SCRATCH_MNT/testdir/remote_file1
>  attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/remote_file2
>  touch: cannot touch 'SCRATCH_MNT/testdir/remote_file2': Input/output
> error
> -Attribute "attr_name2" has a 65536 byte value for
> SCRATCH_MNT/testdir/remote_file2
> -Attribute "attr_name1" has a 65536 byte value for
> SCRATCH_MNT/testdir/remote_file2
>  attr_name2: 7f6fd1b6d872108bd44bd143cbcdfa19  -
>  
>  attr_remove: Input/output error
>  Could not remove "attr_name2" for SCRATCH_MNT/testdir/remote_file2
>  touch: cannot touch 'SCRATCH_MNT/testdir/remote_file2': Input/output
> error
> -Attribute "attr_name1" has a 65536 byte value for
> SCRATCH_MNT/testdir/remote_file2
>  attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/sf_file
>  touch: cannot touch 'SCRATCH_MNT/testdir/sf_file': Input/output
> error
> -Attribute "attr_name1" has a 64 byte value for
> SCRATCH_MNT/testdir/sf_file
> -Attribute "attr_name2" has a 17 byte value for
> SCRATCH_MNT/testdir/sf_file
>  attr_name2: 9a6eb1bc9da3c66a9b495dfe2fe8a756  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/leaf_file
>  touch: cannot touch 'SCRATCH_MNT/testdir/leaf_file': Input/output
> error
> -Attribute "attr_name2" has a 257 byte value for
> SCRATCH_MNT/testdir/leaf_file
> -Attribute "attr_name3" has a 1024 byte value for
> SCRATCH_MNT/testdir/leaf_file
> -Attribute "attr_name1" has a 1024 byte value for
> SCRATCH_MNT/testdir/leaf_file
>  attr_name2: f4ea5799d72a0a9bf2d56a685c9cba7a  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/node_file
>  touch: cannot touch 'SCRATCH_MNT/testdir/node_file': Input/output
> error
> -Attribute "attr_name2" has a 257 byte value for
> SCRATCH_MNT/testdir/node_file
> -Attribute "attr_name1" has a 65536 byte value for
> SCRATCH_MNT/testdir/node_file
>  attr_name2: f4ea5799d72a0a9bf2d56a685c9cba7a  -
>  
>  *** done


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

* Re: [PATCH v2] xfs/018: fix LARP testing for small block sizes
  2022-07-19 22:25 [PATCH v2] xfs/018: fix LARP testing for small block sizes Catherine Hoang
  2022-07-20  1:23 ` Alli
@ 2022-07-20 17:25 ` Darrick J. Wong
  2022-07-20 22:47   ` Catherine Hoang
  1 sibling, 1 reply; 4+ messages in thread
From: Darrick J. Wong @ 2022-07-20 17:25 UTC (permalink / raw)
  To: Catherine Hoang; +Cc: linux-xfs, fstests

On Tue, Jul 19, 2022 at 03:25:20PM -0700, Catherine Hoang wrote:
> From: "Darrick J. Wong" <djwong@kernel.org>
> 
> Fix this test to work properly when the filesystem block size is less
> than 4k.  Tripping the error injection points on shape changes in the
> xattr structure must be done dynamically.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>

Hrmm.  I tried this on an 8k-blocksize filesystem overnight (arm64, 64k
pages), and got this:

--- xfs/018.out
+++ xfs/018.out.bad
@@ -71,14 +71,14 @@
 touch: cannot touch 'SCRATCH_MNT/testdir/extent_file1': Input/output error
 attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
 
-attr_set: Input/output error
-Could not set "attr_nameXXXX" for SCRATCH_MNT/testdir/extent_file2
-touch: cannot touch 'SCRATCH_MNT/testdir/extent_file2': Input/output error
+Attribute "attr_nameXXXX" set to a 257 byte value for SCRATCH_MNT/testdir/extent_file2:
+0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
+
 attr_nameXXXX: f4ea5799d72a0a9bf2d56a685c9cba7a  -
 
-attr_set: Input/output error
-Could not set "attr_nameXXXX" for SCRATCH_MNT/testdir/extent_file3
-touch: cannot touch 'SCRATCH_MNT/testdir/extent_file3': Input/output error
+Attribute "attr_nameXXXX" set to a 257 byte value for SCRATCH_MNT/testdir/extent_file3:
+0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
+
 attr_nameXXXX: f4ea5799d72a0a9bf2d56a685c9cba7a  -
 
 attr_set: Input/output error

Not sure what that's all about, but could you please take a look?

--D

> ---
>  tests/xfs/018     | 14 +++++++++-----
>  tests/xfs/018.out | 47 ++++-------------------------------------------
>  2 files changed, 13 insertions(+), 48 deletions(-)
> 
> diff --git a/tests/xfs/018 b/tests/xfs/018
> index 041a3b24..323279b5 100755
> --- a/tests/xfs/018
> +++ b/tests/xfs/018
> @@ -47,7 +47,8 @@ test_attr_replay()
>  	touch $testfile
>  
>  	# Verify attr recovery
> -	$ATTR_PROG -l $testfile | _filter_scratch
> +	$ATTR_PROG -l $testfile >> $seqres.full
> +	echo "Checking contents of $attr_name" >> $seqres.full
>  	echo -n "$attr_name: "
>  	$ATTR_PROG -q -g $attr_name $testfile 2> /dev/null | md5sum;
>  
> @@ -98,6 +99,9 @@ attr64k="$attr32k$attr32k"
>  echo "*** mkfs"
>  _scratch_mkfs >/dev/null
>  
> +blk_sz=$(_scratch_xfs_get_sb_field blocksize)
> +multiplier=$(( $blk_sz / 276 )) # 256 + 20 to account for attr name
> +
>  echo "*** mount FS"
>  _scratch_mount
>  
> @@ -140,12 +144,12 @@ test_attr_replay extent_file1 "attr_name2" $attr1k "s" "larp"
>  test_attr_replay extent_file1 "attr_name2" $attr1k "r" "larp"
>  
>  # extent, inject error on split
> -create_test_file extent_file2 3 $attr1k
> -test_attr_replay extent_file2 "attr_name4" $attr1k "s" "da_leaf_split"
> +create_test_file extent_file2 $multiplier $attr256
> +test_attr_replay extent_file2 "attr_nameXXXX" $attr256 "s" "da_leaf_split"
>  
>  # extent, inject error on fork transition
> -create_test_file extent_file3 3 $attr1k
> -test_attr_replay extent_file3 "attr_name4" $attr1k "s" "attr_leaf_to_node"
> +create_test_file extent_file3 $multiplier $attr256
> +test_attr_replay extent_file3 "attr_nameXXXX" $attr256 "s" "attr_leaf_to_node"
>  
>  # extent, remote
>  create_test_file extent_file4 1 $attr1k
> diff --git a/tests/xfs/018.out b/tests/xfs/018.out
> index 022b0ca3..57dc448a 100644
> --- a/tests/xfs/018.out
> +++ b/tests/xfs/018.out
> @@ -4,7 +4,6 @@ QA output created by 018
>  attr_set: Input/output error
>  Could not set "attr_name" for SCRATCH_MNT/testdir/empty_file1
>  touch: cannot touch 'SCRATCH_MNT/testdir/empty_file1': Input/output error
> -Attribute "attr_name" has a 65 byte value for SCRATCH_MNT/testdir/empty_file1
>  attr_name: cfbe2a33be4601d2b655d099a18378fc  -
>  
>  attr_remove: Input/output error
> @@ -15,7 +14,6 @@ attr_name: d41d8cd98f00b204e9800998ecf8427e  -
>  attr_set: Input/output error
>  Could not set "attr_name" for SCRATCH_MNT/testdir/empty_file2
>  touch: cannot touch 'SCRATCH_MNT/testdir/empty_file2': Input/output error
> -Attribute "attr_name" has a 1025 byte value for SCRATCH_MNT/testdir/empty_file2
>  attr_name: 9fd415c49d67afc4b78fad4055a3a376  -
>  
>  attr_remove: Input/output error
> @@ -26,7 +24,6 @@ attr_name: d41d8cd98f00b204e9800998ecf8427e  -
>  attr_set: Input/output error
>  Could not set "attr_name" for SCRATCH_MNT/testdir/empty_file3
>  touch: cannot touch 'SCRATCH_MNT/testdir/empty_file3': Input/output error
> -Attribute "attr_name" has a 65536 byte value for SCRATCH_MNT/testdir/empty_file3
>  attr_name: 7f6fd1b6d872108bd44bd143cbcdfa19  -
>  
>  attr_remove: Input/output error
> @@ -37,132 +34,96 @@ attr_name: d41d8cd98f00b204e9800998ecf8427e  -
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file1
>  touch: cannot touch 'SCRATCH_MNT/testdir/inline_file1': Input/output error
> -Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file1
> -Attribute "attr_name2" has a 65 byte value for SCRATCH_MNT/testdir/inline_file1
>  attr_name2: cfbe2a33be4601d2b655d099a18378fc  -
>  
>  attr_remove: Input/output error
>  Could not remove "attr_name2" for SCRATCH_MNT/testdir/inline_file1
>  touch: cannot touch 'SCRATCH_MNT/testdir/inline_file1': Input/output error
> -Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file1
>  attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file2
>  touch: cannot touch 'SCRATCH_MNT/testdir/inline_file2': Input/output error
> -Attribute "attr_name2" has a 1025 byte value for SCRATCH_MNT/testdir/inline_file2
> -Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file2
>  attr_name2: 9fd415c49d67afc4b78fad4055a3a376  -
>  
>  attr_remove: Input/output error
>  Could not remove "attr_name2" for SCRATCH_MNT/testdir/inline_file2
>  touch: cannot touch 'SCRATCH_MNT/testdir/inline_file2': Input/output error
> -Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file2
>  attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file3
>  touch: cannot touch 'SCRATCH_MNT/testdir/inline_file3': Input/output error
> -Attribute "attr_name2" has a 65536 byte value for SCRATCH_MNT/testdir/inline_file3
> -Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file3
>  attr_name2: 7f6fd1b6d872108bd44bd143cbcdfa19  -
>  
>  attr_remove: Input/output error
>  Could not remove "attr_name2" for SCRATCH_MNT/testdir/inline_file3
>  touch: cannot touch 'SCRATCH_MNT/testdir/inline_file3': Input/output error
> -Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file3
>  attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/extent_file1
>  touch: cannot touch 'SCRATCH_MNT/testdir/extent_file1': Input/output error
> -Attribute "attr_name2" has a 1025 byte value for SCRATCH_MNT/testdir/extent_file1
> -Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file1
>  attr_name2: 9fd415c49d67afc4b78fad4055a3a376  -
>  
>  attr_remove: Input/output error
>  Could not remove "attr_name2" for SCRATCH_MNT/testdir/extent_file1
>  touch: cannot touch 'SCRATCH_MNT/testdir/extent_file1': Input/output error
> -Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file1
>  attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>  
>  attr_set: Input/output error
> -Could not set "attr_name4" for SCRATCH_MNT/testdir/extent_file2
> +Could not set "attr_nameXXXX" for SCRATCH_MNT/testdir/extent_file2
>  touch: cannot touch 'SCRATCH_MNT/testdir/extent_file2': Input/output error
> -Attribute "attr_name4" has a 1025 byte value for SCRATCH_MNT/testdir/extent_file2
> -Attribute "attr_name2" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file2
> -Attribute "attr_name3" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file2
> -Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file2
> -attr_name4: 9fd415c49d67afc4b78fad4055a3a376  -
> +attr_nameXXXX: f4ea5799d72a0a9bf2d56a685c9cba7a  -
>  
>  attr_set: Input/output error
> -Could not set "attr_name4" for SCRATCH_MNT/testdir/extent_file3
> +Could not set "attr_nameXXXX" for SCRATCH_MNT/testdir/extent_file3
>  touch: cannot touch 'SCRATCH_MNT/testdir/extent_file3': Input/output error
> -Attribute "attr_name4" has a 1025 byte value for SCRATCH_MNT/testdir/extent_file3
> -Attribute "attr_name2" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file3
> -Attribute "attr_name3" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file3
> -Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file3
> -attr_name4: 9fd415c49d67afc4b78fad4055a3a376  -
> +attr_nameXXXX: f4ea5799d72a0a9bf2d56a685c9cba7a  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/extent_file4
>  touch: cannot touch 'SCRATCH_MNT/testdir/extent_file4': Input/output error
> -Attribute "attr_name2" has a 65536 byte value for SCRATCH_MNT/testdir/extent_file4
> -Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file4
>  attr_name2: 7f6fd1b6d872108bd44bd143cbcdfa19  -
>  
>  attr_remove: Input/output error
>  Could not remove "attr_name2" for SCRATCH_MNT/testdir/extent_file4
>  touch: cannot touch 'SCRATCH_MNT/testdir/extent_file4': Input/output error
> -Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file4
>  attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/remote_file1
>  touch: cannot touch 'SCRATCH_MNT/testdir/remote_file1': Input/output error
> -Attribute "attr_name2" has a 1025 byte value for SCRATCH_MNT/testdir/remote_file1
> -Attribute "attr_name1" has a 65536 byte value for SCRATCH_MNT/testdir/remote_file1
>  attr_name2: 9fd415c49d67afc4b78fad4055a3a376  -
>  
>  attr_remove: Input/output error
>  Could not remove "attr_name2" for SCRATCH_MNT/testdir/remote_file1
>  touch: cannot touch 'SCRATCH_MNT/testdir/remote_file1': Input/output error
> -Attribute "attr_name1" has a 65536 byte value for SCRATCH_MNT/testdir/remote_file1
>  attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/remote_file2
>  touch: cannot touch 'SCRATCH_MNT/testdir/remote_file2': Input/output error
> -Attribute "attr_name2" has a 65536 byte value for SCRATCH_MNT/testdir/remote_file2
> -Attribute "attr_name1" has a 65536 byte value for SCRATCH_MNT/testdir/remote_file2
>  attr_name2: 7f6fd1b6d872108bd44bd143cbcdfa19  -
>  
>  attr_remove: Input/output error
>  Could not remove "attr_name2" for SCRATCH_MNT/testdir/remote_file2
>  touch: cannot touch 'SCRATCH_MNT/testdir/remote_file2': Input/output error
> -Attribute "attr_name1" has a 65536 byte value for SCRATCH_MNT/testdir/remote_file2
>  attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/sf_file
>  touch: cannot touch 'SCRATCH_MNT/testdir/sf_file': Input/output error
> -Attribute "attr_name1" has a 64 byte value for SCRATCH_MNT/testdir/sf_file
> -Attribute "attr_name2" has a 17 byte value for SCRATCH_MNT/testdir/sf_file
>  attr_name2: 9a6eb1bc9da3c66a9b495dfe2fe8a756  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/leaf_file
>  touch: cannot touch 'SCRATCH_MNT/testdir/leaf_file': Input/output error
> -Attribute "attr_name2" has a 257 byte value for SCRATCH_MNT/testdir/leaf_file
> -Attribute "attr_name3" has a 1024 byte value for SCRATCH_MNT/testdir/leaf_file
> -Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/leaf_file
>  attr_name2: f4ea5799d72a0a9bf2d56a685c9cba7a  -
>  
>  attr_set: Input/output error
>  Could not set "attr_name2" for SCRATCH_MNT/testdir/node_file
>  touch: cannot touch 'SCRATCH_MNT/testdir/node_file': Input/output error
> -Attribute "attr_name2" has a 257 byte value for SCRATCH_MNT/testdir/node_file
> -Attribute "attr_name1" has a 65536 byte value for SCRATCH_MNT/testdir/node_file
>  attr_name2: f4ea5799d72a0a9bf2d56a685c9cba7a  -
>  
>  *** done
> -- 
> 2.25.1
> 

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

* Re: [PATCH v2] xfs/018: fix LARP testing for small block sizes
  2022-07-20 17:25 ` Darrick J. Wong
@ 2022-07-20 22:47   ` Catherine Hoang
  0 siblings, 0 replies; 4+ messages in thread
From: Catherine Hoang @ 2022-07-20 22:47 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs, fstests

> On Jul 20, 2022, at 10:25 AM, Darrick J. Wong <djwong@kernel.org> wrote:
> 
> On Tue, Jul 19, 2022 at 03:25:20PM -0700, Catherine Hoang wrote:
>> From: "Darrick J. Wong" <djwong@kernel.org>
>> 
>> Fix this test to work properly when the filesystem block size is less
>> than 4k.  Tripping the error injection points on shape changes in the
>> xattr structure must be done dynamically.
>> 
>> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
>> Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
> 
> Hrmm.  I tried this on an 8k-blocksize filesystem overnight (arm64, 64k
> pages), and got this:
> 
> --- xfs/018.out
> +++ xfs/018.out.bad
> @@ -71,14 +71,14 @@
> touch: cannot touch 'SCRATCH_MNT/testdir/extent_file1': Input/output error
> attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
> 
> -attr_set: Input/output error
> -Could not set "attr_nameXXXX" for SCRATCH_MNT/testdir/extent_file2
> -touch: cannot touch 'SCRATCH_MNT/testdir/extent_file2': Input/output error
> +Attribute "attr_nameXXXX" set to a 257 byte value for SCRATCH_MNT/testdir/extent_file2:
> +0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
> +
> attr_nameXXXX: f4ea5799d72a0a9bf2d56a685c9cba7a  -
> 
> -attr_set: Input/output error
> -Could not set "attr_nameXXXX" for SCRATCH_MNT/testdir/extent_file3
> -touch: cannot touch 'SCRATCH_MNT/testdir/extent_file3': Input/output error
> +Attribute "attr_nameXXXX" set to a 257 byte value for SCRATCH_MNT/testdir/extent_file3:
> +0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
> +
> attr_nameXXXX: f4ea5799d72a0a9bf2d56a685c9cba7a  -
> 
> attr_set: Input/output error
> 
> Not sure what that's all about, but could you please take a look?
> 
> --D

It looks like the error tags aren’t being triggered on an 8k block
size, probably because we’re adding too few / too many attrs.
I’ll try adjusting the calculation for how many attributes are added.

Catherine
> 
>> ---
>> tests/xfs/018     | 14 +++++++++-----
>> tests/xfs/018.out | 47 ++++-------------------------------------------
>> 2 files changed, 13 insertions(+), 48 deletions(-)
>> 
>> diff --git a/tests/xfs/018 b/tests/xfs/018
>> index 041a3b24..323279b5 100755
>> --- a/tests/xfs/018
>> +++ b/tests/xfs/018
>> @@ -47,7 +47,8 @@ test_attr_replay()
>> 	touch $testfile
>> 
>> 	# Verify attr recovery
>> -	$ATTR_PROG -l $testfile | _filter_scratch
>> +	$ATTR_PROG -l $testfile >> $seqres.full
>> +	echo "Checking contents of $attr_name" >> $seqres.full
>> 	echo -n "$attr_name: "
>> 	$ATTR_PROG -q -g $attr_name $testfile 2> /dev/null | md5sum;
>> 
>> @@ -98,6 +99,9 @@ attr64k="$attr32k$attr32k"
>> echo "*** mkfs"
>> _scratch_mkfs >/dev/null
>> 
>> +blk_sz=$(_scratch_xfs_get_sb_field blocksize)
>> +multiplier=$(( $blk_sz / 276 )) # 256 + 20 to account for attr name
>> +
>> echo "*** mount FS"
>> _scratch_mount
>> 
>> @@ -140,12 +144,12 @@ test_attr_replay extent_file1 "attr_name2" $attr1k "s" "larp"
>> test_attr_replay extent_file1 "attr_name2" $attr1k "r" "larp"
>> 
>> # extent, inject error on split
>> -create_test_file extent_file2 3 $attr1k
>> -test_attr_replay extent_file2 "attr_name4" $attr1k "s" "da_leaf_split"
>> +create_test_file extent_file2 $multiplier $attr256
>> +test_attr_replay extent_file2 "attr_nameXXXX" $attr256 "s" "da_leaf_split"
>> 
>> # extent, inject error on fork transition
>> -create_test_file extent_file3 3 $attr1k
>> -test_attr_replay extent_file3 "attr_name4" $attr1k "s" "attr_leaf_to_node"
>> +create_test_file extent_file3 $multiplier $attr256
>> +test_attr_replay extent_file3 "attr_nameXXXX" $attr256 "s" "attr_leaf_to_node"
>> 
>> # extent, remote
>> create_test_file extent_file4 1 $attr1k
>> diff --git a/tests/xfs/018.out b/tests/xfs/018.out
>> index 022b0ca3..57dc448a 100644
>> --- a/tests/xfs/018.out
>> +++ b/tests/xfs/018.out
>> @@ -4,7 +4,6 @@ QA output created by 018
>> attr_set: Input/output error
>> Could not set "attr_name" for SCRATCH_MNT/testdir/empty_file1
>> touch: cannot touch 'SCRATCH_MNT/testdir/empty_file1': Input/output error
>> -Attribute "attr_name" has a 65 byte value for SCRATCH_MNT/testdir/empty_file1
>> attr_name: cfbe2a33be4601d2b655d099a18378fc  -
>> 
>> attr_remove: Input/output error
>> @@ -15,7 +14,6 @@ attr_name: d41d8cd98f00b204e9800998ecf8427e  -
>> attr_set: Input/output error
>> Could not set "attr_name" for SCRATCH_MNT/testdir/empty_file2
>> touch: cannot touch 'SCRATCH_MNT/testdir/empty_file2': Input/output error
>> -Attribute "attr_name" has a 1025 byte value for SCRATCH_MNT/testdir/empty_file2
>> attr_name: 9fd415c49d67afc4b78fad4055a3a376  -
>> 
>> attr_remove: Input/output error
>> @@ -26,7 +24,6 @@ attr_name: d41d8cd98f00b204e9800998ecf8427e  -
>> attr_set: Input/output error
>> Could not set "attr_name" for SCRATCH_MNT/testdir/empty_file3
>> touch: cannot touch 'SCRATCH_MNT/testdir/empty_file3': Input/output error
>> -Attribute "attr_name" has a 65536 byte value for SCRATCH_MNT/testdir/empty_file3
>> attr_name: 7f6fd1b6d872108bd44bd143cbcdfa19  -
>> 
>> attr_remove: Input/output error
>> @@ -37,132 +34,96 @@ attr_name: d41d8cd98f00b204e9800998ecf8427e  -
>> attr_set: Input/output error
>> Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file1
>> touch: cannot touch 'SCRATCH_MNT/testdir/inline_file1': Input/output error
>> -Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file1
>> -Attribute "attr_name2" has a 65 byte value for SCRATCH_MNT/testdir/inline_file1
>> attr_name2: cfbe2a33be4601d2b655d099a18378fc  -
>> 
>> attr_remove: Input/output error
>> Could not remove "attr_name2" for SCRATCH_MNT/testdir/inline_file1
>> touch: cannot touch 'SCRATCH_MNT/testdir/inline_file1': Input/output error
>> -Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file1
>> attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>> 
>> attr_set: Input/output error
>> Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file2
>> touch: cannot touch 'SCRATCH_MNT/testdir/inline_file2': Input/output error
>> -Attribute "attr_name2" has a 1025 byte value for SCRATCH_MNT/testdir/inline_file2
>> -Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file2
>> attr_name2: 9fd415c49d67afc4b78fad4055a3a376  -
>> 
>> attr_remove: Input/output error
>> Could not remove "attr_name2" for SCRATCH_MNT/testdir/inline_file2
>> touch: cannot touch 'SCRATCH_MNT/testdir/inline_file2': Input/output error
>> -Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file2
>> attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>> 
>> attr_set: Input/output error
>> Could not set "attr_name2" for SCRATCH_MNT/testdir/inline_file3
>> touch: cannot touch 'SCRATCH_MNT/testdir/inline_file3': Input/output error
>> -Attribute "attr_name2" has a 65536 byte value for SCRATCH_MNT/testdir/inline_file3
>> -Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file3
>> attr_name2: 7f6fd1b6d872108bd44bd143cbcdfa19  -
>> 
>> attr_remove: Input/output error
>> Could not remove "attr_name2" for SCRATCH_MNT/testdir/inline_file3
>> touch: cannot touch 'SCRATCH_MNT/testdir/inline_file3': Input/output error
>> -Attribute "attr_name1" has a 16 byte value for SCRATCH_MNT/testdir/inline_file3
>> attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>> 
>> attr_set: Input/output error
>> Could not set "attr_name2" for SCRATCH_MNT/testdir/extent_file1
>> touch: cannot touch 'SCRATCH_MNT/testdir/extent_file1': Input/output error
>> -Attribute "attr_name2" has a 1025 byte value for SCRATCH_MNT/testdir/extent_file1
>> -Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file1
>> attr_name2: 9fd415c49d67afc4b78fad4055a3a376  -
>> 
>> attr_remove: Input/output error
>> Could not remove "attr_name2" for SCRATCH_MNT/testdir/extent_file1
>> touch: cannot touch 'SCRATCH_MNT/testdir/extent_file1': Input/output error
>> -Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file1
>> attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>> 
>> attr_set: Input/output error
>> -Could not set "attr_name4" for SCRATCH_MNT/testdir/extent_file2
>> +Could not set "attr_nameXXXX" for SCRATCH_MNT/testdir/extent_file2
>> touch: cannot touch 'SCRATCH_MNT/testdir/extent_file2': Input/output error
>> -Attribute "attr_name4" has a 1025 byte value for SCRATCH_MNT/testdir/extent_file2
>> -Attribute "attr_name2" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file2
>> -Attribute "attr_name3" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file2
>> -Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file2
>> -attr_name4: 9fd415c49d67afc4b78fad4055a3a376  -
>> +attr_nameXXXX: f4ea5799d72a0a9bf2d56a685c9cba7a  -
>> 
>> attr_set: Input/output error
>> -Could not set "attr_name4" for SCRATCH_MNT/testdir/extent_file3
>> +Could not set "attr_nameXXXX" for SCRATCH_MNT/testdir/extent_file3
>> touch: cannot touch 'SCRATCH_MNT/testdir/extent_file3': Input/output error
>> -Attribute "attr_name4" has a 1025 byte value for SCRATCH_MNT/testdir/extent_file3
>> -Attribute "attr_name2" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file3
>> -Attribute "attr_name3" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file3
>> -Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file3
>> -attr_name4: 9fd415c49d67afc4b78fad4055a3a376  -
>> +attr_nameXXXX: f4ea5799d72a0a9bf2d56a685c9cba7a  -
>> 
>> attr_set: Input/output error
>> Could not set "attr_name2" for SCRATCH_MNT/testdir/extent_file4
>> touch: cannot touch 'SCRATCH_MNT/testdir/extent_file4': Input/output error
>> -Attribute "attr_name2" has a 65536 byte value for SCRATCH_MNT/testdir/extent_file4
>> -Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file4
>> attr_name2: 7f6fd1b6d872108bd44bd143cbcdfa19  -
>> 
>> attr_remove: Input/output error
>> Could not remove "attr_name2" for SCRATCH_MNT/testdir/extent_file4
>> touch: cannot touch 'SCRATCH_MNT/testdir/extent_file4': Input/output error
>> -Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/extent_file4
>> attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>> 
>> attr_set: Input/output error
>> Could not set "attr_name2" for SCRATCH_MNT/testdir/remote_file1
>> touch: cannot touch 'SCRATCH_MNT/testdir/remote_file1': Input/output error
>> -Attribute "attr_name2" has a 1025 byte value for SCRATCH_MNT/testdir/remote_file1
>> -Attribute "attr_name1" has a 65536 byte value for SCRATCH_MNT/testdir/remote_file1
>> attr_name2: 9fd415c49d67afc4b78fad4055a3a376  -
>> 
>> attr_remove: Input/output error
>> Could not remove "attr_name2" for SCRATCH_MNT/testdir/remote_file1
>> touch: cannot touch 'SCRATCH_MNT/testdir/remote_file1': Input/output error
>> -Attribute "attr_name1" has a 65536 byte value for SCRATCH_MNT/testdir/remote_file1
>> attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>> 
>> attr_set: Input/output error
>> Could not set "attr_name2" for SCRATCH_MNT/testdir/remote_file2
>> touch: cannot touch 'SCRATCH_MNT/testdir/remote_file2': Input/output error
>> -Attribute "attr_name2" has a 65536 byte value for SCRATCH_MNT/testdir/remote_file2
>> -Attribute "attr_name1" has a 65536 byte value for SCRATCH_MNT/testdir/remote_file2
>> attr_name2: 7f6fd1b6d872108bd44bd143cbcdfa19  -
>> 
>> attr_remove: Input/output error
>> Could not remove "attr_name2" for SCRATCH_MNT/testdir/remote_file2
>> touch: cannot touch 'SCRATCH_MNT/testdir/remote_file2': Input/output error
>> -Attribute "attr_name1" has a 65536 byte value for SCRATCH_MNT/testdir/remote_file2
>> attr_name2: d41d8cd98f00b204e9800998ecf8427e  -
>> 
>> attr_set: Input/output error
>> Could not set "attr_name2" for SCRATCH_MNT/testdir/sf_file
>> touch: cannot touch 'SCRATCH_MNT/testdir/sf_file': Input/output error
>> -Attribute "attr_name1" has a 64 byte value for SCRATCH_MNT/testdir/sf_file
>> -Attribute "attr_name2" has a 17 byte value for SCRATCH_MNT/testdir/sf_file
>> attr_name2: 9a6eb1bc9da3c66a9b495dfe2fe8a756  -
>> 
>> attr_set: Input/output error
>> Could not set "attr_name2" for SCRATCH_MNT/testdir/leaf_file
>> touch: cannot touch 'SCRATCH_MNT/testdir/leaf_file': Input/output error
>> -Attribute "attr_name2" has a 257 byte value for SCRATCH_MNT/testdir/leaf_file
>> -Attribute "attr_name3" has a 1024 byte value for SCRATCH_MNT/testdir/leaf_file
>> -Attribute "attr_name1" has a 1024 byte value for SCRATCH_MNT/testdir/leaf_file
>> attr_name2: f4ea5799d72a0a9bf2d56a685c9cba7a  -
>> 
>> attr_set: Input/output error
>> Could not set "attr_name2" for SCRATCH_MNT/testdir/node_file
>> touch: cannot touch 'SCRATCH_MNT/testdir/node_file': Input/output error
>> -Attribute "attr_name2" has a 257 byte value for SCRATCH_MNT/testdir/node_file
>> -Attribute "attr_name1" has a 65536 byte value for SCRATCH_MNT/testdir/node_file
>> attr_name2: f4ea5799d72a0a9bf2d56a685c9cba7a  -
>> 
>> *** done
>> -- 
>> 2.25.1
>> 


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

end of thread, other threads:[~2022-07-20 22:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19 22:25 [PATCH v2] xfs/018: fix LARP testing for small block sizes Catherine Hoang
2022-07-20  1:23 ` Alli
2022-07-20 17:25 ` Darrick J. Wong
2022-07-20 22:47   ` Catherine Hoang

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.