Linux Test Project
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Wei Gao <wegao@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1] sched_rr_get_interval01.c: Put test process into absolute root cgroup (0::/)
Date: Thu, 5 Jun 2025 15:14:22 +0200	[thread overview]
Message-ID: <aEGYLuTen03bfAvr@yuki.lan> (raw)
In-Reply-To: <20250605142943.229010-1-wegao@suse.com>

Hi!
> diff --git a/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c b/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c
> index b4d75bdcc..55516ec89 100644
> --- a/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c
> +++ b/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c
> @@ -43,6 +43,12 @@ static void setup(void)
>  
>  	tp.type = tv->ts_type;
>  
> +	if (access("/sys/fs/cgroup/cgroup.controllers", F_OK) == 0) {
> +		int pid = getpid();
> +
> +		SAFE_FILE_PRINTF("/sys/fs/cgroup/cgroup.procs", "%d", pid);
> +	}
> +

If we are going to fix more than one test it would make sense to put
this code somewhere in a common header in the top level include/.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2025-06-05 13:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05 14:29 [LTP] [PATCH v1] sched_rr_get_interval01.c: Put test process into absolute root cgroup (0::/) Wei Gao via ltp
2025-06-05  9:40 ` Petr Vorel
2025-06-05 11:17   ` Andrea Cervesato via ltp
     [not found]   ` <orzx7vfokvwuceowwjctea4yvujn75djunyhsqvdfr5bw7kqe7@rkn5tlnzwllu>
2025-06-07  4:01     ` Wei Gao via ltp
2025-06-07 18:42     ` Wei Gao via ltp
     [not found]       ` <rugkmu3bcsrqgehibgy3dn7nsisuv6lip7b5cmo3bewq4zjcdn@zuo6hg25pqyz>
2025-06-09 13:33         ` Petr Vorel
2025-06-05 13:14 ` Cyril Hrubis [this message]
2025-06-10 22:14 ` [LTP] [PATCH v2] tst_cgroup.c: Skip cases which testing cgroup v2 with CONFIG_RT_GROUP_SCHED=y Wei Gao via ltp
2025-08-22  1:38   ` Li Wang via ltp
2025-08-22  1:42     ` Li Wang via ltp

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=aEGYLuTen03bfAvr@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=wegao@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox