public inbox for kernelci@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] selftests: amd-pstate: fix TEST_FILES
@ 2023-02-04 13:34 Guillaume Tucker
  2023-03-02 16:32 ` Guillaume Tucker
  2023-03-03  6:05 ` Huang Rui
  0 siblings, 2 replies; 5+ messages in thread
From: Guillaume Tucker @ 2023-02-04 13:34 UTC (permalink / raw)
  To: Guillaume Tucker, Shuah Khan, Huang Rui, Meng Li, Doug Smythies
  Cc: kernel, linux-kselftest, linux-kernel, kernelci

Bring back the Python scripts that were initially added with
TEST_GEN_FILES but now with TEST_FILES to avoid having them deleted
when doing a clean.  Also fix the way the architecture is being
determined as they should also be installed when ARCH=x86_64 is
provided explicitly.  Then also append extra files to TEST_FILES and
TEST_PROGS with += so they don't get discarded.

Fixes: ba2d788aa873 ("selftests: amd-pstate: Trigger tbench benchmark and test cpus")
Fixes: ac527cee87c9 ("selftests: amd-pstate: Don't delete source files via Makefile")
Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
---
 tools/testing/selftests/amd-pstate/Makefile | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/tools/testing/selftests/amd-pstate/Makefile b/tools/testing/selftests/amd-pstate/Makefile
index 5fd1424db37d..c382f579fe94 100644
--- a/tools/testing/selftests/amd-pstate/Makefile
+++ b/tools/testing/selftests/amd-pstate/Makefile
@@ -4,10 +4,15 @@
 # No binaries, but make sure arg-less "make" doesn't trigger "run_tests"
 all:
 
-uname_M := $(shell uname -m 2>/dev/null || echo not)
-ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
+ARCH ?= $(shell uname -m 2>/dev/null || echo not)
+ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
 
-TEST_PROGS := run.sh
-TEST_FILES := basic.sh tbench.sh gitsource.sh
+ifeq (x86,$(ARCH))
+TEST_FILES += ../../../power/x86/amd_pstate_tracer/amd_pstate_trace.py
+TEST_FILES += ../../../power/x86/intel_pstate_tracer/intel_pstate_tracer.py
+endif
+
+TEST_PROGS += run.sh
+TEST_FILES += basic.sh tbench.sh gitsource.sh
 
 include ../lib.mk
-- 
2.30.2


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

* Re: [PATCH] selftests: amd-pstate: fix TEST_FILES
  2023-02-04 13:34 [PATCH] selftests: amd-pstate: fix TEST_FILES Guillaume Tucker
@ 2023-03-02 16:32 ` Guillaume Tucker
  2023-03-03  6:05 ` Huang Rui
  1 sibling, 0 replies; 5+ messages in thread
From: Guillaume Tucker @ 2023-03-02 16:32 UTC (permalink / raw)
  To: Shuah Khan, Huang Rui, Meng Li, Doug Smythies
  Cc: kernel, linux-kselftest, linux-kernel, kernelci

Hi Shuah,

