Skip to content

Commit 1967331

Browse files
committed
check: do not create fallback device when other requirements are not met
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 <[email protected]>
1 parent e50a5ff commit 1967331

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

check

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,11 @@ _check_and_call_test_device() {
721721
[[ -n $COND_DESC ]] && postfix=_${COND_DESC//[ =]/_}
722722
for TEST_DEV in "${TEST_DEVS[@]}"; do
723723
if [[ $TEST_DEV == fallback ]]; then
724+
if [[ -v SKIP_REASONS ]]; then
725+
_output_notrun "$TEST_NAME"
726+
return 0
727+
fi
728+
724729
if ! TEST_DEV=$(fallback_device); then
725730
_warning "$TEST_NAME: fallback_device call failure"
726731
return 0

0 commit comments

Comments
 (0)