lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230807064044.GA11180@localhost.localdomain>
Date: Mon, 7 Aug 2023 14:40:44 +0800
From: Geliang Tang <geliang.tang@...e.com>
To: Martin KaFai Lau <martin.lau@...ux.dev>
Cc: Alexei Starovoitov <ast@...nel.org>,
	Daniel Borkmann <daniel@...earbox.net>,
	Andrii Nakryiko <andrii@...nel.org>,
	Martin KaFai Lau <martin.lau@...ux.dev>, Song Liu <song@...nel.org>,
	Yonghong Song <yhs@...com>,
	John Fastabend <john.fastabend@...il.com>,
	KP Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...gle.com>,
	Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
	Florent Revest <revest@...omium.org>,
	Brendan Jackman <jackmanb@...omium.org>,
	Matthieu Baerts <matthieu.baerts@...sares.net>,
	Mat Martineau <martineau@...nel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	John Johansen <john.johansen@...onical.com>,
	Paul Moore <paul@...l-moore.com>, James Morris <jmorris@...ei.org>,
	"Serge E. Hallyn" <serge@...lyn.com>,
	Stephen Smalley <stephen.smalley.work@...il.com>,
	Eric Paris <eparis@...isplace.org>, Mykola Lysenko <mykolal@...com>,
	Shuah Khan <shuah@...nel.org>, Simon Horman <horms@...nel.org>,
	bpf@...r.kernel.org, netdev@...r.kernel.org, mptcp@...ts.linux.dev,
	apparmor@...ts.ubuntu.com, linux-security-module@...r.kernel.org,
	selinux@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH bpf-next v11 2/5] selftests/bpf: Use random netns name
 for mptcp

On Fri, Aug 04, 2023 at 05:23:32PM -0700, Martin KaFai Lau wrote:
> On 8/3/23 10:07 PM, Geliang Tang wrote:
> > Use rand() to generate a random netns name instead of using the fixed
> > name "mptcp_ns" for every test.
> > 
> > By doing that, we can re-launch the test even if there was an issue
> > removing the previous netns or if by accident, a netns with this generic
> > name already existed on the system.
> > 
> > Note that using a different name each will also help adding more
> > subtests in future commits.

Hi Martin,

I tried to run mptcp tests simultaneously, and got "Cannot create
namespace file "/var/run/netns/mptcp_ns": File exists" errors sometimes.
So I add this patch to fix it.

It's easy to reproduce, just run this commands in multiple terminals:
 > for i in `seq 1 100`; do sudo ./test_progs -t mptcp; done

> 
> I run test_progs repeatedly without rebooting qemu to save time. If there is
> a test did not clean up its netns, I would rather uncover it earlier and fix
> it instead. Randomizing the name is hiding the issue and does not help to
> uncover the broken test sooner. Although this change is to mptcp test alone,
> this could be referred in other future tests.

I added "ip netns show" after "ip netns del" in v12 to check if there is
a test did not clean up its netns.

Thanks,
-Geliang

> 
> afaik, I don't remember bpf CI ever run into a test failure because the
> picked name had already been used by the system. It seems you ran into this
> issue a lot with the mptcp test in your setup. Could you explain a little
> more?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