qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH-for-6.2 v3 3/6] tests/unit/test-smp-parse: Explicit MachineCl


From: Andrew Jones
Subject: Re: [PATCH-for-6.2 v3 3/6] tests/unit/test-smp-parse: Explicit MachineClass name
Date: Thu, 11 Nov 2021 13:56:22 +0100

On Thu, Nov 11, 2021 at 11:03:48AM +0100, Philippe Mathieu-Daudé wrote:
> If the MachineClass::name pointer is not explicitly set, it is NULL.
> Per the C standard, passing a NULL pointer to printf "%s" format is
> undefined. Some implementations display it as 'NULL', other as 'null'.
> Since we are comparing the formatted output, we need a stable value.
> The easiest is to explicit a machine name string.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Fixes: 9e8e393bb7 ("tests/unit: Add an unit test for smp parsing")
Reported-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Suggested-by: Yanan Wang <wangyanan55@huawei.com>

Reviewed-by: Andrew Jones <drjones@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]