[LTP] [RFC PATCH v6 06/11] network/stress: Add library test_stress_net.sh for general usage

Petr Vorel pvorel@suse.cz
Tue Jun 6 15:45:02 CEST 2017


Hi Alexey,

> > +tst_check_cmds ifconfig killall

> ifconfig is deprecated, it's not a good idea to have it in
> the library. Moreover, I think the new tests or updated ones
> shouldn't test it too. The same for 'route' command.
I know, it's deprecated for Linux. Although we're testing Linux kernel, and net-tools for
linux are IMHO abandoned project, there are still people using it (see Ted Ts'o reaction
in Debian ML [1]).
Is it using removing ifconfig and route the only concern about these tests you have?
Wouldn't be worth to rewrite these test into C, using netlink/rtnetlink/libnfnetlink/libnl API?

> > +
> > +# NOTE: More information about these network variables can be found
> > +# in testcases/network/stress/README
> > +
> > +# TODO: Test expects prefix to be 24, which can get wrong when called
> > +# with different prefix for IPV4_NETWORK.
> > +
> > +# Netmask of for the tested network
> > +IPV4_NETMASK="255.255.255.0"
> > +IPV4_NETMASK_NUM=24
> > +
> > +# Broadcast address of the tested network
> > +IPV4_BROADCAST=${IPV4_NETWORK}.255

> We shouldn't use IPV4_NETWORK for broadcast or adding
> new addresses on the interface, this might affect other
> hosts on this network, this is why we have IPV4_NET16_UNUSED
> and IPV6_NET32_UNUSED variables. This also simplifies adding
> new addresses/routes as we have fixed network with needed IP
> address range that doesn't overlap with IP_RHOST/IP_LHOST
> addresses.
Good point, thanks! Actually, I've experienced problems with local network affected by the
tests. Silly mistake :-(.


Kind regards,
Petr

[1] http://www.mail-archive.com/debian-devel@lists.debian.org/msg344777.html


More information about the ltp mailing list