|
@@ -18,8 +18,7 @@ func cleanupNetworkNamespace(t testing.TB, d *Daemon) {
|
|
// daemon instance and has no chance of getting
|
|
// daemon instance and has no chance of getting
|
|
// cleaned up when a new daemon is instantiated with a
|
|
// cleaned up when a new daemon is instantiated with a
|
|
// new exec root.
|
|
// new exec root.
|
|
- netnsPath := filepath.Join(d.execRoot, "netns")
|
|
|
|
- filepath.Walk(netnsPath, func(path string, info os.FileInfo, err error) error {
|
|
|
|
|
|
+ filepath.WalkDir(filepath.Join(d.execRoot, "netns"), func(path string, _ os.DirEntry, _ error) error {
|
|
if err := unix.Unmount(path, unix.MNT_DETACH); err != nil && err != unix.EINVAL && err != unix.ENOENT {
|
|
if err := unix.Unmount(path, unix.MNT_DETACH); err != nil && err != unix.EINVAL && err != unix.ENOENT {
|
|
t.Logf("[%s] unmount of %s failed: %v", d.id, path, err)
|
|
t.Logf("[%s] unmount of %s failed: %v", d.id, path, err)
|
|
}
|
|
}
|