Hi Carlos,
On 15.09.2020 12:01, Carlos Rivera wrote:
Hi, There is a test in dlls/kernel32/tests/profile.c that contains the following:
ret=GetPrivateProfileSection("section3", buf, sizeof(buf), testfile4); trace("section 3 return: %s\n", buf); ok(GetLastError() == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", GetLastError());
The ok macro now fails in my machine (it doesn't here though: https://test.winehq.org/data/01bacebba418bf6f58a644b1aab41be215bd200a/linux_...)
I have traced it back to this commit. It seems that the trace call sets last error to STATUS_INVALID_HANDLE since the introduction of this patch, If I change trace by a call to printf it does the same thing.
I see that the invalid handle is sent all the way from the server:
WriteConsoleW DeviceIoControl NtDeviceIoControl server_ioctl_file
I understand that checking for last error should be done right after calling the function to be tested anyway. But I wanted to let you know about this, since it seems a little strange, I do not know anything about how the console works, maybe something is broken in my setup? The trace shows up anyway despite setting last error.
The attached patch should help, please give it a try.
Thanks,
Jacek