[LTP] [PATCH] tcp_cmds/ping: TCONF on unknown -f parameter

Alexey Kodanev alexey.kodanev@oracle.com
Fri Nov 6 12:38:33 CET 2020


On 06.11.2020 13:37, Kory Maincent wrote:
> The ping from busybox does not have -f parameter.
> Return TCONF in that case.
> 
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
>  testcases/network/tcp_cmds/ping/ping02.sh | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/testcases/network/tcp_cmds/ping/ping02.sh b/testcases/network/tcp_cmds/ping/ping02.sh
> index e0a63c5f6..6daf22635 100755
> --- a/testcases/network/tcp_cmds/ping/ping02.sh
> +++ b/testcases/network/tcp_cmds/ping/ping02.sh
> @@ -27,6 +27,10 @@ do_test()
>  	local ipaddr=$(tst_ipaddr rhost)
>  	local s
>  
> +	if ! $PING -c 1 -f $ipaddr >/dev/null; then
> +		tst_brk TCONF "$PING: invalid option -- 'f'"

Hi Kory,

If it's not supported, what about replacing it with '-i 0'?


> +	fi
> +
>  	for s in $PACKETSIZES; do
>  		EXPECT_PASS $PING -c $COUNT -f -s $s $ipaddr -p "$pat" \>/dev/null
>  	done
> 



More information about the ltp mailing list