"Maarten Lankhorst" m.b.lankhorst@gmail.com writes:
Or wine is doing something wrong. After some more digging I found that SetLastError() was set to 0 by TlsGetValue when called from X11DRV's MsgWaitForMultipleObjectsEx. After I tried fixing this so that SetLastError is only set when NULL is returned, one of the other tests miraculously started working inside a todo block too (cursoricon). I'll work on some testcases to verify that tlsgetvalue only calls SetLastError(0) when succesfully returning null.
In most cases it's the test that is doing something wrong by being too strict. We don't care whether last error is modified or not on success, and there's no reason to test for it, unless it's one of the very few functions that do something special on success, or unless there is a real app that depends on it.