public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH blktests 1/1] common/scsi_debug: use _patient_rmmod() to unload scsi_debug
@ 2026-04-10  5:30 Shin'ichiro Kawasaki
  2026-04-10 16:34 ` Bart Van Assche
  0 siblings, 1 reply; 3+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-04-10  5:30 UTC (permalink / raw)
  To: linux-block; +Cc: Yi Zhang, Shin'ichiro Kawasaki

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 <yi.zhang@redhat.com>
Closes: https://github.com/linux-blktests/blktests/issues/241
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 common/scsi_debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/scsi_debug b/common/scsi_debug
index 6aa7420..86ea3f4 100644
--- a/common/scsi_debug
+++ b/common/scsi_debug
@@ -57,7 +57,7 @@ _have_scsi_debug_group_number_stats() {
 		SKIP_REASONS+=("scsi_debug does not support group number statistics")
 		ret=1
 	fi
-	modprobe -qr scsi_debug >&/dev/null
+	_patient_rmmod scsi_debug >&/dev/null
 	return ${ret}
 }
 
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-16 11:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-10  5:30 [PATCH blktests 1/1] common/scsi_debug: use _patient_rmmod() to unload scsi_debug Shin'ichiro Kawasaki
2026-04-10 16:34 ` Bart Van Assche
2026-04-16 11:44   ` Shinichiro Kawasaki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox