Re: [PATCH v3 6/6] t/zbd: Add test case to check zonecapacity option

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

 



On Jul 22, 2020 / 05:52, Damien Le Moal wrote:
> On 2020/07/22 14:49, Shinichiro Kawasaki wrote:
> > On Jul 21, 2020 / 09:59, Damien Le Moal wrote:
> >> On 2020/07/17 18:36, Shin'ichiro Kawasaki wrote:
> >>> From: Hans Holmberg <hans.holmberg@xxxxxxx>
> >>>
> >>> Add test case #49 which confirms the newly introduced zonecapacity
> >>> option is working as expected with regular block devices.
> >>>
> >>> Signed-off-by: Hans Holmberg <hans.holmberg@xxxxxxx>
> >>> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>
> >>> Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxx>
> >>> ---
> >>>  t/zbd/test-zbd-support | 20 ++++++++++++++++++++
> >>>  1 file changed, 20 insertions(+)
> >>>
> >>> diff --git a/t/zbd/test-zbd-support b/t/zbd/test-zbd-support
> >>> index 31718c95..e53a20c5 100755
> >>> --- a/t/zbd/test-zbd-support
> >>> +++ b/t/zbd/test-zbd-support
> >>> @@ -839,6 +839,26 @@ test48() {
> >>>  	    >> "${logfile}.${test_number}" 2>&1 || return $?
> >>>  }
> >>>  
> >>> +# Check if fio handles --zonecapacity on a normal block device correctly
> >>> +test49() {
> >>> +
> >>> +    if [ -n "$is_zbd" ]; then
> >>> +	echo "$dev is not a regular block device" \
> >>> +	     >>"${logfile}.${test_number}"
> >>> +	return 0
> >>> +    fi
> >>> +
> >>> +    size=$((2 * zone_size))
> >>> +    capacity=$((zone_size * 3 / 4))
> >>> +
> >>> +    run_one_fio_job "$(ioengine "psync")" --rw=write \
> >>> +		    --zonemode=zbd --zonesize="${zone_size}" \
> >>> +		    --zonecapacity=${capacity} \
> >>> +		    --verify=md5  --size=${size} >>"${logfile}.${test_number}" 2>&1 ||
> >>> +	return $?
> >>> +    check_read $((capacity * 2)) || return $?
> >>
> >> The workload is rw=write, but this is calling check_read. Is this intended ?
> > 
> > Yes, the workload has verify option then written data is read back. It checks
> > both written size and read size.
> 
> But to check both read *and* write, don't you need to add:
> 
> check_write $((capacity * 2)) || return $?
> 
> too ? Or does check_read already does the check for both read and write ?

Yes, it is more precise to call both check_written and check_read. I will post
another patch to add check_written. Jens already picked up the patch series
(Thank you Jens!).

-- 
Best Regards,
Shin'ichiro Kawasaki



[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