Skip to contentSkip to conversation

rpc_test.sh: Check for rpcbind remote calls support

PATCH In review Petr Vorel 2 participants 3 messages Aug 8, 2025

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH v2 1/1 rpc_test.sh: Check for rpcbind remote calls support

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]

---
Changes v1->v2:
* Simplify check

Link to v1:
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
https://lore.kernel.org/ltp/[email protected]/

 testcases/network/rpc/rpc-tirpc/rpc_test.sh | 5 +++++
 1 file changed, 5 insertions(+)
testcases/network/rpc/rpc-tirpc/rpc_test.sh +5 -0
index cadae55203..a038b5bd56 100755
@@ -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?"
 
Signature · 5 lines
2.50.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author Applied
#2 lore raw

Hi all,

merged, thanks!

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp