* Re: [PATCH] selftests: lib.mk: fix out-of-tree builds [not found] <20230613074931.666966-1-anders.roxell@linaro.org> @ 2023-06-13 8:16 ` Muhammad Usama Anjum 2023-06-13 8:44 ` David Hildenbrand 0 siblings, 1 reply; 2+ messages in thread From: Muhammad Usama Anjum @ 2023-06-13 8:16 UTC (permalink / raw) To: Anders Roxell, shuah, Andrew Morton, open list : MEMORY MANAGEMENT, John Hubbard Cc: Muhammad Usama Anjum, linux-kselftest, linux-kernel, jhubbard This patch needs to go through mm tree as the commit which it fixes is in mm. On 6/13/23 12:49 PM, Anders Roxell wrote: > Since commit ("selftests: error out if kernel header files are not yet > built") got merged, the kselftest build correctly because the > KBUILD_OUTPUT isn't set when building out-of-tree and specifying 'O=' > This is the error message that pops up. > > make --silent --keep-going --jobs=32 O=/home/anders/.cache/tuxmake/builds/1482/build INSTALL_PATH=/home/anders/.cache/tuxmake/builds/1482/build/kselftest_install ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- V=1 CROSS_COMPILE_COMPAT=arm-linux-gnueabihf- kselftest-install > make[3]: Entering directory '/home/anders/src/kernel/next/tools/testing/selftests/alsa' > > -e ^[[1;31merror^[[0m: missing kernel header files. > Please run this and try again: > > cd /home/anders/src/kernel/next/tools/testing/selftests/../../.. > make headers > > make[3]: Leaving directory '/home/anders/src/kernel/next/tools/testing/selftests/alsa' > make[3]: *** [../lib.mk:77: kernel_header_files] Error 1 > > Fixing the issue by assigning KBUILD_OUTPUT the same way how its done in > kselftest's Makefile. By adding 'KBUILD_OUTPUT := $(O)' 'if $(origin O)' > is set to 'command line'. This will set the the BUILD dir to > KBUILD_OUTPUT/kselftest when doing out-of-tree builds which makes them > in its own separete output directory. > > Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Please add fixes tag. ("selftests: error out if kernel header files are not yet built") Tested-by: Muhammad Usama Anjum <usama.anjum@collabora.com> > --- > tools/testing/selftests/lib.mk | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk > index b8ea03b9a015..d17854285f2b 100644 > --- a/tools/testing/selftests/lib.mk > +++ b/tools/testing/selftests/lib.mk > @@ -44,6 +44,10 @@ endif > selfdir = $(realpath $(dir $(filter %/lib.mk,$(MAKEFILE_LIST)))) > top_srcdir = $(selfdir)/../../.. > > +ifeq ("$(origin O)", "command line") > + KBUILD_OUTPUT := $(O) > +endif > + > ifneq ($(KBUILD_OUTPUT),) > # Make's built-in functions such as $(abspath ...), $(realpath ...) cannot > # expand a shell special character '~'. We use a somewhat tedious way here. -- BR, Muhammad Usama Anjum ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] selftests: lib.mk: fix out-of-tree builds 2023-06-13 8:16 ` [PATCH] selftests: lib.mk: fix out-of-tree builds Muhammad Usama Anjum @ 2023-06-13 8:44 ` David Hildenbrand 0 siblings, 0 replies; 2+ messages in thread From: David Hildenbrand @ 2023-06-13 8:44 UTC (permalink / raw) To: Muhammad Usama Anjum, Anders Roxell, shuah, Andrew Morton, open list : MEMORY MANAGEMENT, John Hubbard Cc: linux-kselftest, linux-kernel On 13.06.23 10:16, Muhammad Usama Anjum wrote: > This patch needs to go through mm tree as the commit which it fixes is in mm. > > On 6/13/23 12:49 PM, Anders Roxell wrote: >> Since commit ("selftests: error out if kernel header files are not yet >> built") got merged, the kselftest build correctly because the >> KBUILD_OUTPUT isn't set when building out-of-tree and specifying 'O=' >> This is the error message that pops up. >> >> make --silent --keep-going --jobs=32 O=/home/anders/.cache/tuxmake/builds/1482/build INSTALL_PATH=/home/anders/.cache/tuxmake/builds/1482/build/kselftest_install ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- V=1 CROSS_COMPILE_COMPAT=arm-linux-gnueabihf- kselftest-install >> make[3]: Entering directory '/home/anders/src/kernel/next/tools/testing/selftests/alsa' >> >> -e ^[[1;31merror^[[0m: missing kernel header files. >> Please run this and try again: >> >> cd /home/anders/src/kernel/next/tools/testing/selftests/../../.. >> make headers >> >> make[3]: Leaving directory '/home/anders/src/kernel/next/tools/testing/selftests/alsa' >> make[3]: *** [../lib.mk:77: kernel_header_files] Error 1 >> >> Fixing the issue by assigning KBUILD_OUTPUT the same way how its done in >> kselftest's Makefile. By adding 'KBUILD_OUTPUT := $(O)' 'if $(origin O)' >> is set to 'command line'. This will set the the BUILD dir to >> KBUILD_OUTPUT/kselftest when doing out-of-tree builds which makes them >> in its own separete output directory. >> >> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> > Please add fixes tag. ("selftests: error out if kernel header files are not > yet built") > > Tested-by: Muhammad Usama Anjum <usama.anjum@collabora.com> This should get squashed into the original patch unless it's already in mm-stable (which it isn't) and we have a stable commit id. -- Cheers, David / dhildenb ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-13 8:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230613074931.666966-1-anders.roxell@linaro.org>
2023-06-13 8:16 ` [PATCH] selftests: lib.mk: fix out-of-tree builds Muhammad Usama Anjum
2023-06-13 8:44 ` David Hildenbrand
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).