Commit Graph
10 Commits
Author SHA1 Message Date
Aleksei Oladko 5a1292137e selftests: fix ARCH normalization to handle command-line argument
Several selftests Makefiles (e.g.  prctl, breakpoints, etc) attempt to
normalize the ARCH variable by converting x86_64 and i.86 to x86. 
However, it uses the conditional assignment operator '?='.

When ARCH is passed as a command-line argument (e.g., during an rpmbuild
process), the '?=' operator ignores the shell command and the sed
transformation.  This leads to an incorrect ARCH value being used, which
causes build failures

  # make -C tools/testing/selftests TARGETS=prctl ARCH=x86_64
  make: Entering directory '/build/tools/testing/selftests'
  make[1]: Entering directory '/build/tools/testing/selftests/prctl'
  make[1]: *** No targets.  Stop.
  make[1]: Leaving directory '/build/tools/testing/selftests/prctl'
  make: *** [Makefile:197: all] Error 2

Change the assignment to use 'override' and ':=' to ensure the
normalization logic is applied regardless of how the ARCH variable was
initially defined.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Aleksei Oladko <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Wei Yang <[email protected]>
Cc: Bala-Vignesh-Reddy <[email protected]>
Cc: Chelsy Ratnawat <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
2026-03-27 21:19:44 -07:00
Srinivas Pandruvada 8190b9ea30 thermal: intel: selftests: workload_hint: Support slow workload hints
Add option to enable slow workload type hints. User can specify
"slow" as the command line argument to enable slow workload type hints.
There are two slow workload type hints: "power" and "performance".

Signed-off-by: Srinivas Pandruvada <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Rafael J. Wysocki <[email protected]>
2026-01-07 21:42:10 +01:00
Srinivas Pandruvada 0115d06355 thermal: intel: selftests: workload_hint: Mask unsupported types
The workload hint may contain some other hints which are not defined.
So mask out unsupported types. Currently only lower 4 bits of workload
type hints are defined.

Signed-off-by: Srinivas Pandruvada <[email protected]>
Link: https://patch.msgid.link/[email protected]
[ rjw: Subject cleanup ]
Signed-off-by: Rafael J. Wysocki <[email protected]>
2025-09-04 22:17:47 +02:00
WangYuli 599579e857 selftests/thermal: remove duplicate newlines in perror calls
perror() automatically appends a newline character, so the explicit '\n'
in the format strings is redundant and results in duplicate newlines in
the output.

Remove the redundant '\n' characters from perror() calls in
workload_hint_test.c to fix the formatting.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: WangYuli <[email protected]>
Cc: Guan Wentao <[email protected]>
Cc: Shuah Khan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
2025-07-19 19:08:28 -07:00
WangYuli 813b468088 selftests/thermal: remove duplicate sprintf() call in workload_hint_test
Remove redundant sprintf() call that was duplicating the same operation of
formatting delay_str with argv[1].

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: WangYuli <[email protected]>
Cc: Guan Wentao <[email protected]>
Cc: Shuah Khan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
2025-07-19 19:08:28 -07:00
Chelsy Ratnawat f11c1efe46 selftests: fix some typos in tools/testing/selftests
Fix multiple spelling errors:

 - "rougly" -> "roughly"
 - "fielesystems" -> "filesystems"
 - "Can'" -> "Can't"

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Chelsy Ratnawat <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Shuah Khan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
2025-05-11 17:54:13 -07:00
Javier Carrasco 2851f57d2d selftests: thermal: intel: workload_hint: add missing gitignore
The 'workload_hint_test' test generates an object with the same name,
but there is no .gitignore file in the directory to add the object as
stated in the selftest documentation.

Add the missing .gitignore file and include 'workload_hint_test'.

Signed-off-by: Javier Carrasco <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
2024-02-20 16:30:55 -07:00
Javier Carrasco 4b7b4291de selftests: thermal: intel: power_floor: add missing gitignore
The 'power_floor' test generates an object with the same name,
but there is no .gitignore file in the directory to add the object as
stated in the selftest documentation.

Add the missing .gitignore file and include 'power_floor'.

Signed-off-by: Javier Carrasco <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
2024-02-20 16:30:46 -07:00
Srinivas Pandruvada d4d27e5a1a selftests/thermel/intel: Add test to read power floor status
Some SoCs have firmware support to notify, if the system can't lower
power limit to a value requested from user space via RAPL constraints.

This test program waits for notification of power floor and prints. This
program can be used to test this feature and also allows other user space
programs to use as a reference.

Signed-off-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
2023-10-12 21:09:48 +02:00
Srinivas Pandruvada 27801542b2 selftests/thermel/intel: Add test to read workload hint
Some SoCs have in built firmware support to classify current running
workload and pass to OS for making power management decisions.

This test program waits for notification of workload type change
and prints. This program can be used to test this feature and also
allows other user space programs to use as a reference.

Signed-off-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
2023-09-14 21:52:19 +02:00