On 3/27/20 7:31 AM, Xiaoyao Li wrote:
On 3/27/2020 4:57 AM, shuah wrote:The patches you sent are based on running the command with OUTPUT
On 3/25/20 9:07 PM, Xiaoyao Li wrote:
set.
That is why I am asking you start with the right use-cases,
and gave you pointers on tests to refer to that have sub-dirs
and handle relocatable builds:
futex
arm64
android
Also, just build isn't sufficient for you to be able to run the
tests.
make kselftest-install O=/path/to/mydir TARGETS=kvm will generate
run script.
This command also has the x86_64 directory not created issue.
Since it generates header files in kernel_src/usr/include, it doesn't have headers path issue. But as result, the kernel_src directory is not clean, this requires me to run "make mrproper", I *really* don't like it.
If the test leverages lib.mk headers install logic correctly, you
shouldn't see this problem.
Yes. It does make the source directory dirty. That is the problem we
have to fix. I am seeing issues the issue of x86_64 not being created
in the case of relocatable builds.
Thanks for working on this by the way. It is one of the tests that
identified as the one doesn't support relocatable builds.
You will see fixes to others I already fixed in
https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/log/?h=next
Start withe the following use0-cases to fix and then test your fixes
for these use-cases. The goal is to be able to run kvm from target
directory and source directory staying clean.
You will have to build the kernel first in all of these cases.
Let's use kselftest-install which is what you would need if you
want build and then run tests later. Also assuming you are doing
native build on x86_64.
From main kernel Makefile: (from kernel source root dir)
Builds in the same source directory:
make kselftest-install TARGETS=kvm
Relocatable build: (from kernel source root dir)
make O=/path/objdir - build kernel
make kselftest-install O=/path/objdir TARGETS=kvm
From tools/testing/selftests/kvm directory:
make O=/path/objdir install
Install step is important especially for relocatable builds,
as it makes sure all run-time dependencies are copied to the
target directory.