diff options
author | Jing Zhang <jing.c.zhang@nokia.com> | 2017-04-07 21:35:00 -0400 |
---|---|---|
committer | Jing Zhang <jing.c.zhang@nokia.com> | 2017-05-01 10:05:58 -0400 |
commit | ebddbcb0f76d5320853b3d342e0db36bbf8c6626 (patch) | |
tree | 6aca906c5f024a1f83c9a1481b0f7d50d69e1d40 /tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py | |
parent | 942b41170ebb412cef1ccc0c134ea8984e82171d (diff) |
Extend TC008 to run pktgen-dpdk inside VM
Need a fast path inside VM to verify full throughput of SRIOV and OVS-dpdk.
Update 1: Change newly added file names to avoid conflict
Update 2: Add more unit test cases
Update 3: Fix default parameter typo for testpmd
Update 4: Adapted to the pktgen-dpdk prompt change from "Pktgen>" to "Pktgen:/>", now just expect "Pktgen"
Update 5: Per comment, merge common functions between latency and throughput tests to utils.py
Update 6: Per comment, seperate the test case from TC008 to a new test case TC077
Change-Id: I1f7471d4ba77636a3a66c79c2652578321312185
JIRA: YARDSTICK-614
Signed-off-by: Jing Zhang <jing.c.zhang@nokia.com>
Diffstat (limited to 'tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py')
-rw-r--r-- | tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py b/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py index 496ee770c..e6998e443 100644 --- a/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py +++ b/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py @@ -16,6 +16,7 @@ import unittest import mock +import yardstick.common.utils as utils from yardstick.benchmark.scenarios.networking import pktgen_dpdk @@ -60,11 +61,10 @@ class PktgenDPDKLatencyTestCase(unittest.TestCase): mock_ssh.SSH.from_node().execute.return_value = (0, '', '') - p.get_port_ip(p.server, "eth1") + utils.get_port_ip(p.server, "eth1") mock_ssh.SSH.from_node().execute.assert_called_with( - "ifconfig eth1 |grep 'inet addr' |awk '{print $2}' \ - |cut -d ':' -f2 ") + "ifconfig eth1 |grep 'inet addr' |awk '{print $2}' |cut -d ':' -f2 ") def test_pktgen_dpdk_unsuccessful_get_port_ip(self, mock_ssh): @@ -76,7 +76,7 @@ class PktgenDPDKLatencyTestCase(unittest.TestCase): p.server = mock_ssh.SSH.from_node() mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR') - self.assertRaises(RuntimeError, p.get_port_ip, p.server, "eth1") + self.assertRaises(RuntimeError, utils.get_port_ip, p.server, "eth1") def test_pktgen_dpdk_successful_get_port_mac(self, mock_ssh): @@ -88,7 +88,7 @@ class PktgenDPDKLatencyTestCase(unittest.TestCase): mock_ssh.SSH.from_node().execute.return_value = (0, '', '') - p.get_port_mac(p.server, "eth1") + utils.get_port_mac(p.server, "eth1") mock_ssh.SSH.from_node().execute.assert_called_with( "ifconfig |grep HWaddr |grep eth1 |awk '{print $5}' ") @@ -103,7 +103,7 @@ class PktgenDPDKLatencyTestCase(unittest.TestCase): p.server = mock_ssh.SSH.from_node() mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR') - self.assertRaises(RuntimeError, p.get_port_mac, p.server, "eth1") + self.assertRaises(RuntimeError, utils.get_port_mac, p.server, "eth1") def test_pktgen_dpdk_successful_no_sla(self, mock_ssh): |