bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* selftests 'make install' crashing due to bpf makefile bug
       [not found] <187929551.20583102.1587742448675.JavaMail.zimbra@redhat.com>
@ 2020-04-24 16:29 ` Veronika Kabatova
  2020-04-24 18:15   ` Andrii Nakryiko
  0 siblings, 1 reply; 2+ messages in thread
From: Veronika Kabatova @ 2020-04-24 16:29 UTC (permalink / raw)
  To: andriin; +Cc: bpf, Jesper Brouer


Hi,

we've been working on adding selftests to CI for bpf-next and ran into
problems when running 'make install'.

Steps to reproduce:

make -C tools/testing/selftests install TARGETS="bpf"

The underlying build completes fine but the install step crashes with
following error:

rsync: link_stat "/kernel/bpf-next/tools/testing/selftests/bpf/runqslower"
       failed: No such file or directory (2)

lib.mk expects all TEST_GEN_PROGS_EXTENDED to be present in the subsystem
selftests directory, while runqslower is located in tools subdirectory
instead [0].

The directory override was originally added together with the runqslower
target in [1] a few months ago. The issue was most likely overlooked for
two reasons:
- people don't use 'make install' for bpf selftests
- kselftest_install.sh script happily continues after errors so while
  the same error is present, it is easy to overlook. runqslower is
  "simply" not present in the created kselftest_install/bpf


We currently see two potential solutions:
a) Remove "OUTPUT=$(SCRATCH_DIR)/" from runqslower target
   - Tested this for our use case but it has a potential of breaking
     workflows
b) Add a copy from bpf/tools to the bpf directory at the end of the target

Which one of them is preferred? Or does anyone have an alternative idea?
I'm willing to post a proper patch if needed (once we agree on the proper
fix) or test any proposals in our environment.


[0]: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/tools/testing/selftests/bpf/Makefile#n143
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3a0d3092a4edbbc

Thanks,
Veronika


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: selftests 'make install' crashing due to bpf makefile bug
  2020-04-24 16:29 ` selftests 'make install' crashing due to bpf makefile bug Veronika Kabatova
@ 2020-04-24 18:15   ` Andrii Nakryiko
  0 siblings, 0 replies; 2+ messages in thread
From: Andrii Nakryiko @ 2020-04-24 18:15 UTC (permalink / raw)
  To: Veronika Kabatova; +Cc: Andrii Nakryiko, bpf, Jesper Brouer

On Fri, Apr 24, 2020 at 9:29 AM Veronika Kabatova <vkabatov@redhat.com> wrote:
>
>
> Hi,
>
> we've been working on adding selftests to CI for bpf-next and ran into
> problems when running 'make install'.
>
> Steps to reproduce:
>
> make -C tools/testing/selftests install TARGETS="bpf"
>
> The underlying build completes fine but the install step crashes with
> following error:

I assume "crashes" means fails here, not really core-dumping process, right?

>
> rsync: link_stat "/kernel/bpf-next/tools/testing/selftests/bpf/runqslower"
>        failed: No such file or directory (2)
>
> lib.mk expects all TEST_GEN_PROGS_EXTENDED to be present in the subsystem
> selftests directory, while runqslower is located in tools subdirectory
> instead [0].
>
> The directory override was originally added together with the runqslower
> target in [1] a few months ago. The issue was most likely overlooked for
> two reasons:
> - people don't use 'make install' for bpf selftests
> - kselftest_install.sh script happily continues after errors so while
>   the same error is present, it is easy to overlook. runqslower is
>   "simply" not present in the created kselftest_install/bpf
>
>
> We currently see two potential solutions:
> a) Remove "OUTPUT=$(SCRATCH_DIR)/" from runqslower target
>    - Tested this for our use case but it has a potential of breaking
>      workflows
> b) Add a copy from bpf/tools to the bpf directory at the end of the target

We don't want to do a) to keep runqslower completely isolated from
selftest build. Doing b) should be fine, though.

>
> Which one of them is preferred? Or does anyone have an alternative idea?
> I'm willing to post a proper patch if needed (once we agree on the proper
> fix) or test any proposals in our environment.
>
>
> [0]: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/tools/testing/selftests/bpf/Makefile#n143
> [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3a0d3092a4edbbc
>
> Thanks,
> Veronika
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-24 18:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <187929551.20583102.1587742448675.JavaMail.zimbra@redhat.com>
2020-04-24 16:29 ` selftests 'make install' crashing due to bpf makefile bug Veronika Kabatova
2020-04-24 18:15   ` Andrii Nakryiko

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).