Browse code

Fix race detected in TestExecCgroup

Signed-off-by: Brian Goff <cpuguy83@gmail.com>

Brian Goff authored on 2015/02/14 02:18:46
Showing 1 changed files
... ...
@@ -424,7 +424,7 @@ func TestExecCgroup(t *testing.T) {
424 424
 	for i := 0; i < 5; i++ {
425 425
 		wg.Add(1)
426 426
 		go func() {
427
-			cmd = exec.Command(dockerBinary, "exec", "testing", "cat", "/proc/self/cgroup")
427
+			cmd := exec.Command(dockerBinary, "exec", "testing", "cat", "/proc/self/cgroup")
428 428
 			out, _, err := runCommandWithOutput(cmd)
429 429
 			if err != nil {
430 430
 				t.Fatal(out, err)