power_management: rewrite runpwtests04.sh in C
PATCH v4 1/1 power_management: rewrite runpwtests04.sh in C
As part of the ongoing effort to reduce shell-based tests in LTP, rewrite the cpuidle sysfs smoke test in C using the modern LTP test API.
The new implementation preserves the original test semantics while removing shell dependencies.
---
Changes in v4:
- Fix patch application failure reported by CI.
- Link to v3: https://lore.kernel.org/ltp/[email protected]
Changes in v3:
- Replace SAFE_OPEN() with open() to convert ENOENT to TCONF.
- Add a cleanup function.
- Link to v2: https://lore.kernel.org/ltp/[email protected]
Changes in v2:
- Update runtest entry
- Clarify commit message
- Link to v1: https://lore.kernel.org/ltp/[email protected]
--- runtest/power_management_tests | 2 +- testcases/kernel/power_management/.gitignore | 1 + testcases/kernel/power_management/pwtests01.c | 67 +++++++++++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 testcases/kernel/power_management/pwtests01.c
runtest/power_management_tests +1 -1
@@ -1,5 +1,5 @@ #POWER_MANAGEMENT high_freq_hwp_cap_cppc high_freq_hwp_cap_cppc +pwtests01 pwtests01 runpwtests03 runpwtests03.sh -runpwtests04 runpwtests04.sh runpwtests06 runpwtests06.sh
testcases/kernel/power_management/.gitignore +1 -0
@@ -1 +1,2 @@ high_freq_hwp_cap_cppc +pwtests01
testcases/kernel/power_management/pwtests01.c new file +67 -0
67 lines not on this page · raw message
--
2.43.0
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Jinseok,
testcases/kernel/power_management/pwtests01.c
Quoted 5 lines · Jinseok Kim
power_management: rewriterunpwtests04.shin Ctestcases/kernel/power_management/pwtests01.c new file +0
-0
The old shell script runpwtests04.sh is not deleted by this patch. Since the Makefile installs all shell scripts via INSTALL_TARGETS := *.py *.sh, the orphaned script will still be installed even though its runtest entry was removed.
Should runpwtests04.sh (and potentially pm_include.sh if no other script sources it) be deleted in this patch?
Verdict - Needs revision
---
Note:
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