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
81142c99
Commit
81142c99
authored
Jun 29, 2015
by
Michael Müller
Committed by
Alexandre Julliard
Jun 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add tests for GetNumaProcessorNode.
parent
abbb3617
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
process.c
dlls/kernel32/tests/process.c
+37
-0
No files found.
dlls/kernel32/tests/process.c
View file @
81142c99
...
...
@@ -3,6 +3,7 @@
*
* Copyright 2002 Eric Pouech
* Copyright 2006 Dmitry Timoshkov
* Copyright 2014 Michael Müller
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -74,6 +75,7 @@ static BOOL (WINAPI *pTerminateJobObject)(HANDLE job, UINT exit_code);
static
BOOL
(
WINAPI
*
pQueryInformationJobObject
)(
HANDLE
job
,
JOBOBJECTINFOCLASS
class
,
LPVOID
info
,
DWORD
len
,
LPDWORD
ret_len
);
static
BOOL
(
WINAPI
*
pSetInformationJobObject
)(
HANDLE
job
,
JOBOBJECTINFOCLASS
class
,
LPVOID
info
,
DWORD
len
);
static
HANDLE
(
WINAPI
*
pCreateIoCompletionPort
)(
HANDLE
file
,
HANDLE
existing_port
,
ULONG_PTR
key
,
DWORD
threads
);
static
BOOL
(
WINAPI
*
pGetNumaProcessorNode
)(
UCHAR
,
PUCHAR
);
/* ############################### */
static
char
base
[
MAX_PATH
];
...
...
@@ -227,6 +229,7 @@ static BOOL init(void)
pQueryInformationJobObject
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"QueryInformationJobObject"
);
pSetInformationJobObject
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"SetInformationJobObject"
);
pCreateIoCompletionPort
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"CreateIoCompletionPort"
);
pGetNumaProcessorNode
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetNumaProcessorNode"
);
return
TRUE
;
}
...
...
@@ -2692,6 +2695,39 @@ static void test_StartupNoConsole(void)
#endif
}
static
void
test_GetNumaProcessorNode
(
void
)
{
SYSTEM_INFO
si
;
UCHAR
node
;
BOOL
ret
;
int
i
;
if
(
!
pGetNumaProcessorNode
)
{
skip
(
"GetNumaProcessorNode is missing
\n
"
);
return
;
}
GetSystemInfo
(
&
si
);
for
(
i
=
0
;
i
<
256
;
i
++
)
{
SetLastError
(
0xdeadbeef
);
node
=
(
i
<
si
.
dwNumberOfProcessors
)
?
0xFF
:
0xAA
;
ret
=
pGetNumaProcessorNode
(
i
,
&
node
);
if
(
i
<
si
.
dwNumberOfProcessors
)
{
ok
(
ret
,
"GetNumaProcessorNode returned FALSE for processor %d
\n
"
,
i
);
ok
(
node
!=
0xFF
,
"expected node != 0xFF, but got 0xFF
\n
"
);
}
else
{
ok
(
!
ret
,
"GetNumaProcessorNode returned TRUE for processor %d
\n
"
,
i
);
ok
(
node
==
0xFF
||
broken
(
node
==
0xAA
)
/* WinXP */
,
"expected node 0xFF, got %x
\n
"
,
node
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
}
}
}
START_TEST
(
process
)
{
HANDLE
job
;
...
...
@@ -2741,6 +2777,7 @@ START_TEST(process)
test_RegistryQuota
();
test_DuplicateHandle
();
test_StartupNoConsole
();
test_GetNumaProcessorNode
();
/* things that can be tested:
* lookup: check the way program to be executed is searched
* handles: check the handle inheritance stuff (+sec options)
...
...
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