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

Petr Vorel pvorel@suse.cz
Fri Aug 8 09:47:02 CEST 2025


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



More information about the ltp mailing list