verify: Fix test to not check for numberio when verify_only is true
authorGwendal Grignou <gwendal@chromium.org>
Tue, 14 Jan 2020 00:35:10 +0000 (16:35 -0800)
committerGwendal Grignou <gwendal@chromium.org>
Thu, 16 Jan 2020 21:57:55 +0000 (13:57 -0800)
commit8859c0675aec03467ed65dfc79ecc874d026f165
tree43bb8ff65f12fffac7e81492de0297156395f7ed
parent6771088137686d7c6a8f1b5ed0f84bee6fa85865
verify: Fix test to not check for numberio when verify_only is true

io->numberio can not be populated when verify_only is true, because
do_dry_run() build and complete IOs immediately, so it can not replicate
the numberio that was produced when the data was layered on the media.

Without this fix, using write_random
[write_stress]
filename=${FILENAME}
size=${FILESIZE}
verify_only=${VERIFY_ONLY}
readwrite=randwrite
bs=4k
ioengine=libaio
iodepth=32
direct=1
do_verify=1
verify=crc32c

'VERIFY_ONLY=1 FILENAME=/dev/sda1 FILESIZE=1M fio write_random' passes,
but
'VERIFY_ONLY=0 FILENAME=/dev/sda1 FILESIZE=1M fio write_random' fails:
"""verify_only option fails with verify: bad header numberio 1, wanted
0""".
The fix addresses the problem by not checking numberio.

Fixes #732

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
verify.c