[LTP] [PATCH v4 3/3] Add connection tests for bind()

Martin Doucha mdoucha@suse.cz
Fri Mar 20 10:43:14 CET 2020


On 20. 03. 20 9:54, Petr Vorel wrote:
> Hi Martin,
> 
> whole patchset is very nice work. Thanks!
> 
>> +static void setup(void)
>> +{
>> +	srand(time(0));
>> +
>> +	tst_init_sockaddr_inet(&ipv4_addr, IPV4_ADDRESS, 0);
>> +	tst_init_sockaddr_inet_bin(&ipv4_any_addr, INADDR_ANY, 0);
>> +	tst_init_sockaddr_inet6_bin(&ipv6_addr, &in6addr_loopback, 0);
>> +	tst_init_sockaddr_inet6_bin(&ipv6_any_addr, &in6addr_any, 0);
>> +}
> You don't use tst_init_sockaddr_inet6() at all. How about using it?
> 
> Or do you have some reason not to use it?

tst_init_sockaddr_inet6() was trivial to implement so it's there for
future use. The only reason why I'm not using it is that both loopback
and wildcard addresses are provided by libc in expanded form so I don't
need to convert them from string. I'll leave this patch as is.

-- 
Martin Doucha   mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic


More information about the ltp mailing list