[LTP] [RFC PATCH v8 08/11] network/stress: Fix and cleanup route IPv4 tests

Alexey Kodanev alexey.kodanev@oracle.com
Wed Aug 23 15:38:37 CEST 2017


On 23.08.2017 16:34, Petr Vorel wrote:
> Hi Alexey,
>
>>>> +	while [ $cnt -lt $NS_TIMES ]; do
>>>> +		lhost_ifname2="$lhost_ifname"
>>>> +		gateway2="$gateway"
>>>> +
>>>> +		pre_dst_network="$dst_network"
>>>> +		if [ "$test_field" = 'dst' ]; then
>>>> +			dst_addr="$(tst_ipaddr_un_ip $(($cnt % 255)) $DST_HOST)"
>>>> +			dst_network="$(tst_ipaddr_un_ip $(($cnt % 255)))"
>>> tst_ipaddr_un() handles '$cnt' overrun already.
>> Thanks, silly error.
> No, I'll keep it, without it addresses for cnt > 254 would be always 254 (no real
> testing).

If so, it should be added to tst_ipaddr_un.

Thanks,
Alexey


More information about the ltp mailing list