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 0A9C6C369AB for ; Tue, 15 Apr 2025 07:58:07 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.952246.1347756 (Exim 4.92) (envelope-from ) id 1u4bBA-000779-9B; Tue, 15 Apr 2025 07:58:00 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 952246.1347756; Tue, 15 Apr 2025 07:58:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u4bBA-000772-5x; Tue, 15 Apr 2025 07:58:00 +0000 Received: by outflank-mailman (input) for mailman id 952246; Tue, 15 Apr 2025 07:57:58 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u4bB7-00076k-Hh for xen-devel@lists.xenproject.org; Tue, 15 Apr 2025 07:57:58 +0000 Received: from mail-4316.protonmail.ch (mail-4316.protonmail.ch [185.70.43.16]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 54ffeee6-19cf-11f0-9ffb-bf95429c2676; Tue, 15 Apr 2025 09:57:52 +0200 (CEST) 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" X-Inumbo-ID: 54ffeee6-19cf-11f0-9ffb-bf95429c2676 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1744703871; x=1744963071; bh=oEH7nePpt4B7CtrSrvTMhCw4jjpkMYzl1UwBaoOGLrw=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=Fx0SqhiBRCa6NFe/iXPeXqKbDUVvGzgTz5aeRMZoDqyiuqkOx/h5h+JwOlsfSGQjF Ug8qdOwNm0zXztZJQN9aLGnwR2IMZx56d/c3O/VSvFzpV0/Y2zlWBCyt7CA/aprdah VAdE5ypnNNSZJUP10IbPl/u5O0UdtDb/x1kVELBQoDa9lD5xlwnXR6pssjhPl3tI9p 7YYRWhRCvKxkkS8vBgrL4KLnw0n7tfavZ6Z+tH5kBJYP0MT4Nj131ukBdpfVorYh7+ 7P3Hto0tGy41/azUY09ejQev9yyuxNbiokg9Tj3WLUdygj90cjVbZqCZsyx4157Z58 A8LuvMy3+Disg== Date: Tue, 15 Apr 2025 07:57:47 +0000 To: Anthony PERARD From: dmkhn@proton.me Cc: xen-devel@lists.xenproject.org, Roger Pau Monne , Anthony PERARD Subject: Re: [XEN PATCH] tools/tests: Fix newly introduced Makefile Message-ID: In-Reply-To: <20250414141714.10166-1-anthony@xenproject.org> References: <20250414141714.10166-1-anthony@xenproject.org> Feedback-ID: 123220910:user:proton X-Pm-Message-ID: 92c8dbca102a7b4aa11bc74741833df8f107b130 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Apr 14, 2025 at 04:17:14PM +0200, Anthony PERARD wrote: > From: Anthony PERARD >=20 > Fix few issue with this new directory: > - clean generated files > - and ignore those generated files > - include the dependency files generated by `gcc`. > - rework prerequisites: > "test-rangeset.o" also needs the generated files "list.h" and > "rangeset.h". Technically, both only needs "harness.h" which needs > the generated headers, but that's a bit simpler and the previous > point will add the dependency on "harness.h" automatically. >=20 > This last point fix an issue where `make` might decide to build > "test-rangeset.o" before the other files are ready. >=20 > Fixes: 7bf777b42cad ("tootls/tests: introduce unit tests for rangesets") > Signed-off-by: Anthony PERARD Reviewed-by: Denis Mukhin > --- >=20 > Make doesn't needs the *.h to generated the .c. So removing that > prerequisite means make can generate all 3 at the same time. > --- > tools/tests/rangeset/.gitignore | 4 ++++ > tools/tests/rangeset/Makefile | 8 ++++++-- > 2 files changed, 10 insertions(+), 2 deletions(-) > create mode 100644 tools/tests/rangeset/.gitignore >=20 > diff --git a/tools/tests/rangeset/.gitignore b/tools/tests/rangeset/.giti= gnore > new file mode 100644 > index 0000000000..cdeb778535 > --- /dev/null > +++ b/tools/tests/rangeset/.gitignore > @@ -0,0 +1,4 @@ > +/list.h > +/rangeset.c > +/rangeset.h > +/test-rangeset > diff --git a/tools/tests/rangeset/Makefile b/tools/tests/rangeset/Makefil= e > index 70076eff34..3dafcbd054 100644 > --- a/tools/tests/rangeset/Makefile > +++ b/tools/tests/rangeset/Makefile > @@ -12,7 +12,7 @@ run: $(TARGET) >=20 > .PHONY: clean > clean: > -=09$(RM) -- *.o $(TARGET) $(DEPS_RM) > +=09$(RM) -- *.o $(TARGET) $(DEPS_RM) list.h rangeset.h rangeset.c >=20 > .PHONY: distclean > distclean: clean > @@ -32,7 +32,7 @@ rangeset.h: $(XEN_ROOT)/xen/include/xen/rangeset.h > list.h rangeset.h: > =09sed -e '/#include/d' <$< >$@ >=20 > -rangeset.c: $(XEN_ROOT)/xen/common/rangeset.c list.h rangeset.h > +rangeset.c: $(XEN_ROOT)/xen/common/rangeset.c > =09# Remove includes and add the test harness header > =09sed -e '/#include/d' -e '1s/^/#include "harness.h"/' <$< >$@ >=20 > @@ -42,5 +42,9 @@ CFLAGS +=3D $(CFLAGS_xeninclude) >=20 > LDFLAGS +=3D $(APPEND_LDFLAGS) >=20 > +test-rangeset.o rangeset.o: list.h rangeset.h > + > test-rangeset: rangeset.o test-rangeset.o > =09$(CC) $^ -o $@ $(LDFLAGS) > + > +-include $(DEPS_INCLUDE) > -- > Anthony PERARD >=20 >=20