ltp.lists.linux.it archive mirror
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Cc: Martin Doucha <martin.doucha@suse.com>
Subject: Re: [LTP] [PATCH 1/2] tst_test.sh: Cleanup getopts usage
Date: Sat, 2 Apr 2022 00:11:54 +0200	[thread overview]
Message-ID: <Ykd4qtgdNGNn0RXe@pevik> (raw)
In-Reply-To: <20220401215951.13976-2-pvorel@suse.cz>

Hi,

patch needs to be slightly adjusted: to fix tst_ipaddr_un.sh
which uses $TST_NET_SKIP_VARIABLE_INIT, so that shell library needs to be loaded
before.

(NOTE also netns tests are planning [1] to use $TST_NET_SKIP_VARIABLE_INIT
- I'll repost rebased patch after this is merged).

Kind regards,
Petr

[1] https://patchwork.ozlabs.org/project/ltp/patch/20220204194648.32165-4-pvorel@suse.cz/

diff --git testcases/lib/tst_net.sh testcases/lib/tst_net.sh
index 2ca9bea492..dae0ceaf1f 100644
--- testcases/lib/tst_net.sh
+++ testcases/lib/tst_net.sh
@@ -935,6 +935,7 @@ tst_default_max_pkt()
 	echo "$((mtu + mtu / 10))"
 }
 
+[ -n "$TST_USE_LEGACY_API" ] && . test.sh || . tst_test.sh
 [ -n "$TST_PRINT_HELP" -o -n "$TST_NET_SKIP_VARIABLE_INIT" ] && return 0
 
 # Management Link
@@ -973,7 +974,6 @@ if [ -z "$_tst_net_parse_variables" ]; then
 	eval $(tst_net_ip_prefix -r $IPV6_RHOST || echo "exit $?")
 fi
 
-[ -n "$TST_USE_LEGACY_API" ] && . test.sh || . tst_test.sh
 [ -n "$TST_USE_NETNS" -a "$TST_INIT_NETNS" != "no" ] && init_ltp_netspace
 
 if [ -z "$_tst_net_parse_variables" ]; then

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-04-01 22:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-01 21:59 [LTP] [PATCH 0/2] shell: Cleanup getopts usage Petr Vorel
2022-04-01 21:59 ` [LTP] [PATCH 1/2] tst_test.sh: " Petr Vorel
2022-04-01 22:11   ` Petr Vorel [this message]
2022-04-01 22:30   ` Petr Vorel
2022-04-22  9:23     ` Petr Vorel
2022-04-01 21:59 ` [LTP] [PATCH 2/2] doc: Update shell API examples 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=Ykd4qtgdNGNn0RXe@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=martin.doucha@suse.com \
    /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;
as well as URLs for NNTP newsgroup(s).