diff --git a/internal/test/daemon/daemon_unix.go b/internal/test/daemon/daemon_unix.go index 9dd9e36f0c..eb604fec75 100644 --- a/internal/test/daemon/daemon_unix.go +++ b/internal/test/daemon/daemon_unix.go @@ -21,7 +21,7 @@ func cleanupNetworkNamespace(t testingT, execRoot string) { // new exec root. netnsPath := filepath.Join(execRoot, "netns") filepath.Walk(netnsPath, func(path string, info os.FileInfo, err error) error { - if err := unix.Unmount(path, unix.MNT_FORCE); err != nil { + if err := unix.Unmount(path, unix.MNT_DETACH); err != nil && err != unix.EINVAL && err != unix.ENOENT { t.Logf("unmount of %s failed: %v", path, err) } os.Remove(path)