Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e732ca19
Commit
e732ca19
authored
Nov 17, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Nov 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Fix some test failures on Vista without a servicepack.
parent
2ac74fa5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
3 deletions
+28
-3
eventlog.c
dlls/advapi32/tests/eventlog.c
+28
-3
No files found.
dlls/advapi32/tests/eventlog.c
View file @
e732ca19
...
...
@@ -707,7 +707,7 @@ static void test_readwrite(void)
PSID
user
;
DWORD
sidsize
,
count
;
BOOL
ret
,
sidavailable
;
BOOL
on_vista
=
FALSE
;
/* Used to indicate Vista
or higher
*/
BOOL
on_vista
=
FALSE
;
/* Used to indicate Vista
, W2K8 or Win7
*/
int
i
;
char
localcomputer
[
MAX_COMPUTERNAME_LENGTH
+
1
];
DWORD
len
=
sizeof
(
localcomputer
);
...
...
@@ -741,6 +741,31 @@ static void test_readwrite(void)
win_skip
(
"Win7 fails when using incorrect event types
\n
"
);
ret
=
ReportEvent
(
handle
,
0
,
0
,
0
,
NULL
,
0
,
0
,
NULL
,
NULL
);
}
else
{
void
*
buf
;
DWORD
read
,
needed
;
EVENTLOGRECORD
*
record
;
/* Needed to catch earlier Vista (with no ServicePack for example) */
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
EVENTLOGRECORD
));
ReadEventLogA
(
handle
,
EVENTLOG_SEQUENTIAL_READ
|
EVENTLOG_FORWARDS_READ
,
0
,
buf
,
sizeof
(
EVENTLOGRECORD
),
&
read
,
&
needed
);
buf
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
buf
,
needed
);
ReadEventLogA
(
handle
,
EVENTLOG_SEQUENTIAL_READ
|
EVENTLOG_FORWARDS_READ
,
0
,
buf
,
needed
,
&
read
,
&
needed
);
record
=
(
EVENTLOGRECORD
*
)
buf
;
/* Vista and W2K8 return EVENTLOG_SUCCESS, Windows versions before return
* the written eventtype (0x20 in this case).
*/
if
(
record
->
EventType
==
EVENTLOG_SUCCESS
)
on_vista
=
TRUE
;
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
}
ok
(
ret
,
"Expected success : %d
\n
"
,
GetLastError
());
/* This will clear the eventlog. The record numbering for new
...
...
@@ -778,7 +803,7 @@ static void test_readwrite(void)
ret
=
GetOldestEventLogRecord
(
handle
,
&
oldest
);
ok
(
ret
,
"Expected success
\n
"
);
ok
(
oldest
==
1
||
oldest
==
2
,
/* Vista
+
*/
oldest
==
2
,
/* Vista
SP1, W2K8 and Win7
*/
"Expected oldest to be 1 or 2, got %d
\n
"
,
oldest
);
if
(
oldest
==
2
)
on_vista
=
TRUE
;
...
...
@@ -805,7 +830,7 @@ static void test_readwrite(void)
/* Report only once */
if
(
on_vista
)
skip
(
"There is no DWORD alignment for UserSid on Vista
or higher
\n
"
);
skip
(
"There is no DWORD alignment for UserSid on Vista
, W2K8 or Win7
\n
"
);
/* Read all events from our created eventlog, one by one */
handle
=
OpenEventLogA
(
NULL
,
eventlogname
);
...
...
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