<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/bpf/test_loader.c, branch v7.1-rc5</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.1-rc5</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.1-rc5'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-04-11T14:17:06+00:00</updated>
<entry>
<title>selftests/bpf: inline TEST_TAG constants in test_loader.c</title>
<updated>2026-04-11T14:17:06+00:00</updated>
<author>
<name>Eduard Zingerman</name>
<email>eddyz87@gmail.com</email>
</author>
<published>2026-04-11T07:33:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=335a6ca04158505b94afb7271488f5052c46f5e5'/>
<id>urn:sha1:335a6ca04158505b94afb7271488f5052c46f5e5</id>
<content type='text'>
After str_has_pfx() refactoring each TEST_TAG_* / TEST_BTF_PATH
constant is used exactly once. Since constant definitions are not
shared between BPF-side bpf_misc.h and userspace side test_loader.c,
there is no need in the additional redirection layer.

Acked-by: Ihor Solodrai &lt;ihor.solodrai@linux.dev&gt;
Reviewed-by: Puranjay Mohan &lt;puranjay@kernel.org&gt;
Signed-off-by: Eduard Zingerman &lt;eddyz87@gmail.com&gt;
Link: https://lore.kernel.org/r/20260410-selftests-global-tags-ordering-v2-4-c566ec9781bf@gmail.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: impose global ordering for test decl_tags</title>
<updated>2026-04-11T14:17:06+00:00</updated>
<author>
<name>Eduard Zingerman</name>
<email>eddyz87@gmail.com</email>
</author>
<published>2026-04-11T07:33:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=713db9fd0336e8fade7e776ab807c21fd8b7a0f1'/>
<id>urn:sha1:713db9fd0336e8fade7e776ab807c21fd8b7a0f1</id>
<content type='text'>
Impose global ordering for all decl tags used by test_loader.c based
tests (__success, __failure, __msg, etc):
- change every tag to expand as
  __attribute__((btf_decl_tag("comment:" XSTR(__COUNTER__) ...)))
- change parse_test_spec() to collect all decl tags before
  processing and sort them using strverscmp().

The ordering is necessary for gcc-bpf.
Neither GCC nor the C standard defines the order in which function
attributes are consumed. While Clang tends to preserve definition order,
GCC may process them out of sequence. This inconsistency causes BPF
tests with multiple __msg entries to fail when compiled with GCC.

Signed-off-by: Cupertino Miranda &lt;cupertino.miranda@oracle.com&gt;
Reviewed-by: Puranjay Mohan &lt;puranjay@kernel.org&gt;
Signed-off-by: Eduard Zingerman &lt;eddyz87@gmail.com&gt;
Link: https://lore.kernel.org/r/20260410-selftests-global-tags-ordering-v2-3-c566ec9781bf@gmail.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: make str_has_pfx return pointer past the prefix</title>
<updated>2026-04-11T14:17:06+00:00</updated>
<author>
<name>Eduard Zingerman</name>
<email>eddyz87@gmail.com</email>
</author>
<published>2026-04-11T07:33:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5160e584c3616e744252d0a571264f9745bc6e11'/>
<id>urn:sha1:5160e584c3616e744252d0a571264f9745bc6e11</id>
<content type='text'>
Change str_has_pfx() to return a pointer to the first character after
the prefix, thus eliminating the repetitive (s + sizeof(PFX) - 1)
patterns.

Acked-by: Ihor Solodrai &lt;ihor.solodrai@linux.dev&gt;
Acked-by: Mykyta Yatsenko &lt;yatsenko@meta.com&gt;
Reviewed-by: Puranjay Mohan &lt;puranjay@kernel.org&gt;
Signed-off-by: Eduard Zingerman &lt;eddyz87@gmail.com&gt;
Link: https://lore.kernel.org/r/20260410-selftests-global-tags-ordering-v2-2-c566ec9781bf@gmail.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Allow prog name matching for tests with __description</title>
<updated>2026-04-07T19:24:29+00:00</updated>
<author>
<name>Kumar Kartikeya Dwivedi</name>
<email>memxor@gmail.com</email>
</author>
<published>2026-04-07T14:56:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a8aa306741cdeb7b1cb4832133390f9cd08ece14'/>
<id>urn:sha1:a8aa306741cdeb7b1cb4832133390f9cd08ece14</id>
<content type='text'>
For tests that carry a __description tag, allow matching on both the
description string and program name for convenience. Before this commit,
the description string must be spelt out to filter the tests.

Suggested-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Signed-off-by: Kumar Kartikeya Dwivedi &lt;memxor@gmail.com&gt;
Link: https://lore.kernel.org/r/20260407145606.3991770-1-memxor@gmail.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Support non-linear flag in test loader</title>
<updated>2025-10-10T17:43:04+00:00</updated>
<author>
<name>Paul Chaignon</name>
<email>paul.chaignon@gmail.com</email>
</author>
<published>2025-10-09T20:11:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8d45d0398d10966b022b96481feb619ae1695de0'/>
<id>urn:sha1:8d45d0398d10966b022b96481feb619ae1695de0</id>
<content type='text'>
This patch adds support for a new tag __linear_size in the test loader,
to specify the size of the linear area in case of non-linear skbs. If
the tag is absent or null, a linear skb is crafted.

