* [PATCH] _test_mkfs: Include external log device (if any) when creating fs on TEST_DEV
@ 2024-05-24 7:31 Chandan Babu R
2024-05-24 8:06 ` Christoph Hellwig
2024-05-24 15:07 ` Darrick J. Wong
0 siblings, 2 replies; 3+ messages in thread
From: Chandan Babu R @ 2024-05-24 7:31 UTC (permalink / raw)
To: fstests; +Cc: Chandan Babu R, zlang
Test execution fails when testing XFS with external log device and when
RECREATE_TEST_DEV is set to true. This is because _test_mkfs() is invoked as
part of recreating the filesystem on test device and this function does not
include the external log device as part of the mkfs.xfs command line.
_test_mount() invoked later fails since it passes an external log device to
the mount syscall which the kernel does not expect to find.
To fix this bug, this commit modifies _test_mkfs() to invoke _test_options()
in order to compute the value of TEST_OPTIONS and includes the resulting value
in the mkfs.xfs command line.
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
---
common/rc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/common/rc b/common/rc
index 0fe56382..6562ccd7 100644
--- a/common/rc
+++ b/common/rc
@@ -614,7 +614,8 @@ _test_mkfs()
$MKFS_PROG -t $FSTYP -- -F $MKFS_OPTIONS $* $TEST_DEV
;;
xfs)
- $MKFS_PROG -t $FSTYP -- -f $MKFS_OPTIONS $* $TEST_DEV
+ _test_options mkfs
+ $MKFS_PROG -t $FSTYP -- -f $TEST_OPTIONS $MKFS_OPTIONS $* $TEST_DEV
;;
bcachefs)
$MKFS_BCACHEFS_PROG $MKFS_OPTIONS $* $TEST_DEV > /dev/null
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] _test_mkfs: Include external log device (if any) when creating fs on TEST_DEV
2024-05-24 7:31 [PATCH] _test_mkfs: Include external log device (if any) when creating fs on TEST_DEV Chandan Babu R
@ 2024-05-24 8:06 ` Christoph Hellwig
2024-05-24 15:07 ` Darrick J. Wong
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2024-05-24 8:06 UTC (permalink / raw)
To: Chandan Babu R; +Cc: fstests, zlang
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] _test_mkfs: Include external log device (if any) when creating fs on TEST_DEV
2024-05-24 7:31 [PATCH] _test_mkfs: Include external log device (if any) when creating fs on TEST_DEV Chandan Babu R
2024-05-24 8:06 ` Christoph Hellwig
@ 2024-05-24 15:07 ` Darrick J. Wong
1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2024-05-24 15:07 UTC (permalink / raw)
To: Chandan Babu R; +Cc: fstests, zlang
On Fri, May 24, 2024 at 01:01:01PM +0530, Chandan Babu R wrote:
> Test execution fails when testing XFS with external log device and when
> RECREATE_TEST_DEV is set to true. This is because _test_mkfs() is invoked as
> part of recreating the filesystem on test device and this function does not
> include the external log device as part of the mkfs.xfs command line.
>
> _test_mount() invoked later fails since it passes an external log device to
> the mount syscall which the kernel does not expect to find.
>
> To fix this bug, this commit modifies _test_mkfs() to invoke _test_options()
> in order to compute the value of TEST_OPTIONS and includes the resulting value
> in the mkfs.xfs command line.
>
> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Doh
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> common/rc | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/common/rc b/common/rc
> index 0fe56382..6562ccd7 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -614,7 +614,8 @@ _test_mkfs()
> $MKFS_PROG -t $FSTYP -- -F $MKFS_OPTIONS $* $TEST_DEV
> ;;
> xfs)
> - $MKFS_PROG -t $FSTYP -- -f $MKFS_OPTIONS $* $TEST_DEV
> + _test_options mkfs
> + $MKFS_PROG -t $FSTYP -- -f $TEST_OPTIONS $MKFS_OPTIONS $* $TEST_DEV
> ;;
> bcachefs)
> $MKFS_BCACHEFS_PROG $MKFS_OPTIONS $* $TEST_DEV > /dev/null
> --
> 2.43.0
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-24 15:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-24 7:31 [PATCH] _test_mkfs: Include external log device (if any) when creating fs on TEST_DEV Chandan Babu R
2024-05-24 8:06 ` Christoph Hellwig
2024-05-24 15:07 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox