Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93806C4363A for ; Mon, 26 Oct 2020 09:46:20 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 40EFF223EA for ; Mon, 26 Oct 2020 09:46:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="F6GiHJb2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 40EFF223EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.12170.31887 (Exim 4.92) (envelope-from ) id 1kWz4p-0001L0-AO; Mon, 26 Oct 2020 09:46:07 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 12170.31887; Mon, 26 Oct 2020 09:46:07 +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" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kWz4p-0001Kt-70; Mon, 26 Oct 2020 09:46:07 +0000 Received: by outflank-mailman (input) for mailman id 12170; Mon, 26 Oct 2020 09:46:06 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kWz4o-0001Ko-F2 for xen-devel@lists.xenproject.org; Mon, 26 Oct 2020 09:46:06 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 6300eb3b-689b-4b80-8b78-ca747ce71604; Mon, 26 Oct 2020 09:46:05 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6F851AC48; Mon, 26 Oct 2020 09:46:04 +0000 (UTC) Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kWz4o-0001Ko-F2 for xen-devel@lists.xenproject.org; Mon, 26 Oct 2020 09:46:06 +0000 X-Inumbo-ID: 6300eb3b-689b-4b80-8b78-ca747ce71604 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 6300eb3b-689b-4b80-8b78-ca747ce71604; Mon, 26 Oct 2020 09:46:05 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1603705564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wW5S7trTnyLZSMpzApW79jGaAeCctoYfsCL53iLSAIM=; b=F6GiHJb2RIalO4VQoJroK1f28C9NuXh2gOgdK1x+3aAEbaBZ/LxUJpcliRC8YBP36Dc4NP A8luzLdeaeoJlhH7SEZgB47/SdJ+NcKmpRbnCABidlbtIj6Ip1jIe84tyGkFom+/fVfiuo ecqcFAwH5GZXVPNpAEIcMrl8FT/E2wE= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6F851AC48; Mon, 26 Oct 2020 09:46:04 +0000 (UTC) Subject: Re: [PATCH] tools/libs/light: fix race in Makefile To: Jan Beulich Cc: xen-devel@lists.xenproject.org, Ian Jackson , Wei Liu , Anthony PERARD References: <20201025101218.20478-1-jgross@suse.com> <38097e3b-27c3-deaf-8556-6b48677c54a4@suse.com> From: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= Message-ID: <7aafa515-b549-6d2f-32fb-991ba5a12934@suse.com> Date: Mon, 26 Oct 2020 10:46:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <38097e3b-27c3-deaf-8556-6b48677c54a4@suse.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 26.10.20 10:34, Jan Beulich wrote: > On 25.10.2020 11:12, Juergen Gross wrote: >> The header $(INCLUDE)/_lixl_list.h matches two different rules, which >> can result in build breakage. Fix that. > > While I don't doubt you having observed a race, I'm not sure this is > true, and hence I'm also not sure the change is going to address it: > Aiui the two rules you talk about are the one you change and > > $(XEN_INCLUDE)/_%.h: _%.h > $(call move-if-changed,_$*.h,$(XEN_INCLUDE)/_$*.h) > > But a pattern rule doesn't come into play when a specific rule for > a file exists. Hmm, true. I didn't see the race, but spotted the suspected ambiguity just by chance. > > What I don't understand here is why this two step moving around of > headers is used: Instead of the above pattern rule, can't the rule > to generate _libxl_type%.h, _libxl_type%_json.h, > _libxl_type%_private.h, and _libxl_type%.c put the relevant header > files right into their designated place? This would allow the > pattern rule to go away, albeit I'd then still be unclear about > the specific race you did observe. This would require to replace the pattern rules used to generate the files by per-file rules instead, as e.g. _libxl_types_json.h and _libxl_types_internal_json.h are matching the same pattern, but they need to end up in different directories. In the end I think this patch can just be dropped. Sorry for the noise, Juergen