On 04/02/2023 14:34, Guillaume Tucker wrote:
> Bring back the Python scripts that were initially added with
> TEST_GEN_FILES but now with TEST_FILES to avoid having them deleted
> when doing a clean.  Also fix the way the architecture is being
> determined as they should also be installed when ARCH=x86_64 is
> provided explicitly.  Then also append extra files to TEST_FILES and
> TEST_PROGS with += so they don't get discarded.
> 
> Fixes: ba2d788aa873 ("selftests: amd-pstate: Trigger tbench benchmark and test cpus")
> Fixes: ac527cee87c9 ("selftests: amd-pstate: Don't delete source files via Makefile")
> Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
> ---
>  tools/testing/selftests/amd-pstate/Makefile | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/testing/selftests/amd-pstate/Makefile b/tools/testing/selftests/amd-pstate/Makefile
> index 5fd1424db37d..c382f579fe94 100644
> --- a/tools/testing/selftests/amd-pstate/Makefile
> +++ b/tools/testing/selftests/amd-pstate/Makefile
> @@ -4,10 +4,15 @@
>  # No binaries, but make sure arg-less "make" doesn't trigger "run_tests"
>  all:
>  
> -uname_M := $(shell uname -m 2>/dev/null || echo not)
> -ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
> +ARCH ?= $(shell uname -m 2>/dev/null || echo not)
> +ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
>  
> -TEST_PROGS := run.sh
> -TEST_FILES := basic.sh tbench.sh gitsource.sh
> +ifeq (x86,$(ARCH))
> +TEST_FILES += ../../../power/x86/amd_pstate_tracer/amd_pstate_trace.py
> +TEST_FILES += ../../../power/x86/intel_pstate_tracer/intel_pstate_tracer.py
> +endif
> +
> +TEST_PROGS += run.sh
> +TEST_FILES += basic.sh tbench.sh gitsource.sh
>  
>  include ../lib.mk

Is there anything blocking this patch from being applied?  It
brings back the tools needed to run the amd-pstate tests into the
kselftest installation directory.

I could try to run the test on an AMD platform and check it's
working as before, but there was no change in the tools
themselves and I've checked the scripts get installed correctly
now like before.  We might also actually run this test in
KernelCI since there are a few AMD platforms available.

Thanks,
Guillaume


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

* Re: [PATCH] selftests: amd-pstate: fix TEST_FILES
  2023-02-04 13:34 [PATCH] selftests: amd-pstate: fix TEST_FILES Guillaume Tucker
  2023-03-02 16:32 ` Guillaume Tucker
@ 2023-03-03  6:05 ` Huang Rui
  2023-03-03 20:29   ` Shuah Khan
  1 sibling, 1 reply; 5+ messages in thread
From: Huang Rui @ 2023-03-03  6:05 UTC (permalink / raw)
  To: Guillaume Tucker
  Cc: Shuah Khan, Meng, Li (Jassmine), Doug Smythies,
	kernel@collabora.com, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernelci@lists.linux.dev

On Sat, Feb 04, 2023 at 09:34:54PM +0800, Guillaume Tucker wrote:
> Bring back the Python scripts that were initially added with
> TEST_GEN_FILES but now with TEST_FILES to avoid having them deleted
> when doing a clean.  Also fix the way the architecture is being
> determined as they should also be installed when ARCH=x86_64 is
> provided explicitly.  Then also append extra files to TEST_FILES and
> TEST_PROGS with += so they don't get discarded.
> 
> Fixes: ba2d788aa873 ("selftests: amd-pstate: Trigger tbench benchmark and test cpus")
> Fixes: ac527cee87c9 ("selftests: amd-pstate: Don't delete source files via Makefile")
> Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>

Acked-by: Huang Rui <ray.huang@amd.com>

> ---
>  tools/testing/selftests/amd-pstate/Makefile | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/testing/selftests/amd-pstate/Makefile b/tools/testing/selftests/amd-pstate/Makefile
> index 5fd1424db37d..c382f579fe94 100644
> --- a/tools/testing/selftests/amd-pstate/Makefile
> +++ b/tools/testing/selftests/amd-pstate/Makefile
> @@ -4,10 +4,15 @@
>  # No binaries, but make sure arg-less "make" doesn't trigger "run_tests"
>  all:
>  
> -uname_M := $(shell uname -m 2>/dev/null || echo not)
> -ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
> +ARCH ?= $(shell uname -m 2>/dev/null || echo not)
> +ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
>  
> -TEST_PROGS := run.sh
> -TEST_FILES := basic.sh tbench.sh gitsource.sh
> +ifeq (x86,$(ARCH))
> +TEST_FILES += ../../../power/x86/amd_pstate_tracer/amd_pstate_trace.py
> +TEST_FILES += ../../../power/x86/intel_pstate_tracer/intel_pstate_tracer.py
> +endif
> +
> +TEST_PROGS += run.sh
> +TEST_FILES += basic.sh tbench.sh gitsource.sh
>  
>  include ../lib.mk
> -- 
> 2.30.2
> 

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

* Re: [PATCH] selftests: amd-pstate: fix TEST_FILES
  2023-03-03  6:05 ` Huang Rui
