Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b13477de
Commit
b13477de
authored
Mar 21, 2024
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 21, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Remove all files created by RegLoadAppKey tests.
parent
cc62cdc1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
15 deletions
+12
-15
registry.c
dlls/advapi32/tests/registry.c
+12
-15
No files found.
dlls/advapi32/tests/registry.c
View file @
b13477de
...
...
@@ -1673,31 +1673,26 @@ static void wait_file_available(char *path)
static
void
test_reg_load_app_key
(
void
)
{
DWORD
ret
,
size
;
char
temppath
[
MAX_PATH
],
hivefilepath
[
MAX_PATH
]
;
char
hivefilepath
[
2
*
MAX_PATH
],
*
p
;
const
BYTE
test_data
[]
=
"Hello World"
;
BYTE
output
[
sizeof
(
test_data
)];
HKEY
appkey
=
NULL
;
GetTempPathA
(
sizeof
(
temppath
),
temppath
);
GetTempFileNameA
(
temppath
,
"key"
,
0
,
hivefilepath
);
DeleteFileA
(
hivefilepath
);
if
(
!
set_privileges
(
SE_BACKUP_NAME
,
TRUE
)
||
!
set_privileges
(
SE_RESTORE_NAME
,
FALSE
))
if
(
!
set_privileges
(
SE_BACKUP_NAME
,
TRUE
))
{
win_skip
(
"Failed to set SE_BACKUP_NAME privileges, skipping tests
\n
"
);
return
;
}
GetTempPathA
(
MAX_PATH
,
hivefilepath
);
strcat
(
hivefilepath
,
"
\\
wine_reg_test"
);
CreateDirectoryA
(
hivefilepath
,
NULL
);
strcat
(
hivefilepath
,
"
\\
saved_key"
);
ret
=
RegSaveKeyA
(
hkey_main
,
hivefilepath
,
NULL
);
if
(
ret
!=
ERROR_SUCCESS
)
{
win_skip
(
"Failed to save test key 0x%lx
\n
"
,
ret
);
return
;
}
ok
(
ret
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %ld
\n
"
,
ret
);
set_privileges
(
SE_BACKUP_NAME
,
FALSE
);
set_privileges
(
SE_RESTORE_NAME
,
FALSE
);
/* Test simple key load */
/* Check if the changes are saved */
...
...
@@ -1726,8 +1721,10 @@ static void test_reg_load_app_key(void)
RegCloseKey
(
appkey
);
wait_file_available
(
hivefilepath
);
ret
=
DeleteFileA
(
hivefilepath
);
ok
(
ret
,
"couldn't delete hive file %ld
\n
"
,
GetLastError
());
p
=
strrchr
(
hivefilepath
,
'\\'
);
*
p
=
0
;
delete_dir
(
hivefilepath
);
}
/* tests that show that RegConnectRegistry and
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment