Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
55946e3c
Commit
55946e3c
authored
Jul 06, 2011
by
Austin Lund
Committed by
Alexandre Julliard
Jul 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Added tests for ObjectTypeInformation class in NtQueryObject.
parent
84e9a23d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
om.c
dlls/ntdll/tests/om.c
+38
-0
No files found.
dlls/ntdll/tests/om.c
View file @
55946e3c
...
@@ -658,6 +658,8 @@ static void test_query_object(void)
...
@@ -658,6 +658,8 @@ static void test_query_object(void)
{
{
static
const
WCHAR
name
[]
=
{
'\\'
,
'B'
,
'a'
,
's'
,
'e'
,
'N'
,
'a'
,
'm'
,
'e'
,
'd'
,
'O'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
's'
,
static
const
WCHAR
name
[]
=
{
'\\'
,
'B'
,
'a'
,
's'
,
'e'
,
'N'
,
'a'
,
'm'
,
'e'
,
'd'
,
'O'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
's'
,
'\\'
,
't'
,
'e'
,
's'
,
't'
,
'_'
,
'e'
,
'v'
,
'e'
,
'n'
,
't'
};
'\\'
,
't'
,
'e'
,
's'
,
't'
,
'_'
,
'e'
,
'v'
,
'e'
,
'n'
,
't'
};
static
const
WCHAR
type_event
[]
=
{
'E'
,
'v'
,
'e'
,
'n'
,
't'
};
static
const
WCHAR
type_file
[]
=
{
'F'
,
'i'
,
'l'
,
'e'
};
HANDLE
handle
;
HANDLE
handle
;
char
buffer
[
1024
];
char
buffer
[
1024
];
NTSTATUS
status
;
NTSTATUS
status
;
...
@@ -673,11 +675,21 @@ static void test_query_object(void)
...
@@ -673,11 +675,21 @@ static void test_query_object(void)
ok
(
len
>=
sizeof
(
UNICODE_STRING
)
+
sizeof
(
name
)
+
sizeof
(
WCHAR
),
"unexpected len %u
\n
"
,
len
);
ok
(
len
>=
sizeof
(
UNICODE_STRING
)
+
sizeof
(
name
)
+
sizeof
(
WCHAR
),
"unexpected len %u
\n
"
,
len
);
len
=
0
;
len
=
0
;
status
=
pNtQueryObject
(
handle
,
ObjectTypeInformation
,
buffer
,
0
,
&
len
);
todo_wine
ok
(
status
==
STATUS_INFO_LENGTH_MISMATCH
,
"NtQueryObject failed %x
\n
"
,
status
);
todo_wine
ok
(
len
>=
sizeof
(
OBJECT_TYPE_INFORMATION
)
+
sizeof
(
type_event
)
+
sizeof
(
WCHAR
),
"unexpected len %u
\n
"
,
len
);
len
=
0
;
status
=
pNtQueryObject
(
handle
,
ObjectNameInformation
,
buffer
,
sizeof
(
UNICODE_STRING
),
&
len
);
status
=
pNtQueryObject
(
handle
,
ObjectNameInformation
,
buffer
,
sizeof
(
UNICODE_STRING
),
&
len
);
ok
(
status
==
STATUS_INFO_LENGTH_MISMATCH
,
"NtQueryObject failed %x
\n
"
,
status
);
ok
(
status
==
STATUS_INFO_LENGTH_MISMATCH
,
"NtQueryObject failed %x
\n
"
,
status
);
ok
(
len
>=
sizeof
(
UNICODE_STRING
)
+
sizeof
(
name
)
+
sizeof
(
WCHAR
),
"unexpected len %u
\n
"
,
len
);
ok
(
len
>=
sizeof
(
UNICODE_STRING
)
+
sizeof
(
name
)
+
sizeof
(
WCHAR
),
"unexpected len %u
\n
"
,
len
);
len
=
0
;
len
=
0
;
status
=
pNtQueryObject
(
handle
,
ObjectTypeInformation
,
buffer
,
sizeof
(
OBJECT_TYPE_INFORMATION
),
&
len
);
todo_wine
ok
(
status
==
STATUS_INFO_LENGTH_MISMATCH
,
"NtQueryObject failed %x
\n
"
,
status
);
todo_wine
ok
(
len
>=
sizeof
(
OBJECT_TYPE_INFORMATION
)
+
sizeof
(
type_event
)
+
sizeof
(
WCHAR
),
"unexpected len %u
\n
"
,
len
);
len
=
0
;
status
=
pNtQueryObject
(
handle
,
ObjectNameInformation
,
buffer
,
sizeof
(
buffer
),
&
len
);
status
=
pNtQueryObject
(
handle
,
ObjectNameInformation
,
buffer
,
sizeof
(
buffer
),
&
len
);
ok
(
status
==
STATUS_SUCCESS
,
"NtQueryObject failed %x
\n
"
,
status
);
ok
(
status
==
STATUS_SUCCESS
,
"NtQueryObject failed %x
\n
"
,
status
);
ok
(
len
>
sizeof
(
UNICODE_STRING
),
"unexpected len %u
\n
"
,
len
);
ok
(
len
>
sizeof
(
UNICODE_STRING
),
"unexpected len %u
\n
"
,
len
);
...
@@ -693,6 +705,21 @@ static void test_query_object(void)
...
@@ -693,6 +705,21 @@ static void test_query_object(void)
ok
(
status
==
STATUS_INFO_LENGTH_MISMATCH
,
"NtQueryObject failed %x
\n
"
,
status
);
ok
(
status
==
STATUS_INFO_LENGTH_MISMATCH
,
"NtQueryObject failed %x
\n
"
,
status
);
ok
(
len
>=
sizeof
(
UNICODE_STRING
)
+
sizeof
(
name
)
+
sizeof
(
WCHAR
),
"unexpected len %u
\n
"
,
len
);
ok
(
len
>=
sizeof
(
UNICODE_STRING
)
+
sizeof
(
name
)
+
sizeof
(
WCHAR
),
"unexpected len %u
\n
"
,
len
);
len
=
0
;
memset
(
buffer
,
0
,
sizeof
(
buffer
)
);
status
=
pNtQueryObject
(
handle
,
ObjectTypeInformation
,
buffer
,
sizeof
(
buffer
),
&
len
);
todo_wine
ok
(
status
==
STATUS_SUCCESS
,
"NtQueryObject failed %x
\n
"
,
status
);
todo_wine
ok
(
len
>
sizeof
(
OBJECT_TYPE_INFORMATION
),
"unexpected len %u
\n
"
,
len
);
str
=
(
UNICODE_STRING
*
)
buffer
;
todo_wine
ok
(
len
>=
sizeof
(
OBJECT_TYPE_INFORMATION
)
+
str
->
Length
+
sizeof
(
WCHAR
),
"unexpected len %u
\n
"
,
len
);
todo_wine
ok
(
str
->
Buffer
&&
!
memcmp
(
str
->
Buffer
,
type_event
,
sizeof
(
type_file
)
),
"wrong/bad type name %s (%p)
\n
"
,
wine_dbgstr_w
(
str
->
Buffer
),
str
->
Buffer
);
len
-=
sizeof
(
WCHAR
);
status
=
pNtQueryObject
(
handle
,
ObjectTypeInformation
,
buffer
,
len
,
&
len
);
todo_wine
ok
(
status
==
STATUS_INFO_LENGTH_MISMATCH
,
"NtQueryObject failed %x
\n
"
,
status
);
todo_wine
ok
(
len
>=
sizeof
(
OBJECT_TYPE_INFORMATION
)
+
sizeof
(
type_event
)
+
sizeof
(
WCHAR
),
"unexpected len %u
\n
"
,
len
);
pNtClose
(
handle
);
pNtClose
(
handle
);
handle
=
CreateEventA
(
NULL
,
FALSE
,
FALSE
,
NULL
);
handle
=
CreateEventA
(
NULL
,
FALSE
,
FALSE
,
NULL
);
...
@@ -733,6 +760,17 @@ static void test_query_object(void)
...
@@ -733,6 +760,17 @@ static void test_query_object(void)
ok
(
len
==
expected_len
||
broken
(
!
len
),
ok
(
len
==
expected_len
||
broken
(
!
len
),
"unexpected len %u
\n
"
,
len
);
"unexpected len %u
\n
"
,
len
);
len
=
0
;
memset
(
buffer
,
0
,
sizeof
(
buffer
)
);
status
=
pNtQueryObject
(
handle
,
ObjectTypeInformation
,
buffer
,
sizeof
(
buffer
),
&
len
);
todo_wine
ok
(
status
==
STATUS_SUCCESS
,
"NtQueryObject failed %x
\n
"
,
status
);
todo_wine
ok
(
len
>
sizeof
(
OBJECT_TYPE_INFORMATION
),
"unexpected len %u
\n
"
,
len
);
str
=
(
UNICODE_STRING
*
)
buffer
;
expected_len
=
sizeof
(
OBJECT_TYPE_INFORMATION
)
+
str
->
Length
+
sizeof
(
WCHAR
);
todo_wine
ok
(
len
>=
expected_len
,
"unexpected len %u
\n
"
,
len
);
todo_wine
ok
(
str
->
Buffer
&&
!
memcmp
(
str
->
Buffer
,
type_file
,
sizeof
(
type_file
)
),
"wrong/bad type name %s (%p)
\n
"
,
wine_dbgstr_w
(
str
->
Buffer
),
str
->
Buffer
);
pNtClose
(
handle
);
pNtClose
(
handle
);
}
}
...
...
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