[LTP] [RFC PATCH v4 0/3] Simplify network setup

Alexey Kodanev alexey.kodanev@oracle.com
Mon Apr 10 19:49:59 CEST 2017


On 04/10/2017 03:53 PM, Petr Vorel wrote:
> ...
> IMHO it's not about what is in tst_ipaddr(), but that we need IPV{4,6}_NETWORK and
> IPV{4,6}_NET_REV variables in some scripts:
>
> * testcases/network/stress/dns/dns-stress (which already sources test_net.sh) needs
> IPV{4,6}_NETWORK and IPV{4,6}_NET_REV variables. This is the only test which uses all
> of these variables.
> 	if [ "$TST_IPV6" ]; then
> 		record="AAAA"
> 		net="$IPV6_NETWORK"
> 		net_rev="$IPV6_NET_REV"
> 	else
> 		record="A"
> 		net="$IPV4_NETWORK"
> 		net_rev="$IPV4_NET_REV"
> 	fi
> ...
> 	zone "$net_rev.$ip_zone_opt.arpa" {
> 		type master;
> 		file "ltp-ns.rev";
> 	};


Looking at this test, there is no need to use IP4|6_NETWORK vars
and *_L|RHOST_. We could just use "unused network" variables there.
I'll prepare the patch... but still we need to get a reverse net,
though these variables more or less static.

If we want to automate it, may be create reverse IP program as
a separate tool in LTP so it can be invoked inside tests, like
dns-stress?

Thanks,
Alexey



More information about the ltp mailing list