[LTP] [PATCH 2/2] rpc01.sh: Rewrite into new shell API

Petr Vorel pvorel@suse.cz
Tue Jan 28 19:31:09 CET 2020


Hi,

...
> +++ b/testcases/network/rpc/basic_tests/rpc_lib.sh
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +# Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
> +
> +. tst_net.sh
> +
> +check_portmap_rpcbind()
> +{
> +	tst_res TINFO "Checking for portmap or rpcbind"
> +
> +	if pgrep portmap > /dev/null; then
> +		PORTMAPPER="portmap"
> +	else
> +		pgrep rpcbind > /dev/null && PORTMAPPER="rpcbind" || \
> +			tst_brk TCONF "portmap or rpcbind is not running"
> +	fi
> +}
Actually I'd just switch the order of the check (rpcbind has replaced portmap)
and print what is used.

Kind regards,
Petr


More information about the ltp mailing list