Re: [PATCH blktests] nvme/068: check module reference count with patience
Shin'ichiro Kawasaki <[email protected]> Thu, 6 Aug 2026 12:29:57 +0900
| Newsgroups | org.infradead.lists.linux-nvme |
|---|---|
| Message-ID | <anP_X6bgk-H9bL_3@shinmob> |
On Aug 05, 2026 / 09:07, John Garry wrote:
> On 05/08/2026 06:13, Shin'ichiro Kawasaki wrote:
[...]
> > diff --git a/tests/nvme/068 b/tests/nvme/068
> > index 4aee95b..7e39e17 100755
> > --- a/tests/nvme/068
> > +++ b/tests/nvme/068
> > @@ -27,6 +27,19 @@ _delayed_nvme_reconnect_ctrl() {
> > _nvme_connect_subsys
> > }
> > +_check_nvme_core_ref_count() {
> > + local refcnt i
> > +
> > + for ((i = 0; i < 10; i++)); do
> > + refcnt=$(_module_use_count nvme_core)
> > + if [ "$refcnt" != "" ] && [ "$refcnt" -eq "$refcnt_orig" ]; then
>
> As I remember, $refcnt == "" happens when the driver is built-in. So should
> we just always return 0 immediately when we find this?
Thanks for the catch. Will reflect on v2.
>
> > + return
>
> return 0?
Agreed, explicit 0 return is the better. Will reflect this to v2.