[LTP] controllers/cpuacct: Dynamically adjust cpuacct_task execution time

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Mon Aug 10 07:28:00 CEST 2026


Hi Wake,

On Mon, 10 Aug 2026, Wake Liu wrote:
> controllers/cpuacct: Dynamically adjust cpuacct_task execution time

> +	local duration=$((100000 / nbprocess))

Could nbprocess be validated as a positive integer at the start of setup()?
It comes directly from the second command-line argument, while TST_POS_ARGS
checks only the argument count. With `cpuacct.sh 1 0` (or nonnumeric input),
dash treats the arithmetic error as fatal, so execution bypasses
_tst_do_cleanup() after setup has created and possibly mounted the cgroup
hierarchy, leaving those resources behind.

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