https://git.reactos.org/?p=reactos.git;a=commitdiff;h=855cf07c706e304e148d2…
commit 855cf07c706e304e148d2356ae2ca64a043abbea
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Jan 16 14:51:45 2022 +0100
Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com>
CommitDate: Sun Jun 19 13:06:27 2022 +0200
[WINESYNC] reg/tests: Ensure test key is fully removed before each sequence begins.
Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 405853adb53695c0fd3f7d38ac733dd6900a48dd by Hugh McMaster
<hugh.mcmaster(a)outlook.com>
---
modules/rostests/winetests/reg/reg.c | 40 ++++++++++++++++++------------------
sdk/tools/winesync/reg.cfg | 2 +-
2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/modules/rostests/winetests/reg/reg.c b/modules/rostests/winetests/reg/reg.c
index 4be9e635ed7..e11e4e9227e 100644
--- a/modules/rostests/winetests/reg/reg.c
+++ b/modules/rostests/winetests/reg/reg.c
@@ -222,6 +222,9 @@ static void test_add(void)
DWORD r, dword, type, size;
char buffer[22];
+ delete_tree(HKEY_CURRENT_USER, KEY_BASE);
+ verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE);
+
run_reg_exe("reg add", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
@@ -234,11 +237,6 @@ static void test_add(void)
run_reg_exe("reg add -H", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
- err = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
- ok(err == ERROR_SUCCESS || err == ERROR_FILE_NOT_FOUND, "got %d\n", err);
-
- verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE);
-
run_reg_exe("reg add HKCU\\" KEY_BASE " /f", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
@@ -602,12 +600,11 @@ static void test_add(void)
static void test_delete(void)
{
HKEY hkey, hsubkey;
- LONG err;
DWORD r;
const DWORD deadbeef = 0xdeadbeef;
- err = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
- ok(err == ERROR_SUCCESS || err == ERROR_FILE_NOT_FOUND, "got %d\n", err);
+ delete_tree(HKEY_CURRENT_USER, KEY_BASE);
+ verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE);
run_reg_exe("reg delete", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
@@ -664,8 +661,8 @@ static void test_query(void)
const DWORD dword1 = 0x123;
const DWORD dword2 = 0xabc;
- err = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
- ok(err == ERROR_SUCCESS || err == ERROR_FILE_NOT_FOUND, "got %d\n", err);
+ delete_tree(HKEY_CURRENT_USER, KEY_BASE);
+ verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE);
run_reg_exe("reg query", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
@@ -858,8 +855,8 @@ static void test_import(void)
LONG err;
BYTE hex[8];
- err = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
- ok(err == ERROR_SUCCESS || err == ERROR_FILE_NOT_FOUND, "got %d\n", err);
+ delete_tree(HKEY_CURRENT_USER, KEY_BASE);
+ verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE);
run_reg_exe("reg import", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
@@ -2387,8 +2384,8 @@ static void test_unicode_import(void)
char buffer[24];
BYTE hex[8];
- err = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
- ok(err == ERROR_SUCCESS || err == ERROR_FILE_NOT_FOUND, "got %d\n", err);
+ delete_tree(HKEY_CURRENT_USER, KEY_BASE);
+ verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE);
test_import_wstr("REGEDIT\n", &r);
ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS) /* WinXP */,
@@ -3910,8 +3907,8 @@ static void test_import_with_whitespace(void)
DWORD r, dword;
LONG err;
- err = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
- ok(err == ERROR_SUCCESS || err == ERROR_FILE_NOT_FOUND, "got %d\n", err);
+ delete_tree(HKEY_CURRENT_USER, KEY_BASE);
+ verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE);
test_import_str(" REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n",
&r);
@@ -4058,8 +4055,8 @@ static void test_unicode_import_with_whitespace(void)
DWORD r, dword;
LONG err;
- err = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
- ok(err == ERROR_SUCCESS || err == ERROR_FILE_NOT_FOUND, "got %d\n", err);
+ delete_tree(HKEY_CURRENT_USER, KEY_BASE);
+ verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE);
test_import_wstr("\xef\xbb\xbf Windows Registry Editor Version 5.00\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n",
&r);
@@ -4453,8 +4450,8 @@ static void test_export(void)
"\"Wine4g\"=\"Value2\"\r\n"
"\"Wine4h\"=\"abc\"\r\n\r\n";
- err = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
- ok(err == ERROR_SUCCESS || err == ERROR_FILE_NOT_FOUND, "got %d\n", err);
+ delete_tree(HKEY_CURRENT_USER, KEY_BASE);
+ verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE);
run_reg_exe("reg export", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
@@ -4691,6 +4688,9 @@ static void test_copy(void)
{
DWORD r;
+ delete_tree(HKEY_CURRENT_USER, KEY_BASE);
+ verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE);
+
run_reg_exe("reg copy", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg
index 46149d5af82..08fb675aadd 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: add814af3eb7368961fe5b37a66c616e4bd97e4b
+ wine: 405853adb53695c0fd3f7d38ac733dd6900a48dd