public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Alexey Kodanev <aleksei.kodanev@bell-sw.com>,
	ltp@lists.linux.it, Cyril Hrubis <chrubis@suse.cz>
Subject: Re: [LTP] [PATCH 1/2] tst_net.sh: Fix for disabled IPv6
Date: Wed, 2 Feb 2022 11:32:25 +0100	[thread overview]
Message-ID: <YfpduZF0xAfJ5rVd@pevik> (raw)
In-Reply-To: <Ye+9+fpr31Bube0R@pevik>

Hi all,

> 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).
Going to add it to v3.

> And tst_net.sh would just on check also IPv6 on rhost.

I found that no C test needs a special flag for handling IPv6 because we can
filter it with errno EAFNOSUPPORT. We should just remember tests first use IPv4
(e.g. in bind05.c), because functions behind SAFE_* macros use tst_brk.

@Cyril: I suppose we don't want to have kind of info flag "uses_ipv6" in C API
(for docparse), right?

Kind regards,
Petr

> Kind regards,
> Petr

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

      reply	other threads:[~2022-02-02 10:32 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
2022-02-02 10:32     ` Petr Vorel [this message]

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=YfpduZF0xAfJ5rVd@pevik \
    --to=pvorel@suse.cz \
    --cc=aleksei.kodanev@bell-sw.com \
    --cc=chrubis@suse.cz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox