<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/net/tun.c, branch linux-7.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-03-05T15:34:55+00:00</updated>
<entry>
<title>selftests: net: tun: don't abort XFAIL cases</title>
<updated>2026-03-05T15:34:55+00:00</updated>
<author>
<name>Sun Jian</name>
<email>sun.jian.kdev@gmail.com</email>
</author>
<published>2026-02-25T11:14:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c952291593e54415a7bb74c4a7187a7c7c7e8651'/>
<id>urn:sha1:c952291593e54415a7bb74c4a7187a7c7c7e8651</id>
<content type='text'>
The tun UDP tunnel GSO fixture contains XFAIL-marked variants intended to
exercise failure paths (e.g. EMSGSIZE / "Message too long").
Using ASSERT_EQ() in these tests aborts the subtest, which prevents the
harness from classifying them as XFAIL and can make the overall net: tun
test fail.

Switch the relevant ASSERT_EQ() checks to EXPECT_EQ() so the subtests
continue running and the failures are correctly reported and accounted
as XFAIL where applicable.

Signed-off-by: Sun Jian &lt;sun.jian.kdev@gmail.com&gt;
Link: https://patch.msgid.link/20260225111451.347923-2-sun.jian.kdev@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftest: tun: Add test data for success and failure paths</title>
<updated>2026-01-23T19:43:29+00:00</updated>
<author>
<name>Xu Du</name>
<email>xudu@redhat.com</email>
</author>
<published>2026-01-21T10:05:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=87db2fdef5a7c2ea8a404afd402800d48940d6b2'/>
<id>urn:sha1:87db2fdef5a7c2ea8a404afd402800d48940d6b2</id>
<content type='text'>
To improve the robustness and coverage of the TUN selftests, this
patch expands the set of test data.

Signed-off-by: Xu Du &lt;xudu@redhat.com&gt;
Link: https://patch.msgid.link/5054f3ad9f3dbfe33b827183fccc5efeb8fd0da7.1768979440.git.xudu@redhat.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftest: tun: Add test for receiving gso packet from tun</title>
<updated>2026-01-23T19:43:29+00:00</updated>
<author>
<name>Xu Du</name>
<email>xudu@redhat.com</email>
</author>
<published>2026-01-21T10:05:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6bdd7ae6059ec3c19f4717387706f92cd8b715a6'/>
<id>urn:sha1:6bdd7ae6059ec3c19f4717387706f92cd8b715a6</id>
<content type='text'>
The test validate that GSO information are correctly exposed
when reading packets from a TUN device.

Signed-off-by: Xu Du &lt;xudu@redhat.com&gt;
Link: https://patch.msgid.link/fe75ac66466380490eba858eef50596a1bfbd071.1768979440.git.xudu@redhat.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftest: tun: Add test for sending gso packet into tun</title>
<updated>2026-01-23T19:43:28+00:00</updated>
<author>
<name>Xu Du</name>
<email>xudu@redhat.com</email>
</author>
<published>2026-01-21T10:04:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=400e658aa096cda99b37ce806ed63cfe894c9566'/>
<id>urn:sha1:400e658aa096cda99b37ce806ed63cfe894c9566</id>
<content type='text'>
The test constructs a raw packet, prepends a virtio_net_hdr,
and writes the result to the TUN device. This mimics the behavior
of a vm forwarding a guest's packet to the host networking stack.

Signed-off-by: Xu Du &lt;xudu@redhat.com&gt;
Link: https://patch.msgid.link/a988dbc9ca109e4f1f0b33858c5035bce8ebede3.1768979440.git.xudu@redhat.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftest: tun: Add helpers for GSO over UDP tunnel</title>
<updated>2026-01-23T19:43:28+00:00</updated>
<author>
<name>Xu Du</name>
<email>xudu@redhat.com</email>
</author>
<published>2026-01-21T10:04:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=24e59f26eef2c806a8dbb94859aaf7af28197148'/>
<id>urn:sha1:24e59f26eef2c806a8dbb94859aaf7af28197148</id>
<content type='text'>
In preparation for testing GSO over UDP tunnels, enhance the test
infrastructure to support a more complex data path involving a TUN
device and a GENEVE udp tunnel.

This patch introduces a dedicated setup/teardown topology that creates
both a GENEVE tunnel interface and a TUN interface. The TUN device acts
as the VTEP (Virtual Tunnel Endpoint), allowing it to send and receive
virtio-net packets. This setup effectively tests the kernel's data path
for encapsulated traffic.

Note that after adding a new address to the UDP tunnel, we need to wait
a bit until the associated route is available.

Additionally, a new data structure is defined to manage test parameters.
This structure is designed to be extensible, allowing different test
data and configurations to be easily added in subsequent patches.

Signed-off-by: Xu Du &lt;xudu@redhat.com&gt;
Link: https://patch.msgid.link/b5787b8c269f43ce11e1756f1691cc7fd9a1e901.1768979440.git.xudu@redhat.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftest: tun: Refactor tun_delete to use tuntap_helpers</title>
<updated>2026-01-23T19:43:28+00:00</updated>
<author>
<name>Xu Du</name>
<email>xudu@redhat.com</email>
</author>
<published>2026-01-21T10:04:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=82cfdcfa201057861ec8a60ca9354d2c4c67bd68'/>
<id>urn:sha1:82cfdcfa201057861ec8a60ca9354d2c4c67bd68</id>
<content type='text'>
The previous patch introduced common tuntap helpers to simplify
tun test code. This patch refactors the tun_delete function to
use these new helpers.

Signed-off-by: Xu Du &lt;xudu@redhat.com&gt;
Link: https://patch.msgid.link/ecc7c0c2d75d87cb814e97579e731650339703ab.1768979440.git.xudu@redhat.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftest: tun: Format tun.c existing code</title>
<updated>2026-01-23T19:43:28+00:00</updated>
<author>
<name>Xu Du</name>
<email>xudu@redhat.com</email>
</author>
<published>2026-01-21T10:04:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e073c118db0217e1dab14eb0088e7c6a8bf9ef63'/>
<id>urn:sha1:e073c118db0217e1dab14eb0088e7c6a8bf9ef63</id>
<content type='text'>
In preparation for adding new tests for GSO over UDP tunnels,
apply consistently the kernel style to the existing code.

Signed-off-by: Xu Du &lt;xudu@redhat.com&gt;
Link: https://patch.msgid.link/d797de1e5a3d215dd78cb46775772ef682bab60e.1768979440.git.xudu@redhat.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: complete kselftest include centralization</title>
<updated>2025-11-27T22:24:31+00:00</updated>
<author>
<name>Bala-Vignesh-Reddy</name>
<email>reddybalavignesh9979@gmail.com</email>
</author>
<published>2025-10-16T10:44:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e6fbd1759c9ece5044d3470f30a5e2166dc9de89'/>
<id>urn:sha1:e6fbd1759c9ece5044d3470f30a5e2166dc9de89</id>
<content type='text'>
This follow-up patch completes centralization of kselftest.h and
ksefltest_harness.h includes in remaining seltests files, replacing all
relative paths with a non-relative paths using shared -I include path in
lib.mk

Tested with gcc-13.3 and clang-18.1, and cross-compiled successfully on
riscv, arm64, x86_64 and powerpc arch.

[reddybalavignesh9979@gmail.com: add selftests include path for kselftest.h]
  Link: https://lkml.kernel.org/r/20251017090201.317521-1-reddybalavignesh9979@gmail.com
Link: https://lkml.kernel.org/r/20251016104409.68985-1-reddybalavignesh9979@gmail.com
Signed-off-by: Bala-Vignesh-Reddy &lt;reddybalavignesh9979@gmail.com&gt;
Suggested-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Link: https://lore.kernel.org/lkml/20250820143954.33d95635e504e94df01930d0@linux-foundation.org/
Reviewed-by: Wei Yang &lt;richard.weiyang@gmail.com&gt;
Cc: David Hildenbrand &lt;david@redhat.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Günther Noack &lt;gnoack@google.com&gt;
Cc: Jakub Kacinski &lt;kuba@kernel.org&gt;
Cc: Liam Howlett &lt;liam.howlett@oracle.com&gt;
Cc: Lorenzo Stoakes &lt;lorenzo.stoakes@oracle.com&gt;
Cc: Michal Hocko &lt;mhocko@suse.com&gt;
Cc: Mickael Salaun &lt;mic@digikod.net&gt;
Cc: Ming Lei &lt;ming.lei@redhat.com&gt;
Cc: Paolo Abeni &lt;pabeni@redhat.com&gt;
Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Cc: Simon Horman &lt;horms@kernel.org&gt;
Cc: Suren Baghdasaryan &lt;surenb@google.com&gt;
Cc: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>selftest: tun: add test for NAPI dismantle</title>
<updated>2022-06-30T18:34:10+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2022-06-29T18:19:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=839b92fede7ba308f1a475aa00fea55f63b7fccf'/>
<id>urn:sha1:839b92fede7ba308f1a475aa00fea55f63b7fccf</id>
<content type='text'>
Being lazy does not pay, add the test for various
ordering of tun queue close / detach / destroy.

Link: https://lore.kernel.org/r/20220629181911.372047-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
</feed>
