From: Simon Horman <horms@kernel.org>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, "Donald Hunter" <donald.hunter@gmail.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Paolo Abeni" <pabeni@redhat.com>,
"Jan Stancek" <jstancek@redhat.com>,
"Matthieu Baerts (NGI0)" <matttbe@kernel.org>,
"Asbjørn Sloth Tønnesen" <ast@fiberby.net>,
"Stanislav Fomichev" <sdf@fomichev.me>,
"Ido Schimmel" <idosch@nvidia.com>,
"Guillaume Nault" <gnault@redhat.com>,
"Sabrina Dubroca" <sd@queasysnail.net>,
"Petr Machata" <petrm@nvidia.com>
Subject: Re: [PATCHv6 net-next] tools: ynl: add YNL test framework
Date: Sun, 23 Nov 2025 16:04:19 +0000 [thread overview]
Message-ID: <aSMwg9vRBobjhiw5@horms.kernel.org> (raw)
In-Reply-To: <20251119025742.11611-1-liuhangbin@gmail.com>
On Wed, Nov 19, 2025 at 02:57:42AM +0000, Hangbin Liu wrote:
...
> diff --git a/tools/net/ynl/Makefile b/tools/net/ynl/Makefile
...
> @@ -49,5 +49,9 @@ install: libynl.a lib/*.h
> @echo -e "\tINSTALL pyynl"
> @pip install --prefix=$(DESTDIR)$(prefix) .
> @make -C generated install
> + @make -C tests install
>
> -.PHONY: all clean distclean install $(SUBDIRS)
> +run_tests:
> + @$(MAKE) -C tests run_tests
> +
> +.PHONY: all clean distclean install run_tests $(SUBDIRS)
> diff --git a/tools/net/ynl/tests/Makefile b/tools/net/ynl/tests/Makefile
> new file mode 100644
> index 000000000000..38161217e249
> --- /dev/null
> +++ b/tools/net/ynl/tests/Makefile
> @@ -0,0 +1,32 @@
> +# SPDX-License-Identifier: GPL-2.0
> +# Makefile for YNL tests
> +
> +TESTS := \
> + test_ynl_cli.sh \
> + test_ynl_ethtool.sh \
> +# end of TESTS
> +
> +all: $(TESTS)
> +
> +run_tests:
> + @for test in $(TESTS); do \
> + ./$$test; \
> + done
> +
> +install: $(TESTS)
> + @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 \
> + name=$$(basename $$test .sh); \
> + 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; \
> + done
> +
> +clean:
> + @# Nothing to clean
> +
> +.PHONY: all install clean run_tests
Hi Hangbin,
As the parent and sibling Makefiles support the distclean target I think
this one probably should too.
...
prev parent reply other threads:[~2025-11-23 16:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 2:57 [PATCHv6 net-next] tools: ynl: add YNL test framework Hangbin Liu
2025-11-23 16:04 ` Simon Horman [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=aSMwg9vRBobjhiw5@horms.kernel.org \
--to=horms@kernel.org \
--cc=ast@fiberby.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=gnault@redhat.com \
--cc=idosch@nvidia.com \
--cc=jstancek@redhat.com \
--cc=kuba@kernel.org \
--cc=liuhangbin@gmail.com \
--cc=matttbe@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=sd@queasysnail.net \
--cc=sdf@fomichev.me \
/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.