From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 2/3] broken_ip-nexthdr.sh: Check IPv6 support before forcing it
Date: Wed, 2 Mar 2022 15:18:01 +0100 [thread overview]
Message-ID: <Yh98mQNybj1R1Kga@yuki> (raw)
In-Reply-To: <20220204194648.32165-3-pvorel@suse.cz>
Hi!
> diff --git a/testcases/network/stress/broken_ip/broken_ip-nexthdr.sh b/testcases/network/stress/broken_ip/broken_ip-nexthdr.sh
> index ec6643af66..cb4a3dd399 100755
> --- a/testcases/network/stress/broken_ip/broken_ip-nexthdr.sh
> +++ b/testcases/network/stress/broken_ip/broken_ip-nexthdr.sh
> @@ -11,6 +11,7 @@ TST_TESTFUNC="do_test"
> do_test()
> {
> # not supported on IPv4
> + tst_net_require_ipv6
> TST_IPV6=6
> TST_IPVER=6
I was looking at the code if we can simply instead do:
[ "$TST_IPVER" == 6 ] && tst_net_require_ipv6
in the test library, but it looks like the parameters are parsed in the
tst_test.sh in the tst_run() function. Which means that the TST_IPVER is
not actually set until the test starts and the library has no way of
knowing the variable value beforehand.
I guess that we can actually move the option parsing code in the
tst_test.sh so that it happens just right after the script is sourced,
which would make things much easier as the TST_IPVER would end up being
defined in the tst_network.sh and we coud simply use the statement above
without any further hacks like this patch adds.
As a side effect we could clean up the test option parsing code since we
do actually have two different getopts loop in the tst_test.sh library
and as far as I can tell we can do just with one.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-03-02 14:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-04 19:46 [LTP] [PATCH v2 0/3] shell: Fixes for disabled IPv6 Petr Vorel
2022-02-04 19:46 ` [LTP] [PATCH v2 1/3] tst_net.sh: Fix " Petr Vorel
2022-03-02 11:00 ` Cyril Hrubis
2022-03-02 11:05 ` Petr Vorel
2022-02-04 19:46 ` [LTP] [PATCH v2 2/3] broken_ip-nexthdr.sh: Check IPv6 support before forcing it Petr Vorel
2022-03-02 14:18 ` Cyril Hrubis [this message]
2022-03-02 20:44 ` Petr Vorel
2022-03-22 18:25 ` Petr Vorel
2022-03-30 9:15 ` Cyril Hrubis
2022-03-30 9:17 ` Petr Vorel
2022-02-04 19:46 ` [LTP] [PATCH v2 3/3] netns: Rewrite to use tst_net.sh 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=Yh98mQNybj1R1Kga@yuki \
--to=chrubis@suse.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox