<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2022-12-15T05:30:40Z</updated>
<entry>
<title>selftests/bpf: Add a test for using a cpumap from an freplace-to-XDP program</title>
<updated>2022-12-15T05:30:40Z</updated>
<author>
<name>Toke Høiland-Jørgensen</name>
<email>toke@redhat.com</email>
</author>
<published>2022-12-14T23:02:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f506439ec3dee11e0e77b0a1f3fb3eec22c97873'/>
<id>urn:sha1:f506439ec3dee11e0e77b0a1f3fb3eec22c97873</id>
<content type='text'>
This adds a simple test for inserting an XDP program into a cpumap that is
"owned" by an XDP program that was loaded as PROG_TYPE_EXT (as libxdp
does). Prior to the kernel fix this would fail because the map type
ownership would be set to PROG_TYPE_EXT instead of being resolved to
PROG_TYPE_XDP.

v5:
- Fix a few nits from Andrii, add his ACK
v4:
- Use skeletons for selftest
v3:
- Update comment to better explain the cause
- Add Yonghong's ACK

Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Link: https://lore.kernel.org/r/20221214230254.790066-2-toke@redhat.com
Signed-off-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Store BPF object files with .bpf.o extension</title>
<updated>2022-09-02T13:55:37Z</updated>
<author>
<name>Daniel Müller</name>
<email>deso@posteo.net</email>
</author>
<published>2022-09-01T22:22:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=afef88e65554c3e8691513b8350d6445e292560e'/>
<id>urn:sha1:afef88e65554c3e8691513b8350d6445e292560e</id>
<content type='text'>
BPF object files are, in a way, the final artifact produced as part of
the ahead-of-time compilation process. That makes them somewhat special
compared to "regular" object files, which are a intermediate build
artifacts that can typically be removed safely. As such, it can make
sense to name them differently to make it easier to spot this difference
at a glance.

Among others, libbpf-bootstrap [0] has established the extension .bpf.o
for BPF object files. It seems reasonable to follow this example and
establish the same denomination for selftest build artifacts. To that
end, this change adjusts the corresponding part of the build system and
the test programs loading BPF object files to work with .bpf.o files.

  [0] https://github.com/libbpf/libbpf-bootstrap

Suggested-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Daniel Müller &lt;deso@posteo.net&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/20220901222253.1199242-1-deso@posteo.net
</content>
</entry>
<entry>
<title>selftests/bpf: Excercise bpf_obj_get_info_by_fd for bpf2bpf</title>
<updated>2022-08-08T13:53:39Z</updated>
<author>
<name>Stanislav Fomichev</name>
<email>sdf@google.com</email>
</author>
<published>2022-08-04T20:11:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ffd5cfca5388e9d7c8386343763df41315ac1dd2'/>
<id>urn:sha1:ffd5cfca5388e9d7c8386343763df41315ac1dd2</id>
<content type='text'>
Apparently, no existing selftest covers it. Add a new one where
we load cgroup/bind4 program and attach fentry to it. Calling
bpf_obj_get_info_by_fd on the fentry program should return non-zero
btf_id/btf_obj_id instead of crashing the kernel.

Signed-off-by: Stanislav Fomichev &lt;sdf@google.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Link: https://lore.kernel.org/bpf/20220804201140.1340684-2-sdf@google.com
</content>
</entry>
<entry>
<title>selftests/bpf: Add selftest for calling global functions from freplace</title>
<updated>2022-06-07T17:41:20Z</updated>
<author>
<name>Toke Høiland-Jørgensen</name>
<email>toke@redhat.com</email>
</author>
<published>2022-06-06T07:52:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2cf7b7ffdae519b284f1406012b52e2282fa36bf'/>
<id>urn:sha1:2cf7b7ffdae519b284f1406012b52e2282fa36bf</id>
<content type='text'>
Add a selftest that calls a global function with a context object parameter
from an freplace function to check that the program context type is
correctly converted to the freplace target when fetching the context type
from the kernel BTF.

v2:
- Trim includes
- Get rid of global function
- Use __noinline

