On 1/26/19 6:09 AM, Omar Sandoval wrote:
> On Fri, Jan 18, 2019 at 06:44:43PM +0900, Shin'ichiro Kawasaki wrote:
>> @@ -16,10 +17,25 @@ requires() {
>>   test_device() {
>>      echo "Running ${TEST_NAME}"
>>   
>> +    local directio=""
>> +    local zbdmode=""
>> +
>> +    if _test_dev_is_zoned; then
>> +            if ! _have_fio_zbd_zonemode; then
>> +                    echo "${SKIP_REASON}"
>> +                    return 1
>> +            fi
> 
> This will be marked as a failure instead of skipped. This check can be
> in device_requires instead:
> 
> device_requires() {
>       ! _test_dev_is_zoned || _have_fio_zbd_zonemode
> }

Thanks. Will change as suggested.

>> +            _test_dev_queue_set scheduler deadline
>> +
>> +            directio="--direct=1"
>> +            zbdmode="--zonemode=zbd"
>> +    fi
>> +
>>      FIO_PERF_FIELDS=("write iops")
>>      _fio_perf --bs=4k --rw=randwrite --norandommap --fsync=1 \
>>              --number_ios=256 --numjobs=64 --name=flushes \
>> -            --filename="$TEST_DEV"
>> +            ${directio} ${zbdmode} --filename="$TEST_DEV"
> 
> I'm surprised that shellcheck is smart enough to see that directio and
> zbdmode are always one word so this doesn't need quotes :)

Yes, and if I quote ${directio} and ${zbdmode}, fio fails with error message 
"unable to open '' job file". I leave them without quotes.

-- 
Best Regards,
Shin'ichiro Kawasaki

Reply via email to