On 10/31/21 13:02, wangyanan (Y) wrote:
> Hi Philippe,
> 
> I saw that there are some cross-build failures and a clang complain
> about this patch in your triggered CI pipeline. I believe the minor
> diff below will resolve them. If you are going to resend v2 of the
> "qdev-hotplug" patches, I would very much appreciate it if you
> can also help to respin v5 of this series with the diff applied.
> Sorry for the extra work included. :)

Sure, thanks for running the CI pipeline, you saved me time (I'll still
run it again, but with your diff applied).

> 
> Thanks,
> Yanan
> 
> diff --git a/tests/unit/test-smp-parse.c b/tests/unit/test-smp-parse.c
> index e96abe9ba4..61985094f5 100644
> --- a/tests/unit/test-smp-parse.c
> +++ b/tests/unit/test-smp-parse.c
> @@ -347,12 +347,12 @@ static char *smp_config_to_string(SMPConfiguration
> *config)
>  {
>      return g_strdup_printf(
>          "(SMPConfiguration) {\n"
> -        "    .has_cpus    = %5s, cpus    = %ld,\n"
> -        "    .has_sockets = %5s, sockets = %ld,\n"
> -        "    .has_dies    = %5s, dies    = %ld,\n"
> -        "    .has_cores   = %5s, cores   = %ld,\n"
> -        "    .has_threads = %5s, threads = %ld,\n"
> -        "    .has_maxcpus = %5s, maxcpus = %ld,\n"
> +        "    .has_cpus    = %5s, cpus    = %" PRId64 ",\n"
> +        "    .has_sockets = %5s, sockets = %" PRId64 ",\n"
> +        "    .has_dies    = %5s, dies    = %" PRId64 ",\n"
> +        "    .has_cores   = %5s, cores   = %" PRId64 ",\n"
> +        "    .has_threads = %5s, threads = %" PRId64 ",\n"
> +        "    .has_maxcpus = %5s, maxcpus = %" PRId64 ",\n"
>          "}",
>          config->has_cpus ? "true" : "false", config->cpus,
>          config->has_sockets ? "true" : "false", config->sockets,
> @@ -495,7 +495,7 @@ static void test_generic(void)
>      Object *obj = object_new(TYPE_MACHINE);
>      MachineState *ms = MACHINE(obj);
>      MachineClass *mc = MACHINE_GET_CLASS(obj);
> -    SMPTestData *data = &(SMPTestData){0};
> +    SMPTestData *data = &(SMPTestData){{0}};
>      int i;
> 
>      smp_machine_class_init(mc);
> @@ -531,7 +531,7 @@ static void test_with_dies(void)
>      Object *obj = object_new(TYPE_MACHINE);
>      MachineState *ms = MACHINE(obj);
>      MachineClass *mc = MACHINE_GET_CLASS(obj);
> -    SMPTestData *data = &(SMPTestData){0};
> +    SMPTestData *data = &(SMPTestData){{0}};
>      unsigned int num_dies = 2;
>      int i;
> 
> On 2021/10/28 23:09, Philippe Mathieu-Daudé wrote:
>> From: Yanan Wang <[email protected]>
>>
>> Now that we have a generic parser smp_parse(), let's add an unit
>> test for the code. All possible valid/invalid SMP configurations
>> that the user can specify are covered.
>>
>> Signed-off-by: Yanan Wang <[email protected]>
>> Reviewed-by: Andrew Jones <[email protected]>
>> Tested-by: Philippe Mathieu-Daudé <[email protected]>
>> Message-Id: <[email protected]>
>> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
>> ---
>>   tests/unit/test-smp-parse.c | 594 ++++++++++++++++++++++++++++++++++++
>>   MAINTAINERS                 |   1 +
>>   tests/unit/meson.build      |   1 +
>>   3 files changed, 596 insertions(+)
>>   create mode 100644 tests/unit/test-smp-parse.c


Reply via email to