Skip to content

Conversation

smuppand
Copy link
Contributor

Why

  • Previous discovery-based runs occasionally picked up irrelevant binaries and skewed coverage. We also needed consistent CI gating that respects the service state and presence of required configs without generating false negatives.

What’s in this PR

  • Pinned whitelist execution: runs only the approved /usr/bin/*Tests plus /usr/bin/resource_tuner_tests.

  • Early service gate: uses repo helper check_systemd_services(resource-tuner.service); if inactive → overall SKIP (no tests run).

Config-aware SKIPs:

  • Parser suites require either common/ or custom/:

  • common/: InitConfig.yaml, PropertiesConfig.yaml, ResourcesConfig.yaml, SignalsConfig.yaml

  • custom/: InitConfig.yaml, PropertiesConfig.yaml, ResourcesConfig.yaml, SignalsConfig.yaml, TargetConfig.yaml, ExtFeaturesConfig.yaml

  • resource_tuner_tests also requires tests/Configs/ResourceSysFsNodes (non-empty).

  • If requirements aren’t met for a suite, that suite is SKIP only; others continue.

Strict gating:

  • Any FAIL ⇒ overall FAIL

  • No FAIL & ≥1 PASS ⇒ overall PASS

  • No FAIL & 0 PASS (all skipped) ⇒ overall SKIP

Resilient runner:

  • Per-suite logs (.log) and result markers (.res)

  • Coverage reports (coverage.txt, missing_bins.txt) and counts

  • logs/resource-tuner-latest symlink to newest run

  • dmesg snapshot captured at start; optional warn-only scanners if toolchain provides them

  • Concurrency lock via flock (or dir fallback)

  • Optional per-suite timeouts via run_with_timeout if present (ThreadPool/RateLimiter 1800s; resource_tuner_tests 2400s; default 1200s)

Operator-friendly CLI:

  • --all (default), --bin <name|path>, --list, --timeout

  • Environment overrides:

  • SERVICE_NAME, RT_CONFIG_DIR

  • RT_REQUIRE_COMMON_FILES, RT_REQUIRE_CUSTOM_FILES (space-separated lists)

…strict CI gating

- Run ONLY the pinned /usr/bin test binaries (no broad discovery)
- Gate early on systemd via check_systemd_services(resource-tuner.service)
- Config preflight for /etc/resource-tuner/{common,custom}
  - Accept common/ OR custom/ for parser suites; skip only if BOTH missing
  - resource_tuner_tests also requires tests/Configs/ResourceSysFsNodes
- Missing binaries -> per-suite SKIP (continue)
- Skips are neutral: overall FAIL if any suite fails; else PASS if any pass; else SKIP
- dmesg snapshot for context; optional post-run journal/dmesg scans (warn-only)
- Concurrency-safe via flock/dir lock
- Optional timeouts via run_with_timeout if available (suite-specific defaults)
- CLI: --all (default), --bin, --list, --timeout
- Env overrides: SERVICE_NAME, RT_CONFIG_DIR, RT_REQUIRE_COMMON_FILES, RT_REQUIRE_CUSTOM_FILES
- Add README.md documenting policy, inputs, outputs, and troubleshooting
- Add plans/resource-tuner-ci.yaml to enable the Lava CI

Signed-off-by: Srikanth Muppandam <[email protected]>
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.

Looks good to me

@abbajaj806 abbajaj806 merged commit 8c93e63 into qualcomm-linux:main Sep 24, 2025
8 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.

2 participants