[2/3] ntdll/tests: Add test for threadpool environment version 3.

Sebastian Lackner sebastian at fds-team.de
Wed Mar 30 21:53:25 CDT 2016


Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
---
 dlls/ntdll/tests/threadpool.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/dlls/ntdll/tests/threadpool.c b/dlls/ntdll/tests/threadpool.c
index 304fe91..1d8b1f9 100644
--- a/dlls/ntdll/tests/threadpool.c
+++ b/dlls/ntdll/tests/threadpool.c
@@ -477,6 +477,7 @@ static void CALLBACK simple2_cb(TP_CALLBACK_INSTANCE *instance, void *userdata)
 static void test_tp_simple(void)
 {
     TP_CALLBACK_ENVIRON environment;
+    TP_CALLBACK_ENVIRON_V3 environment3;
     TP_CLEANUP_GROUP *group;
     HANDLE semaphore;
     NTSTATUS status;
@@ -512,6 +513,17 @@ static void test_tp_simple(void)
     result = WaitForSingleObject(semaphore, 1000);
     ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result);
 
+    /* test with environment version 3 */
+    memset(&environment3, 0, sizeof(environment3));
+    environment3.Version = 3;
+    environment3.Pool = pool;
+    environment3.CallbackPriority = TP_CALLBACK_PRIORITY_NORMAL;
+    environment3.Size = sizeof(environment3);
+    status = pTpSimpleTryPost(simple_cb, semaphore, (TP_CALLBACK_ENVIRON *)&environment3);
+    ok(!status, "TpSimpleTryPost failed with status %x\n", status);
+    result = WaitForSingleObject(semaphore, 1000);
+    ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result);
+
     /* test with invalid version number */
     memset(&environment, 0, sizeof(environment));
     environment.Version = 9999;
-- 
2.7.1



More information about the wine-patches mailing list