Currently, fallback devices are prepared regardless of whether other requirements are fulfilled. This is not always desired. For example, when users already created scsi_debug devices, it is not good to create a fallback scsi_debug device, because it unloads scsi_debug module and remove the scsi_debug devices users created. To prevent such scenario, confirm requirements by checking skip reasons before creating fallback devices. Signed-off-by: Shin'ichiro Kawasaki --- check | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/check b/check index 91064d7..fdc7ba7 100755 --- a/check +++ b/check @@ -721,6 +721,11 @@ _check_and_call_test_device() { [[ -n $COND_DESC ]] && postfix=_${COND_DESC//[ =]/_} for TEST_DEV in "${TEST_DEVS[@]}"; do if [[ $TEST_DEV == fallback ]]; then + if [[ -v SKIP_REASONS ]]; then + _output_notrun "$TEST_NAME" + return 0 + fi + if ! TEST_DEV=$(fallback_device); then _warning "$TEST_NAME: fallback_device call failure" return 0 -- 2.49.0