* [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* Re: [PATCH blktests 1/1] common/scsi_debug: use _patient_rmmod() to unload scsi_debug
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
0 siblings, 1 reply; 3+ messages in thread
From: Bart Van Assche @ 2026-04-10 16:34 UTC (permalink / raw)
To: Shin'ichiro Kawasaki, linux-block; +Cc: Yi Zhang
On 4/9/26 10:30 PM, Shin'ichiro Kawasaki wrote:
> - modprobe -qr scsi_debug >&/dev/null
> + _patient_rmmod scsi_debug >&/dev/null
The output of none of the other _patient_rmmod calls is redirected to
/dev/null. I propose to leave out the output redirection because of
consistency.
Thanks,
Bart.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH blktests 1/1] common/scsi_debug: use _patient_rmmod() to unload scsi_debug
2026-04-10 16:34 ` Bart Van Assche
@ 2026-04-16 11:44 ` Shinichiro Kawasaki
0 siblings, 0 replies; 3+ messages in thread
From: Shinichiro Kawasaki @ 2026-04-16 11:44 UTC (permalink / raw)
To: Bart Van Assche; +Cc: linux-block@vger.kernel.org, Yi Zhang
On Apr 10, 2026 / 09:34, Bart Van Assche wrote:
> On 4/9/26 10:30 PM, Shin'ichiro Kawasaki wrote:
> > - modprobe -qr scsi_debug >&/dev/null
> > + _patient_rmmod scsi_debug >&/dev/null
>
> The output of none of the other _patient_rmmod calls is redirected to
> /dev/null. I propose to leave out the output redirection because of
> consistency.
Thanks, I completely agree with it. I folded in the suggested change and
applied the patch.
^ permalink raw reply [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