From nobody Mon Feb 9 08:53:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1744640307; cv=none; d=zohomail.com; s=zohoarc; b=PMvwe1dqWQsu1SrWJ1FTrugno5MpXvGzD4Cc/uqpuDJTlohcRECmcSs2wz+zDl7o5YZnSxxiFLNnxmlb53rRy8DZyhFRX9puM+sjyItKWY2Nzy8RfCjufSW5t1Hi2OOIKkz9M6+g4MK2wiHtiCRFTRrco9xjuQEwSGGBSc+9QuI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1744640307; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2TRvNZpz+JhX9kS2Q7J1oFd+thWzi4Dn8OH/vUQM944=; b=idv+qab+/ff1IyMRNGiIiBIYPeT9amqOdcybCC5urxfYJfDnpHZP17WPFMqFYylMe1H06KDvLvLp1wYRkCq1DsK7QPAvscXeXk9Vrt+HGP8IPFE4bUsgyZGvsNOhAcXPcM9KfR0sGw0GZ4T5h8OxZU2OR9pmxBWmoonoqOqN7lI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1744640307390321.66565713368107; Mon, 14 Apr 2025 07:18:27 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.950412.1346758 (Exim 4.92) (envelope-from ) id 1u4Kda-0003fJ-9Z; Mon, 14 Apr 2025 14:18:14 +0000 Received: by outflank-mailman (output) from mailman id 950412.1346758; Mon, 14 Apr 2025 14:18:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u4Kda-0003fB-5T; Mon, 14 Apr 2025 14:18:14 +0000 Received: by outflank-mailman (input) for mailman id 950412; Mon, 14 Apr 2025 14:18:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u4KdY-0003eG-V4 for xen-devel@lists.xenproject.org; Mon, 14 Apr 2025 14:18:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.96) (envelope-from ) id 1u4KdY-00EtTd-1q; Mon, 14 Apr 2025 14:18:12 +0000 Received: from [2a01:e0a:1da:8420:b77:bd5:6e45:7633] (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 1u4KdY-00F14n-0t; Mon, 14 Apr 2025 14:18:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From; bh=2TRvNZpz+JhX9kS2Q7J1oFd+thWzi4Dn8OH/vUQM944=; b=vFXS6pW1zZ7KN0C2fjRNhd5H/B HMCRgeTZpmmAP7181tIcNjkpJ7AWL9adZ4ZOyM6GBTaK9CqxUWIdu41llj41BTVPnnUk8l5hhQjna +2hTAVCNxm8nxiy1mvu+S76GcdCKtAX5wc51kW94YUwejpdQ/rRF/CqT2S+kp6KgAi2Y=; From: Anthony PERARD To: xen-devel@lists.xenproject.org Cc: Roger Pau Monne , Anthony PERARD Subject: [XEN PATCH] tools/tests: Fix newly introduced Makefile Date: Mon, 14 Apr 2025 16:17:14 +0200 Message-Id: <20250414141714.10166-1-anthony@xenproject.org> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @xenproject.org) X-ZM-MESSAGEID: 1744640308065019000 Content-Type: text/plain; charset="utf-8" From: Anthony PERARD 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. This last point fix an issue where `make` might decide to build "test-rangeset.o" before the other files are ready. Fixes: 7bf777b42cad ("tootls/tests: introduce unit tests for rangesets") Signed-off-by: Anthony PERARD Reviewed-by: Denis Mukhin Reviewed-by: Roger Pau Monn=C3=A9 --- 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 diff --git a/tools/tests/rangeset/.gitignore b/tools/tests/rangeset/.gitign= ore 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/Makefile index 70076eff34..3dafcbd054 100644 --- a/tools/tests/rangeset/Makefile +++ b/tools/tests/rangeset/Makefile @@ -12,7 +12,7 @@ run: $(TARGET) =20 .PHONY: clean clean: - $(RM) -- *.o $(TARGET) $(DEPS_RM) + $(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: sed -e '/#include/d' <$< >$@ =20 -rangeset.c: $(XEN_ROOT)/xen/common/rangeset.c list.h rangeset.h +rangeset.c: $(XEN_ROOT)/xen/common/rangeset.c # Remove includes and add the test harness header sed -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 $(CC) $^ -o $@ $(LDFLAGS) + +-include $(DEPS_INCLUDE) --=20 Anthony PERARD