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
cfa7006f
Commit
cfa7006f
authored
Apr 06, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl/tests: Create the driver output file only once.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
57d438b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
ntoskrnl.c
dlls/ntoskrnl.exe/tests/ntoskrnl.c
+10
-11
No files found.
dlls/ntoskrnl.exe/tests/ntoskrnl.c
View file @
cfa7006f
...
...
@@ -366,7 +366,9 @@ static BOOL start_driver(HANDLE service, BOOL vista_plus)
return
TRUE
;
}
static
void
cat_okfile
(
HANDLE
okfile
)
static
HANDLE
okfile
;
static
void
cat_okfile
(
void
)
{
char
buffer
[
512
];
DWORD
size
;
...
...
@@ -390,16 +392,9 @@ static ULONG64 modified_value;
static
void
main_test
(
void
)
{
struct
main_test_input
*
test_input
;
HANDLE
okfile
;
DWORD
size
;
BOOL
res
;
/* Create a temporary file that the driver will write ok/trace output to. */
okfile
=
CreateFileA
(
"C:
\\
windows
\\
winetest_ntoskrnl_okfile"
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
ok
(
okfile
!=
INVALID_HANDLE_VALUE
,
"failed to create file, error %u
\n
"
,
GetLastError
());
test_input
=
heap_alloc
(
sizeof
(
*
test_input
)
);
test_input
->
process_id
=
GetCurrentProcessId
();
test_input
->
teststr_offset
=
(
SIZE_T
)((
BYTE
*
)
&
teststr
-
(
BYTE
*
)
NtCurrentTeb
()
->
Peb
->
ImageBaseAddress
);
...
...
@@ -410,11 +405,9 @@ static void main_test(void)
ok
(
res
,
"DeviceIoControl failed: %u
\n
"
,
GetLastError
());
ok
(
!
size
,
"got size %u
\n
"
,
size
);
cat_okfile
(
okfile
);
cat_okfile
();
heap_free
(
test_input
);
CloseHandle
(
okfile
);
DeleteFileA
(
"C:
\\
windows
\\
winetest_ntoskrnl_okfile"
);
}
static
void
test_basic_ioctl
(
void
)
...
...
@@ -1235,6 +1228,10 @@ START_TEST(ntoskrnl)
test_data
->
winetest_report_success
=
winetest_report_success
;
test_data
->
winetest_debug
=
winetest_debug
;
okfile
=
CreateFileA
(
"C:
\\
windows
\\
winetest_ntoskrnl_okfile"
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
ok
(
okfile
!=
INVALID_HANDLE_VALUE
,
"failed to create file, error %u
\n
"
,
GetLastError
());
subtest
(
"driver"
);
if
(
!
(
service
=
load_driver
(
&
ctx
,
filename
,
L"driver.dll"
,
L"WineTestDriver"
)))
goto
out
;
...
...
@@ -1285,4 +1282,6 @@ out:
testsign_cleanup
(
&
ctx
);
UnmapViewOfFile
(
test_data
);
CloseHandle
(
mapping
);
CloseHandle
(
okfile
);
DeleteFileA
(
"C:
\\
windows
\\
winetest_ntoskrnl_okfile"
);
}
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