power_management: rewrite runpwtests04.sh in C
PATCH 1/1 power_management: rewrite runpwtests04.sh in C
Convert the cpuidle sysfs smoke test from shell to C using the modern LTP test API.
The new implementation preserves the original test semantics while removing shell dependencies.
--- testcases/kernel/power_management/.gitignore | 1 + testcases/kernel/power_management/cpuidle01.c | 52 +++++++++++++++++ .../kernel/power_management/runpwtests04.sh | 58 ------------------- 3 files changed, 53 insertions(+), 58 deletions(-) create mode 100644 testcases/kernel/power_management/.gitignore create mode 100644 testcases/kernel/power_management/cpuidle01.c delete mode 100755 testcases/kernel/power_management/runpwtests04.sh
testcases/kernel/power_management/.gitignore new file +1 -0
@@ -0,0 +1 @@ +/cpuidle01
testcases/kernel/power_management/cpuidle01.c new file +52 -0
52 lines not on this page · raw message
testcases/kernel/power_management/runpwtests04.sh deleted +0 -58
58 lines not on this page · raw message
--
2.43.0
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Jinseok,
Quoted 7 lines · Jinseok Kim
power_management: rewriterunpwtests04.shin CConvert the cpuidle sysfs smoke test from shell to C using the modern LTP test API.
The new implementation preserves the original test semantics while removing shell dependencies.
The commit body needs a sentence on *why* the conversion is being done now — what problem or goal motivates it (e.g. old API retirement, CI coverage gap, etc.).
[...]
testcases/kernel/power_management/cpuidle01.c line 46
Quoted 5 lines
testcases/kernel/power_management/cpuidle01.c new file +5
-0+static void setup (void ) +{ +if (access (CPUIDLE_PATH ,R_OK )) +tst_brk (TCONF ,"%s is not available" ,CPUIDLE_PATH ); +}
The runtest file was not updated. runpwtests04 runpwtests04.sh in runtest/power_management_tests still points to the deleted shell script. Replace it with cpuidle01 cpuidle01.
---
Note:
Our agent completed the review of the patch. The full review can be found at: https://github.com/linux-test-project/ltp-agent/actions/runs/25997280181
The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp