Re: [PATCH v3 3/3] f2fs/017: test mount options for zoned device

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



On Mon, Aug 04, 2025 at 07:40:16PM +0800, Chao Yu wrote:
> As f2fs changes to use new mount APIs, let's add a new testcase
> to check mount result for special mount options for zoned device
> and their combinations, in order to detect any inconsistency during
> mount.
> 
> Cc: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
> Signed-off-by: Chao Yu <chao@xxxxxxxxxx>
> ---

This version is good to me,

Reviewed-by: Zorro Lang <zlang@xxxxxxxxxx>

>  tests/f2fs/017     | 40 ++++++++++++++++++++++++++++++++++++++++
>  tests/f2fs/017.out | 21 +++++++++++++++++++++
>  2 files changed, 61 insertions(+)
>  create mode 100755 tests/f2fs/017
>  create mode 100644 tests/f2fs/017.out
> 
> diff --git a/tests/f2fs/017 b/tests/f2fs/017
> new file mode 100755
> index 00000000..cdf42fc8
> --- /dev/null
> +++ b/tests/f2fs/017
> @@ -0,0 +1,40 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (c) 2025 Chao Yu.  All Rights Reserved.
> +#
> +# FS QA Test No. f2fs/017
> +#
> +# This testcase tries to check stability of mount result
> +# w/ mount options for zoned device and their combination.
> +#
> +. ./common/preamble
> +_begin_fstest auto quick mount
> +
> +_require_zoned_device "$TEST_DEV"
> +_test_unmount >> $seqres.full 2>&1
> +
> +options=(
> +#	mount_option			mkfs_option
> +	"background_gc=on"		"blkzone"		\
> +	"background_gc=off"		"blkzone"		\
> +	"background_gc=sync"		"blkzone"		\
> +	"mode=adaptive"			"blkzone"		\
> +	"mode=lfs"			"blkzone"		\
> +	"mode=fragment:segment"		"blkzone"		\
> +	"mode=fragment:block"		"blkzone"		\
> +	"discard_unit=block"		"blkzone"		\
> +	"discard_unit=segment"		"blkzone"		\
> +	"discard_unit=section"		"blkzone"		\
> +)
> +
> +for ((i=0;i<${#options[@]};i=i+2))
> +do
> +	echo "Option#$i: ${options[$i]} : ${options[$((i+1))]}"
> +	_test_mkfs "-m" >> $seqres.full || _fail "mkfs failed"
> +	_test_mount "-o ${options[$i]}" >> $seqres.full 2>&1
> +	echo $?
> +	_test_unmount >> $seqres.full 2>&1
> +done
> +
> +status=0
> +exit
> diff --git a/tests/f2fs/017.out b/tests/f2fs/017.out
> new file mode 100644
> index 00000000..c260e0b1
> --- /dev/null
> +++ b/tests/f2fs/017.out
> @@ -0,0 +1,21 @@
> +QA output created by 017
> +Option#0: background_gc=on : blkzone
> +0
> +Option#2: background_gc=off : blkzone
> +32
> +Option#4: background_gc=sync : blkzone
> +0
> +Option#6: mode=adaptive : blkzone
> +32
> +Option#8: mode=lfs : blkzone
> +0
> +Option#10: mode=fragment:segment : blkzone
> +32
> +Option#12: mode=fragment:block : blkzone
> +32
> +Option#14: discard_unit=block : blkzone
> +0
> +Option#16: discard_unit=segment : blkzone
> +0
> +Option#18: discard_unit=section : blkzone
> +0
> -- 
> 2.49.0
> 





[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