diff mbox series

[4/5] xfs/004: don't fail test due to realtime files

Message ID 161958295873.3452351.8562454394626118217.stgit@magnolia (mailing list archive)
State New, archived
Headers show
Series fstests: miscellaneous fixes | expand

Commit Message

Darrick J. Wong April 28, 2021, 4:09 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

This test exercises xfs_db functionality that relates to the free space
btrees on the data device.  Therefore, make sure that the files we
create are not realtime files.

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

Comments

Brian Foster April 28, 2021, 5:47 p.m. UTC | #1
On Tue, Apr 27, 2021 at 09:09:18PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> This test exercises xfs_db functionality that relates to the free space
> btrees on the data device.  Therefore, make sure that the files we
> create are not realtime files.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  tests/xfs/004 |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> 
> diff --git a/tests/xfs/004 b/tests/xfs/004
> index 141cf03a..7633071c 100755
> --- a/tests/xfs/004
> +++ b/tests/xfs/004
> @@ -28,6 +28,10 @@ _populate_scratch()
>  	_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
>  	. $tmp.mkfs
>  	_scratch_mount
> +	# This test looks at specific behaviors of the xfs_db freesp command,
> +	# which reports on the contents of the free space btrees for the data
> +	# device.  Don't let anything get created on the realtime volume.
> +	$XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT
>  	dd if=/dev/zero of=$SCRATCH_MNT/foo count=200 bs=4096 >/dev/null 2>&1 &
>  	dd if=/dev/zero of=$SCRATCH_MNT/goo count=400 bs=4096 >/dev/null 2>&1 &
>  	dd if=/dev/zero of=$SCRATCH_MNT/moo count=800 bs=4096 >/dev/null 2>&1 &
>
diff mbox series

Patch

diff --git a/tests/xfs/004 b/tests/xfs/004
index 141cf03a..7633071c 100755
--- a/tests/xfs/004
+++ b/tests/xfs/004
@@ -28,6 +28,10 @@  _populate_scratch()
 	_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
 	. $tmp.mkfs
 	_scratch_mount
+	# This test looks at specific behaviors of the xfs_db freesp command,
+	# which reports on the contents of the free space btrees for the data
+	# device.  Don't let anything get created on the realtime volume.
+	$XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT
 	dd if=/dev/zero of=$SCRATCH_MNT/foo count=200 bs=4096 >/dev/null 2>&1 &
 	dd if=/dev/zero of=$SCRATCH_MNT/goo count=400 bs=4096 >/dev/null 2>&1 &
 	dd if=/dev/zero of=$SCRATCH_MNT/moo count=800 bs=4096 >/dev/null 2>&1 &