netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Sabrina Dubroca <sd@queasysnail.net>, Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH net v2 2/2] selftests: pmtu: add explicit tests for PMTU exceptions cleanup
Date: Mon, 25 Feb 2019 13:56:18 +0100	[thread overview]
Message-ID: <20190225135618.5687e4c2@elisabeth> (raw)
In-Reply-To: <20190225123330.GA10994@bistromath.localdomain>

On Mon, 25 Feb 2019 13:33:30 +0100
Sabrina Dubroca <sd@queasysnail.net> wrote:

> 2019-02-25, 12:13:46 +0100, Paolo Abeni wrote:
> > +	if ! timeout 1 ${ns_a} ip link del dev veth_A-R1; then  
> 
> That doesn't work. "ip link del" is stuck in a way that timeout can't
> terminate it, so this is still going to hang. Did you actually test
> this? :/

Indeed, upon actual testing, this hangs and the error is not reported.

> > +		err "  can't delete veth device in a timely
> > manner, PMTU dst likely leaked"
> > +		return 1
> > +	fi
> > +	return 0
> > +}  

You can use a subshell here, something like:

	${ns_a} ip link del dev veth_A-R1 &
	iplink_pid=$!
	sleep 1
	if [ "$(cat /proc/${iplink_pid}/cmdline 2>/dev/null | tr -d '\0')" = "iplinkdeldevveth_A-R1" ]; then
		err "  can't delete veth device in a timely manner, PMTU dst likely leaked"
		return 1
	fi
}

and now that I tried to run as a single test and couldn't find it, I
think it would also be worth it to rename the tests to something more
sensible.

Right now you have test_pmtu_ipv6_exception_cleanup() calling
test_cleanup_...(), I think it's confusing. Just call the test
test_cleanup_ipv6_exception(), it doesn't have so much to do with PMTU
anyway.

-- 
Stefano

      reply	other threads:[~2019-02-25 12:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25 11:13 [PATCH net v2 0/2] selftests: pmtu: fix and increase coverage Paolo Abeni
2019-02-25 11:13 ` [PATCH net v2 1/2] selftests: pmtu: disable DAD in all namespaces Paolo Abeni
2019-02-25 11:13 ` [PATCH net v2 2/2] selftests: pmtu: add explicit tests for PMTU exceptions cleanup Paolo Abeni
2019-02-25 11:35   ` Stefano Brivio
2019-02-25 12:33   ` Sabrina Dubroca
2019-02-25 12:56     ` Stefano Brivio [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=20190225135618.5687e4c2@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sd@queasysnail.net \
    /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).