Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCH v2 1/1] rpc_test.sh: Check for rpcbind remote calls support
@ 2025-08-08  7:47 Petr Vorel
  2025-08-08 13:00 ` Avinesh Kumar
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2025-08-08  7:47 UTC (permalink / raw)
  To: ltp; +Cc: Ricardo B . Marlière

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.
NOTE: No need to actually check for a version because rpcbind < 1.2.8
prints on '-v' just error message which does not match grep:

    rpcbind: invalid option -- 'v'
    usage: rpcbind [-adhilswf]

Reviewed-by: Ricardo B. Marlière <rbm@suse.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Changes v1->v2:
* Simplify check

Link to v1:
https://patchwork.ozlabs.org/project/ltp/patch/20250804184850.313101-1-pvorel@suse.cz/
https://lore.kernel.org/ltp/20250804184850.313101-1-pvorel@suse.cz/

 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..a038b5bd56 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>&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


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-08  7:47 [LTP] [PATCH v2 1/1] rpc_test.sh: Check for rpcbind remote calls support Petr Vorel
2025-08-08 13:00 ` Avinesh Kumar
2025-08-08 13:07   ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox