<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/bpf/prog_tests/cgroup_link.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-09-21T17:57:13Z</updated>
<entry>
<title>selftests/bpf: Adapt cgroup effective query uapi change</title>
<updated>2022-09-21T17:57:13Z</updated>
<author>
<name>Pu Lehui</name>
<email>pulehui@huawei.com</email>
</author>
<published>2022-09-21T10:46:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d2aa993b7d9de6deeb1df6c9a6b9b6193c337cc6'/>
<id>urn:sha1:d2aa993b7d9de6deeb1df6c9a6b9b6193c337cc6</id>
<content type='text'>
The attach flags is meaningless for effective query and
its value will always be set as 0 during effective query.
Root cg's effective progs is always its attached progs,
so we use non-effective query to get its progs count and
attach flags. And we don't need the remain attach flags
check.

Fixes: b79c9fc9551b ("bpf: implement BPF_PROG_QUERY for BPF_LSM_CGROUP")
Signed-off-by: Pu Lehui &lt;pulehui@huawei.com&gt;
Link: https://lore.kernel.org/r/20220921104604.2340580-4-pulehui@huaweicloud.com
Signed-off-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
</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: 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>
<email>andrii@kernel.org</email>
</author>
<published>2021-05-25T03:59:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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: Add remaining ASSERT_xxx() variants</title>
<updated>2021-04-27T01:37:13Z</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andrii@kernel.org</email>
</author>
<published>2021-04-26T19:29:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7a2fa70aaffc2f8823feca22709a00f5c069a8a9'/>
<id>urn:sha1:7a2fa70aaffc2f8823feca22709a00f5c069a8a9</id>
<content type='text'>
Add ASSERT_TRUE/ASSERT_FALSE for conditions calculated with custom logic to
true/false. Also add remaining arithmetical assertions:
  - ASSERT_LE -- less than or equal;
  - ASSERT_GT -- greater than;
  - ASSERT_GE -- greater than or equal.
This should cover most scenarios where people fall back to error-prone
CHECK()s.

Also extend ASSERT_ERR() to print out errno, in addition to direct error.

Also convert few CHECK() instances to ensure new ASSERT_xxx() variants work as
expected. Subsequent patch will also use ASSERT_TRUE/ASSERT_FALSE more
extensively.

Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Lorenz Bauer &lt;lmb@cloudflare.com&gt;
Link: https://lore.kernel.org/bpf/20210426192949.416837-2-andrii@kernel.org
</content>
</entry>
<entry>
<title>selftests/bpf: Add link detach tests for cgroup, netns, and xdp bpf_links</title>
<updated>2020-08-02T03:38:28Z</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andriin@fb.com</email>
</author>
<published>2020-07-31T18:28:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=90806ccc90bbd0150267a97ae4003269597a6a6c'/>
<id>urn:sha1:90806ccc90bbd0150267a97ae4003269597a6a6c</id>
<content type='text'>
Add bpf_link__detach() testing to selftests for cgroup, netns, and xdp
bpf_links.

Signed-off-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Acked-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Link: https://lore.kernel.org/bpf/20200731182830.286260-4-andriin@fb.com
</content>
</entry>
<entry>
<title>selftests/bpf: Test FD-based cgroup attachment</title>
<updated>2020-03-31T00:36:41Z</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andriin@fb.com</email>
</author>
<published>2020-03-30T03:00:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7cccee42bf76efc9de69fa2e5b8dbe58bfc8ecdf'/>
<id>urn:sha1:7cccee42bf76efc9de69fa2e5b8dbe58bfc8ecdf</id>
<content type='text'>
Add selftests to exercise FD-based cgroup BPF program attachments and their
intermixing with legacy cgroup BPF attachments. Auto-detachment and program
replacement (both unconditional and cmpxchng-like) are tested as well.

Signed-off-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20200330030001.2312810-5-andriin@fb.com
</content>
</entry>
</feed>
