Re: [PATCH] xfs/189: fix remount barrier test failure

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Wed, Jul 30, 2025 at 07:28:26PM +0200, Anthony Iliopoulos wrote:
> _test_remount_barrier() is skipped on kernels newer than v4.19 where the
> barrier options have been removed, and this is detected by matching the
> mount command output for a "bad option" error.
> 
> Recent util-linux commit 9da5644e414c ("libmount: report kernel message
> from new API"), which was introduced in v2.41 release changed that error
> message from the old hardcoded one:
> 
>   mount: /mnt/scratch: mount point not mounted or bad option.
> 
> to the newer, and more specific coming from the kernel:
> 
>   mount: /mnt/scratch: fsconfig() failed: xfs: Unknown parameter 'barrier'.
> 
> Update the test to account for that change so that the unsupported
> options can be properly detected again and for this part of the test to
> be skipped successfully.
> 
> Signed-off-by: Anthony Iliopoulos <ailiop@xxxxxxxx>
> ---
>  tests/xfs/189 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/xfs/189 b/tests/xfs/189
> index d32adf0840a6..1770023760fd 100755
> --- a/tests/xfs/189
> +++ b/tests/xfs/189
> @@ -180,7 +180,7 @@ _test_remount_barrier()
>  
>  	# If the kernel doesn't recognize 'barrier' as a mount option then
>  	# just fake the output.  The barrier option was removed in 4.19.
> -	if grep -q "bad option" $tmp.barriermount; then
> +	if grep -E -q "(bad option|Unknown parameter)" $tmp.barriermount; then

Although this test case might be dropped in one day, but your patch still
makes sense before we remove it :) So

Reviewed-by: Zorro Lang <zlang@xxxxxxxxxx>

>  		cat << ENDL
>  SCRATCH_DEV on SCRATCH_MNT type xfs (rw)
>  SCRATCH_DEV on SCRATCH_MNT type xfs (rw,nobarrier)
> -- 
> 2.50.1
> 
> 





[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux