[PATCH for-4.22 0/5] numa: add unit testing plus fix regression

Roger Pau Monne posted 5 patches 6 days, 12 hours ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20260601154332.30797-1-roger.pau@citrix.com
There is a newer version of this series
tools/console/daemon/io.c                 |   2 +-
tools/include/xen-tools/bitops.h          |   7 +-
tools/include/xen-tools/common-macros.h   |   5 +-
tools/libs/call/buffer.c                  |   3 +-
tools/libs/foreignmemory/linux.c          |   2 +-
tools/libs/gnttab/freebsd.c               |   2 +-
tools/libs/gnttab/linux.c                 |   2 +-
tools/libs/guest/xg_core.c                |   2 +-
tools/libs/guest/xg_dom_arm.c             |   6 +-
tools/libs/guest/xg_dom_x86.c             |   2 +-
tools/libs/guest/xg_private.h             |   4 +-
tools/libs/guest/xg_sr_common.c           |   6 +-
tools/libs/guest/xg_sr_save.c             |   3 +-
tools/libs/guest/xg_sr_stream_format.h    |   2 +-
tools/libs/light/libxl_arm_acpi.c         |  24 +-
tools/libs/light/libxl_create.c           |   2 +-
tools/libs/light/libxl_sr_stream_format.h |   2 +-
tools/libs/light/libxl_stream_read.c      |   2 +-
tools/libs/light/libxl_stream_write.c     |   4 +-
tools/misc/xen-mfndump.c                  |   2 +-
tools/ocaml/libs/xc/xenctrl_stubs.c       |   2 +-
tools/tests/Makefile                      |   1 +
tools/tests/numa/.gitignore               |   2 +
tools/tests/numa/Makefile                 |  47 ++++
tools/tests/numa/harness.h                | 184 +++++++++++++++
tools/tests/numa/test-numa.c              | 267 ++++++++++++++++++++++
tools/xenstored/core.c                    |   4 +-
tools/xenstored/domain.c                  |   9 +-
tools/xenstored/watch.c                   |   2 +-
xen/common/numa.c                         |  22 +-
30 files changed, 569 insertions(+), 55 deletions(-)
create mode 100644 tools/tests/numa/.gitignore
create mode 100644 tools/tests/numa/Makefile
create mode 100644 tools/tests/numa/harness.h
create mode 100644 tools/tests/numa/test-numa.c
[PATCH for-4.22 0/5] numa: add unit testing plus fix regression
Posted by Roger Pau Monne 6 days, 12 hours ago
Hello,

The first 4 patches add some basic unit testing for the NUMA setup
logic.  The last patch expands the test cases and fixes an issue the new
test-cases would otherwise trigger.

Thanks, Roger.

Roger Pau Monne (5):
  tools/bitops: adjust bitmap_or() interface to match hypervisor
  tools/macros: adjust ROUNDUP() interface to match hypervisor
  xen/numa: prepare NUMA setup code for unit testing
  tests/numa: add unit tests for NUMA setup logic
  xen/numa: fix setup of non-aligned memory affinity ranges

 tools/console/daemon/io.c                 |   2 +-
 tools/include/xen-tools/bitops.h          |   7 +-
 tools/include/xen-tools/common-macros.h   |   5 +-
 tools/libs/call/buffer.c                  |   3 +-
 tools/libs/foreignmemory/linux.c          |   2 +-
 tools/libs/gnttab/freebsd.c               |   2 +-
 tools/libs/gnttab/linux.c                 |   2 +-
 tools/libs/guest/xg_core.c                |   2 +-
 tools/libs/guest/xg_dom_arm.c             |   6 +-
 tools/libs/guest/xg_dom_x86.c             |   2 +-
 tools/libs/guest/xg_private.h             |   4 +-
 tools/libs/guest/xg_sr_common.c           |   6 +-
 tools/libs/guest/xg_sr_save.c             |   3 +-
 tools/libs/guest/xg_sr_stream_format.h    |   2 +-
 tools/libs/light/libxl_arm_acpi.c         |  24 +-
 tools/libs/light/libxl_create.c           |   2 +-
 tools/libs/light/libxl_sr_stream_format.h |   2 +-
 tools/libs/light/libxl_stream_read.c      |   2 +-
 tools/libs/light/libxl_stream_write.c     |   4 +-
 tools/misc/xen-mfndump.c                  |   2 +-
 tools/ocaml/libs/xc/xenctrl_stubs.c       |   2 +-
 tools/tests/Makefile                      |   1 +
 tools/tests/numa/.gitignore               |   2 +
 tools/tests/numa/Makefile                 |  47 ++++
 tools/tests/numa/harness.h                | 184 +++++++++++++++
 tools/tests/numa/test-numa.c              | 267 ++++++++++++++++++++++
 tools/xenstored/core.c                    |   4 +-
 tools/xenstored/domain.c                  |   9 +-
 tools/xenstored/watch.c                   |   2 +-
 xen/common/numa.c                         |  22 +-
 30 files changed, 569 insertions(+), 55 deletions(-)
 create mode 100644 tools/tests/numa/.gitignore
 create mode 100644 tools/tests/numa/Makefile
 create mode 100644 tools/tests/numa/harness.h
 create mode 100644 tools/tests/numa/test-numa.c

-- 
2.53.0
Re: [PATCH for-4.22 0/5] numa: add unit testing plus fix regression
Posted by Oleksii Kurochko 5 days, 21 hours ago

On 6/1/26 5:43 PM, Roger Pau Monne wrote:
> Hello,
> 
> The first 4 patches add some basic unit testing for the NUMA setup
> logic.  The last patch expands the test cases and fixes an issue the new
> test-cases would otherwise trigger.
> 
> Thanks, Roger.
> 
> Roger Pau Monne (5):
>    tools/bitops: adjust bitmap_or() interface to match hypervisor
>    tools/macros: adjust ROUNDUP() interface to match hypervisor
>    xen/numa: prepare NUMA setup code for unit testing
>    tests/numa: add unit tests for NUMA setup logic
>    xen/numa: fix setup of non-aligned memory affinity ranges
> 
>   tools/console/daemon/io.c                 |   2 +-
>   tools/include/xen-tools/bitops.h          |   7 +-
>   tools/include/xen-tools/common-macros.h   |   5 +-
>   tools/libs/call/buffer.c                  |   3 +-
>   tools/libs/foreignmemory/linux.c          |   2 +-
>   tools/libs/gnttab/freebsd.c               |   2 +-
>   tools/libs/gnttab/linux.c                 |   2 +-
>   tools/libs/guest/xg_core.c                |   2 +-
>   tools/libs/guest/xg_dom_arm.c             |   6 +-
>   tools/libs/guest/xg_dom_x86.c             |   2 +-
>   tools/libs/guest/xg_private.h             |   4 +-
>   tools/libs/guest/xg_sr_common.c           |   6 +-
>   tools/libs/guest/xg_sr_save.c             |   3 +-
>   tools/libs/guest/xg_sr_stream_format.h    |   2 +-
>   tools/libs/light/libxl_arm_acpi.c         |  24 +-
>   tools/libs/light/libxl_create.c           |   2 +-
>   tools/libs/light/libxl_sr_stream_format.h |   2 +-
>   tools/libs/light/libxl_stream_read.c      |   2 +-
>   tools/libs/light/libxl_stream_write.c     |   4 +-
>   tools/misc/xen-mfndump.c                  |   2 +-
>   tools/ocaml/libs/xc/xenctrl_stubs.c       |   2 +-
>   tools/tests/Makefile                      |   1 +
>   tools/tests/numa/.gitignore               |   2 +
>   tools/tests/numa/Makefile                 |  47 ++++
>   tools/tests/numa/harness.h                | 184 +++++++++++++++
>   tools/tests/numa/test-numa.c              | 267 ++++++++++++++++++++++
>   tools/xenstored/core.c                    |   4 +-
>   tools/xenstored/domain.c                  |   9 +-
>   tools/xenstored/watch.c                   |   2 +-
>   xen/common/numa.c                         |  22 +-
>   30 files changed, 569 insertions(+), 55 deletions(-)
>   create mode 100644 tools/tests/numa/.gitignore
>   create mode 100644 tools/tests/numa/Makefile
>   create mode 100644 tools/tests/numa/harness.h
>   create mode 100644 tools/tests/numa/test-numa.c
> 

The changes do not appear to be too intrusive, so I am okay with 
including all of the patches in 4.22, provided they receive proper review.

Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>

Thanks.

~ Oleksii