[LTP] [PATCH] lib/test_net.sh: add waiting loop to netload()

Alexey Kodanev alexey.kodanev@oracle.com
Thu Sep 17 10:45:52 CEST 2015


Hi,
On 09/17/2015 10:41 AM, Jan Stancek wrote:
>> @@ -282,6 +282,17 @@ tst_netload()
>>   		tst_resm TINFO "run tcp_fastopen with '$ip_addr', port '$port'"
>>   		tst_rhost_run -s -b -c "tcp_fastopen -R $max_requests -g $port"
>>   
>> +		# check that tcp_fastopen on rhost in 'Listening' state
>> +		local sec_waited=
>> +		for sec_waited in $(seq 1 60); do
>> +			tst_rhost_run -c "ss -ln | grep -q $port" && break
> Isn't this too generic match? Can we add "-t" to ss parameters?
> "ss -ln" gives me also unix sockets along with their inode numbers on output,
> which seems they could easily match any port number.

Right, we can use -t option to match only TCP sockets... I'll add it.

Thanks,
Alexey



More information about the Ltp mailing list