From: Wake Liu via ltp <ltp@lists.linux.it>
To: ltp@lists.linux.it
Cc: Wake Liu <wakel@google.com>
Subject: [LTP] [PATCH] controllers/cpuacct_task: Increase execution time to 100ms
Date: Mon, 10 Aug 2026 03:39:21 +0000 [thread overview]
Message-ID: <20260810033921.1694744-1-wakel@google.com> (raw)
The test helper cpuacct_task currently runs for 10ms (virtual time)
before exiting. On some systems (e.g. fast virtual machines or under
heavy load), this short duration can lead to 0 usage being recorded in
cpuacct.usage cgroup file due to timing resolution or scheduling delay.
Increase the execution time to 100ms to ensure that the process runs
long enough to register a non-zero CPU usage, reducing flakiness of the
test.
Signed-off-by: Wake Liu <wakel@google.com>
---
testcases/kernel/controllers/cpuacct/cpuacct_task.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/controllers/cpuacct/cpuacct_task.c b/testcases/kernel/controllers/cpuacct/cpuacct_task.c
index 677d6d401..9519bd9b3 100644
--- a/testcases/kernel/controllers/cpuacct/cpuacct_task.c
+++ b/testcases/kernel/controllers/cpuacct/cpuacct_task.c
@@ -62,7 +62,7 @@ int main(int argc, char **argv)
return 1;
}
- struct itimerval it = {.it_value = {.tv_sec = 0, .tv_usec = 10000}};
+ struct itimerval it = {.it_value = {.tv_sec = 0, .tv_usec = 100000}};
setitimer(ITIMER_VIRTUAL, &it, NULL);
for (;;);
--
2.55.0.654.g21b8a5bc05-goog
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next reply other threads:[~2026-08-10 3:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 3:39 Wake Liu via ltp [this message]
2026-08-10 3:55 ` [LTP] controllers/cpuacct_task: Increase execution time to 100ms linuxtestproject.agent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260810033921.1694744-1-wakel@google.com \
--to=ltp@lists.linux.it \
--cc=wakel@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.