[lkml]   [2022]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Makefile: Fix separate output directory build of kselftests
On 3/4/22 2:32 AM, Shuah Khan wrote:
> On 2/23/22 12:10 PM, Muhammad Usama Anjum wrote:
>> Build of kselftests fail if kernel's top most Makefile is used for
>> running or building kselftests with separate output directory. The
>> absolute path is needed to reference other files during this kind of
>> build. Set KBUILD_ABS_SRCTREE to use absolute path during the build. It
>> fixes the following different types of errors:
>> make kselftest-all O=/linux_mainline/build
>> Makefile:1080: ../scripts/Makefile.extrawarn: No such file or directory
>> make kselftest-all O=build
>> Makefile:1080: ../scripts/Makefile.extrawarn: No such file or directory
>> Signed-off-by: Muhammad Usama Anjum <>
>> ---
>> I've tested this patch on top of next-20220217. The latest next-20220222
>> have missing patches.
> Can you give more details on the use-cases you tested? Did you test all
> the ways kselftest are built?
Yeah, I've tried to test all the ways. Here are the different ways I've
used to test it:
1) Same directory build of kselftest (this is already working)
make kselftest
make kselftest-all
make kselftest-install
make kselftest-clean
make kselftest-gen_tar

2) These were failing when separate output directory is specified either
as relative or absolute path. After adding this patch, these are also
working. kselfetst.rst mentions separate output directory build in this way.
make kselftest O=build
make kselftest-all O=build
make kselftest-install O=build
make kselftest-clean O=build
make kselftest-gen_tar O=build

make kselftest O=/build
make kselftest-all O=/build
make kselftest-install O=/build
make kselftest-clean O=/build
make kselftest-gen_tar O=/build

Tested on top of next-20220307 after applying this patch.

 \ /
  Last update: 2022-03-08 09:13    [W:0.218 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site