Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
rootfs/ | H | 25-Apr-2025 | - | 1,295 | 840 | |
.gitignore | H A D | 25-Apr-2025 | 24 | 3 | 2 | |
Android.bp | H A D | 25-Apr-2025 | 981 | 49 | 46 | |
OWNERS | H A D | 25-Apr-2025 | 221 | 7 | 5 | |
README | H A D | 25-Apr-2025 | 2.6 KiB | 78 | 51 | |
TEST_MAPPING | H A D | 25-Apr-2025 | 152 | 13 | 12 | |
all_tests.py | H A D | 25-Apr-2025 | 2.7 KiB | 102 | 68 | |
all_tests.sh | H A D | 25-Apr-2025 | 2.5 KiB | 117 | 79 | |
all_tests_gki.py | H A D | 25-Apr-2025 | 821 | 28 | 9 | |
anycast_test.py | H A D | 25-Apr-2025 | 3.4 KiB | 123 | 70 | |
bpf.py | H A D | 25-Apr-2025 | 11.4 KiB | 420 | 296 | |
bpf_test.py | H A D | 25-Apr-2025 | 24.3 KiB | 662 | 459 | |
build_rootfs.sh | H A D | 25-Apr-2025 | 20.3 KiB | 564 | 443 | |
csocket.py | H A D | 25-Apr-2025 | 11.1 KiB | 374 | 255 | |
csocket_test.py | H A D | 25-Apr-2025 | 2.7 KiB | 95 | 58 | |
cstruct.py | H A D | 25-Apr-2025 | 10.7 KiB | 304 | 211 | |
cstruct_test.py | H A D | 25-Apr-2025 | 7.7 KiB | 197 | 144 | |
genetlink.py | H A D | 25-Apr-2025 | 3.9 KiB | 125 | 71 | |
gki.py | H A D | 25-Apr-2025 | 665 | 19 | 1 | |
iproute.py | H A D | 25-Apr-2025 | 29.3 KiB | 840 | 644 | |
kernel_feature_test.py | H A D | 25-Apr-2025 | 3 KiB | 102 | 64 | |
leak_test.py | H A D | 25-Apr-2025 | 2.7 KiB | 87 | 42 | |
multinetwork_base.py | H A D | 25-Apr-2025 | 27.7 KiB | 797 | 567 | |
multinetwork_test.py | H A D | 25-Apr-2025 | 58.1 KiB | 1,547 | 1,065 | |
namespace.py | H A D | 25-Apr-2025 | 5.7 KiB | 176 | 111 | |
neighbour_test.py | H A D | 25-Apr-2025 | 13.5 KiB | 384 | 264 | |
net_test.py | H A D | 25-Apr-2025 | 16.7 KiB | 576 | 398 | |
net_test.sh | H A D | 25-Apr-2025 | 5.9 KiB | 202 | 117 | |
netlink.py | H A D | 25-Apr-2025 | 9.6 KiB | 311 | 202 | |
netlink_test.py | H A D | 25-Apr-2025 | 1.3 KiB | 43 | 19 | |
nf_test.py | H A D | 25-Apr-2025 | 2.8 KiB | 88 | 44 | |
no_test | H A D | 25-Apr-2025 | 12 | 2 | 0 | |
packets.py | H A D | 25-Apr-2025 | 7.2 KiB | 204 | 155 | |
parallel_tests.sh | H A D | 25-Apr-2025 | 1.4 KiB | 63 | 44 | |
parameterization_test.py | H A D | 25-Apr-2025 | 2.5 KiB | 84 | 44 | |
ping6_test.py | H A D | 25-Apr-2025 | 32 KiB | 919 | 672 | |
ping6_test.sh | H A D | 25-Apr-2025 | 266 | 17 | 5 | |
policy_crash_test.py | H A D | 25-Apr-2025 | 4.9 KiB | 137 | 45 | |
resilient_rs_test.py | H A D | 25-Apr-2025 | 5.6 KiB | 178 | 108 | |
run_net_test.sh | H A D | 25-Apr-2025 | 17.6 KiB | 501 | 343 | |
sock_diag.py | H A D | 25-Apr-2025 | 14.5 KiB | 433 | 328 | |
sock_diag_test.py | H A D | 25-Apr-2025 | 44.4 KiB | 1,179 | 883 | |
srcaddr_selection_test.py | H A D | 25-Apr-2025 | 15.1 KiB | 379 | 224 | |
sysctls_test.py | H A D | 25-Apr-2025 | 1.6 KiB | 47 | 21 | |
tcp_fastopen_test.py | H A D | 25-Apr-2025 | 4.7 KiB | 141 | 91 | |
tcp_metrics.py | H A D | 25-Apr-2025 | 4.5 KiB | 139 | 93 | |
tcp_nuke_addr_test.py | H A D | 25-Apr-2025 | 3.4 KiB | 112 | 73 | |
tcp_repair_test.py | H A D | 25-Apr-2025 | 11.8 KiB | 342 | 245 | |
tcp_test.py | H A D | 25-Apr-2025 | 5.1 KiB | 155 | 104 | |
tun_twister.py | H A D | 25-Apr-2025 | 7.3 KiB | 215 | 159 | |
util.py | H A D | 25-Apr-2025 | 3.2 KiB | 94 | 52 | |
vts_kernel_net_tests.xml | H A D | 25-Apr-2025 | 1.4 KiB | 31 | 14 | |
xfrm.py | H A D | 25-Apr-2025 | 27.5 KiB | 772 | 554 | |
xfrm_algorithm_test.py | H A D | 25-Apr-2025 | 15.4 KiB | 410 | 290 | |
xfrm_base.py | H A D | 25-Apr-2025 | 11.2 KiB | 331 | 222 | |
xfrm_test.py | H A D | 25-Apr-2025 | 41.4 KiB | 1,012 | 683 | |
xfrm_tunnel_test.py | H A D | 25-Apr-2025 | 44.3 KiB | 1,140 | 756 |
README
1 net_test v0.1 2 ============= 3 4A simple framework for blackbox testing of kernel networking code. 5 6 7Why use it? 8=========== 9 10- Fast test / boot cycle. 11- Access to host filesystem and networking via L2 bridging. 12- Full Linux userland including Python, etc. 13- Kernel bugs don't crash the system. 14 15 16How to use it 17============= 18 19cd <kerneldir> 20path/to/net_test/run_net_test.sh <test> 21 22where <test> is the name of a test binary in the net_test directory. This can 23be an x86 binary, a shell script, a Python script. etc. 24 25 26How it works 27============ 28 29net_test compiles the kernel to a user-mode linux binary, which runs as a 30process on the host machine. It runs the binary to start a Linux "virtual 31machine" whose root filesystem is the supplied Debian disk image. The machine 32boots, mounts the root filesystem read-only, runs the specified test from init, and then drops to a shell. 33 34 35Access to host filesystem 36========================= 37 38The VM mounts the host filesystem at /host, so the test can be modified and 39re-run without rebooting the VM. 40 41 42Access to host networking 43========================= 44 45Access to host networking is provided by tap interfaces. On the host, the 46interfaces are named <user>TAP0, <user>TAP1, etc., where <user> is the first 4710 characters of the username running net_test. (10 characters because 48IFNAMSIZ = 16). On the guest, they are named eth0, eth1, etc. 49 50net_test does not do any networking setup beyond creating the tap interfaces. 51IP connectivity can be provided on the host side by setting up a DHCP server 52and NAT, sending IPv6 router advertisements, etc. By default, the VM has IPv6 53privacy addresses disabled, so its IPv6 addresses can be predicted using a tool 54such as ipv6calc. 55 56The provided filesystem contains a DHCPv4 client and simple networking 57utilities such as ping[6], traceroute[6], and wget. 58 59The number of tap interfaces is currently hardcoded to two. To change this 60number, modify run_net_test.sh. 61 62 63Logging into the VM, installing packages, etc. 64============================================== 65 66net_test mounts the root filesystem read-only, and runs the test from init, but 67since the filesystem contains a full Linux userland, it's possible to boot into 68userland and modify the filesystem, for example to install packages using 69apt-get install. Log in as root with no password. By default, the filesystem is 70configured to perform DHCPv4 on eth0 and listen to RAs. 71 72 73Bugs 74==== 75 76Since the test mounts the filesystem read-only, tests cannot modify 77/etc/resolv.conf and the system resolver is hardcoded to 8.8.8.8. 78