Skip to contentSkip to conversation

selftests: make kselftest-clean remove libynl outputs

PATCH Applied Greg Thelen 5 participants 5 messages Oct 5, 2024 – Oct 8, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: make kselftest-clean remove libynl outputs

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")
---
 tools/testing/selftests/net/ynl.mk | 4 ++++
 1 file changed, 4 insertions(+)
tools/testing/selftests/net/ynl.mk +4 -0
index 59cb26cf3f73..1ef24119def0 100644
@@ -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]
Signature · 1 line
2.47.0.rc0.187.ge670bccf7e-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 25 lines · Greg Thelen

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")
---
 tools/testing/selftests/net/ynl.mk | 4 ++++
 1 file changed, 4 insertions(+)
tools/testing/selftests/net/ynl.mk +0 -0
index 59cb26cf3f73..1ef24119def0 100644

tools/testing/selftests/net/ynl.mk $(YNL_OUTPUTS): CFLAGS += \ · line 25

Quoted 7 lines
tools/testing/selftests/net/ynl.mk +4 -0
@@ -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]
Signature · 2 lines
BR,
Muhammad Usama Anjum
Reviewed-by on v1 1/1
#2 lore raw
In reply to Greg Thelen
Quoted 12 lines · Greg Thelen

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
Quoted 4 lines

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

Fixes 85585b4bc8d8 ("selftests: add ncdevmem, netcat for devmem TCP")
#3 lore raw
In reply to Greg Thelen
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 12 lines · On Sat, 5 Oct 2024 14:56:00 -0700 you 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
Quoted 1 line

[...]

Here is the summary with links:
- selftests: make kselftest-clean remove libynl outputs

    https://git.kernel.org/netdev/net/c/1fd9e4f25782

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Reviewed-by on v1 1/1
#4 lore raw
In reply to Greg Thelen
Quoted 13 lines · Greg Thelen

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
Quoted 3 lines

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

Fixes 85585b4bc8d8 ("selftests: add ncdevmem, netcat for devmem TCP")

Probably moot since this is merged already (sorry for the delay), but likely it's:

Fixes 07c3cc51a085 ("tools: net: package libynl for use in selftests")

The referenced patch doesn't touch ynl.mk, but adds a dependency on it

Quoted 1 line

Thank you Greg,

Signature · 2 lines
Thanks,
Mina