mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
shlwapi-SH_Shared: Fix test failures on Windows7/8 testbots.
This commit is contained in:
parent
108cd9f304
commit
fb86960b4f
@ -1,14 +1,14 @@
|
||||
From db243f2450c75fe4adade70f6895de83858ec0ca Mon Sep 17 00:00:00 2001
|
||||
From 1a0816051ee38e0ec432a7e2fac749c67e50d977 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 1 Oct 2014 02:36:47 +0200
|
||||
Subject: shlwapi/tests: Add SH*Shared inter-process tests.
|
||||
|
||||
---
|
||||
dlls/shlwapi/tests/ordinal.c | 98 ++++++++++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 90 insertions(+), 8 deletions(-)
|
||||
dlls/shlwapi/tests/ordinal.c | 103 +++++++++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 95 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/shlwapi/tests/ordinal.c b/dlls/shlwapi/tests/ordinal.c
|
||||
index cb90d31..7bd1692 100644
|
||||
index cb90d31..2746516 100644
|
||||
--- a/dlls/shlwapi/tests/ordinal.c
|
||||
+++ b/dlls/shlwapi/tests/ordinal.c
|
||||
@@ -444,12 +444,20 @@ static void test_SHSearchMapInt(void)
|
||||
@ -36,7 +36,7 @@ index cb90d31..7bd1692 100644
|
||||
BOOL ret;
|
||||
|
||||
procid=GetCurrentProcessId();
|
||||
@@ -458,19 +466,79 @@ static void test_alloc_shared(void)
|
||||
@@ -458,19 +466,84 @@ static void test_alloc_shared(void)
|
||||
ret = pSHFreeShared(hmem, procid);
|
||||
ok( ret, "SHFreeShared failed: %u\n", GetLastError());
|
||||
|
||||
@ -66,7 +66,7 @@ index cb90d31..7bd1692 100644
|
||||
+
|
||||
+ p = pSHLockShared(hmem, procid);
|
||||
+ ok(p != NULL,"SHLockShared failed: %u\n", GetLastError());
|
||||
+ if (p != NULL)
|
||||
+ if (p != NULL && p->value != 0x12345678)
|
||||
+ {
|
||||
+ ok(p->value == 0x12345679, "Wrong value in shared memory: %d instead of %d\n", p->value, 0x12345679);
|
||||
+ hmem2 = p->handle;
|
||||
@ -102,24 +102,29 @@ index cb90d31..7bd1692 100644
|
||||
+ BOOL ret;
|
||||
+
|
||||
+ p = pSHLockShared(hmem, procid);
|
||||
+ ok(p != NULL,"SHLockShared failed: %u\n", GetLastError());
|
||||
+ if (p != NULL)
|
||||
+ ok(p != NULL || broken(p == NULL) /* Windows 7/8 */,"SHLockShared failed: %u\n", GetLastError());
|
||||
+ if (p == NULL)
|
||||
+ {
|
||||
+ ok(p->value == 0x12345678, "Wrong value in shared memory: %d instead of %d\n", p->value, 0x12345678);
|
||||
+
|
||||
+ val.value = 0xDEADBEEF;
|
||||
+ val.handle = 0;
|
||||
+
|
||||
+ p->handle = pSHAllocShared(&val, sizeof(val), procid);
|
||||
+ ok(p->handle != NULL, "SHAllocShared(NULL...) failed: %u\n", GetLastError());
|
||||
+ p->value++;
|
||||
+ win_skip("Subprocess failed to modify shared memory, skipping test\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ ok(p->value == 0x12345678, "Wrong value in shared memory: %d instead of %d\n", p->value, 0x12345678);
|
||||
+
|
||||
+ val.value = 0xDEADBEEF;
|
||||
+ val.handle = 0;
|
||||
+
|
||||
+ p->handle = pSHAllocShared(&val, sizeof(val), procid);
|
||||
+ ok(p->handle != NULL, "SHAllocShared(NULL...) failed: %u\n", GetLastError());
|
||||
+ p->value++;
|
||||
+
|
||||
+ ret = pSHUnlockShared(p);
|
||||
+ ok(ret, "SHUnlockShared failed: %u\n", GetLastError());
|
||||
+
|
||||
}
|
||||
|
||||
static void test_fdsa(void)
|
||||
@@ -3057,6 +3125,9 @@ static void test_SHSetParentHwnd(void)
|
||||
@@ -3057,6 +3130,9 @@ static void test_SHSetParentHwnd(void)
|
||||
|
||||
START_TEST(ordinal)
|
||||
{
|
||||
@ -129,7 +134,7 @@ index cb90d31..7bd1692 100644
|
||||
hShlwapi = GetModuleHandleA("shlwapi.dll");
|
||||
is_win2k_and_lower = GetProcAddress(hShlwapi, "StrChrNW") == 0;
|
||||
is_win9x = GetProcAddress(hShlwapi, (LPSTR)99) == 0; /* StrCpyNXA */
|
||||
@@ -3069,6 +3140,17 @@ START_TEST(ordinal)
|
||||
@@ -3069,6 +3145,17 @@ START_TEST(ordinal)
|
||||
|
||||
init_pointers();
|
||||
|
||||
@ -147,7 +152,7 @@ index cb90d31..7bd1692 100644
|
||||
hmlang = LoadLibraryA("mlang.dll");
|
||||
pLcidToRfc1766A = (void *)GetProcAddress(hmlang, "LcidToRfc1766A");
|
||||
|
||||
@@ -3077,7 +3159,7 @@ START_TEST(ordinal)
|
||||
@@ -3077,7 +3164,7 @@ START_TEST(ordinal)
|
||||
|
||||
test_GetAcceptLanguagesA();
|
||||
test_SHSearchMapInt();
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d343442b0729be73af148458a9a49f5faca63e0d Mon Sep 17 00:00:00 2001
|
||||
From b88dc3e90eba2f639ee572a93b1885da39b9d52c Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 1 Oct 2014 02:39:49 +0200
|
||||
Subject: shlwapi: Fixed swapped argument order in SHLWAPI_DupSharedHandle
|
||||
@ -41,7 +41,7 @@ index 303c63a..e5da1cf 100644
|
||||
/* Close local copy */
|
||||
return CloseHandle(hClose);
|
||||
diff --git a/dlls/shlwapi/tests/ordinal.c b/dlls/shlwapi/tests/ordinal.c
|
||||
index 7bd1692..409ff3f 100644
|
||||
index 2746516..614bd94 100644
|
||||
--- a/dlls/shlwapi/tests/ordinal.c
|
||||
+++ b/dlls/shlwapi/tests/ordinal.c
|
||||
@@ -505,16 +505,13 @@ static void test_alloc_shared(int argc, char **argv)
|
||||
|
Loading…
Reference in New Issue
Block a user