From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7366AD3B7E2 for ; Mon, 8 Dec 2025 16:39:38 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1180986.1504072 (Exim 4.92) (envelope-from ) id 1vSeGf-0001DB-5y; Mon, 08 Dec 2025 16:39:21 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1180986.1504072; Mon, 08 Dec 2025 16:39:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vSeGf-0001D4-2Y; Mon, 08 Dec 2025 16:39:21 +0000 Received: by outflank-mailman (input) for mailman id 1180986; Mon, 08 Dec 2025 16:39:19 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vSeGd-0001Cy-2Q for xen-devel@lists.xenproject.org; Mon, 08 Dec 2025 16:39:19 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.96) (envelope-from ) id 1vSeGc-0009Mz-0X; Mon, 08 Dec 2025 16:39:18 +0000 Received: from [2a01:cb15:80df:da00:7079:39df:8b4d:ea79] (helo=l14) by xenbits.xenproject.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vSeGc-005cys-0N; Mon, 08 Dec 2025 16:39:18 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date; bh=erDQNhPQnli6NK7O5q8fXQsL8fB1DgElrBNi8bTXA6A=; b=epuqHEc88oc3O0cgCQe8DpvDDd hs17FhTrovAXyisKXymYVe2icH9Ex1Jx8XPRdqiLG8YMfz38btKLrbFzckRtnuZU1zyrft6OZZrel carb5TknSjXUG9W5FSJplKqbCr0wm1gqkbKtoDaHuGvgSJQEFLUdDdjc8tFwegexAqRM=; Date: Mon, 8 Dec 2025 17:39:15 +0100 From: Anthony PERARD 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 Message-ID: References: <20251204123712.721443-1-dmukhin@ford.com> <20251204123712.721443-2-dmukhin@ford.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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