Module: wine Branch: master Commit: 27003f8329d7dc46c3194b70dd9b16790d78a63e URL: https://gitlab.winehq.org/wine/wine/-/commit/27003f8329d7dc46c3194b70dd9b167...
Author: Eric Pouech epouech@codeweavers.com Date: Mon Jan 29 17:24:38 2024 +0100
dbghelp/tests: Use Unicode encoding for generated PDB filenames.
Signed-off-by: Eric Pouech epouech@codeweavers.com
---
dlls/dbghelp/tests/path.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/dlls/dbghelp/tests/path.c b/dlls/dbghelp/tests/path.c index 756eb862df9..4092fb5b2ab 100644 --- a/dlls/dbghelp/tests/path.c +++ b/dlls/dbghelp/tests/path.c @@ -503,7 +503,7 @@ static void pdb_write(HANDLE hfile, struct pdb_file* pdb) SetEndOfFile(hfile); }
-static BOOL create_test_pdb_ds(const char* pdb_name, const GUID* guid, DWORD age) +static BOOL create_test_pdb_ds(const WCHAR* pdb_name, const GUID* guid, DWORD age) { struct PDB_DS_ROOT root = { @@ -660,8 +660,8 @@ static BOOL create_test_pdb_ds(const char* pdb_name, const GUID* guid, DWORD age
stream = pdb_add_stream(&pdb, &pddt.sections_stream, &ro_section, sizeof(ro_section));
- hfile = CreateFileA(pdb_name, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to create %s err %lu\n", pdb_name, GetLastError()); + hfile = CreateFileW(pdb_name, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, 0); + ok(hfile != INVALID_HANDLE_VALUE, "failed to create %ls err %lu\n", pdb_name, GetLastError()); if (hfile == INVALID_HANDLE_VALUE) return FALSE;
pdb_write(hfile, &pdb); @@ -803,8 +803,8 @@ static void test_srvgetindexes_pe(void) static void test_srvgetindexes_pdb(void) { unsigned int i; - char filename[128]; - SYMSRV_INDEX_INFO ssii; + WCHAR filename[128]; + SYMSRV_INDEX_INFOW ssii; BOOL ret;
static struct @@ -822,12 +822,12 @@ static void test_srvgetindexes_pdb(void) winetest_push_context("pdb#%02u", i);
/* create dll */ - snprintf(filename, ARRAYSIZE(filename), "winetest%02u.pdb", i); + swprintf(filename, ARRAY_SIZE(filename), L"winetest%02u.pdb", i); create_test_pdb_ds(filename, indexes[i].guid, 240 + i);
memset(&ssii, 0x45, sizeof(ssii)); ssii.sizeofstruct = sizeof(ssii); - ret = SymSrvGetFileIndexInfo(filename, &ssii, 0); + ret = SymSrvGetFileIndexInfoW(filename, &ssii, 0); ok(ret, "SymSrvGetFileIndexInfo failed: %lu\n", GetLastError());
ok(ssii.age == 240 + i, "Mismatch in age: %lx\n", ssii.age); @@ -839,11 +839,11 @@ static void test_srvgetindexes_pdb(void) ok(ssii.size == 0, "Mismatch in size: %lx\n", ssii.size); ok(!ssii.stripped, "Mismatch in stripped: %x\n", ssii.stripped); ok(ssii.timestamp == 0, "Mismatch in timestamp: %lx\n", ssii.timestamp); - ok(!strcmp(ssii.file, filename), "Mismatch in file: %s\n", ssii.file); - ok(!ssii.pdbfile[0], "Mismatch in pdbfile: %s\n", ssii.pdbfile); - ok(!ssii.dbgfile[0], "Mismatch in dbgfile: %s\n", ssii.dbgfile); + ok(!wcscmp(ssii.file, filename), "Mismatch in file: %ls\n", ssii.file); + ok(!ssii.pdbfile[0], "Mismatch in pdbfile: %ls\n", ssii.pdbfile); + ok(!ssii.dbgfile[0], "Mismatch in dbgfile: %ls\n", ssii.dbgfile);
- DeleteFileA(filename); + DeleteFileW(filename); winetest_pop_context(); } }