Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dkosteck committed Nov 1, 2023
1 parent 94cce18 commit a18377e
Show file tree
Hide file tree
Showing 6 changed files with 150 additions and 6 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 {settings.config['dut']['host']}:{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 @@ -138,7 +141,8 @@ def test_SRIOV_Sanity_Performance(dut, trafficgen, settings, testdata):
trafficgen_cmd = [
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 "
"-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 {settings.config['trafficgen']['host']} "
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 {settings.config['trafficgen']['host']} "
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 {settings.config['trafficgen']['host']} "
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 {settings.config['trafficgen']['host']} "
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
25 changes: 25 additions & 0 deletions sriov/tests/test_pip
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Requirement already satisfied: paramiko==2.11.0 in ./venv/lib/python3.6/site-packages (from -r ../requirements.txt (line 1)) (2.11.0)
Requirement already satisfied: pytest==6.2.5 in ./venv/lib/python3.6/site-packages (from -r ../requirements.txt (line 2)) (6.2.5)
Requirement already satisfied: PyYAML==6.0 in ./venv/lib/python3.6/site-packages (from -r ../requirements.txt (line 3)) (6.0)
Requirement already satisfied: pytest-html in ./venv/lib/python3.6/site-packages (from -r ../requirements.txt (line 4)) (3.2.0)
Requirement already satisfied: docutils in ./venv/lib/python3.6/site-packages (from -r ../requirements.txt (line 5)) (0.18.1)
Requirement already satisfied: gitpython in ./venv/lib/python3.6/site-packages (from -r ../requirements.txt (line 6)) (3.1.18)
Requirement already satisfied: bcrypt>=3.1.3 in ./venv/lib/python3.6/site-packages (from paramiko==2.11.0->-r ../requirements.txt (line 1)) (4.0.1)
Requirement already satisfied: pynacl>=1.0.1 in ./venv/lib/python3.6/site-packages (from paramiko==2.11.0->-r ../requirements.txt (line 1)) (1.5.0)
Requirement already satisfied: six in ./venv/lib/python3.6/site-packages (from paramiko==2.11.0->-r ../requirements.txt (line 1)) (1.16.0)
Requirement already satisfied: cryptography>=2.5 in ./venv/lib/python3.6/site-packages (from paramiko==2.11.0->-r ../requirements.txt (line 1)) (39.0.0)
Requirement already satisfied: py>=1.8.2 in ./venv/lib/python3.6/site-packages (from pytest==6.2.5->-r ../requirements.txt (line 2)) (1.11.0)
Requirement already satisfied: iniconfig in ./venv/lib/python3.6/site-packages (from pytest==6.2.5->-r ../requirements.txt (line 2)) (1.1.1)
Requirement already satisfied: attrs>=19.2.0 in ./venv/lib/python3.6/site-packages (from pytest==6.2.5->-r ../requirements.txt (line 2)) (22.2.0)
Requirement already satisfied: toml in ./venv/lib/python3.6/site-packages (from pytest==6.2.5->-r ../requirements.txt (line 2)) (0.10.2)
Requirement already satisfied: packaging in ./venv/lib/python3.6/site-packages (from pytest==6.2.5->-r ../requirements.txt (line 2)) (21.3)
Requirement already satisfied: importlib-metadata>=0.12 in ./venv/lib/python3.6/site-packages (from pytest==6.2.5->-r ../requirements.txt (line 2)) (4.8.3)
Requirement already satisfied: pluggy<2.0,>=0.12 in ./venv/lib/python3.6/site-packages (from pytest==6.2.5->-r ../requirements.txt (line 2)) (1.0.0)
Requirement already satisfied: pytest-metadata in ./venv/lib/python3.6/site-packages (from pytest-html->-r ../requirements.txt (line 4)) (1.11.0)
Requirement already satisfied: gitdb<5,>=4.0.1 in ./venv/lib/python3.6/site-packages (from gitpython->-r ../requirements.txt (line 6)) (4.0.9)
Requirement already satisfied: typing-extensions>=3.7.4.0 in ./venv/lib/python3.6/site-packages (from gitpython->-r ../requirements.txt (line 6)) (4.1.1)
Requirement already satisfied: cffi>=1.12 in ./venv/lib/python3.6/site-packages (from cryptography>=2.5->paramiko==2.11.0->-r ../requirements.txt (line 1)) (1.15.1)
Requirement already satisfied: smmap<6,>=3.0.1 in ./venv/lib/python3.6/site-packages (from gitdb<5,>=4.0.1->gitpython->-r ../requirements.txt (line 6)) (5.0.0)
Requirement already satisfied: zipp>=0.5 in ./venv/lib/python3.6/site-packages (from importlib-metadata>=0.12->pytest==6.2.5->-r ../requirements.txt (line 2)) (3.6.0)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in ./venv/lib/python3.6/site-packages (from packaging->pytest==6.2.5->-r ../requirements.txt (line 2)) (3.0.9)
Requirement already satisfied: pycparser in ./venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography>=2.5->paramiko==2.11.0->-r ../requirements.txt (line 1)) (2.21)
24 changes: 24 additions & 0 deletions sriov/tests/testbed.yaml.back
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
dut:
host: 192.168.49.134
username: root
password: redhat
pmd_cpus: "30,32,34"
interface:
pf1:
name: "ens7f3"
pci: "0000:ca:00.3"
pf2:
name: "ens2f3"
vf1:
name: "ens7f3v0"
pci: "0000:ca:19.0"
trafficgen:
host: 192.168.49.147
username: root
password: redhat
interface:
pf1:
name: "ens8f0"
mac: "40:a6:b7:2b:19:a0"
pf2:
name: "ens7f0"
29 changes: 29 additions & 0 deletions sriov/tests/testbed_136.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
dut:
host: 192.168.49.136
username: root
password: redhat
pmd_cpus: "30,32,34"
interface:
pf1:
name: "ens2f3"
pci: "0000:17:00.3"
vf1:
name: "ens2f3v0"
pci: "0000:17:19.0"
pf2:
name: "ens7f3"
pci: "0000:ca:00.3"
vf2:
name: "ens7f3v0"
pci: "0000:ca:19.0"
trafficgen:
host: 192.168.49.147
username: root
password: redhat
interface:
pf1:
name: "ens7f1"
mac: "40:a6:b7:2a:c2:91"
pf2:
name: "ens8f1"
mac: "40:a6:b7:2b:19:a1"
29 changes: 29 additions & 0 deletions sriov/tests/testbed_52.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
dut:
host: 192.168.39.52
username: root
password: redhat
pmd_cpus: "30,32,34"
interface:
pf1:
name: "ens4f0"
pci: "0000:af:00.0"
vf1:
name: "ens4f0v0"
pci: "0000:af:01.0"
pf2:
name: "ens4f1"
pci: "0000:af:00.1"
vf2:
name: "ens4f1v0"
pci: "0000:af:09.0"
trafficgen:
host: 192.168.39.51
username: root
password: redhat
interface:
pf1:
name: "ens1f0"
mac: "40:a6:b7:2b:20:30"
pf2:
name: "ens1f1"
mac: "40:a6:b7:2b:20:31"
29 changes: 29 additions & 0 deletions sriov/tests/testbed_52_xxv710.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
dut:
host: 192.168.39.52
username: root
password: redhat
pmd_cpus: "30,32,34"
interface:
pf1:
name: "ens7f0"
pci: "0000:87:00.0"
vf1:
name: "ens7f0v0"
pci: "0000:87:02.0"
pf2:
name: "ens7f1"
pci: "0000:87:00.1"
vf2:
name: "ens7f1v0"
pci: "0000:87:0a.0"
trafficgen:
host: 192.168.39.51
username: root
password: redhat
interface:
pf1:
name: "ens6f0"
mac: "40:a6:b7:2f:f0:20"
pf2:
name: "ens6f1"
mac: "40:a6:b7:2f:f0:21"

0 comments on commit a18377e

Please sign in to comment.