https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bbfb3caa3609bb1716a146efc5437dc4c6e4a910

commit bbfb3caa3609bb1716a146efc5437dc4c6e4a910
Author:     Pierre Schweitzer <pie...@reactos.org>
AuthorDate: Sat Mar 2 10:29:26 2019 +0100
Commit:     Pierre Schweitzer <pie...@reactos.org>
CommitDate: Sat Mar 2 10:30:00 2019 +0100

    [NTOSKRNL] Add a test for ExUuidCreate
---
 modules/rostests/kmtests/CMakeLists.txt        |  1 +
 modules/rostests/kmtests/kmtest_drv/testlist.c |  2 ++
 modules/rostests/kmtests/ntos_ex/ExUuid.c      | 21 +++++++++++++++++++++
 3 files changed, 24 insertions(+)

diff --git a/modules/rostests/kmtests/CMakeLists.txt 
b/modules/rostests/kmtests/CMakeLists.txt
index feb522be36..8d56d61b2d 100644
--- a/modules/rostests/kmtests/CMakeLists.txt
+++ b/modules/rostests/kmtests/CMakeLists.txt
@@ -54,6 +54,7 @@ list(APPEND KMTEST_DRV_SOURCE
     ntos_ex/ExSequencedList.c
     ntos_ex/ExSingleList.c
     ntos_ex/ExTimer.c
+    ntos_ex/ExUuid.c
     ntos_fsrtl/FsRtlDissect.c
     ntos_fsrtl/FsRtlExpression.c
     ntos_fsrtl/FsRtlLegal.c
diff --git a/modules/rostests/kmtests/kmtest_drv/testlist.c 
b/modules/rostests/kmtests/kmtest_drv/testlist.c
index fea8708b4f..11d63bbad2 100644
--- a/modules/rostests/kmtests/kmtest_drv/testlist.c
+++ b/modules/rostests/kmtests/kmtest_drv/testlist.c
@@ -19,6 +19,7 @@ KMT_TESTFUNC Test_ExResource;
 KMT_TESTFUNC Test_ExSequencedList;
 KMT_TESTFUNC Test_ExSingleList;
 KMT_TESTFUNC Test_ExTimer;
+KMT_TESTFUNC Test_ExUuid;
 KMT_TESTFUNC Test_FsRtlDissect;
 KMT_TESTFUNC Test_FsRtlExpression;
 KMT_TESTFUNC Test_FsRtlLegal;
@@ -90,6 +91,7 @@ const KMT_TEST TestList[] =
     { "ExSequencedList",                    Test_ExSequencedList },
     { "ExSingleList",                       Test_ExSingleList },
     { "-ExTimer",                           Test_ExTimer },
+    { "ExUuid",                             Test_ExUuid },
     { "Example",                            Test_Example },
     { "FsRtlDissect",                       Test_FsRtlDissect },
     { "FsRtlExpression",                    Test_FsRtlExpression },
diff --git a/modules/rostests/kmtests/ntos_ex/ExUuid.c 
b/modules/rostests/kmtests/ntos_ex/ExUuid.c
new file mode 100644
index 0000000000..2fb0bba8dc
--- /dev/null
+++ b/modules/rostests/kmtests/ntos_ex/ExUuid.c
@@ -0,0 +1,21 @@
+/*
+ * PROJECT:         ReactOS kernel-mode tests
+ * LICENSE:         LGPLv2+ - See COPYING.LIB in the top level directory
+ * PURPOSE:         Kernel-Mode Test Suite UUIDs test
+ * PROGRAMMER:      Pierre Schweitzer <pie...@reactos.org>
+ */
+
+#include <kmt_test.h>
+
+#define NDEBUG
+#include <debug.h>
+
+START_TEST(ExUuid)
+{
+    UUID Uuid;
+    NTSTATUS Status;
+
+    Status = ExUuidCreate(&Uuid);
+    ok(Status == STATUS_SUCCESS, "ExUuidCreate returned unexpected status: 
%lx\n", Status);
+    ok((Uuid.Data3 & 0x1000) == 0x1000, "Invalid UUID version: %x\n", 
(Uuid.Data3 & 0xF000));
+}

Reply via email to