From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org, liuhangbin@gmail.com,
matttbe@kernel.org, donald.hunter@gmail.com,
Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 3/4] tools: ynl: support INSTALL_PATH in the tests Makefile
Date: Tue, 3 Mar 2026 08:35:03 -0800 [thread overview]
Message-ID: <20260303163504.2084981-4-kuba@kernel.org> (raw)
In-Reply-To: <20260303163504.2084981-1-kuba@kernel.org>
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
next prev parent reply other threads:[~2026-03-03 16:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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 ` [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
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=20260303163504.2084981-4-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=liuhangbin@gmail.com \
--cc=matttbe@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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