From 5f08f8fd8162fa2fc2ca7b862263081d8d07b206 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Tue, 22 Jan 2019 16:45:45 -0800 Subject: Don't bind-mount runsc into a sandbox mntns PiperOrigin-RevId: 230437407 Change-Id: Id9d8ceeb018aad2fe317407c78c6ee0f4b47aa2b --- runsc/test/root/chroot_test.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'runsc/test/root') diff --git a/runsc/test/root/chroot_test.go b/runsc/test/root/chroot_test.go index 04124703d..89f90c3e0 100644 --- a/runsc/test/root/chroot_test.go +++ b/runsc/test/root/chroot_test.go @@ -26,8 +26,6 @@ import ( "os" "os/exec" "path/filepath" - "reflect" - "sort" "strconv" "strings" "testing" @@ -73,16 +71,13 @@ func TestChroot(t *testing.T) { if err != nil { t.Fatalf("error listing %q: %v", chroot, err) } - if want, got := 2, len(fi); want != got { + if want, got := 1, len(fi); want != got { t.Fatalf("chroot dir got %d entries, want %d", got, want) } - // chroot dir is prepared by runsc and should contains only the executable - // and /proc. - files := []string{fi[0].Name(), fi[1].Name()} - sort.Strings(files) - if want := []string{"proc", "runsc"}; !reflect.DeepEqual(files, want) { - t.Errorf("chroot got children %v, want %v", files, want) + // chroot dir is prepared by runsc and should contains only /proc. + if fi[0].Name() != "proc" { + t.Errorf("chroot got children %v, want %v", fi[0].Name(), "proc") } d.CleanUp() -- cgit v1.2.3