From: sashiko-bot@kernel.org
To: "Bobby Eshleman" <bobbyeshleman@gmail.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH net-next v2 6/6] selftests: drv-net: add netkit devmem tests
Date: Wed, 06 May 2026 00:29:07 +0000 [thread overview]
Message-ID: <20260506002908.06754C2BCB4@smtp.kernel.org> (raw)
In-Reply-To: <20260504-tcp-dm-netkit-v2-6-56d52ac72fd4@meta.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The path to the 'ncdevmem' binary is incorrectly constructed using string concatenation instead of `os.path.join()`, which breaks script execution when run without a path prefix.
--
commit 39598108535535c8a8daee8f3c206760a98e0c68
Author: Bobby Eshleman <bobbyeshleman@meta.com>
selftests: drv-net: add netkit devmem tests
This commit adds a new Python script to test TCP devmem through a netkit
device. It duplicates the original devmem tests with adjusted parameters
for the netkit environment.
> diff --git a/tools/testing/selftests/drivers/net/hw/nk_devmem.py b/tools/testing/selftests/drivers/net/hw/nk_devmem.py
> new file mode 100755
> --- /dev/null
> +++ b/tools/testing/selftests/drivers/net/hw/nk_devmem.py
[ ... ]
> +def main() -> None:
> + with NetDrvContEnv(__file__, rxqueues=2, primary_rx_redirect=True) as cfg:
> + setup_test(cfg, path.abspath(path.dirname(__file__) + "/ncdevmem"))
Will this path concatenation fail if the script is executed manually without
a directory prefix?
If __file__ evaluates to just the filename without a directory,
path.dirname(__file__) returns an empty string. Concatenating an empty string
with "/ncdevmem" results in the absolute path "/ncdevmem".
When this happens, the script will attempt to execute the binary from the
system root directory instead of the test directory.
Would it be safer to use os.path.join(path.dirname(__file__), "ncdevmem")
here to handle empty directory strings correctly?
> + ksft_run([check_nk_rx, check_nk_tx, check_nk_tx_chunks, check_nk_rx_hds],
> + args=(cfg,))
> + ksft_exit()
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260504-tcp-dm-netkit-v2-0-56d52ac72fd4@meta.com?part=6
prev parent reply other threads:[~2026-05-06 0:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 0:27 [PATCH net-next v2 0/6] net: devmem: support devmem with netkit devices Bobby Eshleman
2026-05-05 0:27 ` [PATCH net-next v2 1/6] net: add netmem_tx modes that indicate dma capability Bobby Eshleman
2026-05-05 17:41 ` Harshitha Ramamurthy
2026-05-07 2:30 ` Jakub Kicinski
2026-05-05 0:27 ` [PATCH net-next v2 2/6] net: devmem: support TX over NETMEM_TX_NO_DMA devices Bobby Eshleman
2026-05-06 0:29 ` sashiko-bot
2026-05-06 1:18 ` Bobby Eshleman
2026-05-06 15:00 ` Bobby Eshleman
2026-05-07 2:34 ` Jakub Kicinski
2026-05-07 15:38 ` Bobby Eshleman
2026-05-05 0:27 ` [PATCH net-next v2 3/6] selftests: drv-net: ncdevmem: add -n flag to skip NIC configuration Bobby Eshleman
2026-05-05 0:27 ` [PATCH net-next v2 4/6] selftests: drv-net: refactor devmem command builders into lib module Bobby Eshleman
2026-05-06 0:29 ` sashiko-bot
2026-05-05 0:27 ` [PATCH net-next v2 5/6] selftests: drv-net: add primary_rx_redirect support to NetDrvContEnv Bobby Eshleman
2026-05-06 0:29 ` sashiko-bot
2026-05-05 0:27 ` [PATCH net-next v2 6/6] selftests: drv-net: add netkit devmem tests Bobby Eshleman
2026-05-06 0:29 ` sashiko-bot [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=20260506002908.06754C2BCB4@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bobbyeshleman@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=sashiko@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox