https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2d9dfc03d8d9c9e212712…
commit 2d9dfc03d8d9c9e212712827a63855884763cd1f
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Mon Jan 17 18:47:37 2022 +0100
Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com>
CommitDate: Sun Jun 19 13:06:38 2022 +0200
[WINESYNC] reg/tests: Verify key opening and key deletion in delete_tree().
Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 5115e51adb103f023600269ddc1833386fcc1e79 by Hugh McMaster
<hugh.mcmaster(a)outlook.com>
---
modules/rostests/winetests/reg/add.c | 7 +++++--
modules/rostests/winetests/reg/reg_test.h | 3 ++-
sdk/tools/winesync/reg.cfg | 2 +-
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules/rostests/winetests/reg/add.c b/modules/rostests/winetests/reg/add.c
index 36fa634796d..469f354de39 100644
--- a/modules/rostests/winetests/reg/add.c
+++ b/modules/rostests/winetests/reg/add.c
@@ -154,7 +154,7 @@ void delete_key_(const char *file, unsigned line, HKEY root, const
char *path, R
}
}
-LONG delete_tree(HKEY root, const char *path, REGSAM sam)
+LONG delete_tree_(const char *file, unsigned line, HKEY root, const char *path, REGSAM
sam)
{
HKEY hkey;
LONG ret;
@@ -163,6 +163,7 @@ LONG delete_tree(HKEY root, const char *path, REGSAM sam)
static const char empty[1];
ret = RegOpenKeyExA(root, path, 0, KEY_READ|sam, &hkey);
+ lok(!ret || ret == ERROR_FILE_NOT_FOUND, "RegOpenKeyExA failed, got error
%d\n", ret);
if (ret) return ret;
ret = RegQueryInfoKeyA(hkey, NULL, NULL, NULL, NULL, &max_subkey_len,
@@ -184,7 +185,7 @@ LONG delete_tree(HKEY root, const char *path, REGSAM sam)
ret = RegEnumKeyExA(hkey, 0, subkey_name, &subkey_len, NULL, NULL, NULL,
NULL);
if (ret == ERROR_NO_MORE_ITEMS) break;
if (ret) goto cleanup;
- ret = delete_tree(hkey, subkey_name, sam);
+ ret = delete_tree_(file, line, hkey, subkey_name, sam);
if (ret) goto cleanup;
}
@@ -193,6 +194,8 @@ LONG delete_tree(HKEY root, const char *path, REGSAM sam)
else
ret = RegDeleteKeyExA(hkey, empty, sam, 0);
+ lok(!ret, "Failed to delete registry key, got error %d\n", ret);
+
cleanup:
HeapFree(GetProcessHeap(), 0, subkey_name);
RegCloseKey(hkey);
diff --git a/modules/rostests/winetests/reg/reg_test.h
b/modules/rostests/winetests/reg/reg_test.h
index a5d7169beb4..3f64e552a19 100644
--- a/modules/rostests/winetests/reg/reg_test.h
+++ b/modules/rostests/winetests/reg/reg_test.h
@@ -64,7 +64,8 @@ void add_key_(const char *file, unsigned line, const HKEY root, const
char *path
#define delete_key(r,p,s) delete_key_(__FILE__,__LINE__,r,p,s)
void delete_key_(const char *file, unsigned line, HKEY root, const char *path, REGSAM
sam);
-LONG delete_tree(HKEY root, const char *path, REGSAM sam);
+#define delete_tree(r,p,s) delete_tree_(__FILE__,__LINE__,r,p,s)
+LONG delete_tree_(const char *file, unsigned line, HKEY root, const char *path, REGSAM
sam);
#define add_value(k,n,t,d,s) add_value_(__FILE__,__LINE__,k,n,t,d,s)
void add_value_(const char *file, unsigned line, HKEY hkey, const char *name,
diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg
index 823cdbe2830..fdd5714c815 100644
--- a/sdk/tools/winesync/reg.cfg
+++ b/sdk/tools/winesync/reg.cfg
@@ -4,4 +4,4 @@ directories:
files:
programs/reg/resource.h: base/applications/cmdutils/reg/resource.h
tags:
- wine: 76b30097525f755f572d835b0187d9496941d985
+ wine: 5115e51adb103f023600269ddc1833386fcc1e79