Alistair Leslie-Hughes : ntoskrnl.exe/tests: Add KeInitializeTimerEx tests.

Alexandre Julliard julliard at winehq.org
Mon Jul 9 16:00:34 CDT 2018


Module: wine
Branch: master
Commit: d6a2f5e23899c1f1d4a425059e442fb909aa6294
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d6a2f5e23899c1f1d4a425059e442fb909aa6294

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Mon Jul  9 01:07:03 2018 +0000

ntoskrnl.exe/tests: Add KeInitializeTimerEx tests.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntoskrnl.exe/tests/driver.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c
index 06b365f..cde78e5 100644
--- a/dlls/ntoskrnl.exe/tests/driver.c
+++ b/dlls/ntoskrnl.exe/tests/driver.c
@@ -172,6 +172,21 @@ todo_wine
     IoFreeMdl(mdl);
 }
 
+static void test_init_funcs(void)
+{
+    KTIMER timer, timer2;
+
+    KeInitializeTimerEx(&timer, NotificationTimer);
+    ok(timer.Header.Type == 8, "got: %u\n", timer.Header.Type);
+    ok(timer.Header.Size == 0 || timer.Header.Size == 10, "got: %u\n", timer.Header.Size);
+    ok(timer.Header.SignalState == 0, "got: %u\n", timer.Header.SignalState);
+
+    KeInitializeTimerEx(&timer2, SynchronizationTimer);
+    ok(timer2.Header.Type == 9, "got: %u\n", timer2.Header.Type);
+    ok(timer2.Header.Size == 0 || timer2.Header.Size == 10, "got: %u\n", timer2.Header.Size);
+    ok(timer2.Header.SignalState == 0, "got: %u\n", timer2.Header.SignalState);
+}
+
 static NTSTATUS main_test(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info)
 {
     ULONG length = stack->Parameters.DeviceIoControl.OutputBufferLength;
@@ -197,6 +212,7 @@ static NTSTATUS main_test(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info)
 
     test_currentprocess();
     test_mdl_map();
+    test_init_funcs();
 
     /* print process report */
     if (test_input->winetest_debug)




More information about the wine-cvs mailing list