Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH] selftests: add 'show_targets' make target
@ 2020-03-13 22:23 tbird20d
  2020-04-07 23:19 ` shuah
  0 siblings, 1 reply; 3+ messages in thread
From: tbird20d @ 2020-03-13 22:23 UTC (permalink / raw)
  To: shuah; +Cc: linux-kselftest, linux-kernel, tbird20d, tim.bird

From: Tim Bird <tim.bird@sony.com>

It is useful for CI systems to be able to query the list
of targets provided by kselftest by default, so that they
can construct their own loop over the targets if desired.

Signed-off-by: Tim Bird <tim.bird@sony.com>
---
 tools/testing/selftests/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 63430e2..9955e71 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -246,4 +246,7 @@ clean:
 		$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET clean;\
 	done;
 
+show_targets:
+	@echo $(TARGETS)
+
 .PHONY: khdr all run_tests hotplug run_hotplug clean_hotplug run_pstore_crash install clean
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] selftests: add 'show_targets' make target
  2020-03-13 22:23 [PATCH] selftests: add 'show_targets' make target tbird20d
@ 2020-04-07 23:19 ` shuah
  2020-04-08 19:13   ` Bird, Tim
  0 siblings, 1 reply; 3+ messages in thread
From: shuah @ 2020-04-07 23:19 UTC (permalink / raw)
  To: tbird20d; +Cc: linux-kselftest, linux-kernel, tim.bird, shuah

On 3/13/20 4:23 PM, tbird20d@gmail.com wrote:
> From: Tim Bird <tim.bird@sony.com>
> 
> It is useful for CI systems to be able to query the list
> of targets provided by kselftest by default, so that they
> can construct their own loop over the targets if desired.
> 
> Signed-off-by: Tim Bird <tim.bird@sony.com>
> ---
>   tools/testing/selftests/Makefile | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
> index 63430e2..9955e71 100644
> --- a/tools/testing/selftests/Makefile
> +++ b/tools/testing/selftests/Makefile
> @@ -246,4 +246,7 @@ clean:
>   		$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET clean;\
>   	done;
>   
> +show_targets:
> +	@echo $(TARGETS)
> +
>   .PHONY: khdr all run_tests hotplug run_hotplug clean_hotplug run_pstore_crash install clean
> 

Hi Tim,

It is useful addition. Output is hard to read though. It would
be helpful to improve the printing targets.

make -C tools/testing/selftests/ show_targets
make: Entering directory '/lkml/linux_5.7/tools/testing/selftests'
android arm64 bpf breakpoints capabilities cgroup clone3 cpufreq 
cpu-hotplug drivers/dma-buf efivarfs exec filesystems 
filesystems/binderfs filesystems/epoll firmware ftrace futex gpio 
intel_pstate ipc ir kcmp kexec kvm lib livepatch lkdtm membarrier memfd 
memory-hotplug mount mqueue net net/forwarding net/mptcp netfilter nsfs 
pidfd pid_namespace powerpc proc pstore ptrace openat2 rseq rtc seccomp 
sigaltstack size sparc64 splice static_keys sync sysctl timens timers 
tmpfs tpm2 user vm x86 zram

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] selftests: add 'show_targets' make target
  2020-04-07 23:19 ` shuah
@ 2020-04-08 19:13   ` Bird, Tim
  0 siblings, 0 replies; 3+ messages in thread
From: Bird, Tim @ 2020-04-08 19:13 UTC (permalink / raw)
  To: shuah, tbird20d@gmail.com
  Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org



> -----Original Message-----
> From: shuah <shuah@kernel.org>
> 
> On 3/13/20 4:23 PM, tbird20d@gmail.com wrote:
> > From: Tim Bird <tim.bird@sony.com>
> >
> > It is useful for CI systems to be able to query the list
> > of targets provided by kselftest by default, so that they
> > can construct their own loop over the targets if desired.
> >
> > Signed-off-by: Tim Bird <tim.bird@sony.com>
> > ---
> >   tools/testing/selftests/Makefile | 3 +++
> >   1 file changed, 3 insertions(+)
> >
> > diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
> > index 63430e2..9955e71 100644
> > --- a/tools/testing/selftests/Makefile
> > +++ b/tools/testing/selftests/Makefile
> > @@ -246,4 +246,7 @@ clean:
> >   		$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET clean;\
> >   	done;
> >
> > +show_targets:
> > +	@echo $(TARGETS)
> > +
> >   .PHONY: khdr all run_tests hotplug run_hotplug clean_hotplug run_pstore_crash install clean
> >
> 
> Hi Tim,
> 
> It is useful addition. Output is hard to read though. It would
> be helpful to improve the printing targets.
>
> make -C tools/testing/selftests/ show_targets
> make: Entering directory '/lkml/linux_5.7/tools/testing/selftests'
> android arm64 bpf breakpoints capabilities cgroup clone3 cpufreq
> cpu-hotplug drivers/dma-buf efivarfs exec filesystems
> filesystems/binderfs filesystems/epoll firmware ftrace futex gpio
> intel_pstate ipc ir kcmp kexec kvm lib livepatch lkdtm membarrier memfd
> memory-hotplug mount mqueue net net/forwarding net/mptcp netfilter nsfs
> pidfd pid_namespace powerpc proc pstore ptrace openat2 rseq rtc seccomp
> sigaltstack size sparc64 splice static_keys sync sysctl timens timers
> tmpfs tpm2 user vm x86 zram
> 
> thanks,
> -- Shuah

OK.  I did this mainly for test automation, so I was only
concerned about machine readability.  I have code that looks
like this:

TARGET_LIST=$(make --no-print-directory -s -C tools/testing/selftests show_targets)

However, I'd agree that the output is not great for humans.

How would you like it improved?  Would you like it shown as a single column?
Or indented?  Or using some organization besides alphabetical?

Let me know and I'll implement something.
 -- Tim


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-08 19:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-13 22:23 [PATCH] selftests: add 'show_targets' make target tbird20d
2020-04-07 23:19 ` shuah
2020-04-08 19:13   ` Bird, Tim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox