Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp1030990rwp; Thu, 13 Jul 2023 05:15:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlEziAmWnsJt6GRMlt3oWfkKProISvoDoovdD25d/t4it1s+RAcs7oPRREiyXs/tMPMToFdY X-Received: by 2002:a05:6358:2486:b0:135:4f95:4320 with SMTP id m6-20020a056358248600b001354f954320mr1938615rwc.24.1689250536039; Thu, 13 Jul 2023 05:15:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689250536; cv=none; d=google.com; s=arc-20160816; b=ICiCBm88ilBFTXmIcXkA3x2D18/IAuk10Pnkr0ZJo1EoJuLxhtKsLuOprcKA4Qu8rB KHnn1+X746Fyh9nuYDsG2AMnn+2GmH+NdkopE8dXB+5FadgFJ4Y6Qx/XXFj5bS72b5UL WcXm6M9dOhrgjeWQQMhf7S2Epv/OTRiXDnYycGk+x/qk5hhkk+ddC+7A1zxVN7VznySy YYD7TuikQQ4tRSIjtUKGeBjaFoVmGEu5ETevW1uq4AhUSBimgBdyEDF+v7e8SKjc5vdx fqvujnE0y3XJqs9frRMg1IGiT/yRHmk746vO/zvxKsu1mZgCo+4M7bttiajCU/JAYfa+ K0Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=8V8OCCtlkki68qxrwiPmv6DKorIhDxRKPC8E6ZuvwzU=; fh=qb2bdCp2hYGnxKL0pDWwBcvYnjsvt4OyK6fmi8OOux4=; b=ekFGPuKsVuYmIIn8TOYQKsYz8Kucdbn2gs/I1aMiFvNXE1FFAV0iWRn6UDrtyH+RT0 Qn7f4qAbh3xrHYfl0dA9so2FGOr4RnrqKkiJeroejeKqWSfcSwg7J0Q17m+pTK/c6IK+ u+gHRWL9hIbzN3VL6hwGuQd5gOex6odu8uHuFMIfRwaBYWQVmaAY7nkRe0GwPOQKYi4K DZ56+HX6aX+y/csA+p8HMPpfix2l0EJdeeZSGHJovILt/cL/L3OcWbYgMvhizws4pZki D0W+rDuwnuHrVdPLtphQQovVMFAxnfjuYZAH7HuN/3ztLqPVtWhcqge4G2qbkepJuFSI a9wA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e7-20020a656887000000b00543c1b14062si4953828pgt.79.2023.07.13.05.15.24; Thu, 13 Jul 2023 05:15:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234287AbjGMLvO (ORCPT + 99 others); Thu, 13 Jul 2023 07:51:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233799AbjGMLvM (ORCPT ); Thu, 13 Jul 2023 07:51:12 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 466551734; Thu, 13 Jul 2023 04:51:10 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id A5DC2FF80D; Thu, 13 Jul 2023 11:51:02 +0000 (UTC) Message-ID: Date: Thu, 13 Jul 2023 13:51:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] selftests/riscv: fix potential build failure during the "emit_tests" step Content-Language: en-US To: John Hubbard , Andrew Morton Cc: Albert Ou , Alexandre Ghiti , Anders Roxell , Andrew Jones , Andy Chiu , Evan Green , Hugh Dickins , Muhammad Usama Anjum , Palmer Dabbelt , Paul Walmsley , Qinglin Pan , Shuah Khan , linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, linux-mm@kvack.org, LKML References: <20230712193514.740033-1-jhubbard@nvidia.com> From: Alexandre Ghiti In-Reply-To: <20230712193514.740033-1-jhubbard@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: alex@ghiti.fr X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi John, On 12/07/2023 21:35, John Hubbard wrote: > The riscv selftests (which were modeled after the arm64 selftests) are > improperly declaring the "emit_tests" target to depend upon the "all" > target. This approach, when combined with commit 9fc96c7c19df > ("selftests: error out if kernel header files are not yet built"), has > caused build failures [1] on arm64, and is likely to cause similar > failures for riscv. > > To fix this, simply remove the unnecessary "all" dependency from the > emit_tests target. The dependency is still effectively honored, because > again, invocation is via "install", which also depends upon "all". > > An alternative approach would be to harden the emit_tests target so that > it can depend upon "all", but that's a lot more complicated and hard to > get right, and doesn't seem worth it, especially given that emit_tests > should probably not be overridden at all. > > [1] https://lore.kernel.org/20230710-kselftest-fix-arm64-v1-1-48e872844f25@kernel.org > > Fixes: 9fc96c7c19df ("selftests: error out if kernel header files are not yet built") > Signed-off-by: John Hubbard > --- > > Andrew, > > With this, and with my arm64 fix [2] that you've already put into > mm-unstable, you should be able to safely drop commit 819187ab8741 > ("selftests: fix arm64 test installation"). > > [2] https://lore.kernel.org/20230711005629.2547838-1-jhubbard@nvidia.com > > thanks, > John Hubbard > > > tools/testing/selftests/riscv/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/riscv/Makefile b/tools/testing/selftests/riscv/Makefile > index 9dd629cc86aa..f4b3d5c9af5b 100644 > --- a/tools/testing/selftests/riscv/Makefile > +++ b/tools/testing/selftests/riscv/Makefile > @@ -43,7 +43,7 @@ run_tests: all > done > > # Avoid any output on non riscv on emit_tests > -emit_tests: all > +emit_tests: > @for DIR in $(RISCV_SUBTARGETS); do \ > BUILD_TARGET=$(OUTPUT)/$$DIR; \ > $(MAKE) OUTPUT=$$BUILD_TARGET -C $$DIR $@; \ > > base-commit: 3f01e9fed8454dcd89727016c3e5b2fbb8f8e50c > prerequisite-patch-id: 37c92f7425689ff069fb83996a25cd98e78d7242 Perfect timing, I have just encountered this failure this morning: make[5]: *** [../../lib.mk:81: kernel_header_files] Error 1 that your patch fixed :) So you can add: Tested-by: Alexandre Ghiti Thank you! Alex