[LTP] [PATCH v2] lib/tst_net.sh: use SO_BINDTODEVICE in tst_netload()

Petr Vorel
2019-11-21T17:44:05Z

Hi Alexey,

> Since we have the information about the device, enable the
> auto usage of the option, when starting netstress.

> It can be disabled with TST_NETLOAD_BINDTODEVICE=0 even if
> '-D' option is passed to tst_netload().

> Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>

nit: I'd use empty string instead of zero.
testcases/lib/tst_net.sh
-export TST_NETLOAD_BINDTODEVICE="${TST_NETLOAD_BINDTODEVICE:-1}"
+export TST_NETLOAD_BINDTODEVICE="${TST_NETLOAD_BINDTODEVICE-1}"

testcases/network/mpls/mpls_lib.sh
-TST_NETLOAD_BINDTODEVICE=0
+TST_NETLOAD_BINDTODEVICE=

Kind regards,
Petr