_test_mkfs: Include external log device (if any) when creating fs on TEST_DEV

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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
1 file changed