From dd27d0e1940c06f977baa20cfc0dbf5da1dd47ed Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 11 May 2026 15:08:01 +0300 Subject: [PATCH] [APITESTS] Make sure test functions are name correctly With automatic test list creation, the function name (from START_TEST(name)) will also be the test name and some of those conflict with wine tests. --- modules/rostests/apitests/advapi32/eventlog.c | 2 +- modules/rostests/apitests/advapi32/testlist.c | 4 ++-- modules/rostests/apitests/comctl32/button.c | 2 +- modules/rostests/apitests/comctl32/propsheet.c | 2 +- modules/rostests/apitests/comctl32/testlist.c | 16 ++++++++-------- modules/rostests/apitests/comctl32/toolbar.c | 2 +- modules/rostests/apitests/comctl32/tooltip.c | 2 +- modules/rostests/apitests/compiler/pseh.c | 4 ++++ modules/rostests/apitests/compiler/pseh_cpp.cpp | 1 - modules/rostests/apitests/crt/sprintf.c | 4 ++++ modules/rostests/apitests/kernel32/Mailslot.c | 2 +- modules/rostests/apitests/kernel32/testlist.c | 4 ++-- .../apitests/netshell/NcIsValidConnectionName.c | 2 +- modules/rostests/apitests/netshell/testlist.c | 4 ++-- modules/rostests/apitests/ntdll/RtlBitmap.c | 2 +- modules/rostests/apitests/ntdll/testlist.c | 4 ++-- modules/rostests/apitests/powrprof/power.c | 2 +- modules/rostests/apitests/shlwapi/PathIsUNC.c | 2 +- .../rostests/apitests/shlwapi/PathIsUNCServer.c | 2 +- .../apitests/shlwapi/PathIsUNCServerShare.c | 2 +- modules/rostests/apitests/shlwapi/testlist.c | 12 ++++++------ modules/rostests/apitests/user32/testlist.c | 4 ++-- 22 files changed, 44 insertions(+), 37 deletions(-) diff --git a/modules/rostests/apitests/advapi32/eventlog.c b/modules/rostests/apitests/advapi32/eventlog.c index da54ea3a314..cd905b2e209 100644 --- a/modules/rostests/apitests/advapi32/eventlog.c +++ b/modules/rostests/apitests/advapi32/eventlog.c @@ -7,7 +7,7 @@ #include "precomp.h" -START_TEST(eventlog) +START_TEST(eventlog_supp) { static struct { diff --git a/modules/rostests/apitests/advapi32/testlist.c b/modules/rostests/apitests/advapi32/testlist.c index 73d367d40ef..5d72312c6fe 100644 --- a/modules/rostests/apitests/advapi32/testlist.c +++ b/modules/rostests/apitests/advapi32/testlist.c @@ -4,7 +4,7 @@ extern void func_CreateService(void); extern void func_DuplicateTokenEx(void); -extern void func_eventlog(void); +extern void func_eventlog_supp(void); extern void func_Hash(void); extern void func_HKEY_CLASSES_ROOT(void); extern void func_IsTextUnicode(void); @@ -26,7 +26,7 @@ const struct test winetest_testlist[] = { { "CreateService", func_CreateService }, { "DuplicateTokenEx", func_DuplicateTokenEx }, - { "eventlog_supp", func_eventlog }, + { "eventlog_supp", func_eventlog_supp }, { "Hash", func_Hash }, { "HKEY_CLASSES_ROOT", func_HKEY_CLASSES_ROOT }, { "IsTextUnicode" , func_IsTextUnicode }, diff --git a/modules/rostests/apitests/comctl32/button.c b/modules/rostests/apitests/comctl32/button.c index 8a162fd67d5..9dc2ac825a4 100644 --- a/modules/rostests/apitests/comctl32/button.c +++ b/modules/rostests/apitests/comctl32/button.c @@ -923,7 +923,7 @@ void Test_MessagesThemed() DestroyWindow(hWnd2); } -START_TEST(button) +START_TEST(buttonv6) { LoadLibraryW(L"comctl32.dll"); /* same as statically linking to comctl32 and doing InitCommonControls */ Test_TextMargin(); diff --git a/modules/rostests/apitests/comctl32/propsheet.c b/modules/rostests/apitests/comctl32/propsheet.c index e4d7be568b4..46c8e9ece52 100644 --- a/modules/rostests/apitests/comctl32/propsheet.c +++ b/modules/rostests/apitests/comctl32/propsheet.c @@ -147,7 +147,7 @@ static void test_ApplyButtonDisabled() } -START_TEST(propsheet) +START_TEST(propsheetv6) { HMODULE hComCtl32; diff --git a/modules/rostests/apitests/comctl32/testlist.c b/modules/rostests/apitests/comctl32/testlist.c index 3fb14477f34..6d89af532df 100644 --- a/modules/rostests/apitests/comctl32/testlist.c +++ b/modules/rostests/apitests/comctl32/testlist.c @@ -1,18 +1,18 @@ #define STANDALONE #include -extern void func_button(void); +extern void func_buttonv6(void); extern void func_ImageListApi(void); -extern void func_propsheet(void); -extern void func_toolbar(void); -extern void func_tooltip(void); +extern void func_propsheetv6(void); +extern void func_toolbarv6(void); +extern void func_tooltipv6(void); const struct test winetest_testlist[] = { - { "buttonv6", func_button }, + { "buttonv6", func_buttonv6 }, { "ImageListApi", func_ImageListApi }, - { "propsheetv6", func_propsheet }, - { "toolbarv6", func_toolbar }, - { "tooltipv6", func_tooltip }, + { "propsheetv6", func_propsheetv6 }, + { "toolbarv6", func_toolbarv6 }, + { "tooltipv6", func_tooltipv6 }, { 0, 0 } }; diff --git a/modules/rostests/apitests/comctl32/toolbar.c b/modules/rostests/apitests/comctl32/toolbar.c index 1b8f623d709..76cc23a64cc 100644 --- a/modules/rostests/apitests/comctl32/toolbar.c +++ b/modules/rostests/apitests/comctl32/toolbar.c @@ -235,7 +235,7 @@ void TestV5VersionMessage() DestroyWindow(hwnd); } -START_TEST(toolbar) +START_TEST(toolbarv6) { HANDLE hV5ActCtx; diff --git a/modules/rostests/apitests/comctl32/tooltip.c b/modules/rostests/apitests/comctl32/tooltip.c index d92ce4cade2..fbe952c7e69 100644 --- a/modules/rostests/apitests/comctl32/tooltip.c +++ b/modules/rostests/apitests/comctl32/tooltip.c @@ -61,7 +61,7 @@ Cleanup: HeapFree(hAppHeap, 0, lpData); } -START_TEST(tooltip) +START_TEST(tooltipv6) { TestDllProductVersion(); } diff --git a/modules/rostests/apitests/compiler/pseh.c b/modules/rostests/apitests/compiler/pseh.c index af7b0597d62..3c1510a4dc9 100644 --- a/modules/rostests/apitests/compiler/pseh.c +++ b/modules/rostests/apitests/compiler/pseh.c @@ -3020,7 +3020,11 @@ void Test_nested_from_except(void) #endif } +#ifdef __cplusplus +START_TEST(pseh_cpp) +#else START_TEST(pseh) +#endif { #ifdef _M_IX86 Test_structs_no_seh(); diff --git a/modules/rostests/apitests/compiler/pseh_cpp.cpp b/modules/rostests/apitests/compiler/pseh_cpp.cpp index 8a638741e64..681ed6dba00 100644 --- a/modules/rostests/apitests/compiler/pseh_cpp.cpp +++ b/modules/rostests/apitests/compiler/pseh_cpp.cpp @@ -1,3 +1,2 @@ -#define func_pseh func_pseh_cpp #include "pseh.c" diff --git a/modules/rostests/apitests/crt/sprintf.c b/modules/rostests/apitests/crt/sprintf.c index 1842d489e50..3995bd9301a 100644 --- a/modules/rostests/apitests/crt/sprintf.c +++ b/modules/rostests/apitests/crt/sprintf.c @@ -48,7 +48,11 @@ static BOOL Init(void) /* NOTE: This test is not only used for all the CRT apitests, but also for * user32's wsprintf. Make sure to test them all */ +#ifdef TEST_USER32 +START_TEST(wsprintfApi) +#else START_TEST(sprintf) +#endif { int Length; CHAR Buffer[128]; diff --git a/modules/rostests/apitests/kernel32/Mailslot.c b/modules/rostests/apitests/kernel32/Mailslot.c index d2cc5d1a7b2..fecb25aac54 100644 --- a/modules/rostests/apitests/kernel32/Mailslot.c +++ b/modules/rostests/apitests/kernel32/Mailslot.c @@ -74,7 +74,7 @@ StartTestCORE10188(VOID) ok(dInMsg == dOutMsg, "Transfer data failed\n"); } -START_TEST(Mailslot) +START_TEST(MailslotRead) { StartTestCORE10188(); } diff --git a/modules/rostests/apitests/kernel32/testlist.c b/modules/rostests/apitests/kernel32/testlist.c index 287867f257f..37e3569384c 100644 --- a/modules/rostests/apitests/kernel32/testlist.c +++ b/modules/rostests/apitests/kernel32/testlist.c @@ -31,7 +31,7 @@ extern void func_LoadLibraryExW(void); extern void func_LocaleNameToLCID(void); extern void func_lstrcpynW(void); extern void func_lstrlen(void); -extern void func_Mailslot(void); +extern void func_MailslotRead(void); extern void func_MultiByteToWideChar(void); extern void func_Pipes(void); extern void func_PrivMoveFileIdentityW(void); @@ -77,7 +77,7 @@ const struct test winetest_testlist[] = { "LocaleNameToLCID", func_LocaleNameToLCID }, { "lstrcpynW", func_lstrcpynW }, { "lstrlen", func_lstrlen }, - { "MailslotRead", func_Mailslot }, + { "MailslotRead", func_MailslotRead }, { "MultiByteToWideChar", func_MultiByteToWideChar }, { "Pipes", func_Pipes }, { "PrivMoveFileIdentityW", func_PrivMoveFileIdentityW }, diff --git a/modules/rostests/apitests/netshell/NcIsValidConnectionName.c b/modules/rostests/apitests/netshell/NcIsValidConnectionName.c index 443b4bc388d..cff5fb6bc38 100644 --- a/modules/rostests/apitests/netshell/NcIsValidConnectionName.c +++ b/modules/rostests/apitests/netshell/NcIsValidConnectionName.c @@ -86,7 +86,7 @@ static void test_BadLetters(void) } } -START_TEST(isvalidname) +START_TEST(NcIsValidConnectionName) { HMODULE hDll = LoadLibraryA("netshell.dll"); diff --git a/modules/rostests/apitests/netshell/testlist.c b/modules/rostests/apitests/netshell/testlist.c index f63ffc56ea8..a641a90d06b 100644 --- a/modules/rostests/apitests/netshell/testlist.c +++ b/modules/rostests/apitests/netshell/testlist.c @@ -1,10 +1,10 @@ #define STANDALONE #include -extern void func_isvalidname(void); +extern void func_NcIsValidConnectionName(void); const struct test winetest_testlist[] = { - { "NcIsValidConnectionName", func_isvalidname }, + { "NcIsValidConnectionName", func_NcIsValidConnectionName }, { 0, 0 } }; diff --git a/modules/rostests/apitests/ntdll/RtlBitmap.c b/modules/rostests/apitests/ntdll/RtlBitmap.c index 5f08ed2a4b1..8cae5859d45 100644 --- a/modules/rostests/apitests/ntdll/RtlBitmap.c +++ b/modules/rostests/apitests/ntdll/RtlBitmap.c @@ -600,7 +600,7 @@ Test_RtlFindLongestRunClear(void) } -START_TEST(RtlBitmap) +START_TEST(RtlBitmapApi) { /* Windows 2003 has broken bitmap code that modifies the buffer */ if (!IsWindowsVistaOrGreater() && !IsReactOS()) diff --git a/modules/rostests/apitests/ntdll/testlist.c b/modules/rostests/apitests/ntdll/testlist.c index c404ac2aa27..f2028fa2992 100644 --- a/modules/rostests/apitests/ntdll/testlist.c +++ b/modules/rostests/apitests/ntdll/testlist.c @@ -82,7 +82,7 @@ extern void func_NtSystemInformation(void); extern void func_NtUnloadDriver(void); extern void func_NtWriteFile(void); extern void func_RtlAllocateHeap(void); -extern void func_RtlBitmap(void); +extern void func_RtlBitmapApi(void); extern void func_RtlCaptureContext(void); extern void func_RtlComputePrivatizedDllName_U(void); extern void func_RtlCopyMappedMemory(void); @@ -218,7 +218,7 @@ const struct test winetest_testlist[] = { "NtUnloadDriver", func_NtUnloadDriver }, { "NtWriteFile", func_NtWriteFile }, { "RtlAllocateHeap", func_RtlAllocateHeap }, - { "RtlBitmapApi", func_RtlBitmap }, + { "RtlBitmapApi", func_RtlBitmapApi }, { "RtlComputePrivatizedDllName_U", func_RtlComputePrivatizedDllName_U }, { "RtlCopyMappedMemory", func_RtlCopyMappedMemory }, { "RtlCriticalSection", func_RtlCriticalSection }, diff --git a/modules/rostests/apitests/powrprof/power.c b/modules/rostests/apitests/powrprof/power.c index d09b99b8a19..79cb35e3a52 100644 --- a/modules/rostests/apitests/powrprof/power.c +++ b/modules/rostests/apitests/powrprof/power.c @@ -4841,7 +4841,7 @@ void test_WritePwrScheme(void) } -void func_power(void) +START_TEST(power) { if (1) skip("CallNtPowerInformation test is broken and fails on Windows\n"); diff --git a/modules/rostests/apitests/shlwapi/PathIsUNC.c b/modules/rostests/apitests/shlwapi/PathIsUNC.c index 22c874384d7..5d14088e4a9 100644 --- a/modules/rostests/apitests/shlwapi/PathIsUNC.c +++ b/modules/rostests/apitests/shlwapi/PathIsUNC.c @@ -27,7 +27,7 @@ do { \ ok(ret == (exp), "Expected %s to be %d, was %d\n", wine_dbgstr_w((str)), (exp), ret); \ } while (0) -START_TEST(isuncpath) +START_TEST(PathIsUNC) { DO_TEST(TRUE, L"\\\\path1\\path2"); DO_TEST(TRUE, L"\\\\path1"); diff --git a/modules/rostests/apitests/shlwapi/PathIsUNCServer.c b/modules/rostests/apitests/shlwapi/PathIsUNCServer.c index acc2df31992..cc2bef93f34 100644 --- a/modules/rostests/apitests/shlwapi/PathIsUNCServer.c +++ b/modules/rostests/apitests/shlwapi/PathIsUNCServer.c @@ -27,7 +27,7 @@ do { \ ok(ret == (exp), "Expected %s to be %d, was %d\n", wine_dbgstr_w((str)), (exp), ret); \ } while (0) -START_TEST(isuncpathserver) +START_TEST(PathIsUNCServer) { DO_TEST(TRUE, L"\\\\server"); DO_TEST(TRUE, L"\\\\"); diff --git a/modules/rostests/apitests/shlwapi/PathIsUNCServerShare.c b/modules/rostests/apitests/shlwapi/PathIsUNCServerShare.c index 313627ced9c..ad1c8b34c66 100644 --- a/modules/rostests/apitests/shlwapi/PathIsUNCServerShare.c +++ b/modules/rostests/apitests/shlwapi/PathIsUNCServerShare.c @@ -27,7 +27,7 @@ do { \ ok(ret == (exp), "Expected %s to be %d, was %d\n", wine_dbgstr_w((str)), (exp), ret); \ } while (0) -START_TEST(isuncpathservershare) +START_TEST(PathIsUNCServerShare) { DO_TEST(TRUE, L"\\\\server\\share"); DO_TEST(TRUE, L"\\\\reactos\\folder9"); diff --git a/modules/rostests/apitests/shlwapi/testlist.c b/modules/rostests/apitests/shlwapi/testlist.c index 4f9738baff2..d6f9f24f61f 100644 --- a/modules/rostests/apitests/shlwapi/testlist.c +++ b/modules/rostests/apitests/shlwapi/testlist.c @@ -8,9 +8,9 @@ extern void func_PathFindOnPath(void); extern void func_IShellFolderHelpers(void); extern void func_IsQSForward(void); extern void func_IStreamPidl(void); -extern void func_isuncpath(void); -extern void func_isuncpathserver(void); -extern void func_isuncpathservershare(void); +extern void func_PathIsUNC(void); +extern void func_PathIsUNCServer(void); +extern void func_PathIsUNCServerShare(void); extern void func_PathUnExpandEnvStrings(void); extern void func_PathUnExpandEnvStringsForUser(void); extern void func_SHAreIconsEqual(void); @@ -32,9 +32,9 @@ const struct test winetest_testlist[] = { "IShellFolderHelpers", func_IShellFolderHelpers }, { "IsQSForward", func_IsQSForward }, { "IStreamPidl", func_IStreamPidl }, - { "PathIsUNC", func_isuncpath }, - { "PathIsUNCServer", func_isuncpathserver }, - { "PathIsUNCServerShare", func_isuncpathservershare }, + { "PathIsUNC", func_PathIsUNC }, + { "PathIsUNCServer", func_PathIsUNCServer }, + { "PathIsUNCServerShare", func_PathIsUNCServerShare }, { "PathUnExpandEnvStrings", func_PathUnExpandEnvStrings }, { "PathUnExpandEnvStringsForUser", func_PathUnExpandEnvStringsForUser }, { "SHAreIconsEqual", func_SHAreIconsEqual }, diff --git a/modules/rostests/apitests/user32/testlist.c b/modules/rostests/apitests/user32/testlist.c index f613ac0b090..a73593f3153 100644 --- a/modules/rostests/apitests/user32/testlist.c +++ b/modules/rostests/apitests/user32/testlist.c @@ -63,7 +63,7 @@ extern void func_TrackMouseEvent(void); extern void func_TrackPopupMenuEx(void); extern void func_VirtualKey(void); extern void func_WndProc(void); -extern void func_wsprintf(void); +extern void func_wsprintfApi(void); const struct test winetest_testlist[] = { @@ -128,7 +128,7 @@ const struct test winetest_testlist[] = { "TrackPopupMenuEx", func_TrackPopupMenuEx }, { "VirtualKey", func_VirtualKey }, { "WndProc", func_WndProc }, - { "wsprintfApi", func_wsprintf }, + { "wsprintfApi", func_wsprintfApi }, { 0, 0 } };