On Thu Feb 12 21:25:46 2026 +0000, Elizabeth Figura wrote:
Because Windows sometimes takes a long time to fail connection (and because we want our test suite to complete relatively quickly), we hide similar tests behind winetest_interactive. I think that should be done here too. We also usually use port 255, which is defined as invalid. I think we should call check_events() twice, as is generally done elsewhere. I'm not expecting any surprises, but it's good to be sure. We should probably also be clearing pending_events here, as we do almost everywhere else. I.e. if you fail connection, don't check events, and then successfully connect, I would expect that the connection failure is *not* reported. Ideally this too should be tested. Putting the assignment inside of a block containing both SOCK_UNCONNECTED and SOCK_CONNECTIONLESS but then checking for SOCK_STREAM anyway is redundant. Easier is just to put it under SOCK_UNCONNECTED only. I'm also curious if trying to connect with an invalid address will report this behaviour. If not, we want to clear reported_events under that check. There's a part of me that dislikes setting to 0 and not simply clearing AFD_POLL_CONNECT_ERR, but I guess they're equivalent in this case. The latter might still be more declarative, or intuitively correct. The title is confusing; I see why you say "reuse" but that's not the first thing I think of (in particular I think of either TF_REUSE, or the couple of cases where we have to recreate the underlying Unix socket.) I would instead say "Clear events in IOCTL_AFD_WINE_CONNECT" or (assuming the above change) "Clear connection failure events in IOCTL_AFD_WINE_CONNECT". In the future, when making bug-fix changes like this, it is helpful to separate the tests into a first patch, so it is abundantly clear what the commit is fixing. Hello Elizabeth, thanks for your great feedback. I pushed v2 that addresses a few of the raised issues. But I have trouble adding the additional tests. What would an invalid address look like?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10044#note_129554