@ 2023-03-03 20:29   ` Shuah Khan
  2023-03-06 13:11     ` Guillaume Tucker
  0 siblings, 1 reply; 5+ messages in thread
From: Shuah Khan @ 2023-03-03 20:29 UTC (permalink / raw)
  To: Huang Rui, Guillaume Tucker
  Cc: Shuah Khan, Meng, Li (Jassmine), Doug Smythies,
	kernel@collabora.com, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernelci@lists.linux.dev,
	Shuah Khan

On 3/2/23 23:05, Huang Rui wrote:
> On Sat, Feb 04, 2023 at 09:34:54PM +0800, Guillaume Tucker wrote:
>> Bring back the Python scripts that were initially added with
>> TEST_GEN_FILES but now with TEST_FILES to avoid having them deleted
>> when doing a clean.  Also fix the way the architecture is being
>> determined as they should also be installed when ARCH=x86_64 is
>> provided explicitly.  Then also append extra files to TEST_FILES and
>> TEST_PROGS with += so they don't get discarded.
>>
>> Fixes: ba2d788aa873 ("selftests: amd-pstate: Trigger tbench benchmark and test cpus")
>> Fixes: ac527cee87c9 ("selftests: amd-pstate: Don't delete source files via Makefile")
>> Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
> 
> Acked-by: Huang Rui <ray.huang@amd.com>
> 

Thank you both. I will pick this up for 6.3-rc2

thanks,
-- Shuah


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

* Re: [PATCH] selftests: amd-pstate: fix TEST_FILES
  2023-03-03 20:29   ` Shuah Khan
@ 2023-03-06 13:11     ` Guillaume Tucker
  0 siblings, 0 replies; 5+ messages in thread
From: Guillaume Tucker @ 2023-03-06 13:11 UTC (permalink / raw)
  To: Shuah Khan, Huang Rui
  Cc: Shuah Khan, Meng, Li (Jassmine), Doug Smythies,
	kernel@collabora.com, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernelci@lists.linux.dev

On 03/03/2023 21:29, Shuah Khan wrote:
> On 3/2/23 23:05, Huang Rui wrote:
>> On Sat, Feb 04, 2023 at 09:34:54PM +0800, Guillaume Tucker wrote:
>>> Bring back the Python scripts that were initially added with
>>> TEST_GEN_FILES but now with TEST_FILES to avoid having them deleted
>>> when doing a clean.  Also fix the way the architecture is being
>>> determined as they should also be installed when ARCH=x86_64 is
>>> provided explicitly.  Then also append extra files to TEST_FILES and
>>> TEST_PROGS with += so they don't get discarded.
>>>
>>> Fixes: ba2d788aa873 ("selftests: amd-pstate: Trigger tbench benchmark and test cpus")
>>> Fixes: ac527cee87c9 ("selftests: amd-pstate: Don't delete source files via Makefile")
>>> Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
>>
>> Acked-by: Huang Rui <ray.huang@amd.com>
>>
> 
> Thank you both. I will pick this up for 6.3-rc2

Great, many thanks.

Guillaume


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

end of thread, other threads:[~2023-03-06 13:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-04 13:34 [PATCH] selftests: amd-pstate: fix TEST_FILES Guillaume Tucker
2023-03-02 16:32 ` Guillaume Tucker
2023-03-03  6:05 ` Huang Rui
2023-03-03 20:29   ` Shuah Khan
2023-03-06 13:11     ` Guillaume Tucker

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