Signed-off-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Link: https://lore.kernel.org/r/20220606075253.28422-2-toke@redhat.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Migrate from bpf_prog_test_run</title>
<updated>2022-02-03T06:31:18Z</updated>
<author>
<name>Delyan Kratunov</name>
<email>delyank@fb.com</email>
</author>
<published>2022-02-02T23:54:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=04fcb5f9a104f24278ad849c642cbdf0c8f48453'/>
<id>urn:sha1:04fcb5f9a104f24278ad849c642cbdf0c8f48453</id>
<content type='text'>
bpf_prog_test_run is being deprecated in favor of the OPTS-based
bpf_prog_test_run_opts.
We end up unable to use CHECK in most cases, so replace usages with
ASSERT_* calls.

Signed-off-by: Delyan Kratunov &lt;delyank@fb.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20220202235423.1097270-2-delyank@fb.com
</content>
</entry>
<entry>
<title>selftests/bpf: use preferred setter/getter APIs instead of deprecated ones</title>
<updated>2022-01-26T01:59:07Z</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andrii@kernel.org</email>
</author>
<published>2022-01-24T19:42:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=379d19ecdc208c7b8d3d221f29e39d84a5f3b00b'/>
<id>urn:sha1:379d19ecdc208c7b8d3d221f29e39d84a5f3b00b</id>
<content type='text'>
Switch to using preferred setters and getters instead of deprecated ones.

Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/r/20220124194254.2051434-6-andrii@kernel.org
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Stop using bpf_object__find_program_by_title API.</title>
<updated>2021-12-14T22:38:05Z</updated>
<author>
<name>Kui-Feng Lee</name>
<email>kuifeng@fb.com</email>
</author>
<published>2021-12-14T03:59:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a393ea80a22a9beffdc9a527bd2f9f270e7a0c6e'/>
<id>urn:sha1:a393ea80a22a9beffdc9a527bd2f9f270e7a0c6e</id>
<content type='text'>
bpf_object__find_program_by_title is going to be deprecated.  Replace
all use cases in tools/testing/selftests/bpf with
bpf_object__find_program_by_name or bpf_object__for_each_program.

Signed-off-by: Kui-Feng Lee &lt;kuifeng@fb.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20211214035931.1148209-2-kuifeng@fb.com
</content>
</entry>
<entry>
<title>selftests/bpf: Use explicit bpf_prog_test_load() calls everywhere</title>
<updated>2021-11-07T16:34:23Z</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andrii@kernel.org</email>
</author>
<published>2021-11-03T22:08:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cbdb1461dcf45765a036e9f6975ffe19e69bdc33'/>
<id>urn:sha1:cbdb1461dcf45765a036e9f6975ffe19e69bdc33</id>
<content type='text'>
-Dbpf_prog_load_deprecated=bpf_prog_test_load trick is both ugly and
breaks when deprecation goes into effect due to macro magic. Convert all
the uses to explicit bpf_prog_test_load() calls which avoid deprecation
errors and makes everything less magical.

Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Dave Marchevsky &lt;davemarchevsky@fb.com&gt;
Link: https://lore.kernel.org/bpf/20211103220845.2676888-12-andrii@kernel.org
</content>
</entry>
<entry>
<title>selfetest/bpf: Make some tests serial</title>
<updated>2021-10-08T22:17:00Z</updated>
<author>
<name>Yucong Sun</name>
<email>sunyucong@gmail.com</email>
</author>
<published>2021-10-06T18:56:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d3f7b1664d3ebd69751327f45f5cd4adfb29f620'/>
<id>urn:sha1:d3f7b1664d3ebd69751327f45f5cd4adfb29f620</id>
<content type='text'>
Change tests that often fails in parallel execution mode to serial.

Signed-off-by: Yucong Sun &lt;sunyucong@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20211006185619.364369-15-fallentree@fb.com
</content>
</entry>
<entry>
<title>selftests/bpf: Switch to new bpf_object__next_{map,program} APIs</title>
<updated>2021-10-06T19:34:02Z</updated>
<author>
<name>Hengqi Chen</name>
<email>hengqi.chen@gmail.com</email>
</author>
<published>2021-10-03T16:58:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6f2b219b62a4376ca2da15c503de79d0650c8155'/>
<id>urn:sha1:6f2b219b62a4376ca2da15c503de79d0650c8155</id>
<content type='text'>
Replace deprecated bpf_{map,program}__next APIs with newly added
bpf_object__next_{map,program} APIs, so that no compilation warnings
emit.

Signed-off-by: Hengqi Chen &lt;hengqi.chen@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Link: https://lore.kernel.org/bpf/20211003165844.4054931-3-hengqi.chen@gmail.com
</content>
</entry>
</feed>
