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
fa928d16
Commit
fa928d16
authored
Apr 04, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl/tests: Use a hard-coded file path in test_obj_reference().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f5c1a92b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
driver.c
dlls/ntoskrnl.exe/tests/driver.c
+4
-12
No files found.
dlls/ntoskrnl.exe/tests/driver.c
View file @
fa928d16
...
...
@@ -1166,7 +1166,7 @@ static void WINAPI thread_proc(void *arg)
PsTerminateSystemThread
(
STATUS_SUCCESS
);
}
static
void
test_ob_reference
(
const
WCHAR
*
test_path
)
static
void
test_ob_reference
(
void
)
{
POBJECT_TYPE
(
WINAPI
*
pObGetObjectType
)(
void
*
);
OBJECT_ATTRIBUTES
attr
=
{
sizeof
(
attr
)
};
...
...
@@ -1177,8 +1177,6 @@ static void test_ob_reference(const WCHAR *test_path)
POBJECT_TYPE
obj1_type
;
UNICODE_STRING
pathU
;
IO_STATUS_BLOCK
io
;
WCHAR
*
tmp_path
;
SIZE_T
len
;
NTSTATUS
status
;
pObGetObjectType
=
get_proc_address
(
"ObGetObjectType"
);
...
...
@@ -1189,18 +1187,12 @@ static void test_ob_reference(const WCHAR *test_path)
status
=
ZwCreateEvent
(
&
event_handle
,
SYNCHRONIZE
,
&
attr
,
NotificationEvent
,
TRUE
);
ok
(
!
status
,
"ZwCreateEvent failed: %#x
\n
"
,
status
);
len
=
wcslen
(
test_path
);
tmp_path
=
ExAllocatePool
(
PagedPool
,
len
*
sizeof
(
WCHAR
)
+
sizeof
(
L".tmp"
));
memcpy
(
tmp_path
,
test_path
,
len
*
sizeof
(
WCHAR
));
memcpy
(
tmp_path
+
len
,
L".tmp"
,
sizeof
(
L".tmp"
));
RtlInitUnicodeString
(
&
pathU
,
tmp_path
);
RtlInitUnicodeString
(
&
pathU
,
L"
\\
??
\\
C:
\\
windows
\\
winetest_ntoskrnl_file.tmp"
);
attr
.
ObjectName
=
&
pathU
;
attr
.
Attributes
=
OBJ_KERNEL_HANDLE
;
attr
.
Attributes
=
OBJ_KERNEL_HANDLE
|
OBJ_CASE_INSENSITIVE
;
status
=
ZwCreateFile
(
&
file_handle
,
DELETE
|
FILE_WRITE_DATA
|
SYNCHRONIZE
,
&
attr
,
&
io
,
NULL
,
0
,
0
,
FILE_CREATE
,
FILE_DELETE_ON_CLOSE
|
FILE_SYNCHRONOUS_IO_NONALERT
,
NULL
,
0
);
ok
(
!
status
,
"ZwCreateFile failed: %#x
\n
"
,
status
);
ExFreePool
(
tmp_path
);
status
=
ZwDuplicateObject
(
NtCurrentProcess
(),
file_handle
,
NtCurrentProcess
(),
&
file_handle2
,
0
,
OBJ_KERNEL_HANDLE
,
DUPLICATE_SAME_ACCESS
);
...
...
@@ -2164,7 +2156,7 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st
test_version
();
test_stack_callout
();
test_lookaside_list
();
test_ob_reference
(
test_input
->
path
);
test_ob_reference
();
test_resource
();
test_lookup_thread
();
test_IoAttachDeviceToDeviceStack
();
...
...
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