Zebediah Figura (@zfigura) commented about dlls/ws2_32/tests/sock.c:
+ ok(client != INVALID_SOCKET, "Failed to create second Unix socket: %lu\n", + GetLastError()); + + clientThread = CreateThread(NULL, 0, test_afunix_client_connect_thread, + &(struct afunix_thread_param){ client, addr }, 0, NULL); + ok(clientThread != NULL, "CreateThread failed unexpectedly: %ld\n", GetLastError()); + conn = accept(server, NULL, NULL); + ok(conn != INVALID_SOCKET, "Could not accept Unix socket connection: %lu\n", + GetLastError()); + + ret = send(conn, serverMsg, sizeof(serverMsg), 0); + ok(ret == sizeof(serverMsg), + ret >= 0 + ? "Incorrect amount of bytes written to Unix socket: %lu\n" + : "Could not send data over Unix socket: %lu\n", + ret >= 0 ? ret : GetLastError()); This is more complex than it needs to be; just write "Got return value %d", and either leave out the GetLastError() or add a second unconditional ok() for it.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/2786#note_33113