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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 1 Dec 2023 14:20:49 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: Po-Hsu Lin <po-hsu.lin@...onical.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
	Jakub Kicinski <kuba@...nel.org>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	Shuah Khan <shuah@...nel.org>, David Ahern <dsahern@...nel.org>,
	linux-kselftest@...r.kernel.org,
	Guillaume Nault <gnault@...hat.com>,
	Petr Machata <petrm@...dia.com>,
	James Prestwood <prestwoj@...il.com>,
	Jaehee Park <jhpark1013@...il.com>,
	Ido Schimmel <idosch@...dia.com>,
	Francesco Ruggeri <fruggeri@...sta.com>,
	Justin Iurman <justin.iurman@...ege.be>,
	Xin Long <lucien.xin@...il.com>
Subject: Re: [PATCHv2 net-next 01/14] selftests/net: add lib.sh

On Fri, Dec 01, 2023 at 01:56:51PM +0800, Po-Hsu Lin wrote:
> > +# setup netns with given names as prefix. e.g
> > +# setup_ns local remote
> > +setup_ns()
> > +{
> > +       local ns=""
> > +       local ns_name=""
> > +       local ns_list=""
> > +       for ns_name in "$@"; do
> > +               # Some test may setup/remove same netns multi times
> > +               if unset ${ns_name} 2> /dev/null; then
> > +                       ns="${ns_name,,}-$(mktemp -u XXXXXX)"
> > +                       eval readonly ${ns_name}="$ns"
> > +               else
> > +                       eval ns='$'${ns_name}
> > +                       cleanup_ns "$ns"
> > +
> > +               fi
> > +
> > +               if ! ip netns add "$ns"; then
> > +                       echo "Failed to create namespace $ns_name"
> > +                       cleanup_ns "$ns_list"
> > +                       return $ksft_skip
> > +               fi
> > +               ip -n "$ns" link set lo up
> I got this patchset tested the result is looking good. However it
> seems that not all of the tests require this loopback bring up, e.g.
> * arp_ndisc_untracked_subnets.sh
> * cmsg_ipv6.sh
> * cmsg_so_mark.sh
> * cmsg_time.sh
> * drop_monitor_tests.sh
> * icmp.sh
> * ndisc_unsolicited_na_test.sh
> * sctp_vrf.sh
> * unicast_extensions.sh
> 
> A possible solution could be adding an extra flag to setup_ns(), bring
> lo up on demand.
> 
> Not sure if this is needed, as I can't think of possible impacts of
> this for the moment.
> (Maybe a test does not require loopback device in such state?)
> Other might be able to provide some feedback about this.

Yes, I also can't think of impact of set lo up. So I just do it explicit.
If someone could help find out the impact, I can add a flag for this function.

Thanks
Hangbin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