* [PATCH net-next 1/4] tools: ynl: rename TESTS variable to TEST_PROGS
2026-03-03 16:35 [PATCH net-next 0/4] tools: ynl: tests: adjust Makefile to mimic ksft Jakub Kicinski
@ 2026-03-03 16:35 ` Jakub Kicinski
2026-03-03 16:35 ` [PATCH net-next 2/4] tools: ynl: don't install tests in /usr/bin/ Jakub Kicinski
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Jakub Kicinski @ 2026-03-03 16:35 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, liuhangbin,
matttbe, donald.hunter, Jakub Kicinski
Use the standard kselftest variable naming for tests in the Makefile.
NIPA depends on being able to selectively target tests by setting
those variables on the CLI.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
tools/net/ynl/tests/Makefile | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/net/ynl/tests/Makefile b/tools/net/ynl/tests/Makefile
index c1df2e001255..ee4362ca286d 100644
--- a/tools/net/ynl/tests/Makefile
+++ b/tools/net/ynl/tests/Makefile
@@ -1,23 +1,23 @@
# SPDX-License-Identifier: GPL-2.0
# Makefile for YNL tests
-TESTS := \
+TEST_PROGS := \
test_ynl_cli.sh \
test_ynl_ethtool.sh \
-# end of TESTS
+# end of TEST_PROGS
-all: $(TESTS)
+all: $(TEST_PROGS)
run_tests:
- @for test in $(TESTS); do \
+ @for test in $(TEST_PROGS); do \
./$$test; \
done
-install: $(TESTS)
+install: $(TEST_PROGS)
@mkdir -p $(DESTDIR)/usr/bin
@mkdir -p $(DESTDIR)/usr/share/kselftest
@cp ../../../testing/selftests/kselftest/ktap_helpers.sh $(DESTDIR)/usr/share/kselftest/
- @for test in $(TESTS); do \
+ @for test in $(TEST_PROGS); do \
name=$$(basename $$test .sh); \
sed -e 's|^ynl=.*|ynl="ynl"|' \
-e 's|^ynl_ethtool=.*|ynl_ethtool="ynl-ethtool"|' \
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH net-next 2/4] tools: ynl: don't install tests in /usr/bin/
2026-03-03 16:35 [PATCH net-next 0/4] tools: ynl: tests: adjust Makefile to mimic ksft Jakub Kicinski
2026-03-03 16:35 ` [PATCH net-next 1/4] tools: ynl: rename TESTS variable to TEST_PROGS Jakub Kicinski
@ 2026-03-03 16:35 ` Jakub Kicinski
2026-03-03 16:35 ` [PATCH net-next 3/4] tools: ynl: support INSTALL_PATH in the tests Makefile Jakub Kicinski
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Jakub Kicinski @ 2026-03-03 16:35 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, liuhangbin,
matttbe, donald.hunter, Jakub Kicinski
Until commit 790792ebc960 ("tools: ynl: don't install tests")
YNL selftests were installed with all the other YNL outputs.
That's no longer the case, as tests are not really production
artifacts. Let's not install them in /usr/bin at all, and
mirror kselftest format more closely:
For: make -C tools/net/ynl/tests/ install DESTDIR=tmp
tmp/usr/share/kselftest
├── ktap_helpers.sh
└── ynl
├── test_ynl_cli.sh
└── test_ynl_ethtool.sh
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
tools/net/ynl/tests/Makefile | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tools/net/ynl/tests/Makefile b/tools/net/ynl/tests/Makefile
index ee4362ca286d..5045341300e2 100644
--- a/tools/net/ynl/tests/Makefile
+++ b/tools/net/ynl/tests/Makefile
@@ -14,16 +14,15 @@ all: $(TEST_PROGS)
done
install: $(TEST_PROGS)
- @mkdir -p $(DESTDIR)/usr/bin
- @mkdir -p $(DESTDIR)/usr/share/kselftest
+ @mkdir -p $(DESTDIR)/usr/share/kselftest/ynl
@cp ../../../testing/selftests/kselftest/ktap_helpers.sh $(DESTDIR)/usr/share/kselftest/
@for test in $(TEST_PROGS); do \
- name=$$(basename $$test .sh); \
+ name=$$(basename $$test); \
sed -e 's|^ynl=.*|ynl="ynl"|' \
-e 's|^ynl_ethtool=.*|ynl_ethtool="ynl-ethtool"|' \
-e 's|KSELFTEST_KTAP_HELPERS=.*|KSELFTEST_KTAP_HELPERS="/usr/share/kselftest/ktap_helpers.sh"|' \
- $$test > $(DESTDIR)/usr/bin/$$name; \
- chmod +x $(DESTDIR)/usr/bin/$$name; \
+ $$test > $(DESTDIR)/usr/share/kselftest/ynl/$$name; \
+ chmod +x $(DESTDIR)/usr/share/kselftest/ynl/$$name; \
done
clean distclean:
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH net-next 3/4] tools: ynl: support INSTALL_PATH in the tests Makefile
2026-03-03 16:35 [PATCH net-next 0/4] tools: ynl: tests: adjust Makefile to mimic ksft Jakub Kicinski
2026-03-03 16:35 ` [PATCH net-next 1/4] tools: ynl: rename TESTS variable to TEST_PROGS Jakub Kicinski
2026-03-03 16:35 ` [PATCH net-next 2/4] tools: ynl: don't install tests in /usr/bin/ Jakub Kicinski
@ 2026-03-03 16:35 ` Jakub Kicinski
2026-03-03 16:35 ` [PATCH net-next 4/4] tools: ynl: produce kselftest-list.txt from tests Jakub Kicinski
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Jakub Kicinski @ 2026-03-03 16:35 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, liuhangbin,
matttbe, donald.hunter, Jakub Kicinski
We have modelled the YNL tests after ksft to be able to reuse
the NIPA wrappers. Make sure YNL honors INSTALL_PATH not just
DESTDIR, ksft uses INSTALL_PATH.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
tools/net/ynl/tests/Makefile | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/tools/net/ynl/tests/Makefile b/tools/net/ynl/tests/Makefile
index 5045341300e2..ee717db12dff 100644
--- a/tools/net/ynl/tests/Makefile
+++ b/tools/net/ynl/tests/Makefile
@@ -6,6 +6,8 @@ TEST_PROGS := \
test_ynl_ethtool.sh \
# end of TEST_PROGS
+INSTALL_PATH ?= $(DESTDIR)/usr/share/kselftest
+
all: $(TEST_PROGS)
run_tests:
@@ -14,15 +16,15 @@ all: $(TEST_PROGS)
done
install: $(TEST_PROGS)
- @mkdir -p $(DESTDIR)/usr/share/kselftest/ynl
- @cp ../../../testing/selftests/kselftest/ktap_helpers.sh $(DESTDIR)/usr/share/kselftest/
+ @mkdir -p $(INSTALL_PATH)/ynl
+ @cp ../../../testing/selftests/kselftest/ktap_helpers.sh $(INSTALL_PATH)/
@for test in $(TEST_PROGS); do \
name=$$(basename $$test); \
sed -e 's|^ynl=.*|ynl="ynl"|' \
-e 's|^ynl_ethtool=.*|ynl_ethtool="ynl-ethtool"|' \
- -e 's|KSELFTEST_KTAP_HELPERS=.*|KSELFTEST_KTAP_HELPERS="/usr/share/kselftest/ktap_helpers.sh"|' \
- $$test > $(DESTDIR)/usr/share/kselftest/ynl/$$name; \
- chmod +x $(DESTDIR)/usr/share/kselftest/ynl/$$name; \
+ -e 's|KSELFTEST_KTAP_HELPERS=.*|KSELFTEST_KTAP_HELPERS="$(INSTALL_PATH)/ktap_helpers.sh"|' \
+ $$test > $(INSTALL_PATH)/ynl/$$name; \
+ chmod +x $(INSTALL_PATH)/ynl/$$name; \
done
clean distclean:
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH net-next 4/4] tools: ynl: produce kselftest-list.txt from tests
2026-03-03 16:35 [PATCH net-next 0/4] tools: ynl: tests: adjust Makefile to mimic ksft Jakub Kicinski
` (2 preceding siblings ...)
2026-03-03 16:35 ` [PATCH net-next 3/4] tools: ynl: support INSTALL_PATH in the tests Makefile Jakub Kicinski
@ 2026-03-03 16:35 ` Jakub Kicinski
2026-03-03 17:50 ` [PATCH net-next 0/4] tools: ynl: tests: adjust Makefile to mimic ksft Matthieu Baerts
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Jakub Kicinski @ 2026-03-03 16:35 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, liuhangbin,
matttbe, donald.hunter, Jakub Kicinski
Executors will need kselftest-list.txt so create it when
tests are installed.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
tools/net/ynl/tests/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/net/ynl/tests/Makefile b/tools/net/ynl/tests/Makefile
index ee717db12dff..eb166c9550db 100644
--- a/tools/net/ynl/tests/Makefile
+++ b/tools/net/ynl/tests/Makefile
@@ -26,6 +26,9 @@ install: $(TEST_PROGS)
$$test > $(INSTALL_PATH)/ynl/$$name; \
chmod +x $(INSTALL_PATH)/ynl/$$name; \
done
+ @for test in $(TEST_PROGS); do \
+ echo "ynl:$$test"; \
+ done > $(INSTALL_PATH)/kselftest-list.txt
clean distclean:
@# Nothing to clean
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH net-next 0/4] tools: ynl: tests: adjust Makefile to mimic ksft
2026-03-03 16:35 [PATCH net-next 0/4] tools: ynl: tests: adjust Makefile to mimic ksft Jakub Kicinski
` (3 preceding siblings ...)
2026-03-03 16:35 ` [PATCH net-next 4/4] tools: ynl: produce kselftest-list.txt from tests Jakub Kicinski
@ 2026-03-03 17:50 ` Matthieu Baerts
2026-03-04 1:26 ` Hangbin Liu
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Matthieu Baerts @ 2026-03-03 17:50 UTC (permalink / raw)
To: Jakub Kicinski, davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, liuhangbin,
donald.hunter
Hi Jakub,
On 03/03/2026 17:35, Jakub Kicinski wrote:
> Make a few minor adjustments to tools/net/ynl/tests/Makefile
> to align its behavior more with how real kselftests behave.
> This series allows running the YNL tests in NIPA with little
> extra integration effort.
Good idea! This looks good to me:
Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH net-next 0/4] tools: ynl: tests: adjust Makefile to mimic ksft
2026-03-03 16:35 [PATCH net-next 0/4] tools: ynl: tests: adjust Makefile to mimic ksft Jakub Kicinski
` (4 preceding siblings ...)
2026-03-03 17:50 ` [PATCH net-next 0/4] tools: ynl: tests: adjust Makefile to mimic ksft Matthieu Baerts
@ 2026-03-04 1:26 ` Hangbin Liu
2026-03-04 10:36 ` Donald Hunter
2026-03-05 1:00 ` patchwork-bot+netdevbpf
7 siblings, 0 replies; 9+ messages in thread
From: Hangbin Liu @ 2026-03-04 1:26 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, matttbe,
donald.hunter
On Tue, Mar 03, 2026 at 08:35:00AM -0800, Jakub Kicinski wrote:
> Make a few minor adjustments to tools/net/ynl/tests/Makefile
> to align its behavior more with how real kselftests behave.
> This series allows running the YNL tests in NIPA with little
> extra integration effort.
>
> If anyone already integrated these tests into their CI minor
> adjustments to the integration may be needed (due to patch 2).
>
> Jakub Kicinski (4):
> tools: ynl: rename TESTS variable to TEST_PROGS
> tools: ynl: don't install tests in /usr/bin/
> tools: ynl: support INSTALL_PATH in the tests Makefile
> tools: ynl: produce kselftest-list.txt from tests
>
> tools/net/ynl/tests/Makefile | 30 +++++++++++++++++-------------
> 1 file changed, 17 insertions(+), 13 deletions(-)
>
> --
> 2.53.0
>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH net-next 0/4] tools: ynl: tests: adjust Makefile to mimic ksft
2026-03-03 16:35 [PATCH net-next 0/4] tools: ynl: tests: adjust Makefile to mimic ksft Jakub Kicinski
` (5 preceding siblings ...)
2026-03-04 1:26 ` Hangbin Liu
@ 2026-03-04 10:36 ` Donald Hunter
2026-03-05 1:00 ` patchwork-bot+netdevbpf
7 siblings, 0 replies; 9+ messages in thread
From: Donald Hunter @ 2026-03-04 10:36 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, liuhangbin,
matttbe
Jakub Kicinski <kuba@kernel.org> writes:
> Make a few minor adjustments to tools/net/ynl/tests/Makefile
> to align its behavior more with how real kselftests behave.
> This series allows running the YNL tests in NIPA with little
> extra integration effort.
>
> If anyone already integrated these tests into their CI minor
> adjustments to the integration may be needed (due to patch 2).
>
> Jakub Kicinski (4):
> tools: ynl: rename TESTS variable to TEST_PROGS
> tools: ynl: don't install tests in /usr/bin/
> tools: ynl: support INSTALL_PATH in the tests Makefile
> tools: ynl: produce kselftest-list.txt from tests
>
> tools/net/ynl/tests/Makefile | 30 +++++++++++++++++-------------
> 1 file changed, 17 insertions(+), 13 deletions(-)
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH net-next 0/4] tools: ynl: tests: adjust Makefile to mimic ksft
2026-03-03 16:35 [PATCH net-next 0/4] tools: ynl: tests: adjust Makefile to mimic ksft Jakub Kicinski
` (6 preceding siblings ...)
2026-03-04 10:36 ` Donald Hunter
@ 2026-03-05 1:00 ` patchwork-bot+netdevbpf
7 siblings, 0 replies; 9+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-05 1:00 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, liuhangbin,
matttbe, donald.hunter
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 3 Mar 2026 08:35:00 -0800 you wrote:
> Make a few minor adjustments to tools/net/ynl/tests/Makefile
> to align its behavior more with how real kselftests behave.
> This series allows running the YNL tests in NIPA with little
> extra integration effort.
>
> If anyone already integrated these tests into their CI minor
> adjustments to the integration may be needed (due to patch 2).
>
> [...]
Here is the summary with links:
- [net-next,1/4] tools: ynl: rename TESTS variable to TEST_PROGS
https://git.kernel.org/netdev/net-next/c/d86670b837fb
- [net-next,2/4] tools: ynl: don't install tests in /usr/bin/
https://git.kernel.org/netdev/net-next/c/3e90e00da96b
- [net-next,3/4] tools: ynl: support INSTALL_PATH in the tests Makefile
https://git.kernel.org/netdev/net-next/c/2bfc36f5ea16
- [net-next,4/4] tools: ynl: produce kselftest-list.txt from tests
https://git.kernel.org/netdev/net-next/c/32d6fd5832ad
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 9+ messages in thread