diff --git a/rootfs_linux.go b/rootfs_linux.go index 0cd60373c..4ddfff1fe 100644 --- a/rootfs_linux.go +++ b/rootfs_linux.go @@ -215,7 +215,6 @@ func checkMountDestination(rootfs, dest string) error { } invalidDestinations := []string{ "/proc", - "/sys", } for _, invalid := range invalidDestinations { path, err := filepath.Rel(filepath.Join(rootfs, invalid), dest) diff --git a/rootfs_linux_test.go b/rootfs_linux_test.go index 54df065cc..a3bb07708 100644 --- a/rootfs_linux_test.go +++ b/rootfs_linux_test.go @@ -15,8 +15,8 @@ func TestCheckMountDestOnProc(t *testing.T) { func TestCheckMountDestInSys(t *testing.T) { dest := "/rootfs//sys/fs/cgroup" err := checkMountDestination("/rootfs", dest) - if err == nil { - t.Fatal("destination inside proc should return an error") + if err != nil { + t.Fatal("destination inside /sys should not return an error") } }