linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] rpc_test.sh: Check for rpcbind remote calls support
@ 2025-08-04 18:48 Petr Vorel
  2025-08-04 20:05 ` rbm
  2025-08-05  0:49 ` [LTP] " Wei Gao
  0 siblings, 2 replies; 4+ messages in thread
From: Petr Vorel @ 2025-08-04 18:48 UTC (permalink / raw)
  To: ltp
  Cc: Petr Vorel, Steve Dickson, Ricardo B . Marlière, linux-nfs,
	libtirpc-devel

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,

BTW it'd be nice to investigate why the broadcast functions fail,
enabling remote calls does not help, testing on:
./configure --enable-libwrap --enable-warmstarts --enable-debug --with-statedir=/run/rpcbind --with-rpcuser=rpc --with-systemdsystemunitdir=/usr/lib/systemd/system '--with-nss-modules=files usrfiles' --enable-rmtcalls

Kind regards,
Petr

# PATH="/opt/ltp/testcases/bin:$PATH" ./rpc_test.sh -s rpc_svc_1 -c rpc_clnt_broadcast
rpc_test.sh -s rpc_svc_1 -c rpc_clnt_broadcast
rpc_test 1 TINFO: Running: rpc_test.sh -s rpc_svc_1 -c rpc_clnt_broadcast
rpc_test 1 TINFO: Tested kernel: Linux ts 6.13.6-1-default #1 SMP PREEMPT_DYNAMIC Mon Mar 10 08:49:24 UTC 2025 (495d82a) x86_64 x86_64 x86_64 GNU/Linux
rpc_test 1 TINFO: initialize 'lhost' 'ltp_ns_veth2' interface
rpc_test 1 TINFO: add local addr 10.0.0.2/24
rpc_test 1 TINFO: add local addr fd00:1:1:1::2/64
rpc_test 1 TINFO: initialize 'rhost' 'ltp_ns_veth1' interface
rpc_test 1 TINFO: add remote addr 10.0.0.1/24
rpc_test 1 TINFO: add remote addr fd00:1:1:1::1/64
rpc_test 1 TINFO: Network config (local -- remote):
rpc_test 1 TINFO: ltp_ns_veth2 -- ltp_ns_veth1
rpc_test 1 TINFO: 10.0.0.2/24 -- 10.0.0.1/24
rpc_test 1 TINFO: fd00:1:1:1::2/64 -- fd00:1:1:1::1/64
rpc_test 1 TINFO: timeout per run is 0h 5m 0s
rpc_test 1 TINFO: check registered RPC with rpcinfo
rpc_test 1 TINFO: registered RPC:
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100005    1   udp  20048  mountd
    100024    1   udp  36235  status
    100005    1   tcp  20048  mountd
    100024    1   tcp  60743  status
    100005    2   udp  20048  mountd
    100005    2   tcp  20048  mountd
    100005    3   udp  20048  mountd
    100005    3   tcp  20048  mountd
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    3   tcp   2049  nfs_acl
    100021    1   udp  40939  nlockmgr
    100021    3   udp  40939  nlockmgr
    100021    4   udp  40939  nlockmgr
    100021    1   tcp  38047  nlockmgr
    100021    3   tcp  38047  nlockmgr
    100021    4   tcp  38047  nlockmgr
rpc_test 1 TINFO: using libtirpc: yes
rpc_test 1 TFAIL: rpc_clnt_broadcast 10.0.0.2 536875000 failed unexpectedly
RPC: Timed out
1
rpc_test 2 TINFO: SELinux enabled in enforcing mode, this may affect test results
rpc_test 2 TINFO: it can be disabled with TST_DISABLE_SELINUX=1 (requires super/root)
rpc_test 2 TINFO: loaded SELinux profiles: none



 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
+
 	[ -n "$CLIENT" ] || tst_brk TBROK "client program not set"
 	tst_check_cmds $CLIENT $SERVER || tst_brk TCONF "LTP compiled without TI-RPC support?"
 
-- 
2.50.1


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

* Re: [PATCH 1/1] rpc_test.sh: Check for rpcbind remote calls support
  2025-08-04 18:48 [PATCH 1/1] rpc_test.sh: Check for rpcbind remote calls support Petr Vorel
@ 2025-08-04 20:05 ` rbm
  2025-08-05  0:49 ` [LTP] " Wei Gao
  1 sibling, 0 replies; 4+ messages in thread
From: rbm @ 2025-08-04 20:05 UTC (permalink / raw)
  To: Petr Vorel, ltp
  Cc: Steve Dickson, Ricardo B . Marlière, linux-nfs,
	libtirpc-devel

On Mon Aug 4, 2025 at 3:48 PM -03, 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,
>
> BTW it'd be nice to investigate why the broadcast functions fail,
> enabling remote calls does not help, testing on:
> ./configure --enable-libwrap --enable-warmstarts --enable-debug --with-statedir=/run/rpcbind --with-rpcuser=rpc --with-systemdsystemunitdir=/usr/lib/systemd/system '--with-nss-modules=files usrfiles' --enable-rmtcalls

But did you start the daemon with `-r`? e.g.

# /sbin/rpcbind -f -w -r &

