Re: [kvm-unit-tests PATCH v3 6/6] s390x: SMP test

Janosch Frank
2019-09-25T10:24:43Z

[-- Attachment #1.1: Type: text/plain, Size: 582 bytes --]

On 9/25/19 11:03 AM, David Hildenbrand wrote:
> On 20.09.19 10:03, Janosch Frank wrote:

>> +
>> +int main(void)
>> +{
>> + report_prefix_push("smp");
>> +
>> + if (smp_query_num_cpus() == 1) {
>> + report_abort("need at least 2 cpus for this test");
>> + goto done;
>> + }
>
> You should rather sense if CPU with the addr 1 is available. AFAIR, the
> number of CPUs and the CPU addresses are two types of shoes.
>

Yes and no, if we don't have more than one cpu we certainly don't have
cpu 1. And for what I've seen up to now QEMU assigns cpus linearly.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]