[PATCH v3 0/5] tools/tests: test harness fragment

dmukhin@ford.com posted 5 patches 1 month, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20260213024952.3270112-1-dmukhin@ford.com
tools/tests/Rules.mk        | 106 ++++++++++++++++++++++++++++++++++++
tools/tests/domid/Makefile  |  68 ++---------------------
tools/tests/pdx/.gitignore  |   2 +-
tools/tests/pdx/Makefile    |  59 ++++++--------------
tools/tests/pdx/harness.h   |   2 +-
tools/tests/pdx/test-pdx.c  |   2 -
tools/tests/vpci/.gitignore |   2 +
tools/tests/vpci/Makefile   |  52 ++++++------------
tools/tests/vpci/emul.h     |  50 ++++++-----------
tools/tests/vpci/main.c     |   2 -
xen/common/pdx.c            |   3 +-
xen/include/xen/irq.h       |   2 +
xen/include/xen/list.h      |   2 +
xen/include/xen/numa.h      |   2 +
xen/include/xen/pci.h       |   2 +
xen/include/xen/pdx.h       |   2 +
xen/include/xen/pfn.h       |   2 +
xen/include/xen/spinlock.h  |   2 +
xen/include/xen/types.h     |   4 ++
19 files changed, 185 insertions(+), 181 deletions(-)
create mode 100644 tools/tests/Rules.mk
create mode 100644 tools/tests/vpci/.gitignore
[PATCH v3 0/5] tools/tests: test harness fragment
Posted by dmukhin@ford.com 1 month, 4 weeks ago
This series introduces the use of a new common unit test fragment across
several existing unit tests.

Patch 1 contains assorted fixups for the domid Makefile.
Patch 2 adds a new fragment for auto-generating test harness dependencies.
Patch 3 adds some prerequisite changes for vPCI test (patch 4).
Patch 4 switches the vPCI unit test to the new common fragment.
Patch 5 switches the PDX unit test to the new common fragment.

[1] Link to v2: https://lore.kernel.org/xen-devel/20260111041145.553673-1-dmukhin@ford.com/
[2] CI: https://gitlab.com/xen-project/people/dmukhin/xen/-/pipelines/2323352235

Denis Mukhin (5):
  tests: fixup domid make fragment
  tests: use unit test fragment in domid test
  xen/include: customize headers for host builds
  tests: use unit test fragment in vPCI test
  tests: use unit test fragment in PDX test

 tools/tests/Rules.mk        | 106 ++++++++++++++++++++++++++++++++++++
 tools/tests/domid/Makefile  |  68 ++---------------------
 tools/tests/pdx/.gitignore  |   2 +-
 tools/tests/pdx/Makefile    |  59 ++++++--------------
 tools/tests/pdx/harness.h   |   2 +-
 tools/tests/pdx/test-pdx.c  |   2 -
 tools/tests/vpci/.gitignore |   2 +
 tools/tests/vpci/Makefile   |  52 ++++++------------
 tools/tests/vpci/emul.h     |  50 ++++++-----------
 tools/tests/vpci/main.c     |   2 -
 xen/common/pdx.c            |   3 +-
 xen/include/xen/irq.h       |   2 +
 xen/include/xen/list.h      |   2 +
 xen/include/xen/numa.h      |   2 +
 xen/include/xen/pci.h       |   2 +
 xen/include/xen/pdx.h       |   2 +
 xen/include/xen/pfn.h       |   2 +
 xen/include/xen/spinlock.h  |   2 +
 xen/include/xen/types.h     |   4 ++
 19 files changed, 185 insertions(+), 181 deletions(-)
 create mode 100644 tools/tests/Rules.mk
 create mode 100644 tools/tests/vpci/.gitignore

-- 
2.52.0
Re: [PATCH v3 0/5] tools/tests: test harness fragment
Posted by Jan Beulich 1 month, 3 weeks ago
On 13.02.2026 03:49, dmukhin@ford.com wrote:
> This series introduces the use of a new common unit test fragment across
> several existing unit tests.
> 
> Patch 1 contains assorted fixups for the domid Makefile.
> Patch 2 adds a new fragment for auto-generating test harness dependencies.
> Patch 3 adds some prerequisite changes for vPCI test (patch 4).
> Patch 4 switches the vPCI unit test to the new common fragment.
> Patch 5 switches the PDX unit test to the new common fragment.
> 
> [1] Link to v2: https://lore.kernel.org/xen-devel/20260111041145.553673-1-dmukhin@ford.com/
> [2] CI: https://gitlab.com/xen-project/people/dmukhin/xen/-/pipelines/2323352235
> 
> Denis Mukhin (5):
>   tests: fixup domid make fragment
>   tests: use unit test fragment in domid test
>   xen/include: customize headers for host builds
>   tests: use unit test fragment in vPCI test
>   tests: use unit test fragment in PDX test

I remain unconvinced of this attempt to generalize things. Yes, it eliminates
some redundancy, but at the same time some of the new constructs are harder
to read / follow. Perhaps it would help if smaller pieces were abstracted out
first / incrementally.

Jan
Re: [PATCH v3 0/5] tools/tests: test harness fragment
Posted by Stefano Stabellini 1 month, 2 weeks ago
On Tue, 17 Feb 2026, Jan Beulich wrote:
> On 13.02.2026 03:49, dmukhin@ford.com wrote:
> > This series introduces the use of a new common unit test fragment across
> > several existing unit tests.
> > 
> > Patch 1 contains assorted fixups for the domid Makefile.
> > Patch 2 adds a new fragment for auto-generating test harness dependencies.
> > Patch 3 adds some prerequisite changes for vPCI test (patch 4).
> > Patch 4 switches the vPCI unit test to the new common fragment.
> > Patch 5 switches the PDX unit test to the new common fragment.
> > 
> > [1] Link to v2: https://lore.kernel.org/xen-devel/20260111041145.553673-1-dmukhin@ford.com/
> > [2] CI: https://gitlab.com/xen-project/people/dmukhin/xen/-/pipelines/2323352235
> > 
> > Denis Mukhin (5):
> >   tests: fixup domid make fragment
> >   tests: use unit test fragment in domid test
> >   xen/include: customize headers for host builds
> >   tests: use unit test fragment in vPCI test
> >   tests: use unit test fragment in PDX test
> 
> I remain unconvinced of this attempt to generalize things. Yes, it eliminates
> some redundancy, but at the same time some of the new constructs are harder
> to read / follow. Perhaps it would help if smaller pieces were abstracted out
> first / incrementally.

I don't think breaking it down further would help, it is already in
pretty small pieces. At least, I cannot think of a way that breaking it
down would make a difference. Do you have something specific in mind?

Also, I appreciate you being unconvinced about this series, but now it
leaves me in a bit of limbo. I am fine with this series going in --
should I continue reviewing it regardless?
Re: [PATCH v3 0/5] tools/tests: test harness fragment
Posted by Jan Beulich 1 month, 2 weeks ago
On 26.02.2026 01:51, Stefano Stabellini wrote:
> On Tue, 17 Feb 2026, Jan Beulich wrote:
>> On 13.02.2026 03:49, dmukhin@ford.com wrote:
>>> This series introduces the use of a new common unit test fragment across
>>> several existing unit tests.
>>>
>>> Patch 1 contains assorted fixups for the domid Makefile.
>>> Patch 2 adds a new fragment for auto-generating test harness dependencies.
>>> Patch 3 adds some prerequisite changes for vPCI test (patch 4).
>>> Patch 4 switches the vPCI unit test to the new common fragment.
>>> Patch 5 switches the PDX unit test to the new common fragment.
>>>
>>> [1] Link to v2: https://lore.kernel.org/xen-devel/20260111041145.553673-1-dmukhin@ford.com/
>>> [2] CI: https://gitlab.com/xen-project/people/dmukhin/xen/-/pipelines/2323352235
>>>
>>> Denis Mukhin (5):
>>>   tests: fixup domid make fragment
>>>   tests: use unit test fragment in domid test
>>>   xen/include: customize headers for host builds
>>>   tests: use unit test fragment in vPCI test
>>>   tests: use unit test fragment in PDX test
>>
>> I remain unconvinced of this attempt to generalize things. Yes, it eliminates
>> some redundancy, but at the same time some of the new constructs are harder
>> to read / follow. Perhaps it would help if smaller pieces were abstracted out
>> first / incrementally.
> 
> I don't think breaking it down further would help, it is already in
> pretty small pieces. At least, I cannot think of a way that breaking it
> down would make a difference. Do you have something specific in mind?

See Edwin's series moving in effectively the same direction.

> Also, I appreciate you being unconvinced about this series, but now it
> leaves me in a bit of limbo. I am fine with this series going in --
> should I continue reviewing it regardless?

Hard to say. Maybe take a look at Edwin's first?

Jan