Skip to content

Commit

Permalink
tests: some temp changes for testing new code
Browse files Browse the repository at this point in the history
  • Loading branch information
choppsv1 committed Sep 8, 2023
1 parent 8e3eff7 commit 51b6233
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 18 deletions.
4 changes: 4 additions & 0 deletions tests/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ async def _network_up(
if r2:
await ethtool_disable_offloads(r2, g_offloads)

await toggle_ipv6(unet, enable=ipv6)
await toggle_forward_pmtu(unet, enable=False)
await toggle_forwarding(unet, enable=True)

await toggle_ipv6(unet, enable=ipv6)

if ipv4:
Expand Down
2 changes: 1 addition & 1 deletion tests/iperf/iperf.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ async def _test_iperf(
if ipv6:
cargs.append("-V")

tval = 10
tval = 3

if use_iperf3:
args = [
Expand Down
13 changes: 9 additions & 4 deletions tests/iperf/munet_phy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ topology:
hostintf: "enp27s0f0v0"
ip: 10.0.0.1/24
ipv6: "fc00:0:0:0::1/64"
mtu: 9000
# mtu: 9000
mtu: 1400
- name: r1
kind: linux
connections:
Expand All @@ -29,7 +30,8 @@ topology:
physical: "0000:d8:02.0"
ip: 10.0.0.2/24
ipv6: "fc00:0:0:0::2/64"
mtu: 9000
# mtu: 9000
mtu: 1400
- name: r2
kind: linux
connections:
Expand All @@ -43,15 +45,17 @@ topology:
physical: "0000:d8:0a.0"
ip: 10.0.2.3/24
ipv6: "fc00:0:0:2::3/64"
mtu: 9000
# mtu: 9000
mtu: 1400
- name: h2
connections:
- to: mgmt0
- to: r2
hostintf: "enp27s0f1v0"
ip: 10.0.2.4/24
ipv6: "fc00:0:0:2::4/64"
mtu: 9000
# mtu: 9000
mtu: 1400

kinds:
- name: linux
Expand All @@ -65,6 +69,7 @@ kinds:
sshkey: "%CONFIGDIR%/../../root-key"
#cmdline-extra: "acpi=off nokaslr idle=poll"
# cmdline-extra: "nokaslr slub_debug=U,kmalloc-256,kmalloc-128"
# cmdline-extra: "nokaslr idle=poll"
cmdline-extra: "nokaslr"
# memory: "8192M"
memory: "16384M"
Expand Down
34 changes: 21 additions & 13 deletions tests/iperf/test_iperf_phy.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,30 @@ async def test_tun_up(lcl_unet, astepf):
ipv6=unet.ipv6_enable,
)

h1 = unet.hosts["h1"]
r1 = unet.hosts["r1"]

await astepf("Before R2R ping")
# r1 (qemu side) pings r2 (qemu side)
r1.conrepl.cmd_nostatus("ping -w1 -i.2 -c1 10.0.1.3")
r1.conrepl.cmd_raises("ping -w1 -i.2 -c1 10.0.1.3")

await astepf("Before H2H ping")
# h1 pings h2
h1.cmd_nostatus("ping -w1 -i.2 -c1 10.0.2.4")
h1.cmd_raises("ping -w1 -i.2 -c1 10.0.2.4")
# h1 = unet.hosts["h1"]
# r1 = unet.hosts["r1"]

# await astepf("Before R2R ping")
# # r1 (qemu side) pings r2 (qemu side)
# r1.conrepl.cmd_nostatus("ping -w1 -i.2 -c1 10.0.1.3")
# r1.conrepl.cmd_raises("ping -w1 -i.2 -c1 10.0.1.3")

# await astepf("Before H2H ping")
# # h1 pings h2
# h1.cmd_nostatus("ping -w1 -i.2 -c1 10.0.2.4")
# h1.cmd_raises("ping -w1 -i.2 -c1 10.0.2.4")

check_logs(unet)


@pytest.mark.parametrize("iptfs_opts", ["", "dont-frag"], scope="function")
# @pytest.mark.parametrize("iptfs_opts", ["", "dont-frag"], scope="function")
# @pytest.mark.parametrize("pktsize", [None, 88, 536, 1442], scope="function")
# @pytest.mark.parametrize("ipv6", [False, True], scope="function")
# @pytest.mark.parametrize("tun_ipv6", [False, True], scope="function")
# @pytest.mark.parametrize("routed", [False, True], scope="function")


@pytest.mark.parametrize("iptfs_opts", [""], scope="function")
@pytest.mark.parametrize("pktsize", [None, 88, 536, 1442], scope="function")
@pytest.mark.parametrize("ipv6", [False, True], scope="function")
@pytest.mark.parametrize("tun_ipv6", [False, True], scope="function")
Expand Down

0 comments on commit 51b6233

Please sign in to comment.