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é <phi...@redhat.com>
Fixes: 9e8e393bb7 ("tests/unit: Add an unit test for smp parsing") Reported-by: Philippe Mathieu-Daudé <phi...@redhat.com> Suggested-by: Yanan Wang <wangyana...@huawei.com> Reviewed-by: Andrew Jones <drjo...@redhat.com>