* [LTP] [PATCH 0/2] power_management: cleanup
@ 2026-03-18 13:26 Petr Vorel
2026-03-18 13:26 ` [LTP] [PATCH 1/2] runpwtests03.sh: Replace modprobe -l to lsmod Petr Vorel
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Petr Vorel @ 2026-03-18 13:26 UTC (permalink / raw)
To: ltp; +Cc: automated-testing
Hi,
I wanted to delete whole old testsuite (README mentions ancient kernel
2.6.29.4 etc) but because Intel folks contributed power management test
[1] and CPUFREQ/CPUIDLE sysfs tests are probably valid and should be
rewritten.
Of course README itself is also outdated (some scripts has been removed
and code put into the servers).
[1] https://lore.kernel.org/ltp/20260318130250.68495-2-piotr.kubaj@intel.com/
Petr Vorel (2):
runpwtests03.sh: Replace modprobe -l to lsmod
power_management: Remove runpwtests0[125].sh
runtest/power_management_tests | 3 -
testcases/kernel/power_management/.gitignore | 1 -
.../power_management/pm_get_sched_values.c | 36 ---------
.../kernel/power_management/runpwtests01.sh | 71 -----------------
.../kernel/power_management/runpwtests02.sh | 68 -----------------
.../kernel/power_management/runpwtests03.sh | 13 ++--
.../kernel/power_management/runpwtests05.sh | 76 -------------------
7 files changed, 7 insertions(+), 261 deletions(-)
delete mode 100644 testcases/kernel/power_management/.gitignore
delete mode 100644 testcases/kernel/power_management/pm_get_sched_values.c
delete mode 100755 testcases/kernel/power_management/runpwtests01.sh
delete mode 100755 testcases/kernel/power_management/runpwtests02.sh
delete mode 100755 testcases/kernel/power_management/runpwtests05.sh
--
2.51.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 8+ messages in thread
* [LTP] [PATCH 1/2] runpwtests03.sh: Replace modprobe -l to lsmod
2026-03-18 13:26 [LTP] [PATCH 0/2] power_management: cleanup Petr Vorel
@ 2026-03-18 13:26 ` Petr Vorel
2026-03-26 13:41 ` Andrea Cervesato via ltp
2026-03-18 13:26 ` [LTP] [PATCH 2/2] power_management: Remove runpwtests0[125].sh Petr Vorel
2026-03-18 13:44 ` [LTP] [PATCH 0/2] power_management: cleanup Petr Vorel
2 siblings, 1 reply; 8+ messages in thread
From: Petr Vorel @ 2026-03-18 13:26 UTC (permalink / raw)
To: ltp; +Cc: automated-testing
modprobe does not have -l option. And 'busybox modprobe -l'
would require busybox as a dependency. List modules with find.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/power_management/runpwtests03.sh | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/testcases/kernel/power_management/runpwtests03.sh b/testcases/kernel/power_management/runpwtests03.sh
index 72ad2ad687..ebd0957e64 100755
--- a/testcases/kernel/power_management/runpwtests03.sh
+++ b/testcases/kernel/power_management/runpwtests03.sh
@@ -115,9 +115,11 @@ pwkm_load_unload() {
RC=0
loaded_governor=`cat \
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`
- for module in `modprobe -l | grep cpufreq_ | \
- cut -f8 -d"/" | cut -f1 -d"."`
- do
+
+ modules=$(find /lib/modules/$(uname -r) -type f -name '*.ko*' |
+ grep cpufreq_ | cut -f8 -d"/" | cut -f1 -d".")
+
+ for module in $modules; do
#echo -n "Loading $module ... "
if [ $module != "cpufreq_$loaded_governor" ]; then
modprobe $module >/dev/null
@@ -128,9 +130,8 @@ pwkm_load_unload() {
fi
fi
done
- for module in `modprobe -l | grep cpufreq_ | \
- cut -f8 -d"/" | cut -f1 -d"."`
- do
+
+ for module in $modules; do
#echo -n "Unloading $module ... "
if [ $module != "cpufreq_$loaded_governor" ]; then
modprobe -r $module >/dev/null
--
2.51.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [LTP] [PATCH 2/2] power_management: Remove runpwtests0[125].sh
2026-03-18 13:26 [LTP] [PATCH 0/2] power_management: cleanup Petr Vorel
2026-03-18 13:26 ` [LTP] [PATCH 1/2] runpwtests03.sh: Replace modprobe -l to lsmod Petr Vorel
@ 2026-03-18 13:26 ` Petr Vorel
2026-03-26 13:33 ` Andrea Cervesato via ltp
2026-03-18 13:44 ` [LTP] [PATCH 0/2] power_management: cleanup Petr Vorel
2 siblings, 1 reply; 8+ messages in thread
From: Petr Vorel @ 2026-03-18 13:26 UTC (permalink / raw)
To: ltp; +Cc: automated-testing
These tests use power-aware scheduling sysfs, which were removed in
8e7fbcbc22c12 ("sched: Remove stale power aware scheduling remnants and dysfunctional knobs")
in kernel 3.5:
/sys/devices/system/cpu/sched_mc_power_savings
/sys/devices/system/cpu/sched_smt_power_savings
runpwtests05.sh was disabled since 2015 anyway.
Remove also pm_sched_domain.py and pm_get_sched_values.c (used only by
runpwtests05.sh) and .gitignore (contained only removed
pm_get_sched_values).
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
runtest/power_management_tests | 3 -
testcases/kernel/power_management/.gitignore | 1 -
.../power_management/pm_get_sched_values.c | 36 ---------
.../kernel/power_management/runpwtests01.sh | 71 -----------------
.../kernel/power_management/runpwtests02.sh | 68 -----------------
.../kernel/power_management/runpwtests05.sh | 76 -------------------
6 files changed, 255 deletions(-)
delete mode 100644 testcases/kernel/power_management/.gitignore
delete mode 100644 testcases/kernel/power_management/pm_get_sched_values.c
delete mode 100755 testcases/kernel/power_management/runpwtests01.sh
delete mode 100755 testcases/kernel/power_management/runpwtests02.sh
delete mode 100755 testcases/kernel/power_management/runpwtests05.sh
diff --git a/runtest/power_management_tests b/runtest/power_management_tests
index 884e615cd8..b670da6ecf 100644
--- a/runtest/power_management_tests
+++ b/runtest/power_management_tests
@@ -1,7 +1,4 @@
#POWER_MANAGEMENT
-runpwtests01 runpwtests01.sh
-runpwtests02 runpwtests02.sh
runpwtests03 runpwtests03.sh
runpwtests04 runpwtests04.sh
-#runpwtests05 runpwtests05.sh
runpwtests06 runpwtests06.sh
diff --git a/testcases/kernel/power_management/.gitignore b/testcases/kernel/power_management/.gitignore
deleted file mode 100644
index 0c2a3ed4bd..0000000000
--- a/testcases/kernel/power_management/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-pm_get_sched_values
diff --git a/testcases/kernel/power_management/pm_get_sched_values.c b/testcases/kernel/power_management/pm_get_sched_values.c
deleted file mode 100644
index e75c5852e5..0000000000
--- a/testcases/kernel/power_management/pm_get_sched_values.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/************************************************************************
-* Copyright (c) International Business Machines Corp., 2008
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-* the GNU General Public License for more details.
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*
-***************************************************************************/
-#include <stdio.h>
-#include "test.h"
-
-const char *TCID = "pm_get_sched_values";
-
-int main(int argc, char **argv)
-{
- char *param;
- if (argc == 0)
- return 1;
- else {
- param = argv[1];
- if (strcmp(param, "sched_mc") == 0)
- return 2;
- if (strcmp(param, "sched_smt") == 0)
- return 2;
- }
-
- return 1;
-}
diff --git a/testcases/kernel/power_management/runpwtests01.sh b/testcases/kernel/power_management/runpwtests01.sh
deleted file mode 100755
index 2caf9eab51..0000000000
--- a/testcases/kernel/power_management/runpwtests01.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-#! /bin/sh
-#
-# Copyright (c) International Business Machines Corp., 2001
-# Author: Nageswara R Sastry <nasastry@in.ibm.com>
-#
-# This program is free software; you can redistribute it and#or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#
-
-export TCID="Power_Management01"
-export TST_TOTAL=1
-
-. test.sh
-. pm_include.sh
-
-test_sched_mc() {
- get_kernel_version
- get_valid_input $kernel_version
-
- invalid_input="3 4 5 6 7 8 a abcefg x1999 xffff -1 -00000
- 2000000000000000000000000000000000000000000000000000000000000000000
- ox324 -0xfffffffffffffffffffff"
- test_file="/sys/devices/system/cpu/sched_mc_power_savings"
- if [ ! -f ${test_file} ] ; then
- tst_brkm TBROK "MISSING_FILE: missing file ${test_file}"
- fi
-
- RC=0
- echo "${0}: ---Valid test cases---"
- check_input "${valid_input}" valid $test_file
- RC=$?
- echo "${0}: ---Invalid test cases---"
- check_input "${invalid_input}" invalid $test_file
- RC=$(( RC | $? ))
- return $RC
-}
-
-# Checking test environment
-check_arch
-
-# Checking sched_mc sysfs interface
-multi_socket=$(is_multi_socket)
-multi_core=$(is_multi_core)
-if [ ! -f /sys/devices/system/cpu/sched_mc_power_savings ] ; then
- tst_brkm TCONF "Required kernel configuration for SCHED_MC" \
- "NOT set"
-else
- if [ $multi_socket -ne 0 -a $multi_core -ne 0 ] ; then
- tst_brkm TCONF "sched_mc_power_savings interface in system" \
- "which is not a multi socket &(/) multi core"
- fi
-fi
-
-if test_sched_mc ; then
- tst_resm TPASS "SCHED_MC sysfs tests"
-else
- tst_resm TFAIL "SCHED_MC sysfs tests"
-fi
-
-tst_exit
diff --git a/testcases/kernel/power_management/runpwtests02.sh b/testcases/kernel/power_management/runpwtests02.sh
deleted file mode 100755
index 805befb033..0000000000
--- a/testcases/kernel/power_management/runpwtests02.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#! /bin/sh
-#
-# Copyright (c) International Business Machines Corp., 2001
-# Author: Nageswara R Sastry <nasastry@in.ibm.com>
-#
-# This program is free software; you can redistribute it and#or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#
-
-export TCID="Power_Management02"
-export TST_TOTAL=1
-
-. test.sh
-. pm_include.sh
-
-test_sched_smt() {
- get_kernel_version
- get_valid_input $kernel_version
-
- invalid_input="3 4 5 6 7 8 a abcefg x1999 xffff -1 -00000
- 2000000000000000000000000000000000000000000000000000000000000000000000
- ox324 -0xfffffffffffffffffffff"
- test_file="/sys/devices/system/cpu/sched_smt_power_savings"
- if [ ! -f ${test_file} ] ; then
- tst_brkm TBROK "MISSING_FILE: missing file ${test_file}"
- fi
-
- echo "${0}: ---Valid test cases---"
- check_input "${valid_input}" valid $test_file
- RC=$?
- echo "${0}: ---Invalid test cases---"
- check_input "${invalid_input}" invalid $test_file
- RC=$(( RC | $? ))
- return $RC
-}
-
-# Checking test environment
-check_arch
-
-# Check sched_smt_power_savings interface on HT machines
-hyper_threaded=$(is_hyper_threaded)
-if [ ! -f /sys/devices/system/cpu/sched_smt_power_savings ] ; then
- tst_brkm TCONF "Required kernel configuration for SCHED_SMT NOT set"
-else
- if [ $hyper_threaded -ne 0 ]; then
- tst_brkm TCONF "sched_smt_power_saving interface in system" \
- "not hyper-threaded"
- fi
-fi
-
-if test_sched_smt ; then
- tst_resm TPASS "SCHED_SMT sysfs test"
-else
- tst_resm TFAIL "SCHED_SMT sysfs test"
-fi
-
-tst_exit
diff --git a/testcases/kernel/power_management/runpwtests05.sh b/testcases/kernel/power_management/runpwtests05.sh
deleted file mode 100755
index 03b6752bf3..0000000000
--- a/testcases/kernel/power_management/runpwtests05.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#! /bin/sh
-#
-# Copyright (c) International Business Machines Corp., 2001
-# Author: Nageswara R Sastry <nasastry@in.ibm.com>
-#
-# This program is free software; you can redistribute it and#or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#
-
-export TCID="Power_Management05"
-export TST_TOTAL=2
-
-. test.sh
-. pm_include.sh
-
-# Checking test environment
-check_arch
-
-max_sched_mc=2
-max_sched_smt=2
-
-tst_require_cmds python3
-
-if ! grep sched_debug -qw /proc/cmdline ; then
- tst_brkm TCONF "Kernel cmdline parameter 'sched_debug' needed," \
- "CPU Consolidation test cannot run"
-fi
-
-hyper_threaded=$(is_hyper_threaded)
-if [ ! -f /sys/devices/system/cpu/sched_mc_power_savings \
- -o $hyper_threaded -ne 0 ] ; then
- tst_brkm TCONF "Required kernel configuration for SCHED_MC" \
- "NOT set, or sched_mc_power_savings interface in system" \
- "which is not hyper-threaded"
-fi
-
-# sched_domain test
-echo "max sched mc $max_sched_mc"
-RC=0
-for sched_mc in `seq 0 $max_sched_mc`; do
- pm_sched_domain.py -c $sched_mc; ret=$?
- analyze_sched_domain_result $sched_mc $ret; RC=$?
-done
-if [ $RC -eq 0 ]; then
- tst_resm TPASS "Sched_domain test for sched_mc"
-else
- tst_resm TFAIL "Sched_domain test for sched_mc"
-fi
-
-# Testcase to validate sched_domain tree
-RC=0
-for sched_mc in `seq 0 $max_sched_mc`; do
- pm_get_sched_values sched_smt; max_sched_smt=$?
- for sched_smt in `seq 0 $max_sched_smt`; do
- pm_sched_domain.py -c $sched_mc -t $sched_smt; ret=$?
- analyze_sched_domain_result $sched_mc $ret $sched_smt; RC=$?
- done
-done
-if [ $RC -eq 0 ]; then
- tst_resm TPASS "Sched_domain test for sched_mc & sched_smt"
-else
- tst_resm TFAIL "Sched_domain test for sched_mc & sched_smt"
-fi
-
-tst_exit
--
2.51.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [LTP] [PATCH 0/2] power_management: cleanup
2026-03-18 13:26 [LTP] [PATCH 0/2] power_management: cleanup Petr Vorel
2026-03-18 13:26 ` [LTP] [PATCH 1/2] runpwtests03.sh: Replace modprobe -l to lsmod Petr Vorel
2026-03-18 13:26 ` [LTP] [PATCH 2/2] power_management: Remove runpwtests0[125].sh Petr Vorel
@ 2026-03-18 13:44 ` Petr Vorel
2 siblings, 0 replies; 8+ messages in thread
From: Petr Vorel @ 2026-03-18 13:44 UTC (permalink / raw)
To: ltp; +Cc: automated-testing
Hi,
> Hi,
> I wanted to delete whole old testsuite (README mentions ancient kernel
> 2.6.29.4 etc) but because Intel folks contributed power management test
> [1] and CPUFREQ/CPUIDLE sysfs tests are probably valid and should be
> rewritten.
Other problem is that all x86_64 machines I debug have all
/sys/devices/system/cpu/cpu*/topology/physical_package_id
files only 0, therefore all runpwtests_exclusive0*.sh are skipped.
> Of course README itself is also outdated (some scripts has been removed
> and code put into the servers).
> [1] https://lore.kernel.org/ltp/20260318130250.68495-2-piotr.kubaj@intel.com/
> Petr Vorel (2):
> runpwtests03.sh: Replace modprobe -l to lsmod
> power_management: Remove runpwtests0[125].sh
> runtest/power_management_tests | 3 -
Given how old tests are is completely useless "_tests" suffix on the runtest
file. I know renaming runtest files is not practical (at least Cyril was against
in the past), but in this case I'd be for renaming it.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [LTP] [PATCH 2/2] power_management: Remove runpwtests0[125].sh
2026-03-18 13:26 ` [LTP] [PATCH 2/2] power_management: Remove runpwtests0[125].sh Petr Vorel
@ 2026-03-26 13:33 ` Andrea Cervesato via ltp
2026-03-30 8:13 ` Petr Vorel
0 siblings, 1 reply; 8+ messages in thread
From: Andrea Cervesato via ltp @ 2026-03-26 13:33 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp, automated-testing
Hi Petr,
> runpwtests05.sh was disabled since 2015 anyway.
> Remove also pm_sched_domain.py and pm_get_sched_values.c (used only by
pm_sched_domain.py is never deleted by this patch but it's stated in the
commit message.
Otherwise LGTM and
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [LTP] [PATCH 1/2] runpwtests03.sh: Replace modprobe -l to lsmod
2026-03-18 13:26 ` [LTP] [PATCH 1/2] runpwtests03.sh: Replace modprobe -l to lsmod Petr Vorel
@ 2026-03-26 13:41 ` Andrea Cervesato via ltp
2026-03-30 8:10 ` Petr Vorel
0 siblings, 1 reply; 8+ messages in thread
From: Andrea Cervesato via ltp @ 2026-03-26 13:41 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp, automated-testing
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [LTP] [PATCH 1/2] runpwtests03.sh: Replace modprobe -l to lsmod
2026-03-26 13:41 ` Andrea Cervesato via ltp
@ 2026-03-30 8:10 ` Petr Vorel
0 siblings, 0 replies; 8+ messages in thread
From: Petr Vorel @ 2026-03-30 8:10 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: automated-testing, ltp
Hi Andrea,
thanks, merged this patch.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [LTP] [PATCH 2/2] power_management: Remove runpwtests0[125].sh
2026-03-26 13:33 ` Andrea Cervesato via ltp
@ 2026-03-30 8:13 ` Petr Vorel
0 siblings, 0 replies; 8+ messages in thread
From: Petr Vorel @ 2026-03-30 8:13 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: automated-testing, ltp
Hi all,
> Hi Petr,
> > runpwtests05.sh was disabled since 2015 anyway.
> > Remove also pm_sched_domain.py and pm_get_sched_values.c (used only by
> pm_sched_domain.py is never deleted by this patch but it's stated in the
> commit message.
+1
> Otherwise LGTM and
I actually found some 2 years old Cyril's patch which deletes even more tests.
I pointed out something missing, I'll resent the commit with followup.
https://patchwork.ozlabs.org/project/ltp/patch/20240916113308.16749-1-chrubis@suse.cz/
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-03-30 8:13 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18 13:26 [LTP] [PATCH 0/2] power_management: cleanup Petr Vorel
2026-03-18 13:26 ` [LTP] [PATCH 1/2] runpwtests03.sh: Replace modprobe -l to lsmod Petr Vorel
2026-03-26 13:41 ` Andrea Cervesato via ltp
2026-03-30 8:10 ` Petr Vorel
2026-03-18 13:26 ` [LTP] [PATCH 2/2] power_management: Remove runpwtests0[125].sh Petr Vorel
2026-03-26 13:33 ` Andrea Cervesato via ltp
2026-03-30 8:13 ` Petr Vorel
2026-03-18 13:44 ` [LTP] [PATCH 0/2] power_management: cleanup Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox