Skip to content

Commit

Permalink
Extract common cgroup name into a variable
Browse files Browse the repository at this point in the history
Signed-off-by: posutsai <posutsai@gmail.com>
  • Loading branch information
posutsai committed Sep 18, 2024
1 parent c1781f4 commit c7a1995
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/contest/contest/src/tests/cgroups/cpu/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,32 +255,33 @@ fn test_relative_cpus() -> TestResult {

test_outside_container(spec, &|data| {
test_result!(check_container_created(&data));
let cgroup_name = "test_relative_cpus";
test_result!(check_cgroup_subsystem(
"test_relative_cpus",
cgroup_name,
"cpu,cpuacct",
"cpu.shares",
&case.shares().unwrap(),
));
test_result!(check_cgroup_subsystem(
"test_relative_cpus",
cgroup_name,
"cpu,cpuacct",
"cpu.cfs_period_us",
&case.period().unwrap(),
));
test_result!(check_cgroup_subsystem(
"test_relative_cpus",
cgroup_name,
"cpu,cpuacct",
"cpu.cfs_quota_us",
&case.quota().unwrap(),
));
test_result!(check_cgroup_subsystem(
"test_relative_cpus",
cgroup_name,
"cpuset",
"cpuset.cpus",
&case.cpus().to_owned().unwrap(),
));
test_result!(check_cgroup_subsystem(
"test_relative_cpus",
cgroup_name,
"cpuset",
"cpuset.mems",
&case.mems().to_owned().unwrap()
Expand Down

0 comments on commit c7a1995

Please sign in to comment.