You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
skip tests if scsi_debug module is already loaded and in use
Several tests across block/, scsi/, dm/, md/, zbd/, nvme/ require
exclusive access to the scsi_debug module because they load, unload or
reconfigure it. When scsi_debug is loadable and already loaded by the
environment (e.g., by another driver or a previous setup), these tests
fail with:
modprobe: FATAL: Module scsi_debug is in use.
Unloading scsi_debug failed
scsi_debug 327680 4
To prevent the failures, check if scsi_debug already loaded. If so, skip
the test cases which use scsi_debug. Instead of modifying common rc
files—which would overskip unrelated tests, add "_module_not_in_use
scsi_debug" call to the new helper function _have_loadable_scsi_debug()
and call it only for the tests that actually depend on exclusive access
to scsi_debug.
Also, when scsi_debug is built-in and already additional hosts are
created by the environment, the tests may break the hosts. To cover this
built-in scsi_debug scenario, check the number of added hosts in
_have_scsi_debug(). If the number of hosts is larger than 1, skip the
test cases.
Link: linux-blktests#218
Signed-off-by: Disha Goel <[email protected]>
[Shin'ichiro: improved commit message]
Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
0 commit comments