...

Source file src/github.com/opencontainers/runc/libcontainer/cgroups/cgroups_test.go

Documentation: github.com/opencontainers/runc/libcontainer/cgroups

     1  package cgroups
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestParseCgroups(t *testing.T) {
     8  	cgroups, err := ParseCgroupFile("/proc/self/cgroup")
     9  	if err != nil {
    10  		t.Fatal(err)
    11  	}
    12  	if IsCgroup2UnifiedMode() {
    13  		return
    14  	}
    15  	if _, ok := cgroups["cpu"]; !ok {
    16  		t.Fail()
    17  	}
    18  }
    19  

View as plain text