From: Bobby Eshleman <bobbyeshleman@gmail.com>
To: sashiko-reviews@lists.linux.dev
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH net-next v5 3/3] selftests/net: devmem.py: add check_rx_large_niov
Date: Wed, 15 Jul 2026 02:33:24 -0700 [thread overview]
Message-ID: <aldT5PnKUFHTlCkg@devvm29614.prn0.facebook.com> (raw)
In-Reply-To: <20260710072712.0F50B1F000E9@smtp.kernel.org>
On Fri, Jul 10, 2026 at 07:27:11AM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] Unhandled Python exception in selftests when hugepages are disabled or sysctl is read-only.
> --
>
> --- Patch [3]: [PATCH net-next v5 3/3] selftests/net: devmem.py: add check_rx_large_niov ---
> commit c6680f91b9c04fa78f7d8b9d5f92ce1bee9816c1
> Author: Bobby Eshleman <bobbyeshleman@meta.com>
>
> selftests/net: devmem.py: add check_rx_large_niov
>
> This commit adds a new devmem test case for binding a dmabuf with a 16K
> rx-buf-size. It also sweeps various RX payload sizes across the niov boundary
> to exercise the sub-niov, exact-niov, and multi-niov RX paths.
>
> > diff --git a/tools/testing/selftests/drivers/net/hw/devmem_lib.py b/tools/testing/selftests/drivers/net/hw/devmem_lib.py
> > --- a/tools/testing/selftests/drivers/net/hw/devmem_lib.py
> > +++ b/tools/testing/selftests/drivers/net/hw/devmem_lib.py
>
> [ ... ]
>
> > +def run_rx_large_niov(cfg):
> > + """Run the devmem RX test with a large niov (rx-buf-size > PAGE_SIZE).
> > +
> > + Sweep payload sizes that straddle the niov boundary: below, equal to,
> > + and above rx_buf_size, to exercise sub-niov, exact-niov, and multi-niov
> > + RX paths.
> > + """
> > + hp_file = "/proc/sys/vm/nr_hugepages"
> > + with open(hp_file, 'r+', encoding='utf-8') as f:
>
> [Severity: Medium]
> Will this crash with an unhandled exception on systems without hugepages
> enabled or when run without write permissions to /proc/sys?
>
> If the system was compiled without CONFIG_HUGETLB_PAGE=y, opening this file
> will throw a FileNotFoundError, causing the kselftest framework to report a
> test failure rather than gracefully skipping.
>
> Could this be wrapped in a try/except block to catch these exceptions and
> raise KsftSkipEx instead?
Do we usually defend against kernels not using the config (in this case,
selftests/drivers/net/hw/config)? Maybe should be a skip? We do already
use this pattern in iou-zcrx.py and nk_qlease.py.
Best,
Bobby
prev parent reply other threads:[~2026-07-16 8:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 22:55 [PATCH net-next v5 0/3] net: devmem: allow rx-buf-size > PAGE_SIZE per binding Bobby Eshleman
2026-07-08 22:55 ` [PATCH net-next v5 1/3] net: devmem: allow rx-buf-size > PAGE_SIZE per dmabuf binding Bobby Eshleman
2026-07-10 7:27 ` sashiko-bot
2026-07-15 9:28 ` Bobby Eshleman
2026-07-08 22:55 ` [PATCH net-next v5 2/3] selftests/net: ncdevmem: add -b option to set rx-buf-size on bind Bobby Eshleman
2026-07-20 21:15 ` Mina Almasry
2026-07-08 22:55 ` [PATCH net-next v5 3/3] selftests/net: devmem.py: add check_rx_large_niov Bobby Eshleman
2026-07-10 7:27 ` sashiko-bot
2026-07-15 9:33 ` Bobby Eshleman [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=aldT5PnKUFHTlCkg@devvm29614.prn0.facebook.com \
--to=bobbyeshleman@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.