[KMTESTS:IO] Fix some failures in IoDeviceObject test. ROSTESTS-380
[reactos.git] / modules / rostests / kmtests / ntos_io / IoDeviceObject_user.c
index 50d66c5..e511391 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * PROJECT:         ReactOS kernel-mode tests
- * LICENSE:         GPLv2+ - See COPYING in the top level directory
- * PURPOSE:         Kernel-Mode Test Suite Driver Object test user-mode part
- * PROGRAMMER:      Thomas Faber <thomas.faber@reactos.org>
+ * PROJECT:     ReactOS kernel-mode tests
+ * LICENSE:     GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
+ * PURPOSE:     Kernel-Mode Test Suite Device Object test user-mode part
+ * COPYRIGHT:   Copyright 2011-2023 Thomas Faber (thomas.faber@reactos.org)
+ * COPYRIGHT:   Copyright 2022 Timo Kreuzer (timo.kreuzer@reactos.org)
  */
 
 #include <kmt_test.h>
@@ -16,7 +17,9 @@ START_TEST(IoDeviceObject)
     ok_eq_int(Error, ERROR_SUCCESS);
     if (Error)
         return;
-    KmtUnloadDriver();
+    /* Can't use the normal unload function here because we need the
+     * service to stick around. */
+    KmtUnloadDriverKeepService();
 
     Error = KmtLoadAndOpenDriver(L"IoDeviceObject", TRUE);
     ok_eq_int(Error, ERROR_SUCCESS);