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
6a5f6716
Commit
6a5f6716
authored
Nov 05, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Nov 05, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Fix a test failure on Vista+.
parent
8d72b37d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
eventlog.c
dlls/advapi32/tests/eventlog.c
+18
-2
No files found.
dlls/advapi32/tests/eventlog.c
View file @
6a5f6716
...
...
@@ -44,6 +44,9 @@ static void create_backup(const char *filename)
handle
=
OpenEventLogA
(
NULL
,
"Application"
);
BackupEventLogA
(
handle
,
filename
);
CloseEventLog
(
handle
);
todo_wine
ok
(
GetFileAttributesA
(
filename
)
!=
INVALID_FILE_ATTRIBUTES
,
"Expected a backup file
\n
"
);
}
static
void
test_open_close
(
void
)
...
...
@@ -561,6 +564,7 @@ static void test_clear(void)
HANDLE
handle
;
BOOL
ret
;
const
char
backup
[]
=
"backup.evt"
;
const
char
backup2
[]
=
"backup2.evt"
;
SetLastError
(
0xdeadbeef
);
ret
=
ClearEventLogA
(
NULL
,
NULL
);
...
...
@@ -583,16 +587,28 @@ static void test_clear(void)
SetLastError
(
0xdeadbeef
);
ret
=
ClearEventLogA
(
handle
,
backup
);
ok
(
!
ret
,
"Expected failure
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
/* The eventlog service runs under an account that doesn't have the necessary
* permissions on the users home directory on a default Vista+ system.
*/
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
||
GetLastError
()
==
ERROR_ACCESS_DENIED
,
/* Vista+ */
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
/* Show that ClearEventLog only works for real eventlogs. */
SetLastError
(
0xdeadbeef
);
ret
=
ClearEventLogA
(
handle
,
backup2
);
ok
(
!
ret
,
"Expected failure
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
ok
(
GetFileAttributesA
(
backup2
)
==
INVALID_FILE_ATTRIBUTES
,
"Expected no backup file
\n
"
);
SetLastError
(
0xdeadbeef
);
ret
=
ClearEventLogA
(
handle
,
NULL
);
ok
(
!
ret
,
"Expected failure
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
CloseEventLog
(
handle
);
DeleteFileA
(
backup
);
todo_wine
ok
(
DeleteFileA
(
backup
),
"Could not delete the backup file
\n
"
);
}
START_TEST
(
eventlog
)
...
...
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