Re: [PATCH 2/2] t/zbd: add test case to confirm no write with rwmixwrite=0 option

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

 



On 12/20/23 09:58, Shin'ichiro Kawasaki wrote:
> The previous commit fixed the issue of the unexpected write with options
> zonemode=zbd, rw=randrw and rwmixwrite=0. Add a test to confirm the fix.
> 
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>
> ---
>  t/zbd/test-zbd-support | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/t/zbd/test-zbd-support b/t/zbd/test-zbd-support
> index 2f15a191..532860eb 100755
> --- a/t/zbd/test-zbd-support
> +++ b/t/zbd/test-zbd-support
> @@ -1561,6 +1561,29 @@ test67() {
>  	grep -q 'Exceeded max_active_zones limit' "${logfile}.${test_number}"
>  }
>  
> +# Test rw=randrw and rwmixwrite=0 options do not issue write I/O unit
> +test68() {
> +	local off size
> +
> +	require_zbd || return "$SKIP_TESTCASE"
> +
> +	reset_zone "${dev}" -1
> +
> +	# Write some data as preparation
> +	off=$((first_sequential_zone_sector * 512))
> +	size=$min_seq_write_size
> +	run_one_fio_job "$(ioengine "psync")" --rw=write --offset="$off" \
> +			--io_size="$size" --zonemode=strided \
> +			--zonesize="$zone_size" --zonerange="$zone_size" \
> +		       >> "${logfile}.${test_number}" 2>&1 || return $?
> +	# Run random mixed read and write specifying zero write ratio
> +	run_fio_on_seq "$(ioengine "psync")" --rw=randrw --rwmixwrite=0 \
> +		       --time_based --runtime=1s \
> +		       >> "${logfile}.${test_number}" 2>&1 || return $?
> +	# "WRITE:" shall be recoreded only once for the preparation
> +	[[ $(grep -c "WRITE:" "${logfile}.${test_number}") == 1 ]]
> +}
> +
>  SECONDS=0
>  tests=()
>  dynamic_analyzer=()

Looks good.

Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx>

-- 
Damien Le Moal
Western Digital Research





[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux