All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Cristian Marussi <cristian.marussi@arm.com>,
	Tim.Bird@sony.com, "shuah\@kernel.org" <shuah@kernel.org>,
	"linux-kselftest\@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>
Subject: Re: kselftest: failed to build with -C tool/testing/selftests when KBUILD_OUTPUT is set
Date: Wed, 27 Nov 2019 14:54:49 +1100	[thread overview]
Message-ID: <8736ea2cty.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <8d34a9b9-f8f3-0e37-00bf-c342cf3d4074@arm.com>

Cristian Marussi <cristian.marussi@arm.com> writes:
> Hi
>
> while testing on linux-next
>
> I see that, when KBUILD_OUTPUT is set in the env, running something like (using TARGETS=exec as a random subsystem here...)
>
> $ make TARGETS=exec INSTALL_PATH=/nfs/LTP-official-debian-aarch64-rootfs/opt/KSFT_next kselftest-install
>
> works fine as usual, WHILE the alternative invocation (still documented in Documentation/dev-tools/kselftest.rst)
>
> make -C tools/testing/selftests/ TARGETS=exec INSTALL_PATH=/nfs/LTP-official-debian-aarch64-rootfs/opt/KSFT_next install
>
> fails miserably with:
> ...
> ...
>  REMOVE  usr/include/rdma/cxgb3-abi.h usr/include/rdma/nes-abi.h
>   HDRINST usr/include/asm/kvm.h
>   INSTALL /kselftest/usr/include
> mkdir: cannot create directory ‘/kselftest’: Permission denied
> /home/crimar01/ARM/dev/src/pdsw/linux/Makefile:1187: recipe for target 'headers_install' failed
> make[2]: *** [headers_install] Error 1
>
>
> This is fixed by unsetting KBUILD_OUTPUT OR reverting: 
>
> 303e6218ecec (ksft/fixes) selftests: Fix O= and KBUILD_OUTPUT handling for relative paths
>
> since bypassing top makefile with -C, the definition of abs-objtree used by the above patch
> is no more available.
>
> As a side effect when KBUILD_OUTPUT is set, this breaks also the usage kselftest_install.sh.
>
>  $ ./kselftest_install.sh /home/crimar01/ARM/dev/nfs/LTP-official-debian-aarch64-rootfs/opt/KSFT_full_next
> ./kselftest_install.sh: Installing in specified location - /home/crimar01/ARM/dev/nfs/LTP-official-debian-aarch64-rootfs/opt/KSFT_full_next ...
> make --no-builtin-rules INSTALL_HDR_PATH=$BUILD/usr \
> 	ARCH=arm64 -C ../../.. headers_install
> make[1]: Entering directory '/home/crimar01/ARM/dev/src/pdsw/linux'
> make[2]: Entering directory '/home/crimar01/ARM/dev/src/pdsw/out_linux'
>   INSTALL /kselftest/usr/include
> mkdir: cannot create directory ‘/kselftest’: Permission denied
> /home/crimar01/ARM/dev/src/pdsw/linux/Makefile:1187: recipe for target 'headers_install' failed
> make[2]: *** [headers_install] Error 1
> make[2]: Leaving directory '/home/crimar01/ARM/dev/src/pdsw/out_linux'
> Makefile:179: recipe for target 'sub-make' failed
> make[1]: *** [sub-make] Error 2
> make[1]: Leaving directory '/home/crimar01/ARM/dev/src/pdsw/linux'
> Makefile:142: recipe for target 'khdr' failed
> make: *** [khdr] Error 2
>
>
...
> Any thoughts ? ... or am I missing something ?

You're not missing anything, this is broken.

> (I think I'm starting to see this in latest CI linaro kselftest while they cross-compile for arm64)

It just hit my travis jobs when I merged up to master:

  https://travis-ci.org/linuxppc/linux/jobs/617482001

Shuah can we please get this reverted?

cheers

  reply	other threads:[~2019-11-27  3:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12 16:33 kselftest: failed to build with -C tool/testing/selftests when KBUILD_OUTPUT is set Cristian Marussi
2019-11-27  3:54 ` Michael Ellerman [this message]
2019-11-27 10:54   ` Cristian Marussi
2019-11-27 16:04     ` shuah
2019-11-27 16:23       ` Cristian Marussi
2019-11-27 16:42         ` shuah
2019-11-27 16:53           ` Cristian Marussi
2019-11-27 17:32             ` shuah
2019-11-27 17:57               ` Tim.Bird
2019-11-27 18:16                 ` shuah
2019-11-27 18:48                   ` Cristian Marussi
2019-11-28  4:17                 ` Michael Ellerman
2019-11-28  4:20           ` Michael Ellerman
2019-11-28 23:33             ` shuah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736ea2cty.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=Tim.Bird@sony.com \
    --cc=cristian.marussi@arm.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.