add support for cpuset.mems

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 8077b2fb805c78cee642d8350df88227c6414960
Component: engine
This commit is contained in:
Qiang Huang
2015-04-15 09:33:46 +08:00
parent 0a58c2bd69
commit 4f6ebaa34e
11 changed files with 59 additions and 2 deletions
@@ -1367,7 +1367,7 @@ func TestRunWithCpuset(t *testing.T) {
cmd := exec.Command(dockerBinary, "run", "--cpuset", "0", "busybox", "true")
if code, err := runCommand(cmd); err != nil || code != 0 {
t.Fatalf("container should run successfuly with cpuset of 0: %s", err)
t.Fatalf("container should run successfully with cpuset of 0: %s", err)
}
logDone("run - cpuset 0")
@@ -1378,12 +1378,23 @@ func TestRunWithCpusetCpus(t *testing.T) {
cmd := exec.Command(dockerBinary, "run", "--cpuset-cpus", "0", "busybox", "true")
if code, err := runCommand(cmd); err != nil || code != 0 {
t.Fatalf("container should run successfuly with cpuset-cpus of 0: %s", err)
t.Fatalf("container should run successfully with cpuset-cpus of 0: %s", err)
}
logDone("run - cpuset-cpus 0")
}
func TestRunWithCpusetMems(t *testing.T) {
defer deleteAllContainers()
cmd := exec.Command(dockerBinary, "run", "--cpuset-mems", "0", "busybox", "true")
if code, err := runCommand(cmd); err != nil || code != 0 {
t.Fatalf("container should run successfully with cpuset-mems of 0: %s", err)
}
logDone("run - cpuset-mems 0")
}
func TestRunDeviceNumbers(t *testing.T) {
defer deleteAllContainers()