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> |
||
---|---|---|
.. | ||
bdevio | ||
bdevperf | ||
bdev_raid.sh | ||
blockdev.sh | ||
Makefile | ||
nbd_common.sh |