public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
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 2/4] tools: ynl: don't install tests in /usr/bin/
Date: Tue,  3 Mar 2026 08:35:02 -0800	[thread overview]
Message-ID: <20260303163504.2084981-3-kuba@kernel.org> (raw)
In-Reply-To: <20260303163504.2084981-1-kuba@kernel.org>

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


  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 ` Jakub Kicinski [this message]
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 ` [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-3-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