Message ID | 20180411114131.30141-1-pvorel@suse.cz |
---|---|
State | Accepted |
Headers | show |
On 11.04.2018 14:41, Petr Vorel wrote: > Hi Alexey, > > I did last final testing. > > Changes v6->v7 > * I addressed the issues you pointed out (removed TCID, TST_ID) > * Rename some more functions in tst_net.sh) > * Prevent useless restoring ip in ip-updown when command not found. > * Minor changes in test description (related to previous changes). > > This is the final diff v6->v7, whole code also available at > https://github.com/pevik/ltp/commits/tst_net.sh.v7 > (Not sending it here to spam the others.) > If you're ok with merging, I'll add to the commits your Acked-by. > The changes looks good, thanks Petr!
Hi Alexey, > > I did last final testing. > > Changes v6->v7 > > * I addressed the issues you pointed out (removed TCID, TST_ID) > > * Rename some more functions in tst_net.sh) > > * Prevent useless restoring ip in ip-updown when command not found. > > * Minor changes in test description (related to previous changes). > > This is the final diff v6->v7, whole code also available at > > https://github.com/pevik/ltp/commits/tst_net.sh.v7 > > (Not sending it here to spam the others.) > > If you're ok with merging, I'll add to the commits your Acked-by. > The changes looks good, thanks Petr! Thanks a lot for your review, merged! Kind regards, Petr
diff --git testcases/lib/tst_net.sh testcases/lib/tst_net.sh index 2c5d22dba..cb3b144a0 100644 --- testcases/lib/tst_net.sh +++ testcases/lib/tst_net.sh @@ -38,7 +38,7 @@ tst_net_parse_args() esac } -tst_read_opts() +tst_net_read_opts() { local OPTIND while getopts "$TST_OPTS" opt; do @@ -57,7 +57,7 @@ tst_net_usage() echo "-6 IPv6 tests" } -tst_remote_tmpdir() +tst_net_remote_tmpdir() { [ "$TST_NEEDS_TMPDIR" = 1 ] || return [ -n "$TST_USE_LEGACY_API" ] && tst_tmpdir @@ -69,7 +69,7 @@ tst_remote_tmpdir() tst_net_setup() { ipver=${TST_IPV6:-4} - tst_remote_tmpdir + tst_net_remote_tmpdir [ -n "$TST_SETUP_CALLER" ] && $TST_SETUP_CALLER } @@ -78,7 +78,7 @@ if [ -z "$TST_LIB_LOADED" ]; then fi if [ -n "$TST_USE_LEGACY_API" ]; then - tst_read_opts $* + tst_net_read_opts $* ipver=${TST_IPV6:-4} fi @@ -744,4 +744,4 @@ export RHOST_HWADDRS="${RHOST_HWADDRS:-$(tst_get_hwaddrs rhost)}" # More information about network parameters can be found # in the following document: testcases/network/stress/README -[ -n "$TST_USE_LEGACY_API" ] && tst_remote_tmpdir +[ -n "$TST_USE_LEGACY_API" ] && tst_net_remote_tmpdir diff --git testcases/network/stress/interface/if-lib.sh testcases/network/stress/interface/if-lib.sh index b486c66d7..f54c03d9d 100644 --- testcases/network/stress/interface/if-lib.sh +++ testcases/network/stress/interface/if-lib.sh @@ -38,6 +38,7 @@ if_setup() tst_check_cmds "$CMD" netstress_setup + TST_CLEANUP="${TST_CLEANUP:-netstress_cleanup}" } if_cleanup_restore() @@ -47,9 +48,7 @@ if_cleanup_restore() restore_ipaddr rhost } -TST_CNT=2 TST_SETUP="${TST_SETUP:-if_setup}" -TST_CLEANUP="${TST_CLEANUP:-netstress_cleanup}" TST_TESTFUNC="test_body" TST_PARSE_ARGS="if_parse_args" TST_USAGE="if_usage" diff --git testcases/network/stress/interface/if4-addr-change testcases/network/stress/interface/if4-addr-change index ce0a5047a..8ed3ce3a8 100644 --- testcases/network/stress/interface/if4-addr-change +++ testcases/network/stress/interface/if4-addr-change @@ -18,7 +18,6 @@ # # Author: Mitsuru Chinen <mitch@jp.ibm.com> -TST_CNT=1 TCID=if4-addr-change TST_CLEANUP="do_cleanup" TST_TESTFUNC="test_body" diff --git testcases/network/stress/multicast/grp-operation/mcast-lib.sh testcases/network/stress/multicast/grp-operation/mcast-lib.sh index 5939c0e9a..13a445f55 100644 --- testcases/network/stress/multicast/grp-operation/mcast-lib.sh +++ testcases/network/stress/multicast/grp-operation/mcast-lib.sh @@ -19,7 +19,6 @@ # # Setup script for multicast stress tests. -TST_CNT=1 TST_SETUP="do_setup" TST_CLEANUP="mcast_cleanup" TST_TESTFUNC="do_test" diff --git testcases/network/stress/ns-tools/tst_net_stress.sh testcases/network/stress/ns-tools/tst_net_stress.sh index e70417237..9b02fd9ca 100644 --- testcases/network/stress/ns-tools/tst_net_stress.sh +++ testcases/network/stress/ns-tools/tst_net_stress.sh @@ -23,8 +23,6 @@ # NOTE: More information about network variables can be found # in tst_net.sh and testcases/network/stress/README. -export TCID="${TCID:-$(basename $0)}" - . tst_net.sh # Netmask of for the tested network diff --git testscripts/network.sh testscripts/network.sh index b18f202d5..c946e4d86 100755 --- testscripts/network.sh +++ testscripts/network.sh @@ -86,15 +86,12 @@ if [ "$OPTIND" -eq 1 ]; then fi shift $(($OPTIND - 1)) -TST_TOTAL=1 -TCID="network_settings" - TST_NO_DEFAULT_RUN=1 . tst_net.sh # Reset variables. # Don't break the tests which are using 'testcases/lib/cmdlib.sh' -unset TCID TST_LIB_LOADED TST_USE_LEGACY_API +unset TST_ID TST_LIB_LOADED TST_NO_DEFAULT_RUN rm -f $CMDFILE