Skip to content

Commit

Permalink
Replace localhost with dut or trafficgen IPs, add firmware mount
Browse files Browse the repository at this point in the history
  • Loading branch information
dkosteck committed Nov 3, 2023
1 parent 3e20bf7 commit 9baf55a
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ def test_SRIOV_Sanity_Performance(dut, trafficgen, settings, testdata):
testdata.testpmd_id = outs[0][0]

# Check testpmd is running
cmd = f"curl localhost:{settings.config['testpmd_port']}/testpmd/status"
cmd = (
f"curl {settings.config['dut']['host']}:"
f"{settings.config['testpmd_port']}/testpmd/status"
)
assert execute_until_timeout(dut, cmd)

# Start trafficgen
Expand All @@ -139,6 +142,7 @@ def test_SRIOV_Sanity_Performance(dut, trafficgen, settings, testdata):
f"{settings.config['container_manager']} run -d --rm --privileged "
f"-p {settings.config['trafficgen_port']}:{settings.config['trafficgen_port']} "
"-v /dev:/dev -v /sys:/sys -v /lib/modules:/lib/modules "
"-v /lib/firmware:/lib/firmware "
f"--cpuset-cpus {trafficgen_cpus_string} "
f"-e pci_list={trafficgen_pfs_pci[0]},{trafficgen_pfs_pci[1]} "
f"{settings.config['trafficgen_img']}"
Expand All @@ -148,15 +152,17 @@ def test_SRIOV_Sanity_Performance(dut, trafficgen, settings, testdata):

client_cmd = (
f"{settings.config['container_manager']} run --rm --privileged --net=host "
f"{settings.config['trafficgen_img']} client status --server-addr localhost "
f"{settings.config['trafficgen_img']} client status "
f"--server-addr {settings.config['trafficgen']['host']} "
f"--server-port {settings.config['trafficgen_port']}"
)
assert execute_until_timeout(trafficgen, client_cmd)

# Warmup
client_cmd = [
f"{settings.config['container_manager']} run --rm --privileged --net=host "
f"{settings.config['trafficgen_img']} client start --server-addr localhost "
f"{settings.config['trafficgen_img']} client start "
f"--server-addr {settings.config['trafficgen']['host']} "
f"--server-port {settings.config['trafficgen_port']} --timeout 60"
]
execute_and_assert(
Expand All @@ -167,7 +173,8 @@ def test_SRIOV_Sanity_Performance(dut, trafficgen, settings, testdata):
)
client_cmd = [
f"{settings.config['container_manager']} run --rm --privileged --net=host "
f"{settings.config['trafficgen_img']} client stop --server-addr localhost "
f"{settings.config['trafficgen_img']} client stop "
f"--server-addr {settings.config['trafficgen']['host']} "
f"--server-port {settings.config['trafficgen_port']}"
]
outs, errs = execute_and_assert(
Expand All @@ -179,7 +186,8 @@ def test_SRIOV_Sanity_Performance(dut, trafficgen, settings, testdata):
# Actual test
client_cmd = [
f"{settings.config['container_manager']} run --rm --privileged --net=host "
f"{settings.config['trafficgen_img']} client auto --server-addr localhost "
f"{settings.config['trafficgen_img']} client auto "
f"--server-addr {settings.config['trafficgen']['host']} "
f"--server-port {settings.config['trafficgen_port']}"
]
outs, errs = execute_and_assert(
Expand Down

0 comments on commit 9baf55a

Please sign in to comment.