[PATCH 1/3] ole32/tests: Fix tests failing on limited account
Nikolay Sivov
nsivov at codeweavers.com
Fri Mar 4 23:02:17 CST 2016
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/ole32/tests/compobj.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c
index b88029f..49aced9 100644
--- a/dlls/ole32/tests/compobj.c
+++ b/dlls/ole32/tests/compobj.c
@@ -2364,17 +2364,21 @@ static void test_OleRegGetUserType(void)
StringFromGUID2(&CLSID_non_existent, clsidW, sizeof(clsidW)/sizeof(clsidW[0]));
ret = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsidkeyW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &clsidhkey, &disposition);
+ if (!ret)
+ {
+ ret = RegCreateKeyExW(clsidhkey, clsidW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &classkey, NULL);
+ if (ret)
+ RegCloseKey(clsidhkey);
+ }
+
if (ret == ERROR_ACCESS_DENIED)
{
- skip("Failed to create test key, skipping some of OleRegGetUserType() tests.\n");
+ win_skip("Failed to create test key, skipping some of OleRegGetUserType() tests.\n");
return;
}
ok(!ret, "failed to create a key %d, error %d\n", ret, GetLastError());
- ret = RegCreateKeyExW(clsidhkey, clsidW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &classkey, NULL);
- ok(!ret, "failed to create a key %d, error %d\n", ret, GetLastError());
-
ret = RegSetValueExW(classkey, NULL, 0, REG_SZ, (const BYTE*)defvalueW, sizeof(defvalueW));
ok(!ret, "got %d, error %d\n", ret, GetLastError());
--
2.7.0
More information about the wine-patches
mailing list