OSDN Git Service

selftests: drop khdr make target
authorGuillaume Tucker <guillaume.tucker@collabora.com>
Fri, 8 Jul 2022 16:23:27 +0000 (17:23 +0100)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 11 Jul 2022 23:23:25 +0000 (17:23 -0600)
commit3bb267a36185b64949ea9c8bbfe93eb01986f6cb
tree3effda4b2d1d3d62dbdc23da4e9f3cb812b5553b
parentdbeb232726871352fc3e688ff5b02897f8cb0dc7
selftests: drop khdr make target

Drop the "khdr" make target as it fails when the build directory is a
sub-directory of the source tree.  Rely on the "headers_install"
target to have been run first instead.

For example, here's a typical error this patch is addressing:

  $ make O=build -j32 kselftest-gen_tar
  make[1]: Entering directory '/home/kernelci/linux/build'
  make --no-builtin-rules INSTALL_HDR_PATH=/home/kernelci/linux/build/usr \
          ARCH=x86 -C ../../.. headers_install
  make[3]: Entering directory '/home/kernelci/linux'
  Makefile:1022: ../scripts/Makefile.extrawarn: No such file or directory

The source directory is determined in the top-level Makefile as ".."
relatively to the "build" directory, but then the kselftest Makefile
switches to "-C ../../.." so "../scripts" then points one level higher
than the source tree e.g. "linux/../scripts" - which fails obviously.
There is no other use-case in the kernel tree where a sub-directory
Makefile tries to call a top-level make target, and it appears this
isn't really a valid thing to do.

Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/Makefile