[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.21.2312081323570.19664@pobox.suse.cz>
Date: Fri, 8 Dec 2023 13:44:09 +0100 (CET)
From: Miroslav Benes <mbenes@...e.cz>
To: John Hubbard <jhubbard@...dia.com>
cc: Andrew Morton <akpm@...ux-foundation.org>,
David Hildenbrand <david@...hat.com>,
Peter Xu <peterx@...hat.com>, Shuah Khan <shuah@...nel.org>,
Nathan Chancellor <nathan@...nel.org>, linux-mm@...ck.org,
linux-kselftest@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
Muhammad Usama Anjum <usama.anjum@...labora.com>,
Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
live-patching@...r.kernel.org
Subject: Re: [PATCH v3 11/11] selftests: error out if kernel header files
are not yet built
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
Powered by blists - more mailing lists