Signed-off-by: Paul Chaignon &lt;paul.chaignon@gmail.com&gt;
Signed-off-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
Link: https://patch.msgid.link/7ad928ec7591daef4f1b84032aeb86c918b3e5a7.1760037899.git.paul.chaignon@gmail.com
</content>
</entry>
<entry>
<title>selftests/bpf: __not_msg() tag for test_loader framework</title>
<updated>2025-09-19T16:27:23+00:00</updated>
<author>
<name>Eduard Zingerman</name>
<email>eddyz87@gmail.com</email>
</author>
<published>2025-09-19T02:18:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=34c513be3dada9fb6314ea8c9ec35d71d09a2e58'/>
<id>urn:sha1:34c513be3dada9fb6314ea8c9ec35d71d09a2e58</id>
<content type='text'>
This patch adds tags __not_msg(&lt;msg&gt;) and __not_msg_unpriv(&lt;msg&gt;).
Test fails if &lt;msg&gt; is found in verifier log.

If __msg_not() is situated between __msg() tags framework matches
__msg() tags first, and then checks that &lt;msg&gt; is not present in a
portion of a log between bracketing __msg() tags.
__msg_not() tags bracketed by a same __msg() group are effectively
unordered.

The idea is borrowed from LLVM's CheckFile with its CHECK-NOT syntax.

Signed-off-by: Eduard Zingerman &lt;eddyz87@gmail.com&gt;
Link: https://lore.kernel.org/r/20250918-callchain-sensitive-liveness-v3-11-c3cd27bacc60@gmail.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: bpf: introduce __stderr and __stdout</title>
<updated>2025-09-11T20:00:44+00:00</updated>
<author>
<name>Puranjay Mohan</name>
<email>puranjay@kernel.org</email>
</author>
<published>2025-09-11T14:58:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=744eeb2b27c29a61ad13b6b6367636b233e32336'/>
<id>urn:sha1:744eeb2b27c29a61ad13b6b6367636b233e32336</id>
<content type='text'>
Add __stderr and __stdout to validate the output of BPF streams for bpf
selftests. Similar to __xlated, __jited, etc., __stderr/out can be used
in the BPF progs to compare a string (regex supported) to the output in
the bpf streams.

Signed-off-by: Puranjay Mohan &lt;puranjay@kernel.org&gt;
Acked-by: Eduard Zingerman &lt;eddyz87@gmail.com&gt;
Link: https://lore.kernel.org/r/20250911145808.58042-5-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Fix the issue where the error code is 0</title>
<updated>2025-09-08T16:51:13+00:00</updated>
<author>
<name>Feng Yang</name>
<email>yangfeng@kylinos.cn</email>
</author>
<published>2025-09-08T06:08:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=93a83d044314b041ffe2bb1d43b8b0cea7f60921'/>
<id>urn:sha1:93a83d044314b041ffe2bb1d43b8b0cea7f60921</id>
<content type='text'>
The error message printed here only uses the previous err value,
which results in it being printed as 0.
When bpf_map__attach_struct_ops encounters an error,
it uses libbpf_err_ptr(err) to set errno = -err and returns NULL.
Therefore, Using -errno can fix this issue.

Fix before:
run_subtest:FAIL:1019 bpf_map__attach_struct_ops failed for map pro_epilogue: err=0

Fix after:
run_subtest:FAIL:1019 bpf_map__attach_struct_ops failed for map pro_epilogue: err=-9

Signed-off-by: Feng Yang &lt;yangfeng@kylinos.cn&gt;
Signed-off-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
Link: https://patch.msgid.link/20250908060810.1054341-1-yangfeng59949@163.com
</content>
</entry>
<entry>
<title>selftests/bpf: Add __arch_s390x macro</title>
<updated>2025-08-26T23:51:52+00:00</updated>
<author>
<name>Ilya Leoshkevich</name>
<email>iii@linux.ibm.com</email>
</author>
<published>2025-08-21T11:25:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1e4e6b9e260dffc82fa49c2caa4828540082cb58'/>
<id>urn:sha1:1e4e6b9e260dffc82fa49c2caa4828540082cb58</id>
<content type='text'>
Make it possible to limit certain tests to s390x, just like it's
already done for x86_64, arm64, and riscv64.

Signed-off-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20250821113339.292434-4-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Add a missing newline to the "bad arch spec" message</title>
<updated>2025-08-26T23:51:52+00:00</updated>
<author>
<name>Ilya Leoshkevich</name>
<email>iii@linux.ibm.com</email>
</author>
<published>2025-08-21T11:25:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b68dfcc12a320b85cd33d0d673ea620da08d0aec'/>
<id>urn:sha1:b68dfcc12a320b85cd33d0d673ea620da08d0aec</id>
<content type='text'>
Fix error messages like this one:

  parse_test_spec:FAIL:569 bad arch spec: 's390x'process_subtest:FAIL:1153 Can't parse test spec for program 'may_goto_simple'

Signed-off-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20250821113339.292434-3-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
</feed>
