[LTP] pmc_core: add test for pkgc_blocker_residency_show

Andrea Cervesato andrea.cervesato@suse.com
Thu Aug 13 09:05:40 CEST 2026


Hi Piotr,

> 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
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

the review is correct. Please send v2

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com


More information about the ltp mailing list