Skip to content

Commit 1d68a36

Browse files
committed
common/scsi_debug: use _patient_rmmod() to unload scsi_debug
The helper _have_scsi_debug_group_number_stats() loads and unloads scsi_debug to check parameters of scsi_debug. However, the unload is too soon after the load, then it often fails. To avoid such unload failures, use _patient_rmmod() to unload scsi_debug. Reported-by: Yi Zhang <[email protected]> Closes: #241 [Shin'ichro: removed /dev/null redirect per suggestion by Bart] Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
1 parent 255189f commit 1d68a36

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

common/scsi_debug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ _have_scsi_debug_group_number_stats() {
5757
SKIP_REASONS+=("scsi_debug does not support group number statistics")
5858
ret=1
5959
fi
60-
modprobe -qr scsi_debug >&/dev/null
60+
_patient_rmmod scsi_debug
6161
return ${ret}
6262
}
6363

0 commit comments

Comments
 (0)