<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/bpf/prog_tests/stacktrace_map.c, branch linux-5.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-12-14T22:38:05Z</updated>
<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>
</author>
<published>2021-12-14T03:59:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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>
</author>
<published>2021-11-03T22:08:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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>selftests/bpf: Turn on libbpf 1.0 mode and fix all IS_ERR checks</title>
<updated>2021-05-26T00:32:35Z</updated>
<author>
<name>Andrii Nakryiko</name>
</author>
<published>2021-05-25T03:59:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bad2e478af3b4df9fd84b4db7779ea91bd618c16'/>
<id>urn:sha1:bad2e478af3b4df9fd84b4db7779ea91bd618c16</id>
<content type='text'>
Turn ony libbpf 1.0 mode. Fix all the explicit IS_ERR checks that now will be
broken because libbpf returns NULL on error (and sets errno). Fix
ASSERT_OK_PTR and ASSERT_ERR_PTR to work for both old mode and new modes and
use them throughout selftests. This is trivial to do by using
libbpf_get_error() API that all libbpf users are supposed to use, instead of
IS_ERR checks.

A bunch of checks also did explicit -1 comparison for various fd-returning
APIs. Such checks are replaced with &gt;= 0 or &lt; 0 cases.

There were also few misuses of bpf_object__find_map_by_name() in test_maps.
Those are fixed in this patch as well.

Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Acked-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Link: https://lore.kernel.org/bpf/20210525035935.1461796-3-andrii@kernel.org
</content>
</entry>
<entry>
<title>selftests/bpf: test_progs: remove global fail/success counts</title>
<updated>2019-08-27T22:35:40Z</updated>
<author>
<name>Stanislav Fomichev</name>
</author>
<published>2019-08-21T23:44:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d38835b75f67df16cef65c14aa64796a1832e6b4'/>
<id>urn:sha1:d38835b75f67df16cef65c14aa64796a1832e6b4</id>
<content type='text'>
Now that we have a global per-test/per-environment state, there
is no longer need to have global fail/success counters (and there
is no need to save/get the diff before/after the test).

Introduce CHECK_FAIL macro (suggested by Andrii) and covert existing tests
to it. CHECK_FAIL uses new test__fail() to record the failure.

Cc: Andrii Nakryiko &lt;andriin@fb.com&gt;
Signed-off-by: Stanislav Fomichev &lt;sdf@google.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: convert existing tracepoint tests to new APIs</title>
<updated>2019-07-05T20:37:31Z</updated>
<author>
<name>Andrii Nakryiko</name>
</author>
<published>2019-07-01T23:59:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1bdb34274acd4a772865289aeaa41696acb60110'/>
<id>urn:sha1:1bdb34274acd4a772865289aeaa41696acb60110</id>
<content type='text'>
Convert some existing tests that attach to tracepoints to use
bpf_program__attach_tracepoint API instead.

Signed-off-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Reviewed-by: Stanislav Fomichev &lt;sdf@google.com&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>selftests: bpf: break up test_progs - stackmap</title>
<updated>2019-03-02T19:10:40Z</updated>
<author>
<name>Stanislav Fomichev</name>
</author>
<published>2019-03-02T03:42:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=615741d81de6c16aa466c4eb37805caa868a9bb8'/>
<id>urn:sha1:615741d81de6c16aa466c4eb37805caa868a9bb8</id>
<content type='text'>
Move stackmap prog tests into separate files.

Signed-off-by: Stanislav Fomichev &lt;sdf@google.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
</feed>
