Jinoh Kang (@iamahuman) commented about dlls/ntdll/tests/pipe.c:
+ U(ctx.iosb).Status = 0xdeadbabe; + ctx.iosb.Information = 0xdeadbeef; + thread = CreateThread(NULL, 0, synchronousio_thread, &ctx, 0, 0); + /* wait for I/O to start, which transitions the pipe handle from signaled to nonsignaled state. */ + while ((ret = WaitForSingleObject(ctx.pipe, 0)) == WAIT_OBJECT_0) Sleep(1); + ok(ret == WAIT_TIMEOUT, "WaitForSingleObject returned %lu (error %lu)\n", ret, GetLastError()); + memset(&iosb, 0x55, sizeof(iosb)); + res = pNtCancelSynchronousIoFile(thread, &iosb, &iosb); + todo_wine { + ok(res == STATUS_NOT_FOUND, "NtCancelSynchronousIoFile returned %lx\n", res); + res = pNtCancelSynchronousIoFile(NULL, &ctx.iosb, &iosb); + ok(res == STATUS_INVALID_HANDLE, "NtCancelSynchronousIoFile returned %lx\n", res); + res = pNtCancelSynchronousIoFile(thread, &ctx.iosb, &iosb); + ok(res == STATUS_SUCCESS || broken(res == STATUS_NOT_FOUND) /* 32-bit */, + "Failed to cancel I/O\n"); + ok(U(iosb).Status == STATUS_SUCCESS || broken(U(iosb).Status == STATUS_NOT_FOUND) /* 32-bit */, Is this broken on WOW64 (32-bit application on 64-bit Windows), real 32-bit Windows, or both?
In any case, I suggest using appropriate flags to test if this is actually the broken platform. See `dlls/kernel32/tests/virtual.c` for the WOW64 case. For application bitness case, we can test for the `_WIN64` macro. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/47#note_8770