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
3c9c1ffd
Commit
3c9c1ffd
authored
Sep 12, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Fix affinity test when there are too many CPUs.
parent
5314fac5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
info.c
dlls/ntdll/tests/info.c
+14
-9
No files found.
dlls/ntdll/tests/info.c
View file @
3c9c1ffd
...
...
@@ -2958,11 +2958,13 @@ static void test_affinity(void)
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08lx
\n
"
,
status
);
proc_affinity
=
pbi
.
AffinityMask
;
ok
(
proc_affinity
==
get_affinity_mask
(
si
.
dwNumberOfProcessors
),
"Unexpected process affinity
\n
"
);
proc_affinity
=
(
DWORD_PTR
)
1
<<
si
.
dwNumberOfProcessors
;
status
=
pNtSetInformationProcess
(
GetCurrentProcess
(),
ProcessAffinityMask
,
&
proc_affinity
,
sizeof
(
proc_affinity
)
);
ok
(
status
==
STATUS_INVALID_PARAMETER
,
"Expected STATUS_INVALID_PARAMETER, got %08lx
\n
"
,
status
);
if
(
si
.
dwNumberOfProcessors
<
8
*
sizeof
(
DWORD_PTR
))
{
proc_affinity
=
(
DWORD_PTR
)
1
<<
si
.
dwNumberOfProcessors
;
status
=
pNtSetInformationProcess
(
GetCurrentProcess
(),
ProcessAffinityMask
,
&
proc_affinity
,
sizeof
(
proc_affinity
)
);
ok
(
status
==
STATUS_INVALID_PARAMETER
,
"Expected STATUS_INVALID_PARAMETER, got %08lx
\n
"
,
status
);
}
proc_affinity
=
0
;
status
=
pNtSetInformationProcess
(
GetCurrentProcess
(),
ProcessAffinityMask
,
&
proc_affinity
,
sizeof
(
proc_affinity
)
);
ok
(
status
==
STATUS_INVALID_PARAMETER
,
...
...
@@ -2971,10 +2973,13 @@ static void test_affinity(void)
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
ThreadBasicInformation
,
&
tbi
,
sizeof
(
tbi
),
NULL
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08lx
\n
"
,
status
);
ok
(
tbi
.
AffinityMask
==
get_affinity_mask
(
si
.
dwNumberOfProcessors
),
"Unexpected thread affinity
\n
"
);
thread_affinity
=
(
DWORD_PTR
)
1
<<
si
.
dwNumberOfProcessors
;
status
=
pNtSetInformationThread
(
GetCurrentThread
(),
ThreadAffinityMask
,
&
thread_affinity
,
sizeof
(
thread_affinity
)
);
ok
(
status
==
STATUS_INVALID_PARAMETER
,
"Expected STATUS_INVALID_PARAMETER, got %08lx
\n
"
,
status
);
if
(
si
.
dwNumberOfProcessors
<
8
*
sizeof
(
DWORD_PTR
))
{
thread_affinity
=
(
DWORD_PTR
)
1
<<
si
.
dwNumberOfProcessors
;
status
=
pNtSetInformationThread
(
GetCurrentThread
(),
ThreadAffinityMask
,
&
thread_affinity
,
sizeof
(
thread_affinity
)
);
ok
(
status
==
STATUS_INVALID_PARAMETER
,
"Expected STATUS_INVALID_PARAMETER, got %08lx
\n
"
,
status
);
}
thread_affinity
=
0
;
status
=
pNtSetInformationThread
(
GetCurrentThread
(),
ThreadAffinityMask
,
&
thread_affinity
,
sizeof
(
thread_affinity
)
);
ok
(
status
==
STATUS_INVALID_PARAMETER
,
...
...
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