From: Yi Zhang <yi.zhang@redhat.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Omar Sandoval <osandov@osandov.com>,
linux-block <linux-block@vger.kernel.org>
Subject: Re: [PATCH blktests V3] tests/srp: fix module loading issue during srp tests
Date: Mon, 25 Oct 2021 09:27:27 +0800 [thread overview]
Message-ID: <CAHj4cs-2Qc7fMmCDEV7VYCh_KGTe+_=Y6z=tTnYwJTJ9MC+DuQ@mail.gmail.com> (raw)
In-Reply-To: <e1740f8a-07d4-0c7f-4099-2d6a37dfb899@acm.org>
On Mon, Oct 25, 2021 at 5:22 AM Bart Van Assche <bvanassche@acm.org> wrote:
>
> On 10/24/21 05:42, Yi Zhang wrote:
> > The ib_isert/ib_srpt modules will be automatically loaded after the first
> > time rdma_rxe/siw setup, which will lead srp tests fail.
> >
> > $ modprobe rdma_rxe
> > $ echo eno1 >/sys/module/rdma_rxe/parameters/add
> > $ lsmod | grep -E "ib_srpt|iscsi_target_mod|ib_isert"
> > ib_srpt 167936 0
> > ib_isert 139264 0
> > iscsi_target_mod 843776 1 ib_isert
> > target_core_mod 1069056 3 iscsi_target_mod,ib_srpt,ib_isert
> > rdma_cm 315392 5 rpcrdma,ib_srpt,ib_iser,ib_isert,rdma_ucm
> > ib_cm 344064 2 rdma_cm,ib_srpt
> > ib_core 1101824 10 rdma_cm,rdma_rxe,rpcrdma,ib_srpt,iw_cm,ib_iser,ib_isert,rdma_ucm,ib_uverbs,ib_cm
> >
> > $ ./check srp/001
> > srp/001 (Create and remove LUNs) [failed]
> > runtime ... 3.675s
> > --- tests/srp/001.out 2021-10-13 01:18:50.846740093 -0400
> > +++ /root/blktests/results/nodev/srp/001.out.bad 2021-10-14 03:24:18.593852208 -0400
> > @@ -1,3 +1 @@
> > -Configured SRP target driver
> > -count_luns(): 3 <> 3
> > -Passed
> > +insmod: ERROR: could not insert module /lib/modules/5.15.0-rc5.fix+/kernel/drivers/infiniband/ulp/srpt/ib_srpt.ko: File exists
> > modprobe: FATAL: Module iscsi_target_mod is in use.
> >
> > Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
> > ---
> > tests/srp/rc | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/srp/rc b/tests/srp/rc
> > index 7239d87..b3dfd4d 100755
> > --- a/tests/srp/rc
> > +++ b/tests/srp/rc
> > @@ -497,7 +497,7 @@ start_lio_srpt() {
> > if modinfo ib_srpt | grep -q '^parm:[[:blank:]]*rdma_cm_port:'; then
> > opts+=("rdma_cm_port=${srp_rdma_cm_port}")
> > fi
> > - insmod "/lib/modules/$(uname -r)/kernel/drivers/infiniband/ulp/srpt/ib_srpt."* "${opts[@]}" || return $?
> > + unload_module ib_srpt && modprobe ib_srpt "${opts[@]}" || return $?
> > i=0
>
> The "&&" above seems wrong to me. It is not guaranteed that the ib_srpt
> kernel mode has already been loaded before this code runs. I propose to
> use the following code instead:
>
> unload_module ib_srpt
> modprobe ib_srpt "${opts[@]}" || return $?
Thanks Bart, send v4 for this change.
>
> Thanks,
>
> Bart.
>
--
Best Regards,
Yi Zhang
prev parent reply other threads:[~2021-10-25 1:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-24 12:42 [PATCH blktests V3] tests/srp: fix module loading issue during srp tests Yi Zhang
2021-10-24 21:22 ` Bart Van Assche
2021-10-25 1:27 ` Yi Zhang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHj4cs-2Qc7fMmCDEV7VYCh_KGTe+_=Y6z=tTnYwJTJ9MC+DuQ@mail.gmail.com' \
--to=yi.zhang@redhat.com \
--cc=bvanassche@acm.org \
--cc=linux-block@vger.kernel.org \
--cc=osandov@osandov.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).