diff mbox series

selftests: make kselftest-clean remove libynl outputs

Message ID 20241005215600.852260-1-gthelen@google.com
State Accepted
Commit 1fd9e4f257827d939cc627541f12fc4bdd979eb1
Headers show
Series selftests: make kselftest-clean remove libynl outputs | expand

Commit Message

Greg Thelen Oct. 5, 2024, 9:56 p.m. UTC
Starting with 6.12 commit 85585b4bc8d8 ("selftests: add ncdevmem, netcat
for devmem TCP") kselftest-all creates additional outputs that
kselftest-clean does not cleanup:
  $ make defconfig
  $ make kselftest-all
  $ make kselftest-clean
  $ git clean -ndxf | grep tools/net
  Would remove tools/net/ynl/lib/__pycache__/
  Would remove tools/net/ynl/lib/ynl.a
  Would remove tools/net/ynl/lib/ynl.d
  Would remove tools/net/ynl/lib/ynl.o

Make kselftest-clean remove the newly added net/ynl outputs.

Fixes: 85585b4bc8d8 ("selftests: add ncdevmem, netcat for devmem TCP")
Signed-off-by: Greg Thelen <gthelen@google.com>
---
 tools/testing/selftests/net/ynl.mk | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Muhammad Usama Anjum Oct. 6, 2024, 5:41 p.m. UTC | #1
On 10/6/24 2:56 AM, Greg Thelen wrote:
> Starting with 6.12 commit 85585b4bc8d8 ("selftests: add ncdevmem, netcat
> for devmem TCP") kselftest-all creates additional outputs that
> kselftest-clean does not cleanup:
>   $ make defconfig
>   $ make kselftest-all
>   $ make kselftest-clean
>   $ git clean -ndxf | grep tools/net
>   Would remove tools/net/ynl/lib/__pycache__/
>   Would remove tools/net/ynl/lib/ynl.a
>   Would remove tools/net/ynl/lib/ynl.d
>   Would remove tools/net/ynl/lib/ynl.o
> 
> Make kselftest-clean remove the newly added net/ynl outputs.
> 
> Fixes: 85585b4bc8d8 ("selftests: add ncdevmem, netcat for devmem TCP")
> Signed-off-by: Greg Thelen <gthelen@google.com>
> ---
>  tools/testing/selftests/net/ynl.mk | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/testing/selftests/net/ynl.mk b/tools/testing/selftests/net/ynl.mk
> index 59cb26cf3f73..1ef24119def0 100644
> --- a/tools/testing/selftests/net/ynl.mk
> +++ b/tools/testing/selftests/net/ynl.mk
> @@ -19,3 +19,7 @@ $(YNL_OUTPUTS): CFLAGS += \
>  $(OUTPUT)/libynl.a:
>  	$(Q)$(MAKE) -C $(top_srcdir)/tools/net/ynl GENS="$(YNL_GENS)" libynl.a
>  	$(Q)cp $(top_srcdir)/tools/net/ynl/libynl.a $(OUTPUT)/libynl.a
> +
> +EXTRA_CLEAN += \
> +	$(top_srcdir)/tools/net/ynl/lib/__pycache__ \
> +	$(top_srcdir)/tools/net/ynl/lib/*.[ado]
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/ynl.mk b/tools/testing/selftests/net/ynl.mk
index 59cb26cf3f73..1ef24119def0 100644
--- a/tools/testing/selftests/net/ynl.mk
+++ b/tools/testing/selftests/net/ynl.mk
@@ -19,3 +19,7 @@  $(YNL_OUTPUTS): CFLAGS += \
 $(OUTPUT)/libynl.a:
 	$(Q)$(MAKE) -C $(top_srcdir)/tools/net/ynl GENS="$(YNL_GENS)" libynl.a
 	$(Q)cp $(top_srcdir)/tools/net/ynl/libynl.a $(OUTPUT)/libynl.a
+
+EXTRA_CLEAN += \
+	$(top_srcdir)/tools/net/ynl/lib/__pycache__ \
+	$(top_srcdir)/tools/net/ynl/lib/*.[ado]