<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/bpf/bpf_testmod/Makefile, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-12-06T18:44:10Z</updated>
<entry>
<title>selftests/bpf: Consolidate kernel modules into common directory</title>
<updated>2024-12-06T18:44:10Z</updated>
<author>
<name>Toke Høiland-Jørgensen</name>
<email>toke@redhat.com</email>
</author>
<published>2024-12-04T13:28:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d6212d82bf26f3cbd30b84df064080dd98051ae9'/>
<id>urn:sha1:d6212d82bf26f3cbd30b84df064080dd98051ae9</id>
<content type='text'>
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().

Signed-off-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Viktor Malik &lt;vmalik@redhat.com&gt;
Link: https://lore.kernel.org/bpf/20241204-bpf-selftests-mod-compile-v5-1-b96231134a49@redhat.com
</content>
</entry>
<entry>
<title>selftests/bpf: Add bpf_testmod kernel module for testing</title>
<updated>2020-12-04T01:38:20Z</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andrii@kernel.org</email>
</author>
<published>2020-12-03T20:46:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f7fa225894c7fcb014f3699a402fcc4d896cb1c'/>
<id>urn:sha1:9f7fa225894c7fcb014f3699a402fcc4d896cb1c</id>
<content type='text'>
Add bpf_testmod module, which is conceptually out-of-tree module and provides
ways for selftests/bpf to test various kernel module-related functionality:
raw tracepoint, fentry/fexit/fmod_ret, etc. This module will be auto-loaded by
test_progs test runner and expected by some of selftests to be present and
loaded.

Pahole currently isn't able to generate BTF for static functions in kernel
modules, so make sure traced function is global.

Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Link: https://lore.kernel.org/bpf/20201203204634.1325171-7-andrii@kernel.org
</content>
</entry>
</feed>
