mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
libnetwork: fix TestParallel "bad file descriptor"
When running inside a container, testns == origns. Consequently, closing testns causes the deferred netns.Set(origns) call to fail. Stop closing the aliased original namespace handle. Signed-off-by: Cory Snider <csnider@mirantis.com>
This commit is contained in:
parent
fe6706a2ce
commit
f39b83e232
1 changed files with 3 additions and 1 deletions
|
@ -1046,7 +1046,9 @@ func runParallelTests(t *testing.T, thrNumber int) {
|
||||||
<-thrdone
|
<-thrdone
|
||||||
}
|
}
|
||||||
|
|
||||||
testns.Close()
|
if testns != origins {
|
||||||
|
testns.Close()
|
||||||
|
}
|
||||||
if err := net2.Delete(); err != nil {
|
if err := net2.Delete(); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue