Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2308479rdb; Fri, 8 Dec 2023 04:44:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzxcHo+4fk3FdCdJ3rjv6ubpufUGWDr4ELuKzUXx7ug7gQ0iJCtkVYE/Bxjcc8MxmvpW8m X-Received: by 2002:aa7:88d6:0:b0:6cb:913d:2cce with SMTP id k22-20020aa788d6000000b006cb913d2ccemr4429473pff.15.1702039462631; Fri, 08 Dec 2023 04:44:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702039462; cv=none; d=google.com; s=arc-20160816; b=KiPD3Wc0p7n91YAYWVIqRTEV673CQL5cG9tATxhaoVNouVJBcnPq5DwhZJNmNutHxv UEUcgtpb7DNh69Qqfu2b3hsI10PODyEW3ESaqTaRy6fI0T+2JGoy1sQQSfrlA0Q79dk9 qFhJCthZvs63kTnX+Nim8wI2wI6qlDyxMbAq6ynxdchYcJUgq7s/beQGzZ67feQICdGX oK2+YEU4lmJf+XGAVWO2JAMbfkEg581BakSMSreP20tUY8NYfZr7R1Jq8vhwiu4B3ynR 5ThWcsTNGpfy2MK97A6T9OKrYl5S1UTf2TAl6Ta4dXnPNyUeb9wfFqKvVtzGmyoS08yk yOXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature:dkim-signature :dkim-signature:dkim-signature; bh=0n4maJTA6v/hJg+qYTmGFfPnnHUi3IlrWUXV9a2Jkcw=; fh=LfMnLkJcU+IsB74CvhOf1Nxz1CckknEDAX7Pm8gAPeM=; b=iE9JrmKHL6mmVXqXvxfFhOu38ylLHdai6BBJCzDxwHj75kYhM7x3r0uBqdHagVqV8J j5gW2ssg6bDEunz76n3ccyOEA7ZJYlWiwMZygs6rt3pS1ze+vdKc8GgY7nFZKcQXazAY PcwlHTbFTAn70VmyR8RaXm94g5tK+vbI9gMAGo1ZlTwX/fNCXoOWUcywKQwGe6EsTkIr OvTxoBzo+LnSe9AWE5Td2uv9qCQkkxSy9N41Ju3XCMhCI3c7uEc85lHKKjtxEATb/0r/ l4O5gr5ELLiQ3AIg/d62v7QYQZORePQnfsUzV6cVinCZprSPxNO6eRpfNDuFDUyozC+V Tv5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=La9eDmjE; dkim=neutral (no key) header.i=@suse.cz header.b=9hZ8iyq8; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=La9eDmjE; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id q28-20020a056a0002bc00b006ce7ff254c2si1478770pfs.368.2023.12.08.04.44.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 04:44:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=La9eDmjE; dkim=neutral (no key) header.i=@suse.cz header.b=9hZ8iyq8; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=La9eDmjE; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id E8B618114EDE; Fri, 8 Dec 2023 04:44:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233456AbjLHMoF (ORCPT + 99 others); Fri, 8 Dec 2023 07:44:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233400AbjLHMoD (ORCPT ); Fri, 8 Dec 2023 07:44:03 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF71D1710; Fri, 8 Dec 2023 04:44:09 -0800 (PST) Received: from pobox.suse.cz (unknown [10.100.2.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5A52821C42; Fri, 8 Dec 2023 12:44:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1702039448; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0n4maJTA6v/hJg+qYTmGFfPnnHUi3IlrWUXV9a2Jkcw=; b=La9eDmjEtgE1tfkDvO3LLp4mDRDaXF3xKrwIFJFiMwHFHb6xlr+pMiycxsNkusq58GMart zjFdME5/0AFg9O/qizY6ctZoB2A/swvLAc5NRKIjICjPPnPDaGDIPmvx9HaOiosY59X2lu BwmBQP5W4xXRVQZkwGn2RykgTOiSKJg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1702039448; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0n4maJTA6v/hJg+qYTmGFfPnnHUi3IlrWUXV9a2Jkcw=; b=9hZ8iyq8cl3swcssNyUm+DJlQP4sGp3Bm2m2sorlyfHdav5kl+tzMKuwFr1duEX0Ch98Ps Cw79OFkvi7si5oCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1702039448; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0n4maJTA6v/hJg+qYTmGFfPnnHUi3IlrWUXV9a2Jkcw=; b=La9eDmjEtgE1tfkDvO3LLp4mDRDaXF3xKrwIFJFiMwHFHb6xlr+pMiycxsNkusq58GMart zjFdME5/0AFg9O/qizY6ctZoB2A/swvLAc5NRKIjICjPPnPDaGDIPmvx9HaOiosY59X2lu BwmBQP5W4xXRVQZkwGn2RykgTOiSKJg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1702039448; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0n4maJTA6v/hJg+qYTmGFfPnnHUi3IlrWUXV9a2Jkcw=; b=9hZ8iyq8cl3swcssNyUm+DJlQP4sGp3Bm2m2sorlyfHdav5kl+tzMKuwFr1duEX0Ch98Ps Cw79OFkvi7si5oCA== Date: Fri, 8 Dec 2023 13:44:09 +0100 (CET) From: Miroslav Benes To: John Hubbard cc: Andrew Morton , David Hildenbrand , Peter Xu , Shuah Khan , Nathan Chancellor , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, LKML , Muhammad Usama Anjum , Jonathan Corbet , linux-doc@vger.kernel.org, live-patching@vger.kernel.org Subject: Re: [PATCH v3 11/11] selftests: error out if kernel header files are not yet built In-Reply-To: <20230606071637.267103-12-jhubbard@nvidia.com> Message-ID: References: <20230606071637.267103-1-jhubbard@nvidia.com> <20230606071637.267103-12-jhubbard@nvidia.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Score: 1.79 X-Spamd-Result: default: False [2.34 / 50.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(2.44)[0.814]; MIME_GOOD(-0.10)[text/plain]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; RCPT_COUNT_TWELVE(0.00)[13]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; BAYES_HAM(-0.00)[15.61%] X-Spam-Score: 2.34 Authentication-Results: smtp-out1.suse.de; none X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Fri, 08 Dec 2023 04:44:20 -0800 (PST) Hi John, Muhammad, On Tue, 6 Jun 2023, John Hubbard wrote: > As per a discussion with Muhammad Usama Anjum [1], the following is how > one is supposed to build selftests: > > make headers && make -C tools/testing/selftests/mm > > Change the selftest build system's lib.mk to fail out with a helpful > message if that prerequisite "make headers" has not been done yet. > > [1] https://lore.kernel.org/all/bf910fa5-0c96-3707-cce4-5bcc656b6274@collabora.com/ could you, please, elaborate more on that one is supposed to build selftests with 'make headers'? Yes, Documentation/dev-tools/kselftest.rst mentions that because you might need headers but... The common way how we test the kernel is to build the kernel, install it somewhere and run selftests on top. The sequence basically being "make rpm-pkg; rpm -ivh; cd tools/testing/selftest/livepatch/ in source tree; sudo make run_tests" (or a similar variation of the procedure). The point is that we want to test the running kernel with its respective environment installed in /lib/modules/`uname -r`/ (if needed). This way we can run newer selftests from the current mainline tree on older kernels among others. The commit breaks the use case which worked for a long long time. It also breaks what Marcos proposed for livepatch selftests in https://lore.kernel.org/all/20231031-send-lp-kselftests-v3-0-2b1655c2605f@suse.com/ I guess we can always work around it by letting subsystem selftests to override KHDR_DIR but I am not comfortable with the behaviour that your commit introduced in the first place to be honest. Thank you, Miroslav