All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Alexey Kodanev <aleksei.kodanev@bell-sw.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] tst_net.sh: Fix for disabled IPv6
Date: Tue, 25 Jan 2022 10:08:09 +0100	[thread overview]
Message-ID: <Ye+9+fpr31Bube0R@pevik> (raw)
In-Reply-To: <29051e9c-f4c2-9840-7f84-8c9f49efba93@bell-sw.com>

Hi Alexey, all,

...
> > @@ -971,8 +1003,16 @@ IPV6_RHOST="${IPV6_RHOST:-fd00:1:1:1::1/64}"
> >  if [ -z "$_tst_net_parse_variables" ]; then
> >  	eval $(tst_net_ip_prefix $IPV4_LHOST || echo "exit $?")
> >  	eval $(tst_net_ip_prefix -r $IPV4_RHOST || echo "exit $?")
> > -	eval $(tst_net_ip_prefix $IPV6_LHOST || echo "exit $?")
> > -	eval $(tst_net_ip_prefix -r $IPV6_RHOST || echo "exit $?")
> > +
> > +	tst_net_detect_ipv6 && TST_NET_LHOST_IPV6=1
> > +	tst_net_detect_ipv6 rhost && TST_NET_RHOST_IPV6=1
> > +
> > +	if [ "$TST_NET_LHOST_IPV6" = 1 ]; then
> > +		eval $(tst_net_ip_prefix $IPV6_LHOST || echo "exit $?")
> > +	fi
> > +	if [ "$TST_NET_RHOST_IPV6" = 1 ]; then
> > +		eval $(tst_net_ip_prefix -r $IPV6_RHOST || echo "exit $?")
> > +	fi

> Do we really need to keep around and check two variables? If at least
> one machine doesn't have IPv6, it's not longer necessary to setup the
> other.

OK, just one variable is enough, e.g. TST_NET_REQUIRE_IPV6.

@all: But netns_helper.sh, which does not use tst_net.sh also requires IPv6
(and there are probably more), thus how about adding flag TST_REQUIRE_IPV6
into tst_test.sh (would help also for documentation - docparse).
And tst_net.sh would just on check also IPv6 on rhost.

Kind regards,
Petr

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

  reply	other threads:[~2022-01-25  9:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24 22:03 [LTP] [PATCH 1/2] tst_net.sh: Fix for disabled IPv6 Petr Vorel
2022-01-24 22:03 ` [LTP] [PATCH 2/2] broken_ip-nexthdr.sh: Check IPv6 support before forcing it Petr Vorel
2022-01-24 22:11 ` [LTP] [PATCH 1/2] tst_net.sh: Fix for disabled IPv6 Petr Vorel
2022-01-25  8:32 ` Alexey Kodanev
2022-01-25  9:08   ` Petr Vorel [this message]
2022-02-02 10:32     ` 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=Ye+9+fpr31Bube0R@pevik \
    --to=pvorel@suse.cz \
    --cc=aleksei.kodanev@bell-sw.com \
    --cc=ltp@lists.linux.it \
    /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.