[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v17 3/4] tools/tests: introduce unit tests for domain ID allocator
On Fri, Aug 29, 2025 at 04:21:31PM -0700, dmukhin@xxxxxxx 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. > +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. Anyway, patch looks good enough so: Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Thanks, -- Anthony PERARD
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |