[PATCH-for-6.2 v3 0/6] tests/unit: Fix test-smp-parse

Philippe Mathieu-Daudé posted 6 patches 4 years, 1 month ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211111100351.2153662-1-philmd@redhat.com
There is a newer version of this series
include/hw/boards.h         |   3 +-
hw/core/machine-smp.c       |   6 +-
hw/core/machine.c           |   2 +-
tests/unit/test-smp-parse.c | 123 +++++++++++++++++++-----------------
4 files changed, 72 insertions(+), 62 deletions(-)
[PATCH-for-6.2 v3 0/6] tests/unit: Fix test-smp-parse
Posted by Philippe Mathieu-Daudé 4 years, 1 month ago
Yet another approach to fix test-smp-parse.  v2 from Yanan Wang:
https://lore.kernel.org/qemu-devel/20211111024429.10568-1-wangyanan55@huawei.com/

Here we use the QOM class_init() to avoid having to deal with
object_unref() and deinit().

I suggest to rename smp_parse() -> machine_parse_smp_config()
after the rc0 more as a documentation change rather than an
API change, since this method got added last week and doesn't
follow the rest of the machine API.

Supersedes: <20211111024429.10568-1-wangyanan55@huawei.com>

Philippe Mathieu-Daudé (6):
  tests/unit/test-smp-parse: Restore MachineClass fields after modifying
  tests/unit/test-smp-parse: QOM'ify smp_machine_class_init()
  tests/unit/test-smp-parse: Explicit MachineClass name
  tests/unit/test-smp-parse: Simplify pointer to compound literal use
  tests/unit/test-smp-parse: Constify some pointer/struct
  hw/core: Rename smp_parse() -> machine_parse_smp_config()

 include/hw/boards.h         |   3 +-
 hw/core/machine-smp.c       |   6 +-
 hw/core/machine.c           |   2 +-
 tests/unit/test-smp-parse.c | 123 +++++++++++++++++++-----------------
 4 files changed, 72 insertions(+), 62 deletions(-)

-- 
2.31.1


Re: [PATCH-for-6.2 v3 0/6] tests/unit: Fix test-smp-parse
Posted by Andrew Jones 4 years, 1 month ago
On Thu, Nov 11, 2021 at 11:03:45AM +0100, Philippe Mathieu-Daudé wrote:
> Yet another approach to fix test-smp-parse.  v2 from Yanan Wang:
> https://lore.kernel.org/qemu-devel/20211111024429.10568-1-wangyanan55@huawei.com/
> 
> Here we use the QOM class_init() to avoid having to deal with
> object_unref() and deinit().
> 
> I suggest to rename smp_parse() -> machine_parse_smp_config()
> after the rc0 more as a documentation change rather than an
> API change, since this method got added last week and doesn't
> follow the rest of the machine API.
> 
> Supersedes: <20211111024429.10568-1-wangyanan55@huawei.com>
> 
> Philippe Mathieu-Daudé (6):
>   tests/unit/test-smp-parse: Restore MachineClass fields after modifying
>   tests/unit/test-smp-parse: QOM'ify smp_machine_class_init()
>   tests/unit/test-smp-parse: Explicit MachineClass name
>   tests/unit/test-smp-parse: Simplify pointer to compound literal use
>   tests/unit/test-smp-parse: Constify some pointer/struct
>   hw/core: Rename smp_parse() -> machine_parse_smp_config()
> 
>  include/hw/boards.h         |   3 +-
>  hw/core/machine-smp.c       |   6 +-
>  hw/core/machine.c           |   2 +-
>  tests/unit/test-smp-parse.c | 123 +++++++++++++++++++-----------------
>  4 files changed, 72 insertions(+), 62 deletions(-)
> 
> -- 
> 2.31.1
> 
>

For the series

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