[LTP] pmc_core: add test for pkgc_blocker_residency_show
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Tue Aug 11 19:10:05 CEST 2026
Hi Piotr,
On August 11, 2026, Piotr Kubaj wrote:
> pmc_core: add test for pkgc_blocker_residency_show
> /*
> * Interval between the two samples. The PMT telemetry region behind these
> * counters refreshes at roughly 1s granularity: measured on Nova Lake, no
> * counter moved over 200ms or 500ms, while 5 of 28 moved over 1s. Sample well
> * past that so a static counter means "idle source", not "not refreshed yet".
> */
> #define SAMPLE_DELAY_US 2000000
> ...
> usleep(SAMPLE_DELAY_US);
Could this use bounded exponential-backoff polling instead? The fixed sleep is
being used to synchronize the second sample with the asynchronous telemetry
refresh, which violates the no sleep-based synchronization rule.
> if (sscanf(line, "%63s %u", name, &value) != 2) {
> tst_res(TFAIL, "malformed counter line: '%s'", line);
> continue;
> }
>
> if (strncmp(name, PREFIX, sizeof(PREFIX) - 1)) {
Could this validate the complete line and require a nonempty source suffix?
The current conversion accepts signed values, trailing tokens, and the bare
name "PKGC_BLOCK_RESIDENCY_". If both snapshots contain such a line, it is
recorded as a valid counter and the test can pass despite malformed output.
> .needs_root = 1,
Could the high-level description explain why root is required? Tests setting
needs_root must document the reason in the exported test description.
> high_freq_hwp_cap_cppc
> cpufreq_intel
> rfim01
> +pkgc_blocker_residency_show
Could the new entry be inserted alphabetically? Leaf .gitignore entries are
required to remain sorted.
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
More information about the ltp
mailing list