Re: [PATCH bpf-next v5] selftests/bpf: Consolidate kernel modules into common directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 10, 2024 at 7:03 PM Kumar Kartikeya Dwivedi
<memxor@xxxxxxxxx> wrote:
>
> On Fri, 6 Dec 2024 at 23:10, <patchwork-bot+netdevbpf@xxxxxxxxxx> wrote:
> >
> > Hello:
> >
> > This patch was applied to bpf/bpf-next.git (master)
> > by Andrii Nakryiko <andrii@xxxxxxxxxx>:
> >
> > On Wed, 04 Dec 2024 14:28:26 +0100 you wrote:
> > > The selftests build four kernel modules which use copy-pasted Makefile
> > > targets. This is a bit messy, and doesn't scale so well when we add more
> > > modules, so let's consolidate these rules into a single rule generated
> > > for each module name, and move the module sources into a single
> > > directory.
> > >
> > > To avoid parallel builds of the different modules stepping on each
> > > other's toes during the 'modpost' phase of the Kbuild 'make modules',
> > > the module files should really be a grouped target. However, make only
> > > added explicit support for grouped targets in version 4.3, which is
> > > newer than the minimum version supported by the kernel. However, make
> > > implicitly treats pattern matching rules with multiple targets as a
> > > grouped target, so we can work around this by turning the rule into a
> > > pattern matching target. We do this by replacing '.ko' with '%ko' in the
> > > targets with subst().
> > >
> > > [...]
>
> I don't have a good way to reproduce this yet, but I'm seeing
> intermittent failures after this patch when running vmtest.sh:
> make: *** No rule to make target 'test_kmods/bpf_testmod.h', needed by
> '/home/kkd/Projects/linux/tools/testing/selftests/bpf/core_reloc.test.o'.
> Stop.
>
> I haven't been able to root cause today, but I will probably try tomorrow.

You need `make clean` in selftests if you are switching between
versions of the kernel before and after this change. We record header
dependencies in *.test.d files, and this file changes the location of
bpf_testmod's header. Our makefile can't invalidate this
automatically. If you are switching between commits after this commit
is applied you shouldn't see this problem.

>
> >
> > Here is the summary with links:
> >   - [bpf-next,v5] selftests/bpf: Consolidate kernel modules into common directory
> >     https://git.kernel.org/bpf/bpf-next/c/d6212d82bf26
> >
> > You are awesome, thank you!
> > --
> > Deet-doot-dot, I am a bot.
> > https://korg.docs.kernel.org/patchwork/pwbot.html
> >
> >
> >





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux