[PATCH 0/2] MR1898: kernel32/tests: Call newer functions not on Windows XP or 2003 via function addresses (fiber)
There are times when it is useful to test changes on the Windows XP and 2003 VMs, but the direct use of functions not on those platforms makes this impossible. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1898
From: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> --- dlls/kernel32/tests/fiber.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/dlls/kernel32/tests/fiber.c b/dlls/kernel32/tests/fiber.c index 433883e5a26..efdca21c33b 100644 --- a/dlls/kernel32/tests/fiber.c +++ b/dlls/kernel32/tests/fiber.c @@ -803,14 +803,14 @@ static void WINAPI fls_exit_deadlock_callback(void *arg) static DWORD CALLBACK fls_exit_deadlock_thread(void *arg) { - FlsSetValue((DWORD_PTR)arg, (void *)1); + pFlsSetValue((DWORD_PTR)arg, (void *)1); return 0; } static void fls_exit_deadlock_child(void) { - DWORD index = FlsAlloc(fls_exit_deadlock_callback); - FlsSetValue(index, (void *)2); + DWORD index = pFlsAlloc(fls_exit_deadlock_callback); + pFlsSetValue(index, (void *)2); CreateThread(NULL, 0, fls_exit_deadlock_thread, (void *)(DWORD_PTR)index, 0, NULL); Sleep(100); ExitProcess(0); @@ -853,19 +853,25 @@ START_TEST(fiber) char **argv; int argc; - argc = winetest_get_mainargs(&argv); + init_funcs(); - if (argc == 3 && !strcmp(argv[2], "fls_exit_deadlock")) + if (!pCreateFiber) { - fls_exit_deadlock_child(); + win_skip( "Fibers not supported by win95\n" ); return; } - init_funcs(); + if (!pFlsAlloc || !pFlsSetValue) + { + win_skip( "Fiber Local Storage not supported\n" ); + return; + } - if (!pCreateFiber) + argc = winetest_get_mainargs(&argv); + + if (argc == 3 && !strcmp(argv[2], "fls_exit_deadlock")) { - win_skip( "Fibers not supported by win95\n" ); + fls_exit_deadlock_child(); return; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/1898
From: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> --- dlls/kernel32/tests/fiber.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/dlls/kernel32/tests/fiber.c b/dlls/kernel32/tests/fiber.c index efdca21c33b..fa482e3b2d6 100644 --- a/dlls/kernel32/tests/fiber.c +++ b/dlls/kernel32/tests/fiber.c @@ -855,12 +855,6 @@ START_TEST(fiber) init_funcs(); - if (!pCreateFiber) - { - win_skip( "Fibers not supported by win95\n" ); - return; - } - if (!pFlsAlloc || !pFlsSetValue) { win_skip( "Fiber Local Storage not supported\n" ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/1898
participants (2)
-
Hugh McMaster -
Hugh McMaster (@hmc)