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
86e48300
Commit
86e48300
authored
Aug 26, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Make sure buffer alignment is correct.
parent
8274786f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
info.c
dlls/ntdll/tests/info.c
+10
-12
No files found.
dlls/ntdll/tests/info.c
View file @
86e48300
...
...
@@ -121,25 +121,23 @@ static void test_query_cpu(void)
static
void
test_query_performance
(
void
)
{
NTSTATUS
status
;
ULONG
FullLength
;
ULONG
ReturnLength
;
SYSTEM_PERFORMANCE_INFORMATION
spi
;
struct
SPI_PLUS_EXTRA
{
SYSTEM_PERFORMANCE_INFORMATION
spi
;
BYTE
extra
[
2
];
}
spi_plus_extra
;
ULONGLONG
buffer
[
sizeof
(
SYSTEM_PERFORMANCE_INFORMATION
)
/
sizeof
(
ULONGLONG
)
+
1
];
status
=
pNtQuerySystemInformation
(
SystemPerformanceInformation
,
&
spi
,
0
,
&
Full
Length
);
status
=
pNtQuerySystemInformation
(
SystemPerformanceInformation
,
buffer
,
0
,
&
Return
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
(
SYSTEM_PERFORMANCE_INFORMATION
),
&
ReturnLength
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
ok
(
sizeof
(
spi
)
==
ReturnLength
,
"Inconsistent length %d
\n
"
,
ReturnLength
);
ok
(
ReturnLength
==
sizeof
(
SYSTEM_PERFORMANCE_INFORMATION
)
,
"Inconsistent length %d
\n
"
,
ReturnLength
);
status
=
pNtQuerySystemInformation
(
SystemPerformanceInformation
,
&
spi_plus_extra
,
sizeof
(
spi_plus_extra
),
&
ReturnLength
);
status
=
pNtQuerySystemInformation
(
SystemPerformanceInformation
,
buffer
,
sizeof
(
SYSTEM_PERFORMANCE_INFORMATION
)
+
2
,
&
ReturnLength
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
ok
(
ReturnLength
==
min
(
FullLength
,
sizeof
(
spi_plus_extra
)),
"Inconsistent length %d
\n
"
,
ReturnLength
);
ok
(
ReturnLength
==
sizeof
(
SYSTEM_PERFORMANCE_INFORMATION
)
||
ReturnLength
==
sizeof
(
SYSTEM_PERFORMANCE_INFORMATION
)
+
2
,
"Inconsistent length %d
\n
"
,
ReturnLength
);
/* Not return values yet, as struct members are unknown */
}
...
...
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