Skip to content

Conversation

smuppand
Copy link
Contributor

@smuppand smuppand commented Oct 7, 2025

This PR hardens the resource-tuner runner’s service handling without changing any existing test logic or names.

Key changes:

  • Check current service state first (systemctl is-active / is-enabled) and skip redundant actions.
  • Run systemctl daemon-reload before enable/start, then:
    • Enable only if disabled.
    • Start only if not running.
  • Always print final systemctl status resource-tuner for visibility.
  • Multi-line, readable flow replacing prior one-liners, behavior is idempotent and quieter in CI.
  • If systemctl is unavailable, emit a clear warning and continue (no hard fail).

Why:

  • Avoids unnecessary service churn and noisy logs.
  • Reduces risk of races on systems where enable/start is already applied.
  • Improves debuggability by reporting final state explicitly.

@smuppand smuppand changed the title resource-tuner(run.sh): start service only when needed; guard systemctl ops resource-tuner(run.sh): start service only when needed with guard systemctl ops Oct 7, 2025
# - Else -> overall SKIP (everything skipped)
if [ "$FAIL" -gt 0 ]; then
echo "$TESTNAME FAIL" >"$RES_FILE"
exit 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fail should be exit 1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in the latest

@vnarapar
Copy link
Contributor

vnarapar commented Oct 9, 2025

Can you check if the commit message needs all the cgroups

@smuppand
Copy link
Contributor Author

smuppand commented Oct 9, 2025

Can you check if the commit message needs all the cgroups

Removed the unwanted messages from the commit message.

1 similar comment
@smuppand
Copy link
Contributor Author

smuppand commented Oct 9, 2025

Can you check if the commit message needs all the cgroups

Removed the unwanted messages from the commit message.

- Check current state first (systemctl is-active/is-enabled) skip if active.
- Enable only when disabled, run daemon-reload before attempting start.
- Start only if not running, always print final
- Avoid redundant enable/start calls, reduces noise and race risk.
- Preserve existing PASS/SKIP policy and names, no logic changes to tests.
- Replace prior one-liners with readable multi-line flow (no behavioral change).

Signed-off-by: Srikanth Muppandam <[email protected]>
@smuppand smuppand force-pushed the resource-tuner branch 2 times, most recently from 0c95e7c to d9bc98f Compare October 9, 2025 15:34
Copy link
Contributor

@abbajaj806 abbajaj806 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abbajaj806 abbajaj806 merged commit e591bb2 into qualcomm-linux:main Oct 10, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants