package fs

import "github.com/dotcloud/docker/pkg/libcontainer/cgroups/fs"

Utility for testing cgroup operations.

Creates a mock of the cgroup filesystem for the duration of the test.

Index

Variables

var (
	ErrNotSupportStat = errors.New("stats are not supported for subsystem")
	ErrNotValidFormat = errors.New("line is not a valid key value format")
)

Functions

func Apply

func Apply(c *cgroups.Cgroup, pid int) (cgroups.ActiveCgroup, error)

func Freeze

func Freeze(c *cgroups.Cgroup, state cgroups.FreezerState) error

Freeze toggles the container's freezer cgroup depending on the state provided

func GetPids

func GetPids(c *cgroups.Cgroup) ([]int, error)

func GetStats

func GetStats(c *cgroups.Cgroup) (*cgroups.Stats, error)

func NewCgroupTestUtil

func NewCgroupTestUtil(subsystem string, t *testing.T) *cgroupTestUtil

Creates a new test util for the specified subsystem

Source Files

apply_raw.go blkio.go cpu.go cpuacct.go cpuset.go devices.go freezer.go memory.go perf_event.go stats_test_util.go test_util.go utils.go

Version
v1.0.0
Published
Jun 8, 2014
Platform
linux/amd64
Imports
16 packages
Last checked
9 minutes ago

Tools for package owners.