Skip to content

Integration: use testenv.APIClient()#38473

Merged
thaJeztah merged 2 commits intomoby:masterfrom
thaJeztah:use_testenv_client
Jan 3, 2019
Merged

Integration: use testenv.APIClient()#38473
thaJeztah merged 2 commits intomoby:masterfrom
thaJeztah:use_testenv_client

Conversation

@thaJeztah
Copy link
Member

A client is already created in testenv.New(), so we can just as well use that one, instead of creating a new client.

@thaJeztah
Copy link
Member Author

Looks like I need a nolint comment

14:14:37 integration/network/delete_test.go:30:1:warning: context.Context should be the first parameter of a function (golint)

@thaJeztah
Copy link
Member Author

Interesting;

15:05:20 === CONT  TestMountDaemonRoot
15:05:20 fatal error: concurrent map writes
Details
15:05:20 === CONT  TestMountDaemonRoot
15:05:20 fatal error: concurrent map writes
15:05:20 
15:05:20 goroutine 702 [running]:
15:05:20 runtime.throw(0x10510018, 0x15)
15:05:20 	/usr/local/go/src/runtime/panic.go:608 +0x5c fp=0xc000aed7f8 sp=0xc000aed7b8 pc=0x1002c6ac
15:05:20 runtime.mapassign_faststr(0x10469020, 0xc0004b45a0, 0xc00059ef00, 0xe, 0xc00065a100)
15:05:20 	/usr/local/go/src/runtime/map_faststr.go:199 +0x418 fp=0xc000aed870 sp=0xc000aed7f8 pc=0x10012478
15:05:20 github.com/docker/docker/internal/test/environment.(*Execution).ProtectImage(0xc0000ee480, 0x105a6aa0, 0xc00065a100, 0xc00065b000, 0xd, 0x10)
15:05:20 	/go/src/github.com/docker/docker/internal/test/environment/protect.go:93 +0xb0 fp=0xc000aed8f0 sp=0xc000aed870 pc=0x1039cbd0
15:05:20 github.com/docker/docker/internal/test/environment.ProtectImages(0x105a6aa0, 0xc00065a100, 0xc0000ee480)
15:05:20 	/go/src/github.com/docker/docker/internal/test/environment/protect.go:108 +0x190 fp=0xc000aed988 sp=0xc000aed8f0 pc=0x1039cda0
15:05:20 github.com/docker/docker/internal/test/environment.ProtectAll(0x105a6aa0, 0xc00065a100, 0xc0000ee480)
15:05:20 	/go/src/github.com/docker/docker/internal/test/environment/protect.go:41 +0x8c fp=0xc000aed9f8 sp=0xc000aed988 pc=0x1039c5bc
15:05:20 github.com/docker/docker/integration/container.setupTest(0xc00065a100, 0x48)
15:05:20 	/go/src/github.com/docker/docker/integration/container/main_test.go:31 +0x44 fp=0xc000aeda30 sp=0xc000aed9f8 pc=0x103d57f4
15:05:20 github.com/docker/docker/integration/container.TestUpdateCPUQuota(0xc00065a100)
15:05:20 	/go/src/github.com/docker/docker/integration/container/update_linux_test.go:71 +0x48 fp=0xc000aedf70 sp=0xc000aeda30 pc=0x103e3298
15:05:21 testing.tRunner(0xc00065a100, 0x10527b40)
15:05:21 	/usr/local/go/src/testing/testing.go:827 +0xc0 fp=0xc000aedfb0 sp=0xc000aedf70 pc=0x100ee910
15:05:21 runtime.goexit()
15:05:21 	/usr/local/go/src/runtime/asm_ppc64x.s:784 +0x4 fp=0xc000aedfb0 sp=0xc000aedfb0 pc=0x1005be74
15:05:21 created by testing.(*T).Run
15:05:21 	/usr/local/go/src/testing/testing.go:878 +0x2e8
15:05:21 
15:05:21 goroutine 1 [chan receive]:
15:05:21 testing.tRunner.func1(0xc000636200)
15:05:21 	/usr/local/go/src/testing/testing.go:803 +0x1d8
15:05:21 testing.tRunner(0xc000636200, 0xc000665d40)
15:05:21 	/usr/local/go/src/testing/testing.go:831 +0xd0
15:05:21 testing.runTests(0xc00000e580, 0x108ca300, 0x4d, 0x4d, 0xc00066c0c0)
15:05:21 	/usr/local/go/src/testing/testing.go:1117 +0x27c
15:05:21 testing.(*M).Run(0xc000128400, 0x0)
15:05:21 	/usr/local/go/src/testing/testing.go:1034 +0x150
15:05:21 github.com/docker/docker/integration/container.TestMain(0xc000128400)
15:05:21 	/go/src/github.com/docker/docker/integration/container/main_test.go:27 +0x110
15:05:21 main.main()
15:05:21 	_testmain.go:192 +0x134
15:05:21 
15:05:21 goroutine 19 [syscall, 1 minutes]:
15:05:21 os/signal.signal_recv(0x0)
15:05:21 	/usr/local/go/src/runtime/sigqueue.go:139 +0xfc
15:05:21 os/signal.loop()
15:05:21 	/usr/local/go/src/os/signal/signal_unix.go:23 +0x24
15:05:21 created by os/signal.init.0
15:05:21 	/usr/local/go/src/os/signal/signal_unix.go:29 +0x3c
15:05:21 
15:05:21 goroutine 7 [select, 1 minutes]:
15:05:21 net/http.(*persistConn).readLoop(0xc0000d6360)
15:05:21 	/usr/local/go/src/net/http/transport.go:1761 +0x588
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1338 +0x8a0
15:05:21 
15:05:21 goroutine 8 [select, 1 minutes]:
15:05:21 net/http.(*persistConn).writeLoop(0xc0000d6360)
15:05:21 	/usr/local/go/src/net/http/transport.go:1885 +0xd4
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1339 +0x8c0
15:05:21 
15:05:21 goroutine 101 [select]:
15:05:21 github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithLogFile(0xc0007ac500, 0xc000010250, 0xc00008fab0, 0x1, 0x1, 0x0, 0x0)
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:301 +0x9d0
15:05:21 github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithError(0xc0007ac500, 0xc00008fab0, 0x1, 0x1, 0xc000712200, 0x1)
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:219 +0x1a8
15:05:21 github.com/docker/docker/internal/test/daemon.(*Daemon).Start(0xc0007ac500, 0x105a6a60, 0xc000712200, 0xc00008fab0, 0x1, 0x1)
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:206 +0x7c
15:05:21 github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithBusybox(0xc0007ac500, 0x105a6a60, 0xc000712200, 0xc00008fab0, 0x1, 0x1)
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:346 +0x88
15:05:21 github.com/docker/docker/integration/container.TestContainerStartOnDaemonRestart(0xc000712200)
15:05:21 	/go/src/github.com/docker/docker/integration/container/daemon_linux_test.go:36 +0x27c
15:05:21 testing.tRunner(0xc000712200, 0x105278d0)
15:05:21 	/usr/local/go/src/testing/testing.go:827 +0xc0
15:05:21 created by testing.(*T).Run
15:05:21 	/usr/local/go/src/testing/testing.go:878 +0x2e8
15:05:21 
15:05:21 goroutine 253 [select, 1 minutes]:
15:05:21 net/http.(*persistConn).writeLoop(0xc000a0c000)
15:05:21 	/usr/local/go/src/net/http/transport.go:1885 +0xd4
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1339 +0x8c0
15:05:21 
15:05:21 goroutine 162 [IO wait, 1 minutes]:
15:05:21 internal/poll.runtime_pollWait(0x3fff98608e68, 0x72, 0x100929ac)
15:05:21 	/usr/local/go/src/runtime/netpoll.go:173 +0x50
15:05:21 internal/poll.(*pollDesc).wait(0xc0006f4398, 0x72, 0xffffffffffffff00, 0x105a0e40, 0x108d02c0)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xa8
15:05:21 internal/poll.(*pollDesc).waitRead(0xc0006f4398, 0xc0006fd000, 0x1000, 0x1000)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3c
15:05:21 internal/poll.(*FD).Read(0xc0006f4380, 0xc0006fd000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x15c
15:05:21 net.(*netFD).Read(0xc0006f4380, 0xc0006fd000, 0x1000, 0x1000, 0xc000687b00, 0x10058c30, 0xc000001500)
15:05:21 	/usr/local/go/src/net/fd_unix.go:202 +0x48
15:05:21 net.(*conn).Read(0xc000782408, 0xc0006fd000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/net/net.go:177 +0x68
15:05:21 net/http.(*persistConn).Read(0xc00036e120, 0xc0006fd000, 0x1000, 0x1000, 0x1027c4bc, 0x2, 0xc00031bc20)
15:05:21 	/usr/local/go/src/net/http/transport.go:1497 +0xfc
15:05:21 bufio.(*Reader).fill(0xc0006f2420)
15:05:21 	/usr/local/go/src/bufio/bufio.go:100 +0x12c
15:05:21 bufio.(*Reader).Peek(0xc0006f2420, 0x1, 0x0, 0x0, 0x1, 0xc0007ac0c0, 0x0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:132 +0x3c
15:05:21 net/http.(*persistConn).readLoop(0xc00036e120)
15:05:21 	/usr/local/go/src/net/http/transport.go:1645 +0x16c
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1338 +0x8a0
15:05:21 
15:05:21 goroutine 427 [chan send]:
15:05:21 github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithLogFile.func1(0xc000a2f5c0, 0xc000116f00)
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:282 +0x54
15:05:21 created by github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithLogFile
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:281 +0x794
15:05:21 
15:05:21 goroutine 294 [runnable]:
15:05:21 testing.callerName(0x1, 0x105289f8, 0xc000910700)
15:05:21 	/usr/local/go/src/testing/testing.go:698 +0xbc
15:05:21 testing.(*common).Helper(0xc000910700)
15:05:21 	/usr/local/go/src/testing/testing.go:685 +0x74
15:05:21 github.com/docker/docker/internal/test/environment.getExistingNetworks(0x105a5c20, 0xc000910700, 0xc0000ee480, 0x105a5c20, 0xc000910700, 0x1)
15:05:21 	/go/src/github.com/docker/docker/internal/test/environment/protect.go:169 +0x2ac
15:05:21 github.com/docker/docker/internal/test/environment.ProtectNetworks(0x105a6aa0, 0xc000910700, 0xc0000ee480)
15:05:21 	/go/src/github.com/docker/docker/internal/test/environment/protect.go:163 +0x90
15:05:21 github.com/docker/docker/internal/test/environment.ProtectAll(0x105a6aa0, 0xc000910700, 0xc0000ee480)
15:05:21 	/go/src/github.com/docker/docker/internal/test/environment/protect.go:42 +0xa8
15:05:21 github.com/docker/docker/integration/container.setupTest(0xc000910700, 0xc000910700)
15:05:21 	/go/src/github.com/docker/docker/integration/container/main_test.go:31 +0x44
15:05:21 github.com/docker/docker/integration/container.TestMountDaemonRoot(0xc000910700)
15:05:21 	/go/src/github.com/docker/docker/integration/container/mounts_linux_test.go:91 +0xcc
15:05:21 testing.tRunner(0xc000910700, 0x10527a50)
15:05:21 	/usr/local/go/src/testing/testing.go:827 +0xc0
15:05:21 created by testing.(*T).Run
15:05:21 	/usr/local/go/src/testing/testing.go:878 +0x2e8
15:05:21 
15:05:21 goroutine 666 [select]:
15:05:21 net/http.(*persistConn).writeLoop(0xc00085d560)
15:05:21 	/usr/local/go/src/net/http/transport.go:1885 +0xd4
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1339 +0x8c0
15:05:21 
15:05:21 goroutine 139 [select, 1 minutes]:
15:05:21 net/http.(*persistConn).writeLoop(0xc0008c9440)
15:05:21 	/usr/local/go/src/net/http/transport.go:1885 +0xd4
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1339 +0x8c0
15:05:21 
15:05:21 goroutine 163 [select, 1 minutes]:
15:05:21 net/http.(*persistConn).writeLoop(0xc00036e120)
15:05:21 	/usr/local/go/src/net/http/transport.go:1885 +0xd4
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1339 +0x8c0
15:05:21 
15:05:21 goroutine 138 [select, 1 minutes]:
15:05:21 net/http.(*persistConn).readLoop(0xc0008c9440)
15:05:21 	/usr/local/go/src/net/http/transport.go:1761 +0x588
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1338 +0x8a0
15:05:21 
15:05:21 goroutine 114 [IO wait]:
15:05:21 internal/poll.runtime_pollWait(0x3fff98608b28, 0x72, 0x100929ac)
15:05:21 	/usr/local/go/src/runtime/netpoll.go:173 +0x50
15:05:21 internal/poll.(*pollDesc).wait(0xc000129918, 0x72, 0xffffffffffffff00, 0x105a0e40, 0x108d02c0)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xa8
15:05:21 internal/poll.(*pollDesc).waitRead(0xc000129918, 0xc000716000, 0x1000, 0x1000)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3c
15:05:21 internal/poll.(*FD).Read(0xc000129900, 0xc000716000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x15c
15:05:21 net.(*netFD).Read(0xc000129900, 0xc000716000, 0x1000, 0x1000, 0xc000683b00, 0x10058c30, 0xc000001500)
15:05:21 	/usr/local/go/src/net/fd_unix.go:202 +0x48
15:05:21 net.(*conn).Read(0xc00062e2a8, 0xc000716000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/net/net.go:177 +0x68
15:05:21 net/http.(*persistConn).Read(0xc00031a480, 0xc000716000, 0x1000, 0x1000, 0x1027c4bc, 0x2, 0xc0000d6240)
15:05:21 	/usr/local/go/src/net/http/transport.go:1497 +0xfc
15:05:21 bufio.(*Reader).fill(0xc00000d7a0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:100 +0x12c
15:05:21 bufio.(*Reader).Peek(0xc00000d7a0, 0x1, 0x0, 0x0, 0x1, 0xc000667680, 0x0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:132 +0x3c
15:05:21 net/http.(*persistConn).readLoop(0xc00031a480)
15:05:21 	/usr/local/go/src/net/http/transport.go:1645 +0x16c
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1338 +0x8a0
15:05:21 
15:05:21 goroutine 115 [select]:
15:05:21 net/http.(*persistConn).writeLoop(0xc00031a480)
15:05:21 	/usr/local/go/src/net/http/transport.go:1885 +0xd4
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1339 +0x8c0
15:05:21 
15:05:21 goroutine 123 [IO wait, 1 minutes]:
15:05:21 internal/poll.runtime_pollWait(0x3fff98608bf8, 0x72, 0x100929ac)
15:05:21 	/usr/local/go/src/runtime/netpoll.go:173 +0x50
15:05:21 internal/poll.(*pollDesc).wait(0xc00037ae18, 0x72, 0xffffffffffffff00, 0x105a0e40, 0x108d02c0)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xa8
15:05:21 internal/poll.(*pollDesc).waitRead(0xc00037ae18, 0xc000357000, 0x1000, 0x1000)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3c
15:05:21 internal/poll.(*FD).Read(0xc00037ae00, 0xc000357000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x15c
15:05:21 net.(*netFD).Read(0xc00037ae00, 0xc000357000, 0x1000, 0x1000, 0x0, 0x4, 0x0)
15:05:21 	/usr/local/go/src/net/fd_unix.go:202 +0x48
15:05:21 net.(*conn).Read(0xc00062e898, 0xc000357000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/net/net.go:177 +0x68
15:05:21 net/http.(*persistConn).Read(0xc00031be60, 0xc000357000, 0x1000, 0x1000, 0x2, 0x2, 0xc00031bd40)
15:05:21 	/usr/local/go/src/net/http/transport.go:1497 +0xfc
15:05:21 bufio.(*Reader).fill(0xc0006939e0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:100 +0x12c
15:05:21 bufio.(*Reader).Peek(0xc0006939e0, 0x1, 0x2, 0x0, 0x0, 0xc000768b40, 0x0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:132 +0x3c
15:05:21 net/http.(*persistConn).readLoop(0xc00031be60)
15:05:21 	/usr/local/go/src/net/http/transport.go:1645 +0x16c
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1338 +0x8a0
15:05:21 
15:05:21 goroutine 124 [select, 1 minutes]:
15:05:21 net/http.(*persistConn).writeLoop(0xc00031be60)
15:05:21 	/usr/local/go/src/net/http/transport.go:1885 +0xd4
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1339 +0x8c0
15:05:21 
15:05:21 goroutine 321 [chan send]:
15:05:21 github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithLogFile.func1(0xc0006f8720, 0xc0007ac000)
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:282 +0x54
15:05:21 created by github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithLogFile
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:281 +0x794
15:05:21 
15:05:21 goroutine 252 [IO wait, 1 minutes]:
15:05:21 internal/poll.runtime_pollWait(0x3fff98608cc8, 0x72, 0x100929ac)
15:05:21 	/usr/local/go/src/runtime/netpoll.go:173 +0x50
15:05:21 internal/poll.(*pollDesc).wait(0xc000a08298, 0x72, 0xffffffffffffff00, 0x105a0e40, 0x108d02c0)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xa8
15:05:21 internal/poll.(*pollDesc).waitRead(0xc000a08298, 0xc0009c9000, 0x1000, 0x1000)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3c
15:05:21 internal/poll.(*FD).Read(0xc000a08280, 0xc0009c9000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x15c
15:05:21 net.(*netFD).Read(0xc000a08280, 0xc0009c9000, 0x1000, 0x1000, 0xc000760b00, 0x10058c30, 0xc0000a3200)
15:05:21 	/usr/local/go/src/net/fd_unix.go:202 +0x48
15:05:21 net.(*conn).Read(0xc00062f0a8, 0xc0009c9000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/net/net.go:177 +0x68
15:05:21 net/http.(*persistConn).Read(0xc000a0c000, 0xc0009c9000, 0x1000, 0x1000, 0x1027c4bc, 0x2, 0xc00065fe60)
15:05:21 	/usr/local/go/src/net/http/transport.go:1497 +0xfc
15:05:21 bufio.(*Reader).fill(0xc0007bd3e0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:100 +0x12c
15:05:21 bufio.(*Reader).Peek(0xc0007bd3e0, 0x1, 0x0, 0x0, 0x1, 0xc000847680, 0x0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:132 +0x3c
15:05:21 net/http.(*persistConn).readLoop(0xc000a0c000)
15:05:21 	/usr/local/go/src/net/http/transport.go:1645 +0x16c
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1338 +0x8a0
15:05:21 
15:05:21 goroutine 274 [IO wait, 1 minutes]:
15:05:21 internal/poll.runtime_pollWait(0x3fff98608f38, 0x72, 0x100929ac)
15:05:21 	/usr/local/go/src/runtime/netpoll.go:173 +0x50
15:05:21 internal/poll.(*pollDesc).wait(0xc000829618, 0x72, 0xffffffffffffff00, 0x105a0e40, 0x108d02c0)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xa8
15:05:21 internal/poll.(*pollDesc).waitRead(0xc000829618, 0xc0009d6000, 0x1000, 0x1000)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3c
15:05:21 internal/poll.(*FD).Read(0xc000829600, 0xc0009d6000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x15c
15:05:21 net.(*netFD).Read(0xc000829600, 0xc0009d6000, 0x1000, 0x1000, 0x0, 0x4, 0x0)
15:05:21 	/usr/local/go/src/net/fd_unix.go:202 +0x48
15:05:21 net.(*conn).Read(0xc000010810, 0xc0009d6000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/net/net.go:177 +0x68
15:05:21 net/http.(*persistConn).Read(0xc0007d1680, 0xc0009d6000, 0x1000, 0x1000, 0x2, 0x2, 0xc0007d1560)
15:05:21 	/usr/local/go/src/net/http/transport.go:1497 +0xfc
15:05:21 bufio.(*Reader).fill(0xc0009d4120)
15:05:21 	/usr/local/go/src/bufio/bufio.go:100 +0x12c
15:05:21 bufio.(*Reader).Peek(0xc0009d4120, 0x1, 0x2, 0x0, 0x0, 0xc000845e00, 0x0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:132 +0x3c
15:05:21 net/http.(*persistConn).readLoop(0xc0007d1680)
15:05:21 	/usr/local/go/src/net/http/transport.go:1645 +0x16c
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1338 +0x8a0
15:05:21 
15:05:21 goroutine 275 [select, 1 minutes]:
15:05:21 net/http.(*persistConn).writeLoop(0xc0007d1680)
15:05:21 	/usr/local/go/src/net/http/transport.go:1885 +0xd4
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1339 +0x8c0
15:05:21 
15:05:21 goroutine 360 [chan send]:
15:05:21 github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithLogFile.func1(0xc0009ffaa0, 0xc000116000)
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:282 +0x54
15:05:21 created by github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithLogFile
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:281 +0x794
15:05:21 
15:05:21 goroutine 665 [IO wait]:
15:05:21 internal/poll.runtime_pollWait(0x3fff98608648, 0x72, 0x100929ac)
15:05:21 	/usr/local/go/src/runtime/netpoll.go:173 +0x50
15:05:21 internal/poll.(*pollDesc).wait(0xc0006d5398, 0x72, 0xffffffffffffff00, 0x105a0e40, 0x108d02c0)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xa8
15:05:21 internal/poll.(*pollDesc).waitRead(0xc0006d5398, 0xc000a92000, 0x1000, 0x1000)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3c
15:05:21 internal/poll.(*FD).Read(0xc0006d5380, 0xc000a92000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x15c
15:05:21 net.(*netFD).Read(0xc0006d5380, 0xc000a92000, 0x1000, 0x1000, 0xc00075eb00, 0x10058c30, 0xc0000a3500)
15:05:21 	/usr/local/go/src/net/fd_unix.go:202 +0x48
15:05:21 net.(*conn).Read(0xc0000108e0, 0xc000a92000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/net/net.go:177 +0x68
15:05:21 net/http.(*persistConn).Read(0xc00085d560, 0xc000a92000, 0x1000, 0x1000, 0x1027c4bc, 0x2, 0xc0000d6240)
15:05:21 	/usr/local/go/src/net/http/transport.go:1497 +0xfc
15:05:21 bufio.(*Reader).fill(0xc00096baa0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:100 +0x12c
15:05:21 bufio.(*Reader).Peek(0xc00096baa0, 0x1, 0x0, 0x0, 0x1, 0xc0006675c0, 0x0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:132 +0x3c
15:05:21 net/http.(*persistConn).readLoop(0xc00085d560)
15:05:21 	/usr/local/go/src/net/http/transport.go:1645 +0x16c
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1338 +0x8a0
15:05:21 
15:05:21 goroutine 357 [select]:
15:05:21 net/http.(*persistConn).readLoop(0xc00065f440)
15:05:21 	/usr/local/go/src/net/http/transport.go:1761 +0x588
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1338 +0x8a0
15:05:21 
15:05:21 goroutine 358 [select]:
15:05:21 net/http.(*persistConn).writeLoop(0xc00065f440)
15:05:21 	/usr/local/go/src/net/http/transport.go:1885 +0xd4
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1339 +0x8c0
15:05:21 
15:05:21 goroutine 840 [select]:
15:05:21 net/http.(*persistConn).writeLoop(0xc0000d66c0)
15:05:21 	/usr/local/go/src/net/http/transport.go:1885 +0xd4
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1339 +0x8c0
15:05:21 
15:05:21 goroutine 843 [IO wait]:
15:05:21 internal/poll.runtime_pollWait(0x3fff986088b8, 0x72, 0x100929ac)
15:05:21 	/usr/local/go/src/runtime/netpoll.go:173 +0x50
15:05:21 internal/poll.(*pollDesc).wait(0xc000794918, 0x72, 0xffffffffffffff00, 0x105a0e40, 0x108d02c0)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xa8
15:05:21 internal/poll.(*pollDesc).waitRead(0xc000794918, 0xc0009c8000, 0x1000, 0x1000)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3c
15:05:21 internal/poll.(*FD).Read(0xc000794900, 0xc0009c8000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x15c
15:05:21 net.(*netFD).Read(0xc000794900, 0xc0009c8000, 0x1000, 0x1000, 0x0, 0x4, 0x1)
15:05:21 	/usr/local/go/src/net/fd_unix.go:202 +0x48
15:05:21 net.(*conn).Read(0xc0007820f8, 0xc0009c8000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/net/net.go:177 +0x68
15:05:21 net/http.(*persistConn).Read(0xc0000d67e0, 0xc0009c8000, 0x1000, 0x1000, 0x2, 0x2, 0xc000a0d440)
15:05:21 	/usr/local/go/src/net/http/transport.go:1497 +0xfc
15:05:21 bufio.(*Reader).fill(0xc000629e60)
15:05:21 	/usr/local/go/src/bufio/bufio.go:100 +0x12c
15:05:21 bufio.(*Reader).Peek(0xc000629e60, 0x1, 0x2, 0x0, 0x0, 0xc00002b0e0, 0x0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:132 +0x3c
15:05:21 net/http.(*persistConn).readLoop(0xc0000d67e0)
15:05:21 	/usr/local/go/src/net/http/transport.go:1645 +0x16c
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1338 +0x8a0
15:05:21 
15:05:21 goroutine 844 [select]:
15:05:21 net/http.(*persistConn).writeLoop(0xc0000d67e0)
15:05:21 	/usr/local/go/src/net/http/transport.go:1885 +0xd4
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1339 +0x8c0
15:05:21 
15:05:21 goroutine 610 [chan send]:
15:05:21 github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithLogFile.func1(0xc000836fc0, 0xc000724a00)
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:282 +0x54
15:05:21 created by github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithLogFile
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:281 +0x794
15:05:21 
15:05:21 goroutine 570 [chan send]:
15:05:21 github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithLogFile.func1(0xc0007c4180, 0xc0002e2f00)
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:282 +0x54
15:05:21 created by github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithLogFile
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:281 +0x794
15:05:21 
15:05:21 goroutine 445 [chan send]:
15:05:21 github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithLogFile.func1(0xc0006f8a20, 0xc000724500)
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:282 +0x54
15:05:21 created by github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithLogFile
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:281 +0x794
15:05:21 
15:05:21 goroutine 839 [IO wait]:
15:05:21 internal/poll.runtime_pollWait(0x3fff98608988, 0x72, 0x100929ac)
15:05:21 	/usr/local/go/src/runtime/netpoll.go:173 +0x50
15:05:21 internal/poll.(*pollDesc).wait(0xc000794298, 0x72, 0xffffffffffffff00, 0x105a0e40, 0x108d02c0)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xa8
15:05:21 internal/poll.(*pollDesc).waitRead(0xc000794298, 0xc00079d000, 0x1000, 0x1000)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3c
15:05:21 internal/poll.(*FD).Read(0xc000794280, 0xc00079d000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x15c
15:05:21 net.(*netFD).Read(0xc000794280, 0xc00079d000, 0x1000, 0x1000, 0xc0007e3b00, 0x10058c30, 0xc0009e4780)
15:05:21 	/usr/local/go/src/net/fd_unix.go:202 +0x48
15:05:21 net.(*conn).Read(0xc000782048, 0xc00079d000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/net/net.go:177 +0x68
15:05:21 net/http.(*persistConn).Read(0xc0000d66c0, 0xc00079d000, 0x1000, 0x1000, 0x1027c4bc, 0x2, 0xc000a0d440)
15:05:21 	/usr/local/go/src/net/http/transport.go:1497 +0xfc
15:05:21 bufio.(*Reader).fill(0xc0006289c0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:100 +0x12c
15:05:21 bufio.(*Reader).Peek(0xc0006289c0, 0x1, 0x0, 0x0, 0x1, 0xc00002aba0, 0x0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:132 +0x3c
15:05:21 net/http.(*persistConn).readLoop(0xc0000d66c0)
15:05:21 	/usr/local/go/src/net/http/transport.go:1645 +0x16c
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1338 +0x8a0
15:05:21 
15:05:21 goroutine 716 [chan receive]:
15:05:21 testing.runTests.func1.1(0xc000636200)
15:05:21 	/usr/local/go/src/testing/testing.go:1124 +0x34
15:05:21 created by testing.runTests.func1
15:05:21 	/usr/local/go/src/testing/testing.go:1124 +0xac
15:05:21 
15:05:21 goroutine 797 [IO wait]:
15:05:21 internal/poll.runtime_pollWait(0x3fff98608578, 0x72, 0x100929ac)
15:05:21 	/usr/local/go/src/runtime/netpoll.go:173 +0x50
15:05:21 internal/poll.(*pollDesc).wait(0xc00075a518, 0x72, 0xffffffffffffff00, 0x105a0e40, 0x108d02c0)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xa8
15:05:21 internal/poll.(*pollDesc).waitRead(0xc00075a518, 0xc000995000, 0x1000, 0x1000)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3c
15:05:21 internal/poll.(*FD).Read(0xc00075a500, 0xc000995000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x15c
15:05:21 net.(*netFD).Read(0xc00075a500, 0xc000995000, 0x1000, 0x1000, 0xc0007e8b00, 0x10058c30, 0xc000079e00)
15:05:21 	/usr/local/go/src/net/fd_unix.go:202 +0x48
15:05:21 net.(*conn).Read(0xc00009ef30, 0xc000995000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/net/net.go:177 +0x68
15:05:21 net/http.(*persistConn).Read(0xc000a0d0e0, 0xc000995000, 0x1000, 0x1000, 0x1027c4bc, 0x2, 0xc0000d7680)
15:05:21 	/usr/local/go/src/net/http/transport.go:1497 +0xfc
15:05:21 bufio.(*Reader).fill(0xc00000cde0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:100 +0x12c
15:05:21 bufio.(*Reader).Peek(0xc00000cde0, 0x1, 0x0, 0x0, 0x1, 0xc000a7a000, 0x0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:132 +0x3c
15:05:21 net/http.(*persistConn).readLoop(0xc000a0d0e0)
15:05:21 	/usr/local/go/src/net/http/transport.go:1645 +0x16c
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1338 +0x8a0
15:05:21 
15:05:21 goroutine 798 [select]:
15:05:21 net/http.(*persistConn).writeLoop(0xc000a0d0e0)
15:05:21 	/usr/local/go/src/net/http/transport.go:1885 +0xd4
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1339 +0x8c0
15:05:21 
15:05:21 goroutine 717 [syscall]:
15:05:21 syscall.Syscall6(0x110, 0x1, 0x3e3d, 0xc000045568, 0x1000004, 0x0, 0x0, 0x0, 0x0, 0x8009)
15:05:21 	/usr/local/go/src/syscall/asm_linux_ppc64x.s:40 +0xc
15:05:21 os.(*Process).blockUntilWaitable(0xc000097e60, 0x2, 0x90, 0x1027d178)
15:05:21 	/usr/local/go/src/os/wait_waitid.go:31 +0x8c
15:05:21 os.(*Process).wait(0xc000097e60, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/os/exec_unix.go:22 +0x3c
15:05:21 os.(*Process).Wait(0xc000097e60, 0xc000840a80, 0x100010000, 0x0)
15:05:21 	/usr/local/go/src/os/exec.go:125 +0x2c
15:05:21 os/exec.(*Cmd).Wait(0xc00086c000, 0xc000045750, 0x1)
15:05:21 	/usr/local/go/src/os/exec/exec.go:465 +0x54
15:05:21 github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithLogFile.func1(0xc000667560, 0xc0007ac500)
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:282 +0x30
15:05:21 created by github.com/docker/docker/internal/test/daemon.(*Daemon).StartWithLogFile
15:05:21 	/go/src/github.com/docker/docker/internal/test/daemon/daemon.go:281 +0x794
15:05:21 
15:05:21 goroutine 813 [IO wait]:
15:05:21 internal/poll.runtime_pollWait(0x3fff98608718, 0x72, 0x100929ac)
15:05:21 	/usr/local/go/src/runtime/netpoll.go:173 +0x50
15:05:21 internal/poll.(*pollDesc).wait(0xc00037a498, 0x72, 0xffffffffffffff00, 0x105a0e40, 0x108d02c0)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xa8
15:05:21 internal/poll.(*pollDesc).waitRead(0xc00037a498, 0xc000ac8000, 0x1000, 0x1000)
15:05:21 	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3c
15:05:21 internal/poll.(*FD).Read(0xc00037a480, 0xc000ac8000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/internal/poll/fd_unix.go:169 +0x15c
15:05:21 net.(*netFD).Read(0xc00037a480, 0xc000ac8000, 0x1000, 0x1000, 0xc000685b00, 0x10058c30, 0xc00094d800)
15:05:21 	/usr/local/go/src/net/fd_unix.go:202 +0x48
15:05:21 net.(*conn).Read(0xc0007829f0, 0xc000ac8000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
15:05:21 	/usr/local/go/src/net/net.go:177 +0x68
15:05:21 net/http.(*persistConn).Read(0xc0000d79e0, 0xc000ac8000, 0x1000, 0x1000, 0x1027c4bc, 0x2, 0xc0000d7680)
15:05:21 	/usr/local/go/src/net/http/transport.go:1497 +0xfc
15:05:21 bufio.(*Reader).fill(0xc0006f2ea0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:100 +0x12c
15:05:21 bufio.(*Reader).Peek(0xc0006f2ea0, 0x1, 0x0, 0x0, 0x1, 0xc0006f9560, 0x0)
15:05:21 	/usr/local/go/src/bufio/bufio.go:132 +0x3c
15:05:21 net/http.(*persistConn).readLoop(0xc0000d79e0)
15:05:21 	/usr/local/go/src/net/http/transport.go:1645 +0x16c
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1338 +0x8a0
15:05:21 
15:05:21 goroutine 814 [select]:
15:05:21 net/http.(*persistConn).writeLoop(0xc0000d79e0)
15:05:21 	/usr/local/go/src/net/http/transport.go:1885 +0xd4
15:05:21 created by net/http.(*Transport).dialConn
15:05:21 	/usr/local/go/src/net/http/transport.go:1339 +0x8c0
15:05:21 ---> Making bundle: .integration-daemon-stop (in bundles/test-integration)

@thaJeztah
Copy link
Member Author

Looks like testenv isn't really designed for parallel tests 🤔 @vdemeester any thoughts?

@vdemeester
Copy link
Member

Looks like testenv isn't really designed for parallel tests @vdemeester any thoughts?

Indeed… I remember discussing about that a bit (as what should we do to make it safe to use for parallel tests), but it's definitely not the case as of today 😅 That said, testenv.APIClient target the "already running" daemon, so parellel tests on that daemon needs quite some care too

@thaJeztah
Copy link
Member Author

The problem is be triggered by setupTest(t), which is trying to protect testEnv (but testEnv is a package-level variable), and I added a few new ones for that. Let me remove those new ones to see if the tests pass after that. (or remote t.Parallel() for those)

It's a pity that t.isParallel is not exported, otherwise we could make setupTest() fail the test if someone is trying to use it in a test that is running in parallel.

`testEnv` is a package-level variable, so protecting / restoring
`testEnv` in parallel will result in "concurrent map write" errors.

This patch removes `t.Parallel()` from tests that use this
functionality (through `defer setupTest(t)()`).

Note that _subtests_ can still be run in parallel, as the defer
will be called after all subtests have completed.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
A client is already created in testenv.New(), so we can just
as well use that one, instead of creating a new client.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@codecov
Copy link

codecov bot commented Jan 3, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@3f7898c). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #38473   +/-   ##
=========================================
  Coverage          ?   36.63%           
=========================================
  Files             ?      608           
  Lines             ?    45040           
  Branches          ?        0           
=========================================
  Hits              ?    16502           
  Misses            ?    26256           
  Partials          ?     2282

@thaJeztah
Copy link
Member Author

pushed a commit to remove some t.Parallel() from tests;
4d88a95

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐯

func TestBuildWithRemoveAndForceRemove(t *testing.T) {
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
defer setupTest(t)()
t.Parallel()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subtests are still run in parallel on this test


func TestMountDaemonRoot(t *testing.T) {
skip.If(t, testEnv.DaemonInfo.OSType == "windows" || testEnv.IsRemoteDaemon())
t.Parallel()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subtests are still run in parallel on this test

skip.If(t, testEnv.OSType == "windows", "TODO enable on windows")

client := request.NewAPIClient(t)
defer setupTest(t)()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we should spin up a new daemon for this one; I'll check how long this test takes to run

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

13:32:12 === RUN   TestImportExtremelyLargeImageWorks
13:34:14 --- PASS: TestImportExtremelyLargeImageWorks (122.92s)

Looks like that may be worth considering 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #38480 for running it in parallel

Copy link
Member

@yongtang yongtang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
Copy link
Member Author

s390x failure is unrelated; I'll merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants