qemu-devel
[Top][All Lists]
Advanced

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

[PATCH 0/2] hw/core/machine: An an unit test for smp_parse


From: Yanan Wang
Subject: [PATCH 0/2] hw/core/machine: An an unit test for smp_parse
Date: Sun, 10 Oct 2021 18:39:52 +0800

Hi,

This series introduces an unit test for generic smp_parse().

We have had enough discussions about what kind of SMP configurations
by the user should be considered valid and what should be invalid.
Since we have finished optimizing the SMP parsing code, then this
test normatively listed all the possible valid/invalid configurations
that the user can provide. This can be a testing tool when we
introduce new topology members and need to touch the parsing code.

For your reference,
Some related discussion is here [1]:
[1] https://lore.kernel.org/qemu-devel/YOxf+sxzUSJdbY+j@redhat.com/

The originally posted test is here [2]:
[2] 
https://lore.kernel.org/qemu-devel/20210910073025.16480-17-wangyanan55@huawei.com/
Compared to [2], the test in this series is reworked and more brief.

Yanan Wang (2):
  hw/core/machine: Split out smp_parse as an inline API
  tests/unit: Add an unit test for smp parsing

 MAINTAINERS                 |   2 +
 hw/core/machine.c           | 160 +---------
 include/hw/core/smp.h       | 185 +++++++++++
 tests/unit/meson.build      |   1 +
 tests/unit/test-smp-parse.c | 613 ++++++++++++++++++++++++++++++++++++
 5 files changed, 802 insertions(+), 159 deletions(-)
 create mode 100644 include/hw/core/smp.h
 create mode 100644 tests/unit/test-smp-parse.c

-- 
2.19.1




reply via email to

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