mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 00:06:36 +00:00
selftests: breakpoints: fix computation of test plan
The computation of the test plan uses the available_cpus bitset before calling sched_getaffinity to fill it in. The resulting plan is bogus, fix it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
parent
b85d387c9b
commit
ce32659b36
1 changed files with 4 additions and 4 deletions
|
@ -183,6 +183,10 @@ int main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
err = sched_getaffinity(0, sizeof(available_cpus), &available_cpus);
|
||||
if (err < 0)
|
||||
ksft_exit_fail_msg("sched_getaffinity() failed\n");
|
||||
|
||||
for (cpu = 0; cpu < CPU_SETSIZE; cpu++) {
|
||||
if (!CPU_ISSET(cpu, &available_cpus))
|
||||
continue;
|
||||
|
@ -193,10 +197,6 @@ int main(int argc, char **argv)
|
|||
if (do_suspend)
|
||||
suspend();
|
||||
|
||||
err = sched_getaffinity(0, sizeof(available_cpus), &available_cpus);
|
||||
if (err < 0)
|
||||
ksft_exit_fail_msg("sched_getaffinity() failed\n");
|
||||
|
||||
for (cpu = 0; cpu < CPU_SETSIZE; cpu++) {
|
||||
bool test_success;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue