[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aSMwg9vRBobjhiw5@horms.kernel.org>
Date: Sun, 23 Nov 2025 16:04:19 +0000
From: Simon Horman <horms@...nel.org>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org, Donald Hunter <donald.hunter@...il.com>,
Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Jan Stancek <jstancek@...hat.com>,
"Matthieu Baerts (NGI0)" <matttbe@...nel.org>,
Asbjørn Sloth Tønnesen <ast@...erby.net>,
Stanislav Fomichev <sdf@...ichev.me>,
Ido Schimmel <idosch@...dia.com>,
Guillaume Nault <gnault@...hat.com>,
Sabrina Dubroca <sd@...asysnail.net>,
Petr Machata <petrm@...dia.com>
Subject: Re: [PATCHv6 net-next] tools: ynl: add YNL test framework
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.
...
Powered by blists - more mailing lists