From: dmukhin@xen.org
To: Anthony PERARD <anthony@xenproject.org>
Cc: xen-devel@lists.xenproject.org, andrew.cooper3@citrix.com,
anthony.perard@vates.tech, jbeulich@suse.com, julien@xen.org,
michal.orzel@amd.com, roger.pau@citrix.com,
sstabellini@kernel.org, dmukhin@ford.com
Subject: Re: [PATCH v17 3/4] tools/tests: introduce unit tests for domain ID allocator
Date: Fri, 5 Sep 2025 16:19:17 -0700 [thread overview]
Message-ID: <aLtv9bFxf3BEu56v@kraken> (raw)
In-Reply-To: <aLmZLm2_G48yfPWR@l14>
On Thu, Sep 04, 2025 at 03:50:38PM +0200, Anthony PERARD wrote:
> On Fri, Aug 29, 2025 at 04:21:31PM -0700, dmukhin@xen.org wrote:
> > diff --git a/tools/tests/domid/Makefile b/tools/tests/domid/Makefile
> > new file mode 100644
> > index 000000000000..22f1f15d11db
> > --- /dev/null
> > +++ b/tools/tests/domid/Makefile
> > +# NB: $1 cannot be a list
>
> Why not? It would be the same as writing the rule multiple time for
> different targets.
>
> Is about my comment on "prerequisite" on v16? In this rule, "harness.h"
> is a prerequisite.
Sorry for late response.
I see the series is already comitted (thanks!)
I will send a fixup patch for that, since this fragment can be re-used in new
tests.
>
> > +define emit-harness-nested-rule
> > +$(1): $(CURDIR)/harness.h
> > + mkdir -p $$(@D);
> > + ln -sf $$< $$@;
> > +
> > +endef
> > diff --git a/tools/tests/domid/test-domid.c b/tools/tests/domid/test-domid.c
> > new file mode 100644
> > index 000000000000..5915c4699a5c
> > --- /dev/null
> > +++ b/tools/tests/domid/test-domid.c
> > +
> > +#include <sysexits.h>
> > +
> > +#include "harness.h"
> > +
> > +#define verify(exp, fmt, args...) \
> > +while (!(exp)) { \
> > + printf(fmt, ## args); \
> > + exit(EX_SOFTWARE); \
>
> We never used any of "EX_*" macro, or even <sysexits.h>. I'm not sure
> it's a good idea to introduce such use where exit(1) would have been
> more than enough but sysexits.h seems to be available on BSD so it's
> probably fine. It would be nice to change that to exit(1) and remove
> sysexits.h.
re: sysexits.h: muscle memory.
I can fix this up too in a follow on patch, please let me know.
>
> Anyway, patch looks good enough so:
> Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
Thanks!
next prev parent reply other threads:[~2025-09-05 23:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 23:21 [PATCH v17 0/4] xen/domain: domain ID allocation dmukhin
2025-08-29 23:21 ` [PATCH v17 1/4] xen/domain: unify " dmukhin
2025-08-29 23:21 ` [PATCH v17 2/4] tools/include: move xc_bitops.h to xen-tools/bitops.h dmukhin
2025-08-29 23:21 ` [PATCH v17 3/4] tools/tests: introduce unit tests for domain ID allocator dmukhin
2025-09-04 13:50 ` Anthony PERARD
2025-09-05 23:19 ` dmukhin [this message]
2025-08-29 23:21 ` [PATCH v17 4/4] xen/domain: update create_dom0() messages dmukhin
2025-09-03 21:28 ` [PATCH v17 0/4] xen/domain: domain ID allocation Stefano Stabellini
2025-09-04 20:15 ` Demi Marie Obenour
2025-09-05 14:23 ` Alejandro Vallejo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aLtv9bFxf3BEu56v@kraken \
--to=dmukhin@xen.org \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=anthony@xenproject.org \
--cc=dmukhin@ford.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.