From: Jakub Kicinski <kuba@kernel.org>
To: Joe Damato <jdamato@fastly.com>
Cc: linux-kselftest@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, nalramli@fastly.com,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH net-next] selftest: epoll_busy_poll: epoll busy poll tests
Date: Fri, 3 May 2024 15:49:39 -0700 [thread overview]
Message-ID: <20240503154939.79f7c878@kernel.org> (raw)
In-Reply-To: <20240502212013.274758-1-jdamato@fastly.com>
On Thu, 2 May 2024 21:20:11 +0000 Joe Damato wrote:
> --- a/tools/testing/selftests/net/Makefile
> +++ b/tools/testing/selftests/net/Makefile
> @@ -84,6 +84,7 @@ TEST_GEN_FILES += sctp_hello
> TEST_GEN_FILES += csum
> TEST_GEN_FILES += ip_local_port_range
> TEST_GEN_FILES += bind_wildcard
> +TEST_GEN_FILES += epoll_busy_poll
"GEN" is for files which are built for other tests to use.
IOW unless there's also a wrapper script under TEST_PROGS
(or the C code is itself under TEST_PROGS) this test won't
be executed by most CIs.
FWIW here's how we run the tests in our CI upstream CI:
https://github.com/linux-netdev/nipa/wiki/How-to-run-netdev-selftests-CI-style
> TEST_PROGS += test_vxlan_mdb.sh
> TEST_PROGS += test_bridge_neigh_suppress.sh
> TEST_PROGS += test_vxlan_nolocalbypass.sh
> +static void do_simple_test(void)
> +{
> + int fd;
> +
> + fd = epoll_create1(0);
> + if (fd == -1)
> + error(1, errno, "epoll_create");
> +
> + do_simple_test_invalid_fd();
> + do_simple_test_invalid_ioctl(fd);
> + do_simple_test_get_params(fd);
> + do_simple_test_set_invalid(fd);
> + do_simple_test_set_and_get_valid(fd);
You don't want to use the kselftest_harness for this?
No strong preference here, but seems like you could
pop the epoll_create1 into a FIXTURE() and then the
test cases into TEST_F() and we'd get the KTAP output
formatting, ability to run the tests selectively etc.
for free.
tools/testing/selftests/net/tap.c is probably a good example
to take a look at
next prev parent reply other threads:[~2024-05-03 22:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-02 21:20 [PATCH net-next] selftest: epoll_busy_poll: epoll busy poll tests Joe Damato
2024-05-03 22:49 ` Jakub Kicinski [this message]
2024-05-03 23:09 ` Joe Damato
2024-05-04 0:25 ` Jakub Kicinski
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=20240503154939.79f7c878@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jdamato@fastly.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=nalramli@fastly.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
/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).