Skip to contentSkip to conversation

selftests: add few test cases for tap driver

PATCH In review Cezar Bulinaru 3 participants 3 messages Aug 3, 2022 – Aug 5, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 selftests: add few test cases for tap driver

Few test cases related to the fix for 924a9bc362a5:
"net: check if protocol extracted by virtio_net_hdr_set_proto is correct"

Need test for the case when a non-standard packet (GSO without NEEDS_CSUM) sent to the tap device causes a BUG check in the tap driver.

tools/testing/selftests/net/.gitignore +1 -0
index ffc35a22e914..c95bc935ccb8 100644
@@ -38,3 +38,4 @@ ioam6_parser
 toeplitz
 tun
 cmsg_sender
+tap
tools/testing/selftests/net/Makefile +1 -1
index db05b3764b77..71e3f9f7f2d6 100644
@@ -54,7 +54,7 @@ TEST_GEN_FILES += ipsec
 TEST_GEN_FILES += ioam6_parser
 TEST_GEN_FILES += gro
 TEST_GEN_PROGS = reuseport_bpf reuseport_bpf_cpu reuseport_bpf_numa
-TEST_GEN_PROGS += reuseport_dualstack reuseaddr_conflict tls tun
+TEST_GEN_PROGS += reuseport_dualstack reuseaddr_conflict tls tun tap
 TEST_GEN_FILES += toeplitz
 TEST_GEN_FILES += cmsg_sender
 TEST_GEN_FILES += stress_reuseport_listen
tools/testing/selftests/net/tap.c new file +434 -0

434 lines not on this page · raw message

Signature · 1 line
2.37.1
maintainer
#2 lore raw
In reply to Cezar Bulinaru
Quoted 7 lines · On Wed, 3 Aug 2022 02:28:16 -0400 Cezar Bulinaru wrote:

Few test cases related to the fix for 924a9bc362a5:
"net: check if protocol extracted by virtio_net_hdr_set_proto is correct"

Need test for the case when a non-standard packet (GSO without NEEDS_CSUM) sent to the tap device causes a BUG check in the tap driver.

FWIW looks like the pw-bot missed this one, it's 2e64fe4624d1 ("selftests: add few test cases for tap driver") in net. Thank you!