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
e637a6f0
Commit
e637a6f0
authored
May 03, 2018
by
André Hentschel
Committed by
Alexandre Julliard
May 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe/tests: Don't test functions directly when reporting GetLastError().
Signed-off-by:
André Hentschel
<
nerv@dawncrow.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8a9812b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
ntoskrnl.c
dlls/ntoskrnl.exe/tests/ntoskrnl.c
+10
-4
No files found.
dlls/ntoskrnl.exe/tests/ntoskrnl.c
View file @
e637a6f0
...
...
@@ -68,8 +68,10 @@ static void unload_driver(SC_HANDLE service)
ControlService
(
service
,
SERVICE_CONTROL_STOP
,
&
status
);
while
(
status
.
dwCurrentState
==
SERVICE_STOP_PENDING
)
{
BOOL
ret
;
Sleep
(
100
);
ok
(
QueryServiceStatus
(
service
,
&
status
),
"QueryServiceStatus failed: %u
\n
"
,
GetLastError
());
ret
=
QueryServiceStatus
(
service
,
&
status
);
ok
(
ret
,
"QueryServiceStatus failed: %u
\n
"
,
GetLastError
());
}
ok
(
status
.
dwCurrentState
==
SERVICE_STOPPED
,
"expected SERVICE_STOPPED, got %d
\n
"
,
status
.
dwCurrentState
);
...
...
@@ -121,11 +123,13 @@ static SC_HANDLE load_driver(char *filename)
ok
(
ret
,
"StartService failed: %u
\n
"
,
GetLastError
());
/* wait for the service to start up properly */
ok
(
QueryServiceStatus
(
service
,
&
status
),
"QueryServiceStatus failed: %u
\n
"
,
GetLastError
());
ret
=
QueryServiceStatus
(
service
,
&
status
);
ok
(
ret
,
"QueryServiceStatus failed: %u
\n
"
,
GetLastError
());
while
(
status
.
dwCurrentState
==
SERVICE_START_PENDING
)
{
Sleep
(
100
);
ok
(
QueryServiceStatus
(
service
,
&
status
),
"QueryServiceStatus failed: %u
\n
"
,
GetLastError
());
ret
=
QueryServiceStatus
(
service
,
&
status
);
ok
(
ret
,
"QueryServiceStatus failed: %u
\n
"
,
GetLastError
());
}
ok
(
status
.
dwCurrentState
==
SERVICE_RUNNING
,
"expected SERVICE_RUNNING, got %d
\n
"
,
status
.
dwCurrentState
);
...
...
@@ -194,6 +198,7 @@ START_TEST(ntoskrnl)
{
char
filename
[
MAX_PATH
];
SC_HANDLE
service
;
BOOL
ret
;
HMODULE
hntdll
=
GetModuleHandleA
(
"ntdll.dll"
);
pRtlDosPathNameToNtPathName_U
=
(
void
*
)
GetProcAddress
(
hntdll
,
"RtlDosPathNameToNtPathName_U"
);
...
...
@@ -205,5 +210,6 @@ START_TEST(ntoskrnl)
main_test
();
unload_driver
(
service
);
ok
(
DeleteFileA
(
filename
),
"DeleteFile failed: %u
\n
"
,
GetLastError
());
ret
=
DeleteFileA
(
filename
);
ok
(
ret
,
"DeleteFile failed: %u
\n
"
,
GetLastError
());
}
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