dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.09k stars 1.56k forks source link

Failures on [co19] RawDatargamSocket tests enabled #50200

Open liamappelbe opened 1 year ago

liamappelbe commented 1 year ago

[co19] RawDatargamSocket tests enabled introduced a new test that is failing on a bunch of bots (see automated message below). I'll approve them for now to turn the bots green. Not sure who's best suited to fix this, since the culprit CL was just enabling an existing test.

The tests

co19/LibTest/io/RawDatagramSocket/bind_A02_t03 RuntimeError (expected Pass)
co19/LibTest/io/RawDatagramSocket/bind_A02_t07 RuntimeError (expected Pass)
co19/LibTest/io/RawDatagramSocket/bind_A03_t01 RuntimeError (expected Pass)
co19/LibTest/io/RawDatagramSocket/bind_A03_t02 RuntimeError (expected Pass)
co19/LibTest/io/RawDatagramSocket/bind_A03_t03 RuntimeError (expected Pass)
co19/LibTest/io/RawDatagramSocket/broadcastEnable_A01_t01 RuntimeError (expected Pass)

are failing on configurations

dartk-strong-mac-debug-arm64
dartk-strong-mac-debug-x64
dartk-strong-mac-release-arm64
dartk-strong-mac-release-x64
dartk-weak-asserts-mac-debug-arm64
dartk-weak-asserts-mac-debug-x64
dartk-weak-asserts-mac-release-arm64
dartk-weak-asserts-mac-release-x64
dartkp-strong-mac-release-simarm64
dartkp-weak-asserts-mac-release-simarm64
sgrekhov commented 1 year ago

There are two issues here.

The first one is failures of bind_* tests on Mac. The problem is that behavior of reuseAddress parameter of RawDatagramSocket.bind() method on Mac and on Windows/Linux differs. On Windows/Linux if two sockets have reuseAddress set to true then they may share the same port. On Mac it is an error. If this is an expected behavior then, please, update documentation of the RawDatagramSocket.bind() method and I'll change the tests accordingly. Otherwise it's an issue. See #50172 and #49600 for more details

For failure of broadcastEnable_A01_t01 please see #50171. Again, this test works on Windows and Linux. If this Mac issue is expected then, please, update the documentation

mraleph commented 1 year ago

/cc @brianquinlan

athomas commented 1 year ago

Unassigned myself and co19 maintainer, given that this is a dart:io bug.

dcharkes commented 1 year ago

The windows bots have also trailed in now:

The tests

co19/LibTest/io/RawDatagramSocket/bind_A03_t08 RuntimeError (expected Pass)
co19/LibTest/io/RawDatagramSocket/send_A02_t01 RuntimeError (expected Pass)
co19_2/LibTest/io/RawDatagramSocket/bind_A03_t08 RuntimeError (expected Pass)
co19_2/LibTest/io/RawDatagramSocket/send_A02_t01 RuntimeError (expected Pass)

are failing on configurations

dartk-strong-win-debug-x64
dartk-strong-win-release-ia32
dartk-strong-win-release-x64
dartk-weak-asserts-win-debug-x64
dartk-weak-asserts-win-release-ia32
dartk-weak-asserts-win-release-x64
dartk-win-release-x64
dartkp-strong-win-release-x64
dartkp-weak-asserts-win-release-x64
sgrekhov commented 1 year ago

Tests

co19/LibTest/io/RawDatagramSocket/bind_A03_t08
co19_2/LibTest/io/RawDatagramSocket/bind_A03_t08

fail on Windows with error message Dart Socket ERROR: ../../runtime/bin/socket_win.cc:194:reusePortnot supported for Windows. But it's not reflected in the RawDatagramSocket.bind() documentation. Please see https://github.com/dart-lang/sdk/issues/49598

Failures of

co19/LibTest/io/RawDatagramSocket/send_A02_t01
co19_2/LibTest/io/RawDatagramSocket/send_A02_t01

again seems like a documentation issues. See https://github.com/dart-lang/sdk/issues/31873. It is possible to change these tests to not to fail, but, please, update the API docs first. Now all of the tests, that fail on Windows follow API documentation wording