<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/bpf/prog_tests/queue_stack_map.c, branch v7.1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-02-24T16:19:33+00:00</updated>
<entry>
<title>selftests/bpf: Replace strncpy() with strscpy()</title>
<updated>2026-02-24T16:19:33+00:00</updated>
<author>
<name>Ihor Solodrai</name>
<email>ihor.solodrai@linux.dev</email>
</author>
<published>2026-02-23T19:07:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=43277d8f57b490550d33f6f4cb73c28ec6024696'/>
<id>urn:sha1:43277d8f57b490550d33f6f4cb73c28ec6024696</id>
<content type='text'>
strncpy() does not guarantee NULL-termination and is considered
deprecated [1]. Replace strncpy() calls with strscpy().

[1] https://docs.kernel.org/process/deprecated.html#strncpy-on-nul-terminated-strings

Signed-off-by: Ihor Solodrai &lt;ihor.solodrai@linux.dev&gt;
Link: https://lore.kernel.org/r/20260223190736.649171-4-ihor.solodrai@linux.dev
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Fix compiler warnings reported in -O2 mode</title>
<updated>2023-10-06T18:17:28+00:00</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andrii@kernel.org</email>
</author>
<published>2023-10-06T17:57:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=925a01577ea5a70416731c00e42b74c97f41cb6a'/>
<id>urn:sha1:925a01577ea5a70416731c00e42b74c97f41cb6a</id>
<content type='text'>
Fix a bunch of potentially unitialized variable usage warnings that are
reported by GCC in -O2 mode. Also silence overzealous stringop-truncation
class of warnings.

Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20231006175744.3136675-1-andrii@kernel.org
</content>
</entry>
<entry>
<title>selftests/bpf: Store BPF object files with .bpf.o extension</title>
<updated>2022-09-02T13:55:37+00:00</updated>
<author>
<name>Daniel Müller</name>
<email>deso@posteo.net</email>
</author>
<published>2022-09-01T22:22:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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: Migrate from bpf_prog_test_run</title>
<updated>2022-02-03T06:31:18+00:00</updated>
<author>
<name>Delyan Kratunov</name>
<email>delyank@fb.com</email>
</author>
<published>2022-02-02T23:54:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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: Fix misaligned memory access in queue_stack_map test</title>
<updated>2021-11-25T23:15:03+00:00</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andrii@kernel.org</email>
</author>
<published>2021-11-24T00:23:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e2e0d90c550a2588ebed7aa2753adaac0f633989'/>
<id>urn:sha1:e2e0d90c550a2588ebed7aa2753adaac0f633989</id>
<content type='text'>
Copy over iphdr into a local variable before accessing its fields.

Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/20211124002325.1737739-11-andrii@kernel.org
</content>
</entry>
<entry>
<title>selftests/bpf: Use explicit bpf_prog_test_load() calls everywhere</title>
<updated>2021-11-07T16:34:23+00:00</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andrii@kernel.org</email>
</author>
<published>2021-11-03T22:08:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.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: Move existing common networking parts into network_helpers</title>
<updated>2020-05-08T22:48:20+00:00</updated>
<author>
<name>Stanislav Fomichev</name>
<email>sdf@google.com</email>
</author>
<published>2020-05-08T17:46:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=488a23b89d175cc78f352417114f4f5a10470722'/>
<id>urn:sha1:488a23b89d175cc78f352417114f4f5a10470722</id>
<content type='text'>
1. Move pkt_v4 and pkt_v6 into network_helpers and adjust the users.
2. Copy-paste spin_lock_thread into two tests that use it.

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;
Acked-by: Andrey Ignatov &lt;rdna@fb.com&gt;
Link: https://lore.kernel.org/bpf/20200508174611.228805-3-sdf@google.com
</content>
</entry>
<entry>
<title>selftests/bpf: test_progs: remove global fail/success counts</title>
<updated>2019-08-27T22:35:40+00:00</updated>
<author>
<name>Stanislav Fomichev</name>
<email>sdf@google.com</email>
</author>
<published>2019-08-21T23:44:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.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: break up test_progs - misc</title>
<updated>2019-03-02T19:10:40+00:00</updated>
<author>
<name>Stanislav Fomichev</name>
<email>sdf@google.com</email>
</author>
<published>2019-03-02T03:42:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=886225bb0868fcf763bea62d18e57e4b5ef08a42'/>
<id>urn:sha1:886225bb0868fcf763bea62d18e57e4b5ef08a42</id>
<content type='text'>
Move the rest of 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>