>
> Kind regards,
> Petr
>
> # PATH="/opt/ltp/testcases/bin:$PATH" ./rpc_test.sh -s rpc_svc_1 -c rpc_clnt_broadcast
> rpc_test.sh -s rpc_svc_1 -c rpc_clnt_broadcast
> rpc_test 1 TINFO: Running: rpc_test.sh -s rpc_svc_1 -c rpc_clnt_broadcast
> rpc_test 1 TINFO: Tested kernel: Linux ts 6.13.6-1-default #1 SMP PREEMPT_DYNAMIC Mon Mar 10 08:49:24 UTC 2025 (495d82a) x86_64 x86_64 x86_64 GNU/Linux
> rpc_test 1 TINFO: initialize 'lhost' 'ltp_ns_veth2' interface
> rpc_test 1 TINFO: add local addr 10.0.0.2/24
> rpc_test 1 TINFO: add local addr fd00:1:1:1::2/64
> rpc_test 1 TINFO: initialize 'rhost' 'ltp_ns_veth1' interface
> rpc_test 1 TINFO: add remote addr 10.0.0.1/24
> rpc_test 1 TINFO: add remote addr fd00:1:1:1::1/64
> rpc_test 1 TINFO: Network config (local -- remote):
> rpc_test 1 TINFO: ltp_ns_veth2 -- ltp_ns_veth1
> rpc_test 1 TINFO: 10.0.0.2/24 -- 10.0.0.1/24
> rpc_test 1 TINFO: fd00:1:1:1::2/64 -- fd00:1:1:1::1/64
> rpc_test 1 TINFO: timeout per run is 0h 5m 0s
> rpc_test 1 TINFO: check registered RPC with rpcinfo
> rpc_test 1 TINFO: registered RPC:
>    program vers proto   port  service
>     100000    4   tcp    111  portmapper
>     100000    3   tcp    111  portmapper
>     100000    2   tcp    111  portmapper
>     100000    4   udp    111  portmapper
>     100000    3   udp    111  portmapper
>     100000    2   udp    111  portmapper
>     100005    1   udp  20048  mountd
>     100024    1   udp  36235  status
>     100005    1   tcp  20048  mountd
>     100024    1   tcp  60743  status
>     100005    2   udp  20048  mountd
>     100005    2   tcp  20048  mountd
>     100005    3   udp  20048  mountd
>     100005    3   tcp  20048  mountd
>     100003    3   tcp   2049  nfs
>     100003    4   tcp   2049  nfs
>     100227    3   tcp   2049  nfs_acl
>     100021    1   udp  40939  nlockmgr
>     100021    3   udp  40939  nlockmgr
>     100021    4   udp  40939  nlockmgr
>     100021    1   tcp  38047  nlockmgr
>     100021    3   tcp  38047  nlockmgr
>     100021    4   tcp  38047  nlockmgr
> rpc_test 1 TINFO: using libtirpc: yes
> rpc_test 1 TFAIL: rpc_clnt_broadcast 10.0.0.2 536875000 failed unexpectedly
> RPC: Timed out
> 1
> rpc_test 2 TINFO: SELinux enabled in enforcing mode, this may affect test results
> rpc_test 2 TINFO: it can be disabled with TST_DISABLE_SELINUX=1 (requires super/root)
> rpc_test 2 TINFO: loaded SELinux profiles: none
>
>
>
>  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
> +

Reviewed-by: Ricardo B. Marlière <rbm@suse.com>

Thanks!

>  	[ -n "$CLIENT" ] || tst_brk TBROK "client program not set"
>  	tst_check_cmds $CLIENT $SERVER || tst_brk TCONF "LTP compiled without TI-RPC support?"
>  


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

* Re: [LTP] [PATCH 1/1] rpc_test.sh: Check for rpcbind remote calls support
  2025-08-04 18:48 [PATCH 1/1] rpc_test.sh: Check for rpcbind remote calls support Petr Vorel
  2025-08-04 20:05 ` rbm
@ 2025-08-05  0:49 ` Wei Gao
  2025-08-08  7:38   ` Petr Vorel
  1 sibling, 1 reply; 4+ messages in thread
From: Wei Gao @ 2025-08-05  0:49 UTC (permalink / raw)
  To: Petr Vorel
  Cc: ltp, libtirpc-devel, linux-nfs, Steve Dickson,
	Ricardo B . Marlière

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.
> +
>  	[ -n "$CLIENT" ] || tst_brk TBROK "client program not set"
>  	tst_check_cmds $CLIENT $SERVER || tst_brk TCONF "LTP compiled without TI-RPC support?"
>  
> -- 
> 2.50.1
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/1] rpc_test.sh: Check for rpcbind remote calls support
  2025-08-05  0:49 ` [LTP] " Wei Gao
@ 2025-08-08  7:38   ` Petr Vorel
  0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2025-08-08  7:38 UTC (permalink / raw)
  To: Wei Gao
  Cc: ltp, libtirpc-devel, linux-nfs, Steve Dickson,
	Ricardo B . Marlière

> 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


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

end of thread, other threads:[~2025-08-08  7:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-04 18:48 [PATCH 1/1] rpc_test.sh: Check for rpcbind remote calls support Petr Vorel
2025-08-04 20:05 ` rbm
2025-08-05  0:49 ` [LTP] " Wei Gao
2025-08-08  7:38   ` Petr Vorel

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).