[LTP] [PATCH v1] sched_rr_get_interval01.c: Put test process into absolute root cgroup (0::/)

Cyril Hrubis chrubis@suse.cz
Thu Jun 5 15:14:22 CEST 2025


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


More information about the ltp mailing list