Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1229567rdb; Sat, 7 Oct 2023 19:59:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGvZaYuI9KAe89K/NsfAU6GJFriGYnM3xYmDkyxGgZ/5hKRzxykjQvoI+xJVzSkJDEvAYM0 X-Received: by 2002:a05:622a:1453:b0:418:1588:2653 with SMTP id v19-20020a05622a145300b0041815882653mr15100428qtx.12.1696733992264; Sat, 07 Oct 2023 19:59:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696733992; cv=none; d=google.com; s=arc-20160816; b=zT3IjG9ig9BYQqyyvgdNnfXdOh5+X51UQuV0g9vYiCRRGHwxz0W6AAh2DF5SmvmeZB 8rNgbXMzkhfiasNmArVPbi/Squ7LnDRAVpTJhLoLoRNtO2cTzx9BEJMBAR6dkYfgBUw2 9gsj7w0nZMFiqkbilugZHKtIGSEKLONUI8wHLGlVjXMzQkzA8Ben/Y/L0GOkjdSx4YPs 39E/LXnb2MWIBG4dVi8aiHA1EPFu1xWMJGoPsV0XX5d5jPLuusJHIHmrLjTkz4qOCVD/ hjUfHV5eQmL0HrW6yB0R/Db8hS8dM+tszQAQDm0297mGcM+1PextQqrkygiCyYw8BKJS r+7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ScEsw5kRuBSyCrQaTmCBYUka5dQTvwb6RwilZml22rc=; fh=GbebbnE2F8e92f3kjqt0KIciPhs0CC8RnHsQtME/EHI=; b=XS4AfQ/nCK8tLtGHgz3/nko0coclHtOmNo8ghbZtQooPVwnYIwTNYFUgtV74+aop3N awOGAIZS/BT5WIC80Ry1jAe4UJ33QmmrB5JsWENeRE61kBx4k4yg8rCyE7czXF9dh5/P 5n9CwwAIdijFToZMwelYrbcfdQRhJbsIphKE1HrWNL1LxDF6lwtiauIs8B2K1vMsIOTL X18EhtmMl5q/RL9QGIusnAJlAAwPSsdjEj49aN+o5HpeXCQEv/t0Pc7x/t4/IEHVcNyD TmT9+jlGkVXGJ4spg9zGQe9AIzBENOftneKIAQVIVVAh7wONMPaRhroITrEOjvKau9g2 lpEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hVVbDEWL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id q13-20020a056a00150d00b0068e4037c5f7si5068292pfu.388.2023.10.07.19.59.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 19:59:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hVVbDEWL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id CF22B8061166; Sat, 7 Oct 2023 19:59:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344327AbjJHC7N (ORCPT + 99 others); Sat, 7 Oct 2023 22:59:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229793AbjJHC7M (ORCPT ); Sat, 7 Oct 2023 22:59:12 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2F8EBC; Sat, 7 Oct 2023 19:59:10 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-50433d8385cso4576979e87.0; Sat, 07 Oct 2023 19:59:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696733949; x=1697338749; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ScEsw5kRuBSyCrQaTmCBYUka5dQTvwb6RwilZml22rc=; b=hVVbDEWLLxEn0JCbIiru9h3H94b7ftOGKPB4SA/lFZcxADytR2YlVdOwCs5qRQ+qHS LLHHf6XKzMeHIxuW35mielGI2OzqBYirS3nIZvTkrnnFia5gMxG+xxSV/5PvCMARl6N5 IGegdjwnd1Q2oQ0J8D1tbwH/QsALrSoFU4YQ/jOAUFgdM+pcgEm2IuTkmIMKNjSAWqDn TYd3l8eOHaD5UKxBgaOHDqUeolzjonvbfl7cA6UshfULvZOZ5SE4OXKBAiGgypRmbJVo khyfus8VKzusezhY9lctlRu7VsJXEURO1nfPi4NtTAxxdqv8B/8i50IIM751mUyVRJ2L 1rIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696733949; x=1697338749; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ScEsw5kRuBSyCrQaTmCBYUka5dQTvwb6RwilZml22rc=; b=MnZvIkjwONI0yUy4cIGOzv92xwv0zof9A3bZLnTtfXJr0O0PB1G89opAm0MS870OOH wTI5UkUCpJienes0sRzj2Aqgl5lsDwY+YKzoBkLqoLtCOSPI/ek3Ceb8OgDpX9JQBB5z PorDqQH9lUkcoNUHSZ60lMou7/R83Vb09k42Ay14iNdiEVe9c01d60W3ZWiFCkMy9l76 Dp6gUJqHleK4SlWODHmizb4tQS3dQfwKU25Re/JG77oTn5SkMZDExW7IG1JtYBfYQVYd fOp+HYidOvyLcAE6njqG3CuZryTYoop48B5632Z20AOe7n/BayXaYfDvZhsUaxaB+q6D WdnQ== X-Gm-Message-State: AOJu0Yyzf44wFoMr3WtG9fO4bMW6/QidFLD8tUDMMJ0vRQMsj8MefL+r 4QNhHX7tg4yrpJz4ueZHQOh39XZTwrJbegd3GKE= X-Received: by 2002:a05:6512:1154:b0:501:bd43:3b9c with SMTP id m20-20020a056512115400b00501bd433b9cmr11192604lfg.23.1696733948681; Sat, 07 Oct 2023 19:59:08 -0700 (PDT) MIME-Version: 1.0 References: <20231003-d44206f71d0b22e539833697@orel> In-Reply-To: <20231003-d44206f71d0b22e539833697@orel> From: Haibo Xu Date: Sun, 8 Oct 2023 10:58:57 +0800 Message-ID: Subject: Re: [PATCH v3 2/9] KVM: selftests: Unify the makefile rule for split targets To: Andrew Jones Cc: Haibo Xu , Paul Walmsley , Palmer Dabbelt , Albert Ou , Paolo Bonzini , Shuah Khan , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Anup Patel , Atish Patra , Sean Christopherson , Ricardo Koller , Vishal Annapurve , Vipin Sharma , David Matlack , Aaron Lewis , Colton Lewis , Thomas Huth , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sat, 07 Oct 2023 19:59:50 -0700 (PDT) X-Spam-Level: ** On Tue, Oct 3, 2023 at 6:28=E2=80=AFPM Andrew Jones 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 > > --- > > tools/testing/selftests/kvm/Makefile | 6 ++---- > > 1 file changed, 2 insertions(+), 4 deletions(-) > > > > diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selft= ests/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 +=3D $(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 +=3D $(LIBKVM_OBJS) $(TEST_DEP_FILES) $(TEST_GEN_OBJ) $(SP= LIT_TESTS_OBJS) cscope.* > > > > x :=3D $(shell mkdir -p $(sort $(dir $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ)))= ) > > @@ -274,6 +271,7 @@ $(LIBKVM_STRING_OBJ): $(OUTPUT)/%.o: %.c > > x :=3D $(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 =3D $(LINUX_TOOL_INCLUDE) $(LINUX_HDR_PATH) incl= ude 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=3Dbuild). 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