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

Re: [PATCH 0/7] Factor out common build rules and helpers in tools/tests


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Edwin Torok <edwin.torok@xxxxxxxxxx>
  • Date: Fri, 27 Feb 2026 18:00:49 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5gWzCdg5gadUerYjYxhYNLwRHOAFmjO1JP/VTpiILQg=; b=Gbz6r6sYZyAjbyLOUAuJll9jJwFOwbi9DREUqKYFNOW29Dlpie9Z2WAwIWgLZv9WqMjJGBYhOqu3Lu7zhUSj8lU9OrSTbTdVXcAsF0u1azHPfvvBY3qw2QK3q091Dp1ghl5S0DPli+Bh7SJuMJMFNw7jUCqeDV+3lq99nvLWdTgN8z7pUGMHCTYs6QM5RH+sHAx3rdIf0MldLjzFicFmZ1ijtd680NKUrPp57oLlK+BNT47ms985p0nKTXYqeoeBO6r8lJ4IaR9QycAo/E3aX3Vtb275ikOME5OXfaP2hSIuNLRirpScwW2o1i+KyBHO7ZUDCrpeM6+5qD9ATMfKAQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=o9ZaPLHvAJXdcTTarA3X7gAgxsYtsiqHq09XWfOj9P/xgDoudGh7R15by9vDbZrMEDQXq5txxA28erFGgQgH87lbETa5ATeUXfBqMYmOG7/1AUeMMc/96D4Qp1lDeMrEblLCjJve9uFyE2wvvNdGn8EPdTHwxs32i/MmIaKnUxcaZdx85PFqW8JxeJi4W5xTtH4F3kM5DclaipSroIKoUHyRksNveOxPLrTFMsBF4F9JKyIqk1LvQXcwSqk0APLJ2AG+9cLLP60KQHo1QxiYK3arQa7fQvtpbBphcI+tNu5oCRBCeXLvtdZVxqznzGg4H9cO+VmOsqb+N3qgt8Lygw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Denis Mukhin <dmukhin@xxxxxxxx>
  • Delivery-date: Fri, 27 Feb 2026 18:01:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHcpK0ssUh7hdj8f0mNZT6LyhFCMLWQGOWAgAbDtQA=
  • Thread-topic: [PATCH 0/7] Factor out common build rules and helpers in tools/tests

> On 23 Feb 2026, at 10:42, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 23.02.2026 11:14, Edwin Török wrote:
>> There are a lot of duplicate rules and code in tools/tests.
>> To simplify writing new tests move common build rules into a
>> `tools/tests/Rules.mk`, and helper macros/functions into 
>> `common/{tests,guests}.{c,h}`.
>> 
>> This also ensures that CFLAGS are applied consistently across all tests 
>> (e.g. one test failed
>> to build now due to an unused variable error).
>> 
>> Guest creation also needs to test for the presence of PV, HVM HAP or HVM 
>> shadow support
>> in Xen and create a guest accordingly. This can be shared.
>> 
>> After these changes the per-test Makefile only contains entries specific
>> to the test (its name, dependencies, etc.) and avoids having to
>> copy&paste boilerplate code.
>> 
>> `tools/tests/x86_emulator` remains unchanged, because the Makefile
>> contains a lot of conditional build logic specific to that test.
>> 
>> An upcoming patch series will introduce new tests using the simplified
>> Makefile and shared helpers.
>> 
>> For convenience this is also available at:
>> https://gitlab.com/xen-project/people/edwintorok/xen/-/compare/staging...private%2Fedvint%2Fmigration-tests2?from_project_id=2336572
>> https://gitlab.com/xen-project/people/edwintorok/xen/-/pipelines/2342318716
>> 
>> Edwin Török (7):
>>  tools/tests/*/Makefile: factor out common PHONY rules into Rules.mk
>>  tools/tests/vpci/main.c: drop unused variables
>>  tools/tests/*/Makefile: factor out build rules
>>  tools/tests: factor out common helpers
>>  tools/tests/common: ensure error messages have a newline
>>  tools/tests/tsx: move guest creation to common area
>>  tools/tests: print more debug info
> 
> Just fyi that there is also
> https://lists.xen.org/archives/html/xen-devel/2026-02/msg00751.html.
> Can the two of you maybe work together to have a single resulting approach?
> 
> Jan

There is definitely a lot in common between the two series, and I’m talking 
with Denis.
The Makefile cleanups that both of us have done can probably go in first as 
part of a shared series,
I’ll try to setup a combined branch to see how that’d look like.

Best regards,
—Edwin

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.