All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] hw/core/machine: Add an unit test for smp_parse
@ 2021-10-13  7:41 Yanan Wang
  2021-10-13  7:41 ` [PATCH v2 1/2] hw/core/machine: Split out the smp parsing code Yanan Wang
  2021-10-13  7:41 ` [PATCH v2 2/2] tests/unit: Add an unit test for smp parsing Yanan Wang
  0 siblings, 2 replies; 5+ messages in thread
From: Yanan Wang @ 2021-10-13  7:41 UTC (permalink / raw)
  To: qemu-devel
  Cc: Andrew Jones, Daniel P . Berrangé,
	Eduardo Habkost, Pierre Morel, Markus Armbruster, Yanan Wang,
	wanghaibin.wang, Paolo Bonzini, Philippe Mathieu-Daudé

Hi,

This is v2 which 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:
https://lore.kernel.org/qemu-devel/YOxf+sxzUSJdbY+j@redhat.com/

Changelog:
v1->v2:
- split smp_parse out into a separate .c file instead of a header (patch #1)
- dropped an unnecessary function and add Andrew's R-b (patch #2)
- v1: https://lore.kernel.org/qemu-devel/20211010103954.20644-1-wangyanan55@huawei.com/

Yanan Wang (2):
  hw/core/machine: Split out the smp parsing code
  tests/unit: Add an unit test for smp parsing

 MAINTAINERS                 |   2 +
 hw/core/machine-smp.c       | 181 +++++++++++
 hw/core/machine.c           | 159 ----------
 hw/core/meson.build         |   2 +
 include/hw/boards.h         |   1 +
 tests/unit/meson.build      |   1 +
 tests/unit/test-smp-parse.c | 604 ++++++++++++++++++++++++++++++++++++
 7 files changed, 791 insertions(+), 159 deletions(-)
 create mode 100644 hw/core/machine-smp.c
 create mode 100644 tests/unit/test-smp-parse.c

--
2.19.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-26  3:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13  7:41 [PATCH v2 0/2] hw/core/machine: Add an unit test for smp_parse Yanan Wang
2021-10-13  7:41 ` [PATCH v2 1/2] hw/core/machine: Split out the smp parsing code Yanan Wang
2021-10-13  8:14   ` Andrew Jones
2021-10-13  7:41 ` [PATCH v2 2/2] tests/unit: Add an unit test for smp parsing Yanan Wang
2021-10-26  3:40   ` wangyanan (Y)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.