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
4bc7a3eb
Commit
4bc7a3eb
authored
Aug 24, 2009
by
Ge van Geldorp
Committed by
Alexandre Julliard
Aug 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Fix info tests on Win7.
parent
2245e2c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
info.c
dlls/ntdll/tests/info.c
+10
-6
No files found.
dlls/ntdll/tests/info.c
View file @
4bc7a3eb
...
...
@@ -121,19 +121,21 @@ static void test_query_cpu(void)
static
void
test_query_performance
(
void
)
{
NTSTATUS
status
;
ULONG
FullLength
;
ULONG
ReturnLength
;
SYSTEM_PERFORMANCE_INFORMATION
spi
;
BYTE
Buffer
[
sizeof
(
SYSTEM_PERFORMANCE_INFORMATION
)
+
2
];
status
=
pNtQuerySystemInformation
(
SystemPerformanceInformation
,
&
spi
,
0
,
&
Return
Length
);
status
=
pNtQuerySystemInformation
(
SystemPerformanceInformation
,
Buffer
,
0
,
&
Full
Length
);
ok
(
status
==
STATUS_INFO_LENGTH_MISMATCH
,
"Expected STATUS_INFO_LENGTH_MISMATCH, got %08x
\n
"
,
status
);
status
=
pNtQuerySystemInformation
(
SystemPerformanceInformation
,
&
spi
,
sizeof
(
spi
),
&
ReturnLength
);
status
=
pNtQuerySystemInformation
(
SystemPerformanceInformation
,
Buffer
,
sizeof
(
spi
),
&
ReturnLength
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
ok
(
sizeof
(
spi
)
==
ReturnLength
,
"Inconsistent length %d
\n
"
,
ReturnLength
);
status
=
pNtQuerySystemInformation
(
SystemPerformanceInformation
,
&
spi
,
sizeof
(
spi
)
+
2
,
&
ReturnLength
);
status
=
pNtQuerySystemInformation
(
SystemPerformanceInformation
,
&
Buffer
,
sizeof
(
Buffer
)
,
&
ReturnLength
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
ok
(
sizeof
(
spi
)
==
ReturnLength
,
"Inconsistent length %d
\n
"
,
ReturnLength
);
ok
(
ReturnLength
==
min
(
FullLength
,
sizeof
(
Buffer
))
,
"Inconsistent length %d
\n
"
,
ReturnLength
);
/* Not return values yet, as struct members are unknown */
}
...
...
@@ -746,6 +748,7 @@ static void test_query_process_handlecount(void)
NTSTATUS
status
;
ULONG
ReturnLength
;
DWORD
handlecount
;
BYTE
buffer
[
2
*
sizeof
(
DWORD
)];
HANDLE
process
;
status
=
pNtQueryInformationProcess
(
NULL
,
ProcessHandleCount
,
NULL
,
sizeof
(
handlecount
),
NULL
);
...
...
@@ -773,8 +776,9 @@ static void test_query_process_handlecount(void)
ok
(
sizeof
(
handlecount
)
==
ReturnLength
,
"Inconsistent length %d
\n
"
,
ReturnLength
);
CloseHandle
(
process
);
status
=
pNtQueryInformationProcess
(
GetCurrentProcess
(),
ProcessHandleCount
,
&
handlecount
,
sizeof
(
handlecount
)
*
2
,
&
ReturnLength
);
ok
(
status
==
STATUS_INFO_LENGTH_MISMATCH
,
"Expected STATUS_INFO_LENGTH_MISMATCH, got %08x
\n
"
,
status
);
status
=
pNtQueryInformationProcess
(
GetCurrentProcess
(),
ProcessHandleCount
,
buffer
,
sizeof
(
buffer
),
&
ReturnLength
);
ok
(
status
==
STATUS_INFO_LENGTH_MISMATCH
||
status
==
STATUS_SUCCESS
,
"Expected STATUS_INFO_LENGTH_MISMATCH or STATUS_SUCCESS, got %08x
\n
"
,
status
);
ok
(
sizeof
(
handlecount
)
==
ReturnLength
,
"Inconsistent length %d
\n
"
,
ReturnLength
);
/* Check if we have some return values */
...
...
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