From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BB93EB64DD for ; Thu, 13 Jul 2023 11:51:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2FD9F8E0008; Thu, 13 Jul 2023 07:51:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2AE098E0001; Thu, 13 Jul 2023 07:51:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1760F8E0008; Thu, 13 Jul 2023 07:51:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 06A358E0001 for ; Thu, 13 Jul 2023 07:51:13 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id BFD051A020E for ; Thu, 13 Jul 2023 11:51:12 +0000 (UTC) X-FDA: 81006422784.21.EC436CC Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by imf05.hostedemail.com (Postfix) with ESMTP id BE105100026 for ; Thu, 13 Jul 2023 11:51:10 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf05.hostedemail.com: domain of alex@ghiti.fr designates 217.70.183.199 as permitted sender) smtp.mailfrom=alex@ghiti.fr ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689249071; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8V8OCCtlkki68qxrwiPmv6DKorIhDxRKPC8E6ZuvwzU=; b=JriZWFW4EIt6b0+pj/+pZ0B05wLwBj8RwyEmYQK7a9pmwLeWkOmpm+eE6nsTmb/w2rAbXM SBW02kbxXGXTciGgV4Ie5uaOjg6Z8fXjkuCBDQCeJNktV7GiHUJ3IP63a3vGBjiQV5JYhX fDh5l8CpJfi6aa4Q6f4TQawon+ui0WI= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf05.hostedemail.com: domain of alex@ghiti.fr designates 217.70.183.199 as permitted sender) smtp.mailfrom=alex@ghiti.fr ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689249071; a=rsa-sha256; cv=none; b=xpA/2tM3HjStkmQQbZE6YXfU1yVs5JxzaH8grpGoc04GttdLmo61wOmUH1L4YFk+2zDcqS el7nuJt8JITKxIQ+zERPNdiFuTBByHOfoek+2cQEp9ZtKT0bcNEiEaZl2dcubWzWr2zoyD sNOESf600mNxf1CxMoborsi/zElgJmY= 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-Rspamd-Queue-Id: BE105100026 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 67fdudhe4gdm86bsgpqmqddcz49cbcby X-HE-Tag: 1689249070-803355 X-HE-Meta: U2FsdGVkX19edi5AOV8O+jzcyUjrAI1AoaICvR5MaEa3yE25A88lAc7bWVy1xciy2KQr1K3ksB+QXRLx7rA2RzuOt35fGCV+V95ZtODLfNUEonDzP66Jn/GFwvJzI6NDOSLhn2pNXtMcYa/OlC6lFztWKDZ/8DFFcCDTPS9Uj49EiwM4mpqYmZ+dEgVhJPlP+rjoT6HO2R0p97L1H6Uxd+9zmSQro4Q3bTkkuF7S64Kl7b01fEcg2HW9DNzVt6bxf9jS7q5VQ3t5i8QH3ztrXk5uq/K0TZUc1+6Bwhb4chPTdAeqL+EjrDJE7p1N1U4W6a30GfsxM5YnoL5YJ5zFX2lf5Qj6UR5xL8unHmOxsozDXwpM0i5AMymCgErAXUrzx276TsT/9d+GIaQVp3xc2e72E/xZJsUrER0ARwjCWDZ9AuTzt/6FIPilanOsOu74pXJI5ja+YoXwch49nolvyuHoP3QGPHV0nzFuWF35V7ynAbH+vPwlwwuUj8HLgB1DimzrzdqrkBLgsg9n40vihCru8PybHWwTyoLfEhsBETXJn3LjF410VxhtpZB6wSR90M3jd5HZFrv5512EP02CNxxUP89/01t4QpnqfCZaE1n7KIEjSGZLPCatYbDVf7S0H/Vjn/Eb/ofPOEnY2MK3ozILWiKvNj+DLD8PhXLNoD43d1tQyaGcSxS/bqWzPr2p92Ec/qzNJVV/g2woXwI+zUT3Z4U7Rt5AuQGX2bgSEvPDP6oK3qupolJO5gPNpQgpImdyLUuDFjyE99q/gdv9NmJtYntXR54Ex9HW1k5oy8URvS4hizOtJXclPDNJma605g2BgQMT0SL6VhCCevUU8DH9E1a+h5WhJnANAFRz36Jqx0iEy1UKZ6O3AvFnynCLqQxMP8H4H9wKmV9lriDmayRsge3YNVc88YUbFgq2ehd9NndjFcsFPZ9dIXjq/NVWJNWH36zeX1dYRitqLYK wTVPkfg2 S8YPNzmPDuWi5sMbQtayMyZawJEZa8eiZVIzVVt8oN+fkcJVUbEvRohDqMwp7mpMIZblw8069famh7856pTD95UmtJfU8si01sm53FC8dHl9wcdeDYOtZXBgRqFtKi8SyvErhKbz0P41YNRdZHSh+IQoZaSqEikXfYzfgcLYFayjI1ew6CY9p1VQ55gvJygNn6Ih1CwTucnKOAeLuUSztcEFiDsyknR1yqChB3RqZXPdFVnQ= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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