<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/bpf/prog_tests/fexit_test.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-02-03T06:31:18Z</updated>
<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: Add weak/typeless ksym test for light skeleton</title>
<updated>2021-10-28T23:30:07Z</updated>
<author>
<name>Kumar Kartikeya Dwivedi</name>
<email>memxor@gmail.com</email>
</author>
<published>2021-10-28T06:34:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=087cba799ced0573df499ddd3b2d8777e50cfb62'/>
<id>urn:sha1:087cba799ced0573df499ddd3b2d8777e50cfb62</id>
<content type='text'>
Also, avoid using CO-RE features, as lskel doesn't support CO-RE, yet.
Include both light and libbpf skeleton in same file to test both of them
together.

In c48e51c8b07a ("bpf: selftests: Add selftests for module kfunc support"),
I added support for generating both lskel and libbpf skel for a BPF
object, however the name parameter for bpftool caused collisions when
included in same file together. This meant that every test needed a
separate file for a libbpf/light skeleton separation instead of
subtests.

Change that by appending a "_lskel" suffix to the name for files using
light skeleton, and convert all existing users.

Signed-off-by: Kumar Kartikeya Dwivedi &lt;memxor@gmail.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20211028063501.2239335-7-memxor@gmail.com
</content>
</entry>
<entry>
<title>selftests/bpf: Convert few tests to light skeleton.</title>
<updated>2021-05-18T22:41:44Z</updated>
<author>
<name>Alexei Starovoitov</name>
<email>ast@kernel.org</email>
</author>
<published>2021-05-14T00:36:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4d1b62986125b6de596c98310543652a7892e097'/>
<id>urn:sha1:4d1b62986125b6de596c98310543652a7892e097</id>
<content type='text'>
Convert few tests that don't use CO-RE to light skeleton.

Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210514003623.28033-19-alexei.starovoitov@gmail.com
</content>
</entry>
<entry>
<title>selftests/bpf: Add re-attach test to fexit_test</title>
<updated>2021-04-26T04:09:02Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2021-04-14T19:51:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8caadc43f2019caebbf314f7a6ae2faed791e783'/>
<id>urn:sha1:8caadc43f2019caebbf314f7a6ae2faed791e783</id>
<content type='text'>
Adding the test to re-attach (detach/attach again) tracing
fexit programs, plus check that already linked program can't
be attached again.

Also switching to ASSERT* macros.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210414195147.1624932-5-jolsa@kernel.org
</content>
</entry>
<entry>
<title>bpf: Add test ops for BPF_PROG_TYPE_TRACING</title>
<updated>2020-03-04T21:41:06Z</updated>
<author>
<name>KP Singh</name>
<email>kpsingh@google.com</email>
</author>
<published>2020-03-04T19:18:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=da00d2f117a08fbca262db5ea422c80a568b112b'/>
<id>urn:sha1:da00d2f117a08fbca262db5ea422c80a568b112b</id>
<content type='text'>
The current fexit and fentry tests rely on a different program to
exercise the functions they attach to. Instead of doing this, implement
the test operations for tracing which will also be used for
BPF_MODIFY_RETURN in a subsequent patch.

Also, clean up the fexit test to use the generated skeleton.

Signed-off-by: KP Singh &lt;kpsingh@google.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Acked-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/20200304191853.1529-7-kpsingh@chromium.org
</content>
</entry>
<entry>
<title>selftests/bpf: Initialize duration variable before using</title>
<updated>2020-01-24T10:05:45Z</updated>
<author>
<name>John Sperbeck</name>
<email>jsperbeck@google.com</email>
</author>
<published>2020-01-23T23:51:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1a6fa10640d97e16d4184fa1c24aa8c3337d4653'/>
<id>urn:sha1:1a6fa10640d97e16d4184fa1c24aa8c3337d4653</id>
<content type='text'>
The 'duration' variable is referenced in the CHECK() macro, and there are
some uses of the macro before 'duration' is set.  The clang compiler
(validly) complains about this.

Sample error:

.../selftests/bpf/prog_tests/fexit_test.c:23:6: warning: variable 'duration' is uninitialized when used here [-Wuninitialized]
        if (CHECK(err, "prog_load sched cls", "err %d errno %d\n", err, errno))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../selftests/bpf/test_progs.h:134:25: note: expanded from macro 'CHECK'
        if (CHECK(err, "prog_load sched cls", "err %d errno %d\n", err, errno))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        _CHECK(condition, tag, duration, format)
                               ^~~~~~~~

Signed-off-by: John Sperbeck &lt;jsperbeck@google.com&gt;
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/20200123235144.93610-1-sdf@google.com
</content>
</entry>
<entry>
<title>selftests/bpf: Add fexit tests for BPF trampoline</title>
<updated>2019-11-15T22:43:28Z</updated>
<author>
<name>Alexei Starovoitov</name>
<email>ast@kernel.org</email>
</author>
<published>2019-11-14T18:57:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d3b0856e5959fbb50a2f2f15a5614e20e51cb522'/>
<id>urn:sha1:d3b0856e5959fbb50a2f2f15a5614e20e51cb522</id>
<content type='text'>
Add fexit tests for BPF trampoline that checks kernel functions
with up to 6 arguments of different sizes and their return values.

Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Link: https://lore.kernel.org/bpf/20191114185720.1641606-11-ast@kernel.org
</content>
</entry>
</feed>
