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
929ba3f1
Commit
929ba3f1
authored
Jun 30, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Add some tests for NtQuerySymbolicLinkObject.
parent
6df7e7b9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
om.c
dlls/ntdll/tests/om.c
+34
-1
No files found.
dlls/ntdll/tests/om.c
View file @
929ba3f1
...
@@ -44,6 +44,7 @@ static NTSTATUS (WINAPI *pNtOpenDirectoryObject)(PHANDLE, ACCESS_MASK, POBJECT_A
...
@@ -44,6 +44,7 @@ static NTSTATUS (WINAPI *pNtOpenDirectoryObject)(PHANDLE, ACCESS_MASK, POBJECT_A
static
NTSTATUS
(
WINAPI
*
pNtCreateDirectoryObject
)(
PHANDLE
,
ACCESS_MASK
,
POBJECT_ATTRIBUTES
);
static
NTSTATUS
(
WINAPI
*
pNtCreateDirectoryObject
)(
PHANDLE
,
ACCESS_MASK
,
POBJECT_ATTRIBUTES
);
static
NTSTATUS
(
WINAPI
*
pNtOpenSymbolicLinkObject
)(
PHANDLE
,
ACCESS_MASK
,
POBJECT_ATTRIBUTES
);
static
NTSTATUS
(
WINAPI
*
pNtOpenSymbolicLinkObject
)(
PHANDLE
,
ACCESS_MASK
,
POBJECT_ATTRIBUTES
);
static
NTSTATUS
(
WINAPI
*
pNtCreateSymbolicLinkObject
)(
PHANDLE
,
ACCESS_MASK
,
POBJECT_ATTRIBUTES
,
PUNICODE_STRING
);
static
NTSTATUS
(
WINAPI
*
pNtCreateSymbolicLinkObject
)(
PHANDLE
,
ACCESS_MASK
,
POBJECT_ATTRIBUTES
,
PUNICODE_STRING
);
static
NTSTATUS
(
WINAPI
*
pNtQuerySymbolicLinkObject
)(
HANDLE
,
PUNICODE_STRING
,
PULONG
);
static
NTSTATUS
(
WINAPI
*
pNtQueryObject
)(
HANDLE
,
OBJECT_INFORMATION_CLASS
,
PVOID
,
ULONG
,
PULONG
);
static
NTSTATUS
(
WINAPI
*
pNtQueryObject
)(
HANDLE
,
OBJECT_INFORMATION_CLASS
,
PVOID
,
ULONG
,
PULONG
);
...
@@ -402,13 +403,44 @@ static void test_directory(void)
...
@@ -402,13 +403,44 @@ static void test_directory(void)
is_nt4
=
(
status
==
STATUS_OBJECT_NAME_NOT_FOUND
);
/* nt4 doesn't have Local\\ symlink */
is_nt4
=
(
status
==
STATUS_OBJECT_NAME_NOT_FOUND
);
/* nt4 doesn't have Local\\ symlink */
if
(
!
is_nt4
)
if
(
!
is_nt4
)
{
{
WCHAR
buffer
[
256
];
ULONG
len
,
full_len
;
ok
(
status
==
STATUS_SUCCESS
,
"Failed to open SymbolicLink(%08x)
\n
"
,
status
);
ok
(
status
==
STATUS_SUCCESS
,
"Failed to open SymbolicLink(%08x)
\n
"
,
status
);
pRtlFreeUnicodeString
(
&
str
);
pRtlFreeUnicodeString
(
&
str
);
InitializeObjectAttributes
(
&
attr
,
&
str
,
0
,
dir
,
NULL
);
InitializeObjectAttributes
(
&
attr
,
&
str
,
0
,
dir
,
NULL
);
pRtlCreateUnicodeStringFromAsciiz
(
&
str
,
"one more level"
);
pRtlCreateUnicodeStringFromAsciiz
(
&
str
,
"one more level"
);
DIR_TEST_CREATE_FAILURE
(
&
h
,
STATUS_OBJECT_TYPE_MISMATCH
)
DIR_TEST_CREATE_FAILURE
(
&
h
,
STATUS_OBJECT_TYPE_MISMATCH
)
pRtlFreeUnicodeString
(
&
str
);
pRtlFreeUnicodeString
(
&
str
);
pNtClose
(
h
);
str
.
Buffer
=
buffer
;
str
.
MaximumLength
=
sizeof
(
buffer
);
len
=
0xdeadbeef
;
memset
(
buffer
,
0xaa
,
sizeof
(
buffer
)
);
status
=
pNtQuerySymbolicLinkObject
(
dir
,
&
str
,
&
len
);
ok
(
status
==
STATUS_SUCCESS
,
"NtQuerySymbolicLinkObject failed %08x
\n
"
,
status
);
full_len
=
str
.
Length
+
sizeof
(
WCHAR
);
ok
(
len
==
full_len
,
"bad length %u/%u
\n
"
,
len
,
full_len
);
ok
(
buffer
[
len
/
sizeof
(
WCHAR
)
-
1
]
==
0
,
"no terminating null
\n
"
);
str
.
MaximumLength
=
str
.
Length
;
len
=
0xdeadbeef
;
status
=
pNtQuerySymbolicLinkObject
(
dir
,
&
str
,
&
len
);
ok
(
status
==
STATUS_BUFFER_TOO_SMALL
,
"NtQuerySymbolicLinkObject failed %08x
\n
"
,
status
);
ok
(
len
==
full_len
,
"bad length %u/%u
\n
"
,
len
,
full_len
);
str
.
MaximumLength
=
0
;
len
=
0xdeadbeef
;
status
=
pNtQuerySymbolicLinkObject
(
dir
,
&
str
,
&
len
);
ok
(
status
==
STATUS_BUFFER_TOO_SMALL
,
"NtQuerySymbolicLinkObject failed %08x
\n
"
,
status
);
ok
(
len
==
full_len
,
"bad length %u/%u
\n
"
,
len
,
full_len
);
str
.
MaximumLength
=
str
.
Length
+
sizeof
(
WCHAR
);
len
=
0xdeadbeef
;
status
=
pNtQuerySymbolicLinkObject
(
dir
,
&
str
,
&
len
);
ok
(
status
==
STATUS_SUCCESS
,
"NtQuerySymbolicLinkObject failed %08x
\n
"
,
status
);
ok
(
len
==
full_len
,
"bad length %u/%u
\n
"
,
len
,
full_len
);
pNtClose
(
dir
);
pNtClose
(
dir
);
}
}
...
@@ -710,6 +742,7 @@ START_TEST(om)
...
@@ -710,6 +742,7 @@ START_TEST(om)
pNtCreateDirectoryObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateDirectoryObject"
);
pNtCreateDirectoryObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateDirectoryObject"
);
pNtOpenSymbolicLinkObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtOpenSymbolicLinkObject"
);
pNtOpenSymbolicLinkObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtOpenSymbolicLinkObject"
);
pNtCreateSymbolicLinkObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateSymbolicLinkObject"
);
pNtCreateSymbolicLinkObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateSymbolicLinkObject"
);
pNtQuerySymbolicLinkObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtQuerySymbolicLinkObject"
);
pNtCreateSemaphore
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateSemaphore"
);
pNtCreateSemaphore
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateSemaphore"
);
pNtCreateTimer
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateTimer"
);
pNtCreateTimer
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateTimer"
);
pNtCreateSection
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateSection"
);
pNtCreateSection
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateSection"
);
...
...
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