Module: wine Branch: master Commit: c898503e949ea3b2c478bfb4ccbf6a1d9400b08f URL: https://gitlab.winehq.org/wine/wine/-/commit/c898503e949ea3b2c478bfb4ccbf6a1...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Feb 23 03:07:09 2023 +0100
mscoree/tests: Trace the error when a Windows API fails.
---
dlls/mscoree/tests/comtest.c | 2 +- dlls/mscoree/tests/mscoree.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/mscoree/tests/comtest.c b/dlls/mscoree/tests/comtest.c index db6acac1e9e..2881fdb8943 100644 --- a/dlls/mscoree/tests/comtest.c +++ b/dlls/mscoree/tests/comtest.c @@ -102,7 +102,7 @@ static BOOL compile_cs_to_dll(char *source_path, char *dest_path) ok(ret, "Compilation failed\n");
ret = MoveFileA(path_temp, dest_path); - ok(ret, "Moving temporary file failed\n"); + ok(ret, "Could not move %s to %s: %lu\n", path_temp, dest_path, GetLastError()); return ret; }
diff --git a/dlls/mscoree/tests/mscoree.c b/dlls/mscoree/tests/mscoree.c index 7da40d92887..bb6545b8a21 100644 --- a/dlls/mscoree/tests/mscoree.c +++ b/dlls/mscoree/tests/mscoree.c @@ -148,7 +148,7 @@ static BOOL runtime_is_usable(void) si.cb = sizeof(si);
ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcessA failed\n"); + ok(ret, "Could not create process: %lu\n", GetLastError()); if (!ret) return FALSE;
@@ -159,7 +159,7 @@ static BOOL runtime_is_usable(void) ret = GetExitCodeProcess(pi.hProcess, &exitcode); CloseHandle(pi.hProcess);
- ok(ret, "GetExitCodeProcess failed\n"); + ok(ret, "GetExitCodeProcess failed: %lu\n", GetLastError());
if (!ret || exitcode != 0) { @@ -424,7 +424,7 @@ static void create_xml_file(LPCWSTR filename) DWORD dwNumberOfBytesWritten; HANDLE hfile = CreateFileW(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(hfile != INVALID_HANDLE_VALUE, "File creation failed\n"); + ok(hfile != INVALID_HANDLE_VALUE, "Could not open %s for writing: %lu\n", wine_dbgstr_w(filename), GetLastError()); WriteFile(hfile, xmldata, sizeof(xmldata) - 1, &dwNumberOfBytesWritten, NULL); CloseHandle(hfile); }