]> www.infradead.org Git - users/sagi/blktests.git/commit
check: Introduce fallback_device() and cleanup_fallback_device()
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Mon, 28 Jan 2019 13:14:48 +0000 (22:14 +0900)
committerOmar Sandoval <osandov@fb.com>
Tue, 5 Feb 2019 18:46:01 +0000 (10:46 -0800)
commitcfde92e040dccb473964f16f2a0d9ea36855694c
treef7ef3ebd6840af90820a262c420247ff540fec9a
parent4672828bb25bd0b8f68eddcce65abb96391d93d0
check: Introduce fallback_device() and cleanup_fallback_device()

These optional functions can be defined by a test case script. When
defined and TEST_DEVS is empty, the fallback_device() is executed before
runing the test case. The fallback_device() function intializes a virtual
device to run the test case and return the device to be set in TEST_DEVS.
After running the test case, cleanup_fallback_device() is executed to
clean up the device.

This feature allows to run test cases with test_device() function even if
TEST_DEVS is not set in the config, using virtaul devices such as null_blk.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
check