From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Anthony PERARD <anthony.perard@vates.tech>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [PATCH for-4.22 v2 4/5] tests/numa: add unit tests for NUMA setup logic
Date: Fri, 5 Jun 2026 17:22:44 +0200 [thread overview]
Message-ID: <aiLpxA__rzSCQQn1@macbook.local> (raw)
In-Reply-To: <1780672224.8631fc262581453bbf619ec5b2062170.19e9855de55000701b@vates.tech>
On Fri, Jun 05, 2026 at 05:10:23PM +0200, Anthony PERARD wrote:
> On Wed, Jun 03, 2026 at 09:18:35PM +0200, Roger Pau Monne wrote:
> > diff --git a/tools/tests/numa/Makefile b/tools/tests/numa/Makefile
> > new file mode 100644
> > index 000000000000..5235f9d6297f
> > --- /dev/null
> > +++ b/tools/tests/numa/Makefile
> > +
> > +.PHONY: uninstall
> > +uninstall:
> > + $(RM) -- $(patsubst %,$(DESTDIR)$(LIBEXEC)/tests/%,$(TARGETS))
>
> There's a simpler way to write this, with
> $(addprefix $(DESTDIR)$(LIBEXEC)/tests/,$(TARGETS))
> But that's ok to.
I've merely c&p what we had in other Makefiles, and didn't think much
about the specific runes. I will leave that one alone if you don't
mind, we could always do a sweep change of this pattern in
tools/tests.
> > +
> > +numa.h: $(XEN_ROOT)/xen/include/xen/numa.h
> > + sed -e '/^#[[:space:]]*include/d' <$< >$@
> > +
> > +CFLAGS += -D__XEN_TOOLS__
> > +CFLAGS += $(APPEND_CFLAGS)
> > +CFLAGS += $(CFLAGS_xeninclude)
> > +
> > +test-numa: test-numa.c numa.h
> > + $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_$*.o) -o $@ $< $(APPEND_CFLAGS)
>
> $* should be undefined here.
> So we have $(CFLAGS_.o), but that variable doesn't exit either.
> You could remove $(CFLAGS_$*.o), it's not use here.
Ack.
> Also, $(APPEND_CFLAGS) is added twice, once via $(CFLAGS) and a second
> time on the command line. I think the one added to $(CFLAGS) should be
> removed.
Done, will remove that from CLFAGS then.
> > diff --git a/tools/tests/numa/test-numa.c b/tools/tests/numa/test-numa.c
> > new file mode 100644
> > index 000000000000..bced68d4d7f1
> > --- /dev/null
> > +++ b/tools/tests/numa/test-numa.c
> > +
> > + for ( j = 0;
> > + j < ARRAY_SIZE(tests[i].affinity) && tests[i].affinity[j].end;
>
> Why do you test the value `.end` ? ARRAY_SIZE is likely enough as the
> test array is static. Same thing later, with the `ram` array.
To skip processing empty/uninitialized entries (ie: ones with start
== end == 0).
>
>
> Anyway, it's all look good enough to me:
> Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
Thanks, will do the above changes and do one last pre-push CI run.
Roger.
next prev parent reply other threads:[~2026-06-05 15:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 19:18 [PATCH for-4.22 v2 0/5] numa: add unit testing plus fix regression Roger Pau Monne
2026-06-03 19:18 ` [PATCH for-4.22 v2 1/5] tools/bitops: adjust bitmap_or() interface to match hypervisor Roger Pau Monne
2026-06-03 19:18 ` [PATCH for-4.22 v2 2/5] tools/macros: adjust ROUNDUP() " Roger Pau Monne
2026-06-05 15:24 ` Andrew Cooper
2026-06-05 15:38 ` Roger Pau Monné
2026-06-03 19:18 ` [PATCH for-4.22 v2 3/5] xen/numa: prepare NUMA setup code for unit testing Roger Pau Monne
2026-06-03 19:18 ` [PATCH for-4.22 v2 4/5] tests/numa: add unit tests for NUMA setup logic Roger Pau Monne
2026-06-05 15:10 ` Anthony PERARD
2026-06-05 15:22 ` Roger Pau Monné [this message]
2026-06-05 15:41 ` Andrew Cooper
2026-06-05 15:49 ` Roger Pau Monné
2026-06-05 15:53 ` Andrew Cooper
2026-06-03 19:18 ` [PATCH for-4.22 v2 5/5] xen/numa: fix setup of non-aligned memory affinity ranges Roger Pau Monne
2026-06-05 15:49 ` Andrew Cooper
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=aiLpxA__rzSCQQn1@macbook.local \
--to=roger.pau@citrix.com \
--cc=anthony.perard@vates.tech \
--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.