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
070cbfc4
Commit
070cbfc4
authored
Jul 19, 2011
by
Bernhard Loos
Committed by
Alexandre Julliard
Jul 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Add a test for STATUS_OBJECT_TYPE_MISMATCH.
parent
bf3c2a06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
om.c
dlls/ntdll/tests/om.c
+25
-0
No files found.
dlls/ntdll/tests/om.c
View file @
070cbfc4
...
@@ -46,6 +46,7 @@ static NTSTATUS (WINAPI *pNtOpenSymbolicLinkObject)(PHANDLE, ACCESS_MASK, POBJEC
...
@@ -46,6 +46,7 @@ static NTSTATUS (WINAPI *pNtOpenSymbolicLinkObject)(PHANDLE, ACCESS_MASK, POBJEC
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
*
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
);
static
NTSTATUS
(
WINAPI
*
pNtReleaseSemaphore
)(
HANDLE
handle
,
ULONG
count
,
PULONG
previous
);
static
void
test_case_sensitive
(
void
)
static
void
test_case_sensitive
(
void
)
...
@@ -774,6 +775,28 @@ static void test_query_object(void)
...
@@ -774,6 +775,28 @@ static void test_query_object(void)
pNtClose
(
handle
);
pNtClose
(
handle
);
}
}
static
void
test_type_mismatch
(
void
)
{
HANDLE
h
;
NTSTATUS
res
;
OBJECT_ATTRIBUTES
attr
;
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
NULL
;
attr
.
Attributes
=
0
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
res
=
pNtCreateEvent
(
&
h
,
0
,
&
attr
,
0
,
0
);
ok
(
!
res
,
"can't create event: %x
\n
"
,
res
);
res
=
pNtReleaseSemaphore
(
h
,
30
,
NULL
);
ok
(
res
==
STATUS_OBJECT_TYPE_MISMATCH
,
"expected 0xc0000024, got %x
\n
"
,
res
);
pNtClose
(
h
);
}
START_TEST
(
om
)
START_TEST
(
om
)
{
{
HMODULE
hntdll
=
GetModuleHandleA
(
"ntdll.dll"
);
HMODULE
hntdll
=
GetModuleHandleA
(
"ntdll.dll"
);
...
@@ -805,6 +828,7 @@ START_TEST(om)
...
@@ -805,6 +828,7 @@ START_TEST(om)
pNtCreateTimer
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateTimer"
);
pNtCreateTimer
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateTimer"
);
pNtCreateSection
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateSection"
);
pNtCreateSection
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateSection"
);
pNtQueryObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtQueryObject"
);
pNtQueryObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtQueryObject"
);
pNtReleaseSemaphore
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtReleaseSemaphore"
);
test_case_sensitive
();
test_case_sensitive
();
test_namespace_pipe
();
test_namespace_pipe
();
...
@@ -812,4 +836,5 @@ START_TEST(om)
...
@@ -812,4 +836,5 @@ START_TEST(om)
test_directory
();
test_directory
();
test_symboliclink
();
test_symboliclink
();
test_query_object
();
test_query_object
();
test_type_mismatch
();
}
}
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