diff --git a/runsc/container/trace_test.go b/runsc/container/trace_test.go index 2a117f4c8..9a98af330 100644 --- a/runsc/container/trace_test.go +++ b/runsc/container/trace_test.go @@ -370,11 +370,11 @@ func TestProcfsDump(t *testing.T) { t.Errorf("expected CWD %q, got %q", spec.Process.Cwd, procfsDump[0].CWD) } - // Expect 3 host FDs for stdout, stdin and stderr. - if len(procfsDump[0].FDs) != 3 { - t.Errorf("expected 3 FDs for the sleep process, got %+v", procfsDump[0].FDs) + // Expect at least 3 host FDs for stdout, stdin and stderr. + if len(procfsDump[0].FDs) < 3 { + t.Errorf("expected at least 3 FDs for the sleep process, got %+v", procfsDump[0].FDs) } else { - for i, fd := range procfsDump[0].FDs { + for i, fd := range procfsDump[0].FDs[:3] { if want := int32(i); fd.Number != want { t.Errorf("expected FD number %d, got %d", want, fd.Number) }