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
d91e9514
Commit
d91e9514
authored
Dec 10, 2020
by
Alex Henrie
Committed by
Alexandre Julliard
Dec 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add tests for Get(Active|Maximum)ProcessorCount.
Signed-off-by:
Alex Henrie
<
alexhenrie24@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
114d5126
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
process.c
dlls/kernel32/tests/process.c
+22
-0
No files found.
dlls/kernel32/tests/process.c
View file @
d91e9514
...
...
@@ -90,6 +90,8 @@ static SIZE_T (WINAPI *pGetLargePageMinimum)(void);
static
BOOL
(
WINAPI
*
pInitializeProcThreadAttributeList
)(
struct
_PROC_THREAD_ATTRIBUTE_LIST
*
,
DWORD
,
DWORD
,
SIZE_T
*
);
static
BOOL
(
WINAPI
*
pUpdateProcThreadAttribute
)(
struct
_PROC_THREAD_ATTRIBUTE_LIST
*
,
DWORD
,
DWORD_PTR
,
void
*
,
SIZE_T
,
void
*
,
SIZE_T
*
);
static
void
(
WINAPI
*
pDeleteProcThreadAttributeList
)(
struct
_PROC_THREAD_ATTRIBUTE_LIST
*
);
static
DWORD
(
WINAPI
*
pGetActiveProcessorCount
)(
WORD
);
static
DWORD
(
WINAPI
*
pGetMaximumProcessorCount
)(
WORD
);
/* ############################### */
static
char
base
[
MAX_PATH
];
...
...
@@ -270,6 +272,8 @@ static BOOL init(void)
pInitializeProcThreadAttributeList
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"InitializeProcThreadAttributeList"
);
pUpdateProcThreadAttribute
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"UpdateProcThreadAttribute"
);
pDeleteProcThreadAttributeList
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"DeleteProcThreadAttributeList"
);
pGetActiveProcessorCount
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetActiveProcessorCount"
);
pGetMaximumProcessorCount
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetMaximumProcessorCount"
);
return
TRUE
;
}
...
...
@@ -2320,6 +2324,23 @@ static void test_SystemInfo(void)
}
}
static
void
test_ProcessorCount
(
void
)
{
DWORD
active
,
maximum
;
if
(
!
pGetActiveProcessorCount
||
!
pGetMaximumProcessorCount
)
{
win_skip
(
"GetActiveProcessorCount or GetMaximumProcessorCount is not available
\n
"
);
return
;
}
active
=
pGetActiveProcessorCount
(
ALL_PROCESSOR_GROUPS
);
maximum
=
pGetMaximumProcessorCount
(
ALL_PROCESSOR_GROUPS
);
ok
(
active
<=
maximum
,
"Number of active processors %i is greater than maximum number of processors %i
\n
"
,
active
,
maximum
);
}
static
void
test_RegistryQuota
(
void
)
{
BOOL
ret
;
...
...
@@ -4257,6 +4278,7 @@ START_TEST(process)
test_IsWow64Process
();
test_IsWow64Process2
();
test_SystemInfo
();
test_ProcessorCount
();
test_RegistryQuota
();
test_DuplicateHandle
();
test_StartupNoConsole
();
...
...
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