diff mbox series

[1/2] xfs/270: actually test file readability

Message ID 169335059383.3526409.15894917295629170268.stgit@frogsfrogsfrogs (mailing list archive)
State New, archived
Headers show
Series fstests: fix ro mounting with unknown rocompat features | expand

Commit Message

Darrick J. Wong Aug. 29, 2023, 11:09 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Make sure we can actually read files off the ro mounted filesystem that
has an unknown rocompat feature set.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 tests/xfs/270 |    4 ++++
 1 file changed, 4 insertions(+)

Comments

Zorro Lang Sept. 13, 2023, 4:54 p.m. UTC | #1
On Tue, Aug 29, 2023 at 04:09:53PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Make sure we can actually read files off the ro mounted filesystem that
> has an unknown rocompat feature set.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---

Looks good to me,
Reviewed-by: Zorro Lang <zlang@redhat.com>

>  tests/xfs/270 |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> 
> diff --git a/tests/xfs/270 b/tests/xfs/270
> index 7447ce87be..511dfe9fcd 100755
> --- a/tests/xfs/270
> +++ b/tests/xfs/270
> @@ -23,6 +23,9 @@ _require_scratch_nocheck
>  _require_scratch_xfs_crc
>  
>  _scratch_mkfs_xfs >>$seqres.full 2>&1
> +_scratch_mount
> +echo moo > $SCRATCH_MNT/testfile
> +_scratch_unmount
>  
>  # set the highest bit of features_ro_compat, use it as an unknown
>  # feature bit. If one day this bit become known feature, please
> @@ -68,6 +71,7 @@ if [ $? -ne 0 ]; then
>  	_fail "ro mount test failed"
>  else
>  	# no hang/panic is fine
> +	cat $SCRATCH_MNT/testfile > /dev/null
>  	$FSSTRESS_PROG -d $SCRATCH_MNT -p 4 -n 400 >>$seqres.full 2>&1
>  fi
>  
>
diff mbox series

Patch

diff --git a/tests/xfs/270 b/tests/xfs/270
index 7447ce87be..511dfe9fcd 100755
--- a/tests/xfs/270
+++ b/tests/xfs/270
@@ -23,6 +23,9 @@  _require_scratch_nocheck
 _require_scratch_xfs_crc
 
 _scratch_mkfs_xfs >>$seqres.full 2>&1
+_scratch_mount
+echo moo > $SCRATCH_MNT/testfile
+_scratch_unmount
 
 # set the highest bit of features_ro_compat, use it as an unknown
 # feature bit. If one day this bit become known feature, please
@@ -68,6 +71,7 @@  if [ $? -ne 0 ]; then
 	_fail "ro mount test failed"
 else
 	# no hang/panic is fine
+	cat $SCRATCH_MNT/testfile > /dev/null
 	$FSSTRESS_PROG -d $SCRATCH_MNT -p 4 -n 400 >>$seqres.full 2>&1
 fi