On Thu, Sep 04, 2025 at 03:50:38PM +0200, Anthony PERARD wrote:
> On Fri, Aug 29, 2025 at 04:21:31PM -0700, dmuk...@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.per...@vates.tech>

Thanks!

Reply via email to