From: Joe Damato <jdamato@fastly.com>
To: Jakub Kicinski <kuba@kernel.org>
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 v2] selftest: epoll_busy_poll: epoll busy poll tests
Date: Mon, 6 May 2024 18:40:00 -0700 [thread overview]
Message-ID: <ZjmGcPrxhm3mZnCS@LQ3V64L9R2> (raw)
In-Reply-To: <20240506181254.09f10699@kernel.org>
On Mon, May 06, 2024 at 06:12:54PM -0700, Jakub Kicinski wrote:
> On Mon, 6 May 2024 20:53:22 +0000 Joe Damato wrote:
> > Add a simple test for the epoll busy poll ioctls, using the kernel
> > selftest harness.
> >
> > This test ensures that the ioctls have the expected return codes and
> > that the kernel properly gets and sets epoll busy poll parameters.
> >
> > The test can be expanded in the future to do real busy polling (provided
> > another machine to act as the client is available).
>
> Hm, we get:
>
> # timeout set to 3600
> # selftests: net: epoll_busy_poll
> # TAP version 13
> # 1..5
> # # Starting 5 tests from 2 test cases.
> # # RUN invalid_fd.test_invalid_fd ...
> # # OK invalid_fd.test_invalid_fd
> # ok 1 invalid_fd.test_invalid_fd
> # # RUN epoll_busy_poll.test_get_params ...
> # # OK epoll_busy_poll.test_get_params
> # ok 2 epoll_busy_poll.test_get_params
> # # RUN epoll_busy_poll.test_set_invalid ...
> # # epoll_busy_poll.c:204:test_set_invalid:Expected -1 (-1) == ret (0)
> # # epoll_busy_poll.c:205:test_set_invalid:EPIOCSPARAMS should error busy_poll_budget > NAPI_POLL_WEIGHT
> # # epoll_busy_poll.c:207:test_set_invalid:Expected EPERM (1) == errno (22)
> # # epoll_busy_poll.c:208:test_set_invalid:EPIOCSPARAMS errno should be EPERM busy_poll_budget > NAPI_POLL_WEIGHT
> # # test_set_invalid: Test failed
> # # FAIL epoll_busy_poll.test_set_invalid
> # not ok 3 epoll_busy_poll.test_set_invalid
> # # RUN epoll_busy_poll.test_set_and_get_valid ...
> # # OK epoll_busy_poll.test_set_and_get_valid
> # ok 4 epoll_busy_poll.test_set_and_get_valid
> # # RUN epoll_busy_poll.test_invalid_ioctl ...
> # # OK epoll_busy_poll.test_invalid_ioctl
> # ok 5 epoll_busy_poll.test_invalid_ioctl
>
> https://netdev-3.bots.linux.dev/vmksft-net/results/584001/98-epoll-busy-poll/stdout
Ah, sorry -- this is because I had assumed the test would run without
CAP_NET_ADMIN, but since:
epoll_busy_poll.c:204:test_set_invalid:Expected -1 (-1) == ret (0)
succeeds (ret = 0), clearly I am mistaken. Sorry about that.
I think I'll spin up a v3 and I'll add a test with and without
CAP_NET_ADMIN to check both cases, which would probably be better anyway.
next prev parent reply other threads:[~2024-05-07 1:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-06 20:53 [PATCH net-next v2] selftest: epoll_busy_poll: epoll busy poll tests Joe Damato
2024-05-07 1:12 ` Jakub Kicinski
2024-05-07 1:40 ` Joe Damato [this message]
2024-05-07 2:02 ` 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=ZjmGcPrxhm3mZnCS@LQ3V64L9R2 \
--to=jdamato@fastly.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--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).