test-tcp fails on WSL ubuntu 18.04.
This test is new with the upgrade to libuv 1.32.0.
Uncaught Error: tests/test-tcp.lua:158: assertion failed!
stack traceback:
[C]: in function 'assert'
tests/test-tcp.lua:158: in function 'fn'
./lib/tap.lua:48: in function <./lib/tap.lua:46>
[C]: in function 'run'
./lib/tap.lua:55: in function <./lib/tap.lua:42>
[C]: in function 'xpcall'
./lib/tap.lua:42: in function 'run'
./lib/tap.lua:138: in function <./lib/tap.lua:115>
[C]: at 0x7f79f8008e25
Relevant code: https://github.com/luvit/luv/blob/c6cf094e6e5c59339de56fef6deb453981f005cb/tests/test-tcp.lua#L158
In the read_start callback, data and err are both nil.
Encountered on WSL ubuntu 18.04. Cannot reproduce on native ubuntu 16.04 on a different machine. Not tested on native Windows 10 on the same machine.
Maybe it needs to match this assert?
https://github.com/luvit/luv/blob/c6cf094e6e5c59339de56fef6deb453981f005cb/tests/test-tcp.lua#L257
For reference, the Libuv test never checks for ECONNRESET: https://github.com/libuv/libuv/blob/v1.x/test/test-tcp-close-reset.c
This is not an issue in WSL2. No idea what causes it in WSL1. Probably not worth investigating.