✗ Check CPU constraints
(in test file k8s-cpu-ns.bats, line 52)
`-- sh -c "cat $sharessyspath")' failed
INFO: k8s configured to use runtimeclass
pod/constraints-cpu-test created
pod/constraints-cpu-test condition met
cat: can't open '/sys/fs/cgroup/cpu/cpu.shares': No such file or directory
command terminated with exit code 1
Name: constraints-cpu-test
Description of problem
The current k8s-cpu-ns.bats test is cgroup-specific. For example, the test expects
/sys/fs/cgroup/cpu/cpu.shares
to present, which does not exist when cgroup2 is used (more specifically, whenunified_cgroup_hierarchy
istrue
per https://github.com/confidential-containers/kata-containers-CCv0/blob/ffdd7e1ad8da4dff39949639601ad95ecf7f44c9/src/agent/src/mount.rs#L888).Expected result
Test passes
Actual result