test: ignore named hierarchies for cgroups=split

ignore named hierarchies for the --cgroups=split test as crun does not
set it.

Closes: https://github.com/containers/podman/pull/9302#issuecomment-784157272

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2021-02-23 14:09:10 +01:00
parent 96fc9d983e
commit 3947feb4b0
No known key found for this signature in database
GPG Key ID: E4730F97F60286ED
1 changed files with 3 additions and 2 deletions

View File

@ -1228,9 +1228,10 @@ USER mail`
for _, line := range lines {
parts := strings.SplitN(line, ":", 3)
if !CGROUPSV2 {
// ignore unified on cgroup v1
// ignore unified on cgroup v1.
// both runc and crun do not set it.
if parts[1] == "" {
// crun does not set named hierarchies.
if parts[1] == "" || strings.Contains(parts[1], "name=") {
continue
}
}