From: Richard Palethorpe <rpalethorpe@suse.de>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] tst_net.sh: Move run code after loading test lib
Date: Mon, 13 Feb 2023 10:35:44 +0000 [thread overview]
Message-ID: <87cz6dq2aq.fsf@suse.de> (raw)
In-Reply-To: <20230201114126.15513-1-pvorel@suse.cz>
Hello,
Petr Vorel <pvorel@suse.cz> writes:
> This is important mostly for variable checks (tst_res() would not be
> loaded). Originally added in ecc29beeda on correct place, but left on
> wrong place during 04021637f4.
>
> Fixes: 04021637f4 ("tst_test.sh: Cleanup getopts usage")
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
Acked-by: Richard Palethorpe <rpalethorpe@suse.com>
> ---
> Hi,
>
> this is expected to be applied on the top of
> "[9/9] tst_net.sh: Move net setup into separate function"
> https://patchwork.ozlabs.org/project/ltp/patch/20230126215401.29101-10-pvorel@suse.cz/
> (non-applied patches starts from the 6th)
>
> Kind regards,
> Petr
>
> testcases/lib/tst_net.sh | 34 +++++++++++++++++-----------------
> 1 file changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
> index 45c37a85ec..4c4a1c271e 100644
> --- a/testcases/lib/tst_net.sh
> +++ b/testcases/lib/tst_net.sh
> @@ -84,23 +84,6 @@ tst_brk_()
> [ -z "$TST_USE_LEGACY_API" ] && tst_brk $@ || tst_brkm $@
> }
>
> -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 "$@"
> -fi
> -
> # Detect IPv6 disabled via ipv6.disable=1 kernel cmdline parameter
> # or via CONFIG_IPV6=y kernel configure option.
> tst_net_detect_ipv6_cmdline()
> @@ -1067,6 +1050,23 @@ tst_net_setup_network()
>
> [ -n "$TST_USE_LEGACY_API" ] && . test.sh || . tst_test.sh
>
> +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
> tst_net_detect_ipv6_cmdline
>
> --
> 2.39.1
--
Thank you,
Richard.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-02-13 10:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 11:41 [LTP] [PATCH 1/1] tst_net.sh: Move run code after loading test lib Petr Vorel
2023-02-13 10:35 ` Richard Palethorpe [this message]
2023-02-14 7:29 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87cz6dq2aq.fsf@suse.de \
--to=rpalethorpe@suse.de \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.