=?UTF-8?Q?Rafa=C5=82=20Harabie=C5=84=20?=: kernel32/tests: Check last error after successful Tls/FlsGetValue calls.
Alexandre Julliard
julliard at winehq.org
Mon Nov 13 16:24:18 CST 2017
Module: wine
Branch: master
Commit: 56424c5b6fdabc59de188a1971d17beccfff73b2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=56424c5b6fdabc59de188a1971d17beccfff73b2
Author: Rafał Harabień <rafalh1992 at o2.pl>
Date: Mon Nov 13 00:32:19 2017 +0100
kernel32/tests: Check last error after successful Tls/FlsGetValue calls.
Signed-off-by: Rafał Harabień <rafalh1992 at o2.pl>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/kernel32/tests/thread.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c
index 334bdf4..5918a58 100644
--- a/dlls/kernel32/tests/thread.c
+++ b/dlls/kernel32/tests/thread.c
@@ -1325,10 +1325,12 @@ static DWORD WINAPI LS_ThreadProc(LPVOID p)
ok(LS_index0 != LS_index1, "%s failed\n", LS_AllocFuncName);
/* Both slots should be initialized to NULL */
+ SetLastError(0xdeadbeef);
val = LS_GetValueFunc(LS_index0);
ok(GetLastError() == ERROR_SUCCESS, "%s failed\n", LS_GetValueFuncName);
ok(val == NULL, "Slot not initialized correctly\n");
+ SetLastError(0xdeadbeef);
val = LS_GetValueFunc(LS_index1);
ok(GetLastError() == ERROR_SUCCESS, "%s failed\n", LS_GetValueFuncName);
ok(val == NULL, "Slot not initialized correctly\n");
@@ -1337,10 +1339,12 @@ static DWORD WINAPI LS_ThreadProc(LPVOID p)
if (sync_threads_and_run_one(0, id))
{
+ SetLastError(0xdeadbeef);
val = LS_GetValueFunc(LS_index0);
ok(GetLastError() == ERROR_SUCCESS, "%s failed\n", LS_GetValueFuncName);
ok(val == NULL, "Slot not initialized correctly\n");
+ SetLastError(0xdeadbeef);
val = LS_GetValueFunc(LS_index1);
ok(GetLastError() == ERROR_SUCCESS, "%s failed\n", LS_GetValueFuncName);
ok(val == NULL, "Slot not initialized correctly\n");
@@ -1351,10 +1355,12 @@ static DWORD WINAPI LS_ThreadProc(LPVOID p)
ret = LS_SetValueFunc(LS_index1, (LPVOID) 2);
ok(ret, "%s failed\n", LS_SetValueFuncName);
+ SetLastError(0xdeadbeef);
val = LS_GetValueFunc(LS_index0);
ok(GetLastError() == ERROR_SUCCESS, "%s failed\n", LS_GetValueFuncName);
ok(val == (LPVOID) 1, "Slot not initialized correctly\n");
+ SetLastError(0xdeadbeef);
val = LS_GetValueFunc(LS_index1);
ok(GetLastError() == ERROR_SUCCESS, "%s failed\n", LS_GetValueFuncName);
ok(val == (LPVOID) 2, "Slot not initialized correctly\n");
More information about the wine-cvs
mailing list