Alexandre Julliard : ntdll/tests: Fix a test failure on restricted Windows.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jan 20 10:50:02 CST 2016


Module: wine
Branch: master
Commit: 29e0178cf51594240553b292aabe1fb1de3ddf21
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=29e0178cf51594240553b292aabe1fb1de3ddf21

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Jan 20 21:36:28 2016 +0900

ntdll/tests: Fix a test failure on restricted Windows.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/tests/om.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c
index a736c1e..58333d1 100644
--- a/dlls/ntdll/tests/om.c
+++ b/dlls/ntdll/tests/om.c
@@ -516,9 +516,13 @@ static void test_name_limits(void)
     }
     str.Length = sizeof(registryW) + 256 * sizeof(WCHAR);
     status = pNtCreateKey( &ret, GENERIC_ALL, &attr, 0, NULL, 0, NULL );
-    ok( status == STATUS_SUCCESS, "%u: NtCreateKey failed %x\n", str.Length, status );
-    pNtDeleteKey( ret );
-    pNtClose( ret );
+    ok( status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED,
+        "%u: NtCreateKey failed %x\n", str.Length, status );
+    if (!status)
+    {
+        pNtDeleteKey( ret );
+        pNtClose( ret );
+    }
     str.Length++;
     status = pNtCreateKey( &ret, GENERIC_ALL, &attr, 0, NULL, 0, NULL );
     ok( status == STATUS_OBJECT_NAME_INVALID ||




More information about the wine-cvs mailing list