From: Petr Vorel <pvorel@suse.cz>
To: Wei Gao <wegao@suse.com>
Cc: ltp@lists.linux.it, libtirpc-devel@lists.sourceforge.net,
linux-nfs@vger.kernel.org, "Steve Dickson" <steved@redhat.com>,
"Ricardo B . Marlière" <rbm@suse.com>
Subject: Re: [LTP] [PATCH 1/1] rpc_test.sh: Check for rpcbind remote calls support
Date: Fri, 8 Aug 2025 09:38:14 +0200 [thread overview]
Message-ID: <20250808073814.GB410227@pevik> (raw)
In-Reply-To: <aJFVNdvkdfqPFsse@localhost>
> On Mon, Aug 04, 2025 at 08:48:50PM +0200, Petr Vorel wrote:
> > client binaries rpc_pmap_rmtcall and tirpc_rpcb_rmtcall require rpcbind
> > compiled with remote calls. rpcbind has disabled remote calls by
> > default in 1.2.5. But this was not detectable until 1.2.8, which brought
> > this info in -v flag.
> > Detect the support and skip on these 2 functions when disabled.
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > Hi,
> > testcases/network/rpc/rpc-tirpc/rpc_test.sh | 5 +++++
> > 1 file changed, 5 insertions(+)
> > diff --git a/testcases/network/rpc/rpc-tirpc/rpc_test.sh b/testcases/network/rpc/rpc-tirpc/rpc_test.sh
> > index cadae55203..1a8cf46399 100755
> > --- a/testcases/network/rpc/rpc-tirpc/rpc_test.sh
> > +++ b/testcases/network/rpc/rpc-tirpc/rpc_test.sh
> > @@ -53,6 +53,11 @@ setup()
> > fi
> > fi
> > + if [ "$CLIENT" = 'rpc_pmap_rmtcall' -o "$CLIENT" = 'tirpc_rpcb_rmtcall' ] && \
> > + rpcbind -v 2>/dev/null && rpcbind -v 2>&1 | grep -q 'remote calls: no'; then
> > + tst_brk TCONF "skip due rpcbind compiled without remote calls"
> > + fi
> Should we check rpcbind version? Since you mentioned remove call
> detectable until 1.2.8.
We would not get any benefit from it. The check skips tests only when remote
calls are disabled and it's detectable. 'rpcbind -v' is on >= 1.2.8, therefore
'rpcbind -v 2>/dev/null &&' is hidden check for rpcbind >= 1.2.8.
But looking at the code it's confusing and 'rpcbind -v 2>/dev/null && ' is
redundant (as '-v' certainly does not produce wanted output on rpcbind < 1.2.8),
therefore I'll send v2:
- rpcbind -v 2>/dev/null && rpcbind -v 2>&1 | grep -q 'remote calls: no'; then
+ rpcbind -v 2>&1 | grep -q 'remote calls: no'; then
Kind regards,
Petr
WARNING: multiple messages have this Message-ID (diff)
From: Petr Vorel <pvorel@suse.cz>
To: Wei Gao <wegao@suse.com>
Cc: linux-nfs@vger.kernel.org, "Ricardo B . Marlière" <rbm@suse.com>,
libtirpc-devel@lists.sourceforge.net, ltp@lists.linux.it,
"Steve Dickson" <steved@redhat.com>
Subject: Re: [LTP] [PATCH 1/1] rpc_test.sh: Check for rpcbind remote calls support
Date: Fri, 8 Aug 2025 09:38:14 +0200 [thread overview]
Message-ID: <20250808073814.GB410227@pevik> (raw)
In-Reply-To: <aJFVNdvkdfqPFsse@localhost>
> On Mon, Aug 04, 2025 at 08:48:50PM +0200, Petr Vorel wrote:
> > client binaries rpc_pmap_rmtcall and tirpc_rpcb_rmtcall require rpcbind
> > compiled with remote calls. rpcbind has disabled remote calls by
> > default in 1.2.5. But this was not detectable until 1.2.8, which brought
> > this info in -v flag.
> > Detect the support and skip on these 2 functions when disabled.
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > Hi,
> > testcases/network/rpc/rpc-tirpc/rpc_test.sh | 5 +++++
> > 1 file changed, 5 insertions(+)
> > diff --git a/testcases/network/rpc/rpc-tirpc/rpc_test.sh b/testcases/network/rpc/rpc-tirpc/rpc_test.sh
> > index cadae55203..1a8cf46399 100755
> > --- a/testcases/network/rpc/rpc-tirpc/rpc_test.sh
> > +++ b/testcases/network/rpc/rpc-tirpc/rpc_test.sh
> > @@ -53,6 +53,11 @@ setup()
> > fi
> > fi
> > + if [ "$CLIENT" = 'rpc_pmap_rmtcall' -o "$CLIENT" = 'tirpc_rpcb_rmtcall' ] && \
> > + rpcbind -v 2>/dev/null && rpcbind -v 2>&1 | grep -q 'remote calls: no'; then
> > + tst_brk TCONF "skip due rpcbind compiled without remote calls"
> > + fi
> Should we check rpcbind version? Since you mentioned remove call
> detectable until 1.2.8.
We would not get any benefit from it. The check skips tests only when remote
calls are disabled and it's detectable. 'rpcbind -v' is on >= 1.2.8, therefore
'rpcbind -v 2>/dev/null &&' is hidden check for rpcbind >= 1.2.8.
But looking at the code it's confusing and 'rpcbind -v 2>/dev/null && ' is
redundant (as '-v' certainly does not produce wanted output on rpcbind < 1.2.8),
therefore I'll send v2:
- rpcbind -v 2>/dev/null && rpcbind -v 2>&1 | grep -q 'remote calls: no'; then
+ rpcbind -v 2>&1 | grep -q 'remote calls: no'; then
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-08-08 7:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-04 18:48 [PATCH 1/1] rpc_test.sh: Check for rpcbind remote calls support Petr Vorel
2025-08-04 18:48 ` [LTP] " Petr Vorel
2025-08-04 20:05 ` rbm
2025-08-04 20:05 ` [LTP] " Ricardo B. Marliere via ltp
2025-08-05 0:49 ` Wei Gao
2025-08-05 0:49 ` Wei Gao via ltp
2025-08-08 7:38 ` Petr Vorel [this message]
2025-08-08 7:38 ` Petr Vorel
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=20250808073814.GB410227@pevik \
--to=pvorel@suse.cz \
--cc=libtirpc-devel@lists.sourceforge.net \
--cc=linux-nfs@vger.kernel.org \
--cc=ltp@lists.linux.it \
--cc=rbm@suse.com \
--cc=steved@redhat.com \
--cc=wegao@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.