From: Jakub Kicinski <kuba@kernel.org>
To: Peter Seiderer <ps.report@gmx.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Paolo Abeni" <pabeni@redhat.com>,
"Simon Horman" <horms@kernel.org>,
"Shuah Khan" <shuah@kernel.org>,
"Toke Høiland-Jørgensen" <toke@redhat.com>,
"Frederic Weisbecker" <frederic@kernel.org>,
"Artem Chernyshev" <artem.chernyshev@red-soft.ru>,
"Nam Cao" <namcao@linutronix.de>
Subject: Re: [PATCH net-next v1 5/5] selftest: net: add proc_net_pktgen
Date: Fri, 17 Jan 2025 13:11:54 -0800 [thread overview]
Message-ID: <20250117131154.0f3d2057@kernel.org> (raw)
In-Reply-To: <20250117141613.691452-6-ps.report@gmx.net>
On Fri, 17 Jan 2025 15:16:13 +0100 Peter Seiderer wrote:
> +FIXTURE_SETUP(proc_net_pktgen) {
> + ssize_t len;
> +
> + self->ctrl_fd = open("/proc/net/pktgen/kpktgend_0", O_RDWR);
> + ASSERT_GE(self->ctrl_fd, 0) TH_LOG("CONFIG_NET_PKTGEN not enabled, module pktgen nod loaded?");
nod -> not?
Please take a look at the instructions here:
https://github.com/linux-netdev/nipa/wiki/How-to-run-netdev-selftests-CI-style
the test currently fails in our CI, you need to add it to
tools/testing/selftests/net/config, and perhaps try to call
modprobe in the test?
> + len = write(self->ctrl_fd, add_loopback_0, sizeof(add_loopback_0));
> + ASSERT_EQ(len, sizeof(add_loopback_0)) TH_LOG("device lo@0 already registered?");
FWIW we prefer to stick to 80 char line width in networking,
but it's not a big deal for a test, up to you.
> + // complete command string without/with trailing '\0'
> + EXPECT_EQ(len, i);
Run this patch thru checkpatch, please. This looks misaligned.
> + }
> + }
> +}
> +#if 0 // needs CONFIG_XFRM
Add it to the config, too, then?
> +TEST_F(proc_net_pktgen, device_command_spi) {
> + ssize_t len;
> +
> + len = write(self->device_fd, device_command_spi_0, sizeof(device_command_spi_0));
> + EXPECT_EQ(len, sizeof(device_command_spi_0));
> +}
> +#endif
Thanks for working on a test!
next prev parent reply other threads:[~2025-01-17 21:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-17 14:16 [PATCH net-next v1 0/5] Some pktgen fixes/improvments Peter Seiderer
2025-01-17 14:16 ` [PATCH net-next v1 1/5] net: pktgen: replace ENOTSUPP with EOPNOTSUPP Peter Seiderer
2025-01-17 14:16 ` [PATCH net-next v1 2/5] net: pktgen: enable 'param=value' parsing Peter Seiderer
2025-01-17 14:16 ` [PATCH net-next v1 3/5] net: pktgen: fix access outside of user given buffer in pktgen_thread_write() Peter Seiderer
2025-01-17 14:16 ` [PATCH net-next v1 4/5] net: pktgen: fix access outside of user given buffer in pktgen_if_write() Peter Seiderer
2025-01-17 14:16 ` [PATCH net-next v1 5/5] selftest: net: add proc_net_pktgen Peter Seiderer
2025-01-17 21:11 ` Jakub Kicinski [this message]
2025-01-22 14:40 ` Peter Seiderer
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=20250117131154.0f3d2057@kernel.org \
--to=kuba@kernel.org \
--cc=artem.chernyshev@red-soft.ru \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=frederic@kernel.org \
--cc=horms@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=namcao@linutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ps.report@gmx.net \
--cc=shuah@kernel.org \
--cc=toke@redhat.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;
as well as URLs for NNTP newsgroup(s).