Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Breno Leitao <leitao@debian.org>, Matteo Croce <technoboy85@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Shuah Khan <shuah@kernel.org>,
	 Shakeel Butt <shakeel.butt@linux.dev>,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] selftests: net: tests net.core.{r,w}mem_{default,max} sysctls in a netns
Date: Thu, 30 May 2024 15:58:05 +0200	[thread overview]
Message-ID: <2e58d7f5c493d6f158042fb39f299d24c7b60591.camel@redhat.com> (raw)
In-Reply-To: <Zlhsu+9If//CMPv+@gmail.com>

On Thu, 2024-05-30 at 05:10 -0700, Breno Leitao wrote:
> On Tue, May 28, 2024 at 02:11:39PM +0200, Matteo Croce wrote:
> > Add a selftest which checks that the sysctl is present in a netns,
> > that the value is read from the init one, and that it's readonly.
> > 
> > Signed-off-by: Matteo Croce <teknoraver@meta.com>
> > ---
> >  tools/testing/selftests/net/Makefile        |  1 +
> >  tools/testing/selftests/net/netns-sysctl.sh | 15 +++++++++++++++
> >  2 files changed, 16 insertions(+)
> >  create mode 100755 tools/testing/selftests/net/netns-sysctl.sh
> > 
> > diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
> > index bd01e4a0be2c..6da63d1831c1 100644
> > --- a/tools/testing/selftests/net/Makefile
> > +++ b/tools/testing/selftests/net/Makefile
> > @@ -53,6 +53,7 @@ TEST_PROGS += bind_bhash.sh
> >  TEST_PROGS += ip_local_port_range.sh
> >  TEST_PROGS += rps_default_mask.sh
> >  TEST_PROGS += big_tcp.sh
> > +TEST_PROGS += netns-sysctl.sh
> >  TEST_PROGS_EXTENDED := toeplitz_client.sh toeplitz.sh
> >  TEST_GEN_FILES =  socket nettest
> >  TEST_GEN_FILES += psock_fanout psock_tpacket msg_zerocopy reuseport_addr_any
> > diff --git a/tools/testing/selftests/net/netns-sysctl.sh b/tools/testing/selftests/net/netns-sysctl.sh
> > new file mode 100755
> > index 000000000000..b948ba67b13a
> > --- /dev/null
> > +++ b/tools/testing/selftests/net/netns-sysctl.sh
> > @@ -0,0 +1,15 @@
> > +#!/bin/bash -e
> 
> Don't you need to add the SPDX license header?

Yes, please!

Additionally, please handle explicitly the sysctl-related I/O errors so
that the script could output a human readable message in case of
failure.

Thanks!

Paolo


      reply	other threads:[~2024-05-30 13:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-28 12:11 [PATCH net-next 0/2] net: visibility of memory limits in netns Matteo Croce
2024-05-28 12:11 ` [PATCH net-next 1/2] net: make net.core.{r,w}mem_{default,max} namespaced Matteo Croce
2024-05-28 15:02   ` Shakeel Butt
2024-05-28 12:11 ` [PATCH net-next 2/2] selftests: net: tests net.core.{r,w}mem_{default,max} sysctls in a netns Matteo Croce
2024-05-30 12:10   ` Breno Leitao
2024-05-30 13:58     ` Paolo Abeni [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=2e58d7f5c493d6f158042fb39f299d24c7b60591.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=shuah@kernel.org \
    --cc=technoboy85@gmail.com \
    /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