The test case block/007 requires TEST_DEVS which support IO polling.
To allow test case executed without such devices, fallback to a null_blk
device when TEST_DEVS is empty.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
. tests/block/rc
. common/iopoll
+. common/null_blk
DESCRIPTION="test classic and hybrid IO polling"
TIMED=1
_require_test_dev_supports_io_poll_delay
}
+fallback_device() {
+ if ! _configure_null_blk nullb1 power=1; then
+ return 1
+ fi
+ echo /dev/nullb1
+}
+
+cleanup_fallback_device() {
+ _exit_null_blk
+}
+
run_fio_job() {
if _test_dev_is_rotational; then
size="32m"