From: Miroslav Benes <mbenes@suse.cz>
To: John Hubbard <jhubbard@nvidia.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
Peter Xu <peterx@redhat.com>, Shuah Khan <shuah@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
Muhammad Usama Anjum <usama.anjum@collabora.com>,
Jonathan Corbet <corbet@lwn.net>,
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
Date: Fri, 8 Dec 2023 13:44:09 +0100 (CET) [thread overview]
Message-ID: <alpine.LSU.2.21.2312081323570.19664@pobox.suse.cz> (raw)
In-Reply-To: <20230606071637.267103-12-jhubbard@nvidia.com>
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
prev parent reply other threads:[~2023-12-08 12:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230606071637.267103-1-jhubbard@nvidia.com>
[not found] ` <20230606071637.267103-11-jhubbard@nvidia.com>
2023-07-10 14:20 ` [PATCH v3 10/11] Documentation: kselftest: "make headers" is a prerequisite Mark Brown
[not found] ` <20230606071637.267103-12-jhubbard@nvidia.com>
[not found] ` <8e208e0f-699c-2c34-d66e-bf6d488a7a1e@collabora.com>
2023-06-06 20:10 ` [PATCH v3 11/11] selftests: error out if kernel header files are not yet built John Hubbard
2023-06-07 5:37 ` Muhammad Usama Anjum
2023-11-03 12:16 ` Peter Zijlstra
2023-11-03 12:22 ` David Hildenbrand
2023-11-03 12:46 ` Peter Zijlstra
2023-11-03 12:59 ` David Hildenbrand
2023-11-03 13:00 ` David Hildenbrand
2023-11-03 13:08 ` Peter Zijlstra
2023-12-08 15:14 ` Peter Zijlstra
2023-12-08 15:21 ` David Hildenbrand
2023-12-08 20:29 ` John Hubbard
2023-12-08 22:10 ` Peter Zijlstra
2023-12-09 1:39 ` John Hubbard
2023-12-08 12:44 ` Miroslav Benes [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LSU.2.21.2312081323570.19664@pobox.suse.cz \
--to=mbenes@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=live-patching@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=peterx@redhat.com \
--cc=shuah@kernel.org \
--cc=usama.anjum@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox