From: Anthony PERARD <anthony@xenproject.org>
To: dmukhin@xen.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 v1 1/2] tests: fixup domid test harness dependencies
Date: Mon, 8 Dec 2025 17:39:15 +0100 [thread overview]
Message-ID: <aTb_M48P_nBh73Sc@l14> (raw)
In-Reply-To: <20251204123712.721443-2-dmukhin@ford.com>
On Thu, Dec 04, 2025 at 04:37:11AM -0800, dmukhin@xen.org wrote:
> diff --git a/tools/tests/domid/Makefile b/tools/tests/domid/Makefile
> index 753129029ed9..1a2129d20655 100644
> --- a/tools/tests/domid/Makefile
> +++ b/tools/tests/domid/Makefile
> @@ -14,16 +14,18 @@ $(shell sed -n \
> 's/^[ \t]*# *include[ \t]*[<"]\([^">]*\)[">].*/\1/p' $(1) 2>/dev/null)
> endef
>
> -# NB: $1 cannot be a list
> +# $1 target
> +# $2 list of test harnesses
> define emit-harness-nested-rule
> -$(1): $(CURDIR)/harness.h
> - mkdir -p $$(@D);
> - ln -sf $$< $$@;
> +$(1): $(2)
> + mkdir -p $$(@D); \
> + for i in $$<; do ln -sf $$$$i $$@; done
This doesn't work.
First, on the first line, the introduction of the backslash mean that
error from `mkdir` are ignored, Make will execute both line in the same
shell instead of 2 separate shell. You would need to add `set -e` if
executing all lines of the recipe in the same shell is useful.
Second, $< only refer to the first prerequisite. So only a single
symlink is created, even if $(2) list multiple files.
Third, if we fix to loop through all the dependencies, the loop will
still only create a single symlink, the last iteration will overwrite
the previous one.
Thanks,
--
Anthony PERARD
next prev parent reply other threads:[~2025-12-08 16:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-04 12:37 [PATCH v1 0/2] tools/tests: test harness fragment dmukhin
2025-12-04 12:37 ` [PATCH v1 1/2] tests: fixup domid test harness dependencies dmukhin
2025-12-08 12:52 ` Jan Beulich
2025-12-08 16:39 ` Anthony PERARD [this message]
2025-12-04 12:37 ` [PATCH v1 2/2] tests: introduce Tests.mk fragment dmukhin
2025-12-08 13:01 ` Jan Beulich
2025-12-08 16:57 ` [PATCH v1 0/2] tools/tests: test harness fragment Anthony PERARD
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=aTb_M48P_nBh73Sc@l14 \
--to=anthony@xenproject.org \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=dmukhin@ford.com \
--cc=dmukhin@xen.org \
--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.