Message ID | cda6cc71c9bdde87fe87f6c2dec4f03ca249dd62.1694421911.git.haibo1.xu@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp47255vqi; Wed, 13 Sep 2023 18:36:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IENI9uIO3g4pg4hI45MnRJXF/azP0lPjyfwvIOnRba3kNaSogyDSg/OmIz/0nLrzzNmWTvU X-Received: by 2002:a0d:d684:0:b0:58e:a9d3:bf98 with SMTP id y126-20020a0dd684000000b0058ea9d3bf98mr4521095ywd.27.1694655380125; Wed, 13 Sep 2023 18:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694655380; cv=none; d=google.com; s=arc-20160816; b=ljmUT4gFGW7daG8zmGV89jMZ7I7IM0xZ84nrfcL6IUZ4qQ3b8DLb4hfVdhaJbUsSmJ 7eg3gM7WO9tgIJ0nrWz0ZNq+GEzIoLBQynqe0CNEw/tYg/kiiVEOfz/ItQl9nLYm7P8v lNW/KXjzUlDRXlCYs3vv6SMIrJRlvKKHtEcuDpFFxXno2GtZkL4RCWVb9tn4gqIzgrFY 5kcCiPLBgPY/wmREYPeEveetsn+LAP5/I/ru/14+Y0KQBx7T21SNprscDJx430pGLcw3 9YAs1EFm5ly+wNlirlj/wdok/bhs/prb5Dqpuj7WPwT6GxnEPMFAlSD/yyanyhTo3Ndk eqNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=W37l3kfNP50BaKD/mHwKWxpRa8mfY7BU5hJAo7qfN9o=; fh=ZclgJ3YvEj7AnEBZ42VJyVRewwhaMq6QGMTdt028Cgg=; b=ONKFvrVMf2G7XFGavHSw2wbQf4PxWAjXDpeBoMS87ofZl/u5TFvmL5NgBJH4TlDJ+j pFJeBdaa8au38BSXazupIxblE9G7i549tj6exvU8FXSz9F4HljfhIOgZ0G/Ml6sZPDe9 8M8Xl7QR3OYPkmT8FH0Pq0Nxs9IKXLT0tfoggU0gLepaCXnCE0qYCfROHINghQtdu9pd 6hhe80qNum4R2OL7j5EObR9Z0wiOT0wbUUm8//bwDu3ZXAJolJbJr0Jpipwi62I4vmXF 8hG/fPpgmR+dut8XN7m0SS1YqqHOS7aObobZo0Lh3oCebWa4soaMQwnP8FMDmkIgmM1W RlKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=CEms+858; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id cm10-20020a056a00338a00b0068fbace5bfcsi465860pfb.149.2023.09.13.18.36.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 18:36:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=CEms+858; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0A580819FC6E; Wed, 13 Sep 2023 18:28:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233674AbjINB2b (ORCPT <rfc822;chrisfriedt@gmail.com> + 35 others); Wed, 13 Sep 2023 21:28:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233590AbjINB2a (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 13 Sep 2023 21:28:30 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1FDD1BDA; Wed, 13 Sep 2023 18:28:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694654906; x=1726190906; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wSd9GEp5Pne1TmdWLw5kDWwDYuO0mubJkWJuSQ3R++A=; b=CEms+8583EXIfM4QbfOwUaYY/NO70VsltYnnInXP/BeP+CJNVZbSevw4 b+L2PC0h2DjfPVRMeIkRTpxIowP4eghXWVXu3DeoCIT0ZWoICJX5/68Sk RkulahbsH+L/xCPBz3JpAfnaKG+V3o881elCUnOS+/Wteo2DpeQmrr1F9 1siLmD6hsrQ2uo7/yAYZdfkhvLxj8rJeFW3LW5hyHxB8L9FO9xt4I5UOq UCJ0KINAX47lL3L21aRKy+pXa/4cmyIcBYjPw8juNR0ZIPGEYAkr1EwOW oWG3Ji8mHEHb/wey6m+FCh/lz/9tfbpaXYJWUo345eHwvhJD+rBLLmCfg w==; X-IronPort-AV: E=McAfee;i="6600,9927,10832"; a="377734047" X-IronPort-AV: E=Sophos;i="6.02,144,1688454000"; d="scan'208";a="377734047" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2023 18:28:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10832"; a="694049172" X-IronPort-AV: E=Sophos;i="6.02,144,1688454000"; d="scan'208";a="694049172" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2023 18:28:18 -0700 From: Haibo Xu <haibo1.xu@intel.com> Cc: xiaobo55x@gmail.com, haibo1.xu@intel.com, ajones@ventanamicro.com, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Paolo Bonzini <pbonzini@redhat.com>, Shuah Khan <shuah@kernel.org>, Marc Zyngier <maz@kernel.org>, Oliver Upton <oliver.upton@linux.dev>, James Morse <james.morse@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Zenghui Yu <yuzenghui@huawei.com>, Anup Patel <anup@brainfault.org>, Atish Patra <atishp@atishpatra.org>, Sean Christopherson <seanjc@google.com>, Ricardo Koller <ricarkol@google.com>, Vishal Annapurve <vannapurve@google.com>, Vipin Sharma <vipinsh@google.com>, David Matlack <dmatlack@google.com>, Aaron Lewis <aaronlewis@google.com>, Colton Lewis <coltonlewis@google.com>, Thomas Huth <thuth@redhat.com>, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org Subject: [PATCH v3 2/9] KVM: selftests: Unify the makefile rule for split targets Date: Thu, 14 Sep 2023 09:36:56 +0800 Message-Id: <cda6cc71c9bdde87fe87f6c2dec4f03ca249dd62.1694421911.git.haibo1.xu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <cover.1694421911.git.haibo1.xu@intel.com> References: <cover.1694421911.git.haibo1.xu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 13 Sep 2023 18:28:35 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776974960218767238 X-GMAIL-MSGID: 1776974960218767238 |
Series |
RISCV: Add kvm Sstc timer selftests
|
|
Commit Message
Haibo Xu
Sept. 14, 2023, 1:36 a.m. UTC
A separate makefile rule was used for split targets which was added
in patch(KVM: arm64: selftests: Split get-reg-list test code). This
could be avoided by minor changes to the recipes of current rule.
Signed-off-by: Haibo Xu <haibo1.xu@intel.com>
---
tools/testing/selftests/kvm/Makefile | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Comments
On Thu, Sep 14, 2023 at 09:36:56AM +0800, Haibo Xu wrote: > A separate makefile rule was used for split targets which was added > in patch(KVM: arm64: selftests: Split get-reg-list test code). This > could be avoided by minor changes to the recipes of current rule. > > Signed-off-by: Haibo Xu <haibo1.xu@intel.com> > --- > tools/testing/selftests/kvm/Makefile | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile > index a3bb36fb3cfc..7972269e8c5f 100644 > --- a/tools/testing/selftests/kvm/Makefile > +++ b/tools/testing/selftests/kvm/Makefile > @@ -249,13 +249,10 @@ TEST_DEP_FILES += $(patsubst %.o, %.d, $(SPLIT_TESTS_OBJS)) > -include $(TEST_DEP_FILES) > > $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED): %: %.o > - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $< $(LIBKVM_OBJS) $(LDLIBS) -o $@ > + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ > $(TEST_GEN_OBJ): $(OUTPUT)/%.o: %.c > $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ > > -$(SPLIT_TESTS_TARGETS): %: %.o $(SPLIT_TESTS_OBJS) > - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ > - > EXTRA_CLEAN += $(LIBKVM_OBJS) $(TEST_DEP_FILES) $(TEST_GEN_OBJ) $(SPLIT_TESTS_OBJS) cscope.* > > x := $(shell mkdir -p $(sort $(dir $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ)))) > @@ -274,6 +271,7 @@ $(LIBKVM_STRING_OBJ): $(OUTPUT)/%.o: %.c > x := $(shell mkdir -p $(sort $(dir $(TEST_GEN_PROGS)))) > $(TEST_GEN_PROGS): $(LIBKVM_OBJS) > $(TEST_GEN_PROGS_EXTENDED): $(LIBKVM_OBJS) > +$(SPLIT_TESTS_TARGETS): $(OUTPUT)/%: $(ARCH_DIR)/%.o > > cscope: include_paths = $(LINUX_TOOL_INCLUDE) $(LINUX_HDR_PATH) include lib .. > cscope: > -- > 2.34.1 > Nice. Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Thanks, drew
On Thu, Sep 14, 2023 at 09:36:56AM +0800, Haibo Xu wrote: > A separate makefile rule was used for split targets which was added > in patch(KVM: arm64: selftests: Split get-reg-list test code). This > could be avoided by minor changes to the recipes of current rule. > > Signed-off-by: Haibo Xu <haibo1.xu@intel.com> > --- > tools/testing/selftests/kvm/Makefile | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile > index a3bb36fb3cfc..7972269e8c5f 100644 > --- a/tools/testing/selftests/kvm/Makefile > +++ b/tools/testing/selftests/kvm/Makefile > @@ -249,13 +249,10 @@ TEST_DEP_FILES += $(patsubst %.o, %.d, $(SPLIT_TESTS_OBJS)) > -include $(TEST_DEP_FILES) > > $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED): %: %.o > - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $< $(LIBKVM_OBJS) $(LDLIBS) -o $@ > + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ > $(TEST_GEN_OBJ): $(OUTPUT)/%.o: %.c > $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ > > -$(SPLIT_TESTS_TARGETS): %: %.o $(SPLIT_TESTS_OBJS) > - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ > - > EXTRA_CLEAN += $(LIBKVM_OBJS) $(TEST_DEP_FILES) $(TEST_GEN_OBJ) $(SPLIT_TESTS_OBJS) cscope.* > > x := $(shell mkdir -p $(sort $(dir $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ)))) > @@ -274,6 +271,7 @@ $(LIBKVM_STRING_OBJ): $(OUTPUT)/%.o: %.c > x := $(shell mkdir -p $(sort $(dir $(TEST_GEN_PROGS)))) > $(TEST_GEN_PROGS): $(LIBKVM_OBJS) > $(TEST_GEN_PROGS_EXTENDED): $(LIBKVM_OBJS) > +$(SPLIT_TESTS_TARGETS): $(OUTPUT)/%: $(ARCH_DIR)/%.o > > cscope: include_paths = $(LINUX_TOOL_INCLUDE) $(LINUX_HDR_PATH) include lib .. > cscope: > -- > 2.34.1 > I just noticed that with and without this patch we're building the arch-specific part in tools/testing/selftests/kvm/riscv even when we have an $(OUTPUT) directory (e.g. O=build). Those build artifacts should be in build/kselftest/kvm/riscv instead. Thanks, drew
On Tue, Oct 3, 2023 at 6:28 PM Andrew Jones <ajones@ventanamicro.com> wrote: > > On Thu, Sep 14, 2023 at 09:36:56AM +0800, Haibo Xu wrote: > > A separate makefile rule was used for split targets which was added > > in patch(KVM: arm64: selftests: Split get-reg-list test code). This > > could be avoided by minor changes to the recipes of current rule. > > > > Signed-off-by: Haibo Xu <haibo1.xu@intel.com> > > --- > > tools/testing/selftests/kvm/Makefile | 6 ++---- > > 1 file changed, 2 insertions(+), 4 deletions(-) > > > > diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile > > index a3bb36fb3cfc..7972269e8c5f 100644 > > --- a/tools/testing/selftests/kvm/Makefile > > +++ b/tools/testing/selftests/kvm/Makefile > > @@ -249,13 +249,10 @@ TEST_DEP_FILES += $(patsubst %.o, %.d, $(SPLIT_TESTS_OBJS)) > > -include $(TEST_DEP_FILES) > > > > $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED): %: %.o > > - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $< $(LIBKVM_OBJS) $(LDLIBS) -o $@ > > + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ > > $(TEST_GEN_OBJ): $(OUTPUT)/%.o: %.c > > $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ > > > > -$(SPLIT_TESTS_TARGETS): %: %.o $(SPLIT_TESTS_OBJS) > > - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ > > - > > EXTRA_CLEAN += $(LIBKVM_OBJS) $(TEST_DEP_FILES) $(TEST_GEN_OBJ) $(SPLIT_TESTS_OBJS) cscope.* > > > > x := $(shell mkdir -p $(sort $(dir $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ)))) > > @@ -274,6 +271,7 @@ $(LIBKVM_STRING_OBJ): $(OUTPUT)/%.o: %.c > > x := $(shell mkdir -p $(sort $(dir $(TEST_GEN_PROGS)))) > > $(TEST_GEN_PROGS): $(LIBKVM_OBJS) > > $(TEST_GEN_PROGS_EXTENDED): $(LIBKVM_OBJS) > > +$(SPLIT_TESTS_TARGETS): $(OUTPUT)/%: $(ARCH_DIR)/%.o > > > > cscope: include_paths = $(LINUX_TOOL_INCLUDE) $(LINUX_HDR_PATH) include lib .. > > cscope: > > -- > > 2.34.1 > > > > I just noticed that with and without this patch we're building the > arch-specific part in tools/testing/selftests/kvm/riscv even when we have > an $(OUTPUT) directory (e.g. O=build). Those build artifacts should be in > build/kselftest/kvm/riscv instead. > Thanks for pointing it out. I will have a look in next week! > Thanks, > drew
On Sun, Oct 08, 2023 at 10:58:57AM +0800, Haibo Xu wrote: > On Tue, Oct 3, 2023 at 6:28 PM Andrew Jones <ajones@ventanamicro.com> wrote: > > > > On Thu, Sep 14, 2023 at 09:36:56AM +0800, Haibo Xu wrote: > > > A separate makefile rule was used for split targets which was added > > > in patch(KVM: arm64: selftests: Split get-reg-list test code). This > > > could be avoided by minor changes to the recipes of current rule. > > > > > > Signed-off-by: Haibo Xu <haibo1.xu@intel.com> > > > --- > > > tools/testing/selftests/kvm/Makefile | 6 ++---- > > > 1 file changed, 2 insertions(+), 4 deletions(-) > > > > > > diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile > > > index a3bb36fb3cfc..7972269e8c5f 100644 > > > --- a/tools/testing/selftests/kvm/Makefile > > > +++ b/tools/testing/selftests/kvm/Makefile > > > @@ -249,13 +249,10 @@ TEST_DEP_FILES += $(patsubst %.o, %.d, $(SPLIT_TESTS_OBJS)) > > > -include $(TEST_DEP_FILES) > > > > > > $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED): %: %.o > > > - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $< $(LIBKVM_OBJS) $(LDLIBS) -o $@ > > > + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ > > > $(TEST_GEN_OBJ): $(OUTPUT)/%.o: %.c > > > $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ > > > > > > -$(SPLIT_TESTS_TARGETS): %: %.o $(SPLIT_TESTS_OBJS) > > > - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ > > > - > > > EXTRA_CLEAN += $(LIBKVM_OBJS) $(TEST_DEP_FILES) $(TEST_GEN_OBJ) $(SPLIT_TESTS_OBJS) cscope.* > > > > > > x := $(shell mkdir -p $(sort $(dir $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ)))) > > > @@ -274,6 +271,7 @@ $(LIBKVM_STRING_OBJ): $(OUTPUT)/%.o: %.c > > > x := $(shell mkdir -p $(sort $(dir $(TEST_GEN_PROGS)))) > > > $(TEST_GEN_PROGS): $(LIBKVM_OBJS) > > > $(TEST_GEN_PROGS_EXTENDED): $(LIBKVM_OBJS) > > > +$(SPLIT_TESTS_TARGETS): $(OUTPUT)/%: $(ARCH_DIR)/%.o > > > > > > cscope: include_paths = $(LINUX_TOOL_INCLUDE) $(LINUX_HDR_PATH) include lib .. > > > cscope: > > > -- > > > 2.34.1 > > > > > > > I just noticed that with and without this patch we're building the > > arch-specific part in tools/testing/selftests/kvm/riscv even when we have > > an $(OUTPUT) directory (e.g. O=build). Those build artifacts should be in > > build/kselftest/kvm/riscv instead. > > > > Thanks for pointing it out. I will have a look in next week! > Hi Haibo, Paolo just fixed this https://lore.kernel.org/all/20231121165631.1170797-1-pbonzini@redhat.com/ Thanks, drew
On Wed, Nov 22, 2023 at 4:13 PM Andrew Jones <ajones@ventanamicro.com> wrote: > > On Sun, Oct 08, 2023 at 10:58:57AM +0800, Haibo Xu wrote: > > On Tue, Oct 3, 2023 at 6:28 PM Andrew Jones <ajones@ventanamicro.com> wrote: > > > > > > On Thu, Sep 14, 2023 at 09:36:56AM +0800, Haibo Xu wrote: > > > > A separate makefile rule was used for split targets which was added > > > > in patch(KVM: arm64: selftests: Split get-reg-list test code). This > > > > could be avoided by minor changes to the recipes of current rule. > > > > > > > > Signed-off-by: Haibo Xu <haibo1.xu@intel.com> > > > > --- > > > > tools/testing/selftests/kvm/Makefile | 6 ++---- > > > > 1 file changed, 2 insertions(+), 4 deletions(-) > > > > > > > > diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile > > > > index a3bb36fb3cfc..7972269e8c5f 100644 > > > > --- a/tools/testing/selftests/kvm/Makefile > > > > +++ b/tools/testing/selftests/kvm/Makefile > > > > @@ -249,13 +249,10 @@ TEST_DEP_FILES += $(patsubst %.o, %.d, $(SPLIT_TESTS_OBJS)) > > > > -include $(TEST_DEP_FILES) > > > > > > > > $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED): %: %.o > > > > - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $< $(LIBKVM_OBJS) $(LDLIBS) -o $@ > > > > + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ > > > > $(TEST_GEN_OBJ): $(OUTPUT)/%.o: %.c > > > > $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ > > > > > > > > -$(SPLIT_TESTS_TARGETS): %: %.o $(SPLIT_TESTS_OBJS) > > > > - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ > > > > - > > > > EXTRA_CLEAN += $(LIBKVM_OBJS) $(TEST_DEP_FILES) $(TEST_GEN_OBJ) $(SPLIT_TESTS_OBJS) cscope.* > > > > > > > > x := $(shell mkdir -p $(sort $(dir $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ)))) > > > > @@ -274,6 +271,7 @@ $(LIBKVM_STRING_OBJ): $(OUTPUT)/%.o: %.c > > > > x := $(shell mkdir -p $(sort $(dir $(TEST_GEN_PROGS)))) > > > > $(TEST_GEN_PROGS): $(LIBKVM_OBJS) > > > > $(TEST_GEN_PROGS_EXTENDED): $(LIBKVM_OBJS) > > > > +$(SPLIT_TESTS_TARGETS): $(OUTPUT)/%: $(ARCH_DIR)/%.o > > > > > > > > cscope: include_paths = $(LINUX_TOOL_INCLUDE) $(LINUX_HDR_PATH) include lib .. > > > > cscope: > > > > -- > > > > 2.34.1 > > > > > > > > > > I just noticed that with and without this patch we're building the > > > arch-specific part in tools/testing/selftests/kvm/riscv even when we have > > > an $(OUTPUT) directory (e.g. O=build). Those build artifacts should be in > > > build/kselftest/kvm/riscv instead. > > > > > > > Thanks for pointing it out. I will have a look in next week! > > > > Hi Haibo, > > Paolo just fixed this > > https://lore.kernel.org/all/20231121165631.1170797-1-pbonzini@redhat.com/ > Thanks for the info! I will rebase the patch set in next version. Thanks, Haibo > Thanks, > drew
diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile index a3bb36fb3cfc..7972269e8c5f 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -249,13 +249,10 @@ TEST_DEP_FILES += $(patsubst %.o, %.d, $(SPLIT_TESTS_OBJS)) -include $(TEST_DEP_FILES) $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED): %: %.o - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $< $(LIBKVM_OBJS) $(LDLIBS) -o $@ + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ $(TEST_GEN_OBJ): $(OUTPUT)/%.o: %.c $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ -$(SPLIT_TESTS_TARGETS): %: %.o $(SPLIT_TESTS_OBJS) - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@ - EXTRA_CLEAN += $(LIBKVM_OBJS) $(TEST_DEP_FILES) $(TEST_GEN_OBJ) $(SPLIT_TESTS_OBJS) cscope.* x := $(shell mkdir -p $(sort $(dir $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ)))) @@ -274,6 +271,7 @@ $(LIBKVM_STRING_OBJ): $(OUTPUT)/%.o: %.c x := $(shell mkdir -p $(sort $(dir $(TEST_GEN_PROGS)))) $(TEST_GEN_PROGS): $(LIBKVM_OBJS) $(TEST_GEN_PROGS_EXTENDED): $(LIBKVM_OBJS) +$(SPLIT_TESTS_TARGETS): $(OUTPUT)/%: $(ARCH_DIR)/%.o cscope: include_paths = $(LINUX_TOOL_INCLUDE) $(LINUX_HDR_PATH) include lib .. cscope: