mirror of
				https://github.com/opencontainers/runc.git
				synced 2025-10-31 11:06:21 +08:00 
			
		
		
		
	 e49c1dc559
			
		
	
	e49c1dc559
	
	
	
		
			
			Currently we parse /proc/self/cgroup for each controller. It's ineffective. Signed-off-by: Andrey Vagin <avagin@openvz.org>
		
			
				
	
	
		
			19 lines
		
	
	
		
			236 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			236 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // +build linux
 | |
| 
 | |
| package cgroups
 | |
| 
 | |
| import (
 | |
| 	"testing"
 | |
| )
 | |
| 
 | |
| func TestParseCgroups(t *testing.T) {
 | |
| 	cgroups, err := ParseCgroupFile("/proc/self/cgroup")
 | |
| 	if err != nil {
 | |
| 		t.Fatal(err)
 | |
| 	}
 | |
| 
 | |
| 	if _, ok := cgroups["cpu"]; !ok {
 | |
| 		t.Fail()
 | |
| 	}
 | |
| }
 |