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 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.

-- 
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