From 22ef1c7e2aa7872d9b3c82a6d32abc92aa2b61a3 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sat, 5 Mar 2016 08:02:19 +0300 Subject: [PATCH] ole32/tests: Fixed CoGetPSClsid() test failures when running on limited account. Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/ole32/tests/compobj.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c index 65a8fb58c91..183d8a036c4 100644 --- a/dlls/ole32/tests/compobj.c +++ b/dlls/ole32/tests/compobj.c @@ -1293,6 +1293,12 @@ static void test_CoGetPSClsid(void) ok(!res, "RegCreateKeyEx returned %d\n", res); res = RegCreateKeyExA(hkey_iface, clsidDeadBeef, 0, NULL, 0, KEY_ALL_ACCESS | opposite, NULL, &hkey, NULL); + if (res == ERROR_ACCESS_DENIED) + { + win_skip("Failed to create a key, skipping some of CoGetPSClsid() tests\n"); + goto cleanup; + } + ok(!res, "RegCreateKeyEx returned %d\n", res); res = RegCreateKeyExA(hkey, "ProxyStubClsid32", 0, NULL, 0, KEY_ALL_ACCESS | opposite, NULL, &hkey_psclsid, NULL); @@ -1310,6 +1316,8 @@ static void test_CoGetPSClsid(void) RegCloseKey(hkey); res = pRegDeleteKeyExA(hkey_iface, clsidDeadBeef, opposite, 0); ok(!res, "RegDeleteKeyEx returned %d\n", res); + + cleanup: RegCloseKey(hkey_iface); }