https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0790755208f3f94a5b927…
commit 0790755208f3f94a5b92709f55c416196f942e36
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Jan 16 20:10:04 2022 +0100
Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com>
CommitDate: Sun Jun 19 13:06:29 2022 +0200
[WINESYNC] reg/tests: Pass __FILE__ from the caller so the correct filename is shown
in error logs.
Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id e3a738b1562de68bd92c4be6bc948ea31f6a2d79 by Hugh McMaster
<hugh.mcmaster(a)outlook.com>
---
modules/rostests/winetests/reg/add.c | 26 +++++++-------
modules/rostests/winetests/reg/export.c | 5 +--
modules/rostests/winetests/reg/import.c | 2 +-
modules/rostests/winetests/reg/reg_test.h | 56 ++++++++++++++++---------------
sdk/tools/winesync/reg.cfg | 2 +-
5 files changed, 48 insertions(+), 43 deletions(-)
diff --git a/modules/rostests/winetests/reg/add.c b/modules/rostests/winetests/reg/add.c
index bd0888ae831..a34bcf7c9ac 100644
--- a/modules/rostests/winetests/reg/add.c
+++ b/modules/rostests/winetests/reg/add.c
@@ -22,7 +22,7 @@
#define TODO_REG_SIZE (0x0002u)
#define TODO_REG_DATA (0x0004u)
-BOOL run_reg_exe_(unsigned line, const char *cmd, DWORD *rc)
+BOOL run_reg_exe_(const char *file, unsigned line, const char *cmd, DWORD *rc)
{
STARTUPINFOA si = {sizeof(STARTUPINFOA)};
PROCESS_INFORMATION pi;
@@ -51,8 +51,8 @@ BOOL run_reg_exe_(unsigned line, const char *cmd, DWORD *rc)
return bret;
}
-void verify_reg_(unsigned line, HKEY hkey, const char* value, DWORD exp_type,
- const void *exp_data, DWORD exp_size, DWORD todo)
+void verify_reg_(const char *file, unsigned line, HKEY hkey, const char *value,
+ DWORD exp_type, const void *exp_data, DWORD exp_size, DWORD todo)
{
DWORD type, size;
BYTE data[256];
@@ -76,7 +76,7 @@ void verify_reg_(unsigned line, HKEY hkey, const char* value, DWORD
exp_type,
}
}
-void verify_reg_nonexist_(unsigned line, HKEY hkey, const char *value)
+void verify_reg_nonexist_(const char *file, unsigned line, HKEY hkey, const char *value)
{
LONG err;
@@ -85,7 +85,8 @@ void verify_reg_nonexist_(unsigned line, HKEY hkey, const char *value)
(value && *value) ? value : "(Default)", err);
}
-void open_key_(unsigned line, const HKEY base, const char *path, const DWORD sam, HKEY
*hkey)
+void open_key_(const char *file, unsigned line, const HKEY base, const char *path,
+ const DWORD sam, HKEY *hkey)
{
LONG err;
@@ -93,7 +94,7 @@ void open_key_(unsigned line, const HKEY base, const char *path, const
DWORD sam
lok(err == ERROR_SUCCESS, "RegOpenKeyExA failed: %d\n", err);
}
-void close_key_(unsigned line, HKEY hkey)
+void close_key_(const char *file, unsigned line, HKEY hkey)
{
LONG err;
@@ -101,7 +102,7 @@ void close_key_(unsigned line, HKEY hkey)
lok(err == ERROR_SUCCESS, "RegCloseKey failed: %d\n", err);
}
-void verify_key_(unsigned line, HKEY key_base, const char *subkey)
+void verify_key_(const char *file, unsigned line, HKEY key_base, const char *subkey)
{
HKEY hkey;
LONG err;
@@ -113,7 +114,7 @@ void verify_key_(unsigned line, HKEY key_base, const char *subkey)
RegCloseKey(hkey);
}
-void verify_key_nonexist_(unsigned line, HKEY key_base, const char *subkey)
+void verify_key_nonexist_(const char *file, unsigned line, HKEY key_base, const char
*subkey)
{
HKEY hkey;
LONG err;
@@ -126,7 +127,7 @@ void verify_key_nonexist_(unsigned line, HKEY key_base, const char
*subkey)
RegCloseKey(hkey);
}
-void add_key_(unsigned line, const HKEY hkey, const char *path, HKEY *subkey)
+void add_key_(const char *file, unsigned line, const HKEY hkey, const char *path, HKEY
*subkey)
{
LONG err;
@@ -135,7 +136,7 @@ void add_key_(unsigned line, const HKEY hkey, const char *path, HKEY
*subkey)
lok(err == ERROR_SUCCESS, "RegCreateKeyExA failed: %d\n", err);
}
-void delete_key_(unsigned line, const HKEY hkey, const char *path)
+void delete_key_(const char *file, unsigned line, const HKEY hkey, const char *path)
{
if (path && *path)
{
@@ -188,7 +189,8 @@ cleanup:
return ret;
}
-void add_value_(unsigned line, HKEY hkey, const char *name, DWORD type, const void *data,
size_t size)
+void add_value_(const char *file, unsigned line, HKEY hkey, const char *name,
+ DWORD type, const void *data, size_t size)
{
LONG err;
@@ -196,7 +198,7 @@ void add_value_(unsigned line, HKEY hkey, const char *name, DWORD
type, const vo
lok(err == ERROR_SUCCESS, "RegSetValueExA failed: %d\n", err);
}
-void delete_value_(unsigned line, const HKEY hkey, const char *name)
+void delete_value_(const char *file, unsigned line, const HKEY hkey, const char *name)
{
LONG err;
diff --git a/modules/rostests/winetests/reg/export.c
b/modules/rostests/winetests/reg/export.c
index 9a3f7d5fbf0..32c99e36376 100644
--- a/modules/rostests/winetests/reg/export.c
+++ b/modules/rostests/winetests/reg/export.c
@@ -20,8 +20,9 @@
#define TODO_REG_COMPARE (0x0008u)
-#define compare_export(f,e,todo) compare_export_(__LINE__,f,e,todo)
-static BOOL compare_export_(unsigned line, const char *filename, const char *expected,
DWORD todo)
+#define compare_export(f,e,todo) compare_export_(__FILE__,__LINE__,f,e,todo)
+static BOOL compare_export_(const char *file, unsigned line, const char *filename,
+ const char *expected, DWORD todo)
{
FILE *fp;
long file_size;
diff --git a/modules/rostests/winetests/reg/import.c
b/modules/rostests/winetests/reg/import.c
index 58831625fa5..9b7a90ac99c 100644
--- a/modules/rostests/winetests/reg/import.c
+++ b/modules/rostests/winetests/reg/import.c
@@ -37,7 +37,7 @@ static BOOL write_file(const void *str, DWORD size)
return ret;
}
-BOOL import_reg(unsigned line, const char *contents, BOOL unicode, DWORD *rc)
+BOOL import_reg(const char *file, unsigned line, const char *contents, BOOL unicode,
DWORD *rc)
{
int lenA;
BOOL ret;
diff --git a/modules/rostests/winetests/reg/reg_test.h
b/modules/rostests/winetests/reg/reg_test.h
index 2f4bdf36437..14afa02930c 100644
--- a/modules/rostests/winetests/reg/reg_test.h
+++ b/modules/rostests/winetests/reg/reg_test.h
@@ -24,52 +24,54 @@
#include "wine/test.h"
/* Common #defines */
-#define lok ok_(__FILE__,line)
+#define lok ok_(file,line)
#define KEY_WINE "Software\\Wine"
#define KEY_BASE KEY_WINE "\\reg_test"
#define REG_EXIT_SUCCESS 0
#define REG_EXIT_FAILURE 1
/* add.c */
-#define run_reg_exe(c,r) run_reg_exe_(__LINE__,c,r)
-BOOL run_reg_exe_(unsigned line, const char *cmd, DWORD *rc);
+#define run_reg_exe(c,r) run_reg_exe_(__FILE__,__LINE__,c,r)
+BOOL run_reg_exe_(const char *file, unsigned line, const char *cmd, DWORD *rc);
-#define verify_reg(k,v,t,d,s,todo) verify_reg_(__LINE__,k,v,t,d,s,todo)
-void verify_reg_(unsigned line, HKEY hkey, const char* value, DWORD exp_type,
- const void *exp_data, DWORD exp_size, DWORD todo);
+#define verify_reg(k,v,t,d,s,todo) verify_reg_(__FILE__,__LINE__,k,v,t,d,s,todo)
+void verify_reg_(const char *file, unsigned line, HKEY hkey, const char *value,
+ DWORD exp_type, const void *exp_data, DWORD exp_size, DWORD todo);
-#define verify_reg_nonexist(k,v) verify_reg_nonexist_(__LINE__,k,v)
-void verify_reg_nonexist_(unsigned line, HKEY hkey, const char *value);
+#define verify_reg_nonexist(k,v) verify_reg_nonexist_(__FILE__,__LINE__,k,v)
+void verify_reg_nonexist_(const char *file, unsigned line, HKEY hkey, const char
*value);
-#define open_key(b,p,s,k) open_key_(__LINE__,b,p,s,k)
-void open_key_(unsigned line, const HKEY base, const char *path, const DWORD sam, HKEY
*hkey);
+#define open_key(b,p,s,k) open_key_(__FILE__,__LINE__,b,p,s,k)
+void open_key_(const char *file, unsigned line, const HKEY base, const char *path,
+ const DWORD sam, HKEY *hkey);
-#define close_key(k) close_key_(__LINE__,k)
-void close_key_(unsigned line, HKEY hkey);
+#define close_key(k) close_key_(__FILE__,__LINE__,k)
+void close_key_(const char *file, unsigned line, HKEY hkey);
-#define verify_key(k,s) verify_key_(__LINE__,k,s)
-void verify_key_(unsigned line, HKEY key_base, const char *subkey);
+#define verify_key(k,s) verify_key_(__FILE__,__LINE__,k,s)
+void verify_key_(const char *file, unsigned line, HKEY key_base, const char *subkey);
-#define verify_key_nonexist(k,s) verify_key_nonexist_(__LINE__,k,s)
-void verify_key_nonexist_(unsigned line, HKEY key_base, const char *subkey);
+#define verify_key_nonexist(k,s) verify_key_nonexist_(__FILE__,__LINE__,k,s)
+void verify_key_nonexist_(const char *file, unsigned line, HKEY key_base, const char
*subkey);
-#define add_key(k,p,s) add_key_(__LINE__,k,p,s)
-void add_key_(unsigned line, const HKEY hkey, const char *path, HKEY *subkey);
+#define add_key(k,p,s) add_key_(__FILE__,__LINE__,k,p,s)
+void add_key_(const char *file, unsigned line, const HKEY hkey, const char *path, HKEY
*subkey);
-#define delete_key(k,p) delete_key_(__LINE__,k,p)
-void delete_key_(unsigned line, const HKEY hkey, const char *path);
+#define delete_key(k,p) delete_key_(__FILE__,__LINE__,k,p)
+void delete_key_(const char *file, unsigned line, const HKEY hkey, const char *path);
LONG delete_tree(const HKEY key, const char *subkey);
-#define add_value(k,n,t,d,s) add_value_(__LINE__,k,n,t,d,s)
-void add_value_(unsigned line, HKEY hkey, const char *name, DWORD type, const void *data,
size_t size);
+#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,
+ DWORD type, const void *data, size_t size);
-#define delete_value(k,n) delete_value_(__LINE__,k,n)
-void delete_value_(unsigned line, const HKEY hkey, const char *name);
+#define delete_value(k,n) delete_value_(__FILE__,__LINE__,k,n)
+void delete_value_(const char *file, unsigned line, const HKEY hkey, const char *name);
/* import.c */
-#define test_import_str(c,r) import_reg(__LINE__,c,FALSE,r)
-#define test_import_wstr(c,r) import_reg(__LINE__,c,TRUE,r)
-BOOL import_reg(unsigned line, const char *contents, BOOL unicode, DWORD *rc);
+#define test_import_str(c,r) import_reg(__FILE__,__LINE__,c,FALSE,r)
+#define test_import_wstr(c,r) import_reg(__FILE__,__LINE__,c,TRUE,r)
+BOOL import_reg(const char *file, unsigned line, const char *contents, BOOL unicode,
DWORD *rc);
#endif /* __REG_TEST_H__ */
diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg
index 2231ec227a9..18f921b573b 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: 17023a8100a62852bbad342e5e7c705cafae9a1f
+ wine: e3a738b1562de68bd92c4be6bc948ea31f6a2d79