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

2021-11-16 Thread wangyanan (Y)
On 2021/11/15 18:16, Philippe Mathieu-Daudé wrote: On 11/12/21 03:28, wangyanan (Y) wrote: On 2021/11/11 18:03, 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. Som

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

2021-11-15 Thread Philippe Mathieu-Daudé
On 11/12/21 03:28, wangyanan (Y) wrote: > On 2021/11/11 18:03, 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

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

2021-11-11 Thread wangyanan (Y)
On 2021/11/11 18:03, 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

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

2021-11-11 Thread Richard Henderson
On 11/11/21 11:03 AM, 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

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

2021-11-11 Thread Andrew Jones
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 ar

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

2021-11-11 Thread Philippe Mathieu-Daudé
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 expl