Spdk/test/bdev
Jonas Pfefferle a6e0224634 test/bdevio: fix bytes vs blocks => early return of test
blockdev_compare_and_write and blockdev_write_read check
if data_length is multiple of block size and silently
succeed if it is not. There are multiple test that test
e.g. invalid size but the actual bdev API is
never called and tested because of the early return.
The intend of this behavior presumably was to allow
to run test like e.g. the 512bytes rw test on a 4K
formatted namespace without failing. Instead of silently
succeeding which introduces the issues described this
patch changes all sizes to be multiple of block size and
removes the test for valid block size to let the
return value of the bdev API functions indicate failure like
intended. All previous 4k tests are now performing io of
1 block size. Previous 512byte tests now perform
8 * block size (to have 4k test size for 512byte formatted
namespaces). Write zeroes test are now using the
write zeroes buffer size instead of a hardcoded value
and align accordingly to block size io.
Furthermore, no cmp&write test is ever executed because
data_length is set to 1 trying to indicate 1 block but
it is tested against valid block bytes and silently
succeeded. Also write and read helpers in cmp&write test
expect bytes not blocks. For consistency use bytes in the
test and only convert to blocks when calling the cmp&write
blocks API.

Signed-off-by: Jonas Pfefferle <pepperjo@japf.ch>
Change-Id: I662094c2bcd08c0e9dc5573177a2e7a0edd275ce
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12382
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-05-03 16:09:25 +00:00
..
bdevio test/bdevio: fix bytes vs blocks => early return of test 2022-05-03 16:09:25 +00:00
bdevperf scripts: fix PYTHONPATH references to scripts/ directory 2022-04-18 17:22:09 +00:00
bdev_raid.sh bdev/raid: Add concat module 2022-04-05 07:39:00 +00:00
blockdev.sh test/bdev: MLX5 AES_XTS testing support 2022-04-06 07:23:20 +00:00
Makefile test: move the bdev directory up one level 2018-03-23 19:45:09 -04:00
nbd_common.sh tests: Switch to $SPDK_TEST_STORAGE for writing out bigger tmp files 2020-05-20 14:17:02 +00:00