@@ -953,21 +953,21 @@ tst_default_max_pkt()
[ -n "$TST_USE_LEGACY_API" ] && . test.sh || . tst_test.sh
-if [ "$TST_PARSE_ARGS_CALLER" = "$TST_PARSE_ARGS" ]; then
- tst_res_ TWARN "TST_PARSE_ARGS_CALLER same as TST_PARSE_ARGS, unset it ($TST_PARSE_ARGS)"
- unset TST_PARSE_ARGS_CALLER
-fi
-if [ "$TST_SETUP_CALLER" = "$TST_SETUP" ]; then
- tst_res_ TWARN "TST_SETUP_CALLER same as TST_SETUP, unset it ($TST_SETUP)"
- unset TST_SETUP_CALLER
-fi
-if [ "$TST_USAGE_CALLER" = "$TST_USAGE" ]; then
- tst_res_ TWARN "TST_USAGE_CALLER same as TST_USAGE, unset it ($TST_USAGE)"
- unset TST_USAGE_CALLER
-fi
-
if [ -n "$TST_USE_LEGACY_API" ]; then
tst_net_read_opts "$@"
+else
+ if [ "$TST_PARSE_ARGS_CALLER" = "$TST_PARSE_ARGS" ]; then
+ tst_res_ TWARN "TST_PARSE_ARGS_CALLER same as TST_PARSE_ARGS, unset it ($TST_PARSE_ARGS)"
+ unset TST_PARSE_ARGS_CALLER
+ fi
+ if [ "$TST_SETUP_CALLER" = "$TST_SETUP" ]; then
+ tst_res_ TWARN "TST_SETUP_CALLER same as TST_SETUP, unset it ($TST_SETUP)"
+ unset TST_SETUP_CALLER
+ fi
+ if [ "$TST_USAGE_CALLER" = "$TST_USAGE" ]; then
+ tst_res_ TWARN "TST_USAGE_CALLER same as TST_USAGE, unset it ($TST_USAGE)"
+ unset TST_USAGE_CALLER
+ fi
fi
# detect IPv6 support on lhost for tests which don't use test links
It does not make sense to check these variables when legacy API is used. Signed-off-by: Petr Vorel <pvorel@suse.cz> --- testcases/lib/tst_net.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)