[V2] tests/ice_dcf_qos: optimize scripts

Message ID 20230814151836.1494836-1-songx.jiale@intel.com (mailing list archive)
State New
Headers
Series [V2] tests/ice_dcf_qos: optimize scripts |

Commit Message

Jiale Song Aug. 14, 2023, 3:18 p.m. UTC
  optimize scripts:
    1. modify pf reset method.
    2. modify incorrect inspection ports and detection values according
to the testing plan.
    3. Modify the detection rate from 25Gbps to 45Gbps. this value is the
actual measured value.

Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
 test_plans/ice_dcf_qos_test_plan.rst |  2 +-
 tests/TestSuite_ice_dcf_qos.py       | 13 +++++--------
 2 files changed, 6 insertions(+), 9 deletions(-)
  

Patch

diff --git a/test_plans/ice_dcf_qos_test_plan.rst b/test_plans/ice_dcf_qos_test_plan.rst
index b2cb08ce..ab3d6035 100644
--- a/test_plans/ice_dcf_qos_test_plan.rst
+++ b/test_plans/ice_dcf_qos_test_plan.rst
@@ -1238,7 +1238,7 @@  This case is to check if the QoS setting works after resetting PF.
 
 2. Reset pf::
 
-    echo 1 > /sys/devices/pci0000:17/0000:17:00.0/0000:18:00.0/reset
+    echo 1 > /sys/bus/pci/devices/0000:31:00.0/reset
 
 3. Send same streams as step1, check no packets received and transmitted.
 
diff --git a/tests/TestSuite_ice_dcf_qos.py b/tests/TestSuite_ice_dcf_qos.py
index bd0317db..ff4409d0 100644
--- a/tests/TestSuite_ice_dcf_qos.py
+++ b/tests/TestSuite_ice_dcf_qos.py
@@ -908,7 +908,7 @@  class TestICEDCFQos(TestCase):
             [[5], 12.5, (8, "Gbps", 3)],
             [[6], 12.5, (8, "Gbps", 3)],
             [[7], 12.5, (8, "Gbps", 3)],
-            [[0, 1, 2, 3, 4, 5, 6, 7], 100, (9.7, "Gbps", 1)],
+            [[0, 1, 2, 3, 4, 5, 6, 7], 100, (9.77, "Gbps", 3)],
         ]
         results = self.check_traffic(stream_configs, traffic_tasks, frame_size=1024)
         queue_mapping = [
@@ -928,7 +928,7 @@  class TestICEDCFQos(TestCase):
         ]
         time.sleep(10)
         traffic_tasks = [
-            [[0, 1, 2, 3, 4, 5, 6, 7], 100, (7.273, "Gbps", 1)],
+            [[0, 1, 2, 3, 4, 5, 6, 7], 100, (7.273, "Gbps", 3)],
         ]
         results = self.check_traffic(stream_configs, traffic_tasks, frame_size=68)
         self.testpmd_close()
@@ -1017,7 +1017,7 @@  class TestICEDCFQos(TestCase):
             [[5], 12.5, (2, "MBps", 2)],
             [[6], 12.5, (2, "MBps", 2)],
             [[7], 12.5, (4, "MBps", 2)],
-            [[0, 1, 2, 3, 4, 5, 6, 7], 100, (12.5, "Gbps")],
+            [[0, 1, 2, 3, 4, 5, 6, 7], 100, (128, "Mbps")],
         ]
         results = self.check_traffic(stream_configs, traffic_tasks)
         self.testpmd_close()
@@ -1446,7 +1446,7 @@  class TestICEDCFQos(TestCase):
         ]
         self.pmd_con(cmds)
         traffic_tasks = [
-            [[0, 1, 2, 3, 4, 5, 6, 7], 100, (25, "Gbps")],
+            [[0, 1, 2, 3, 4, 5, 6, 7], 100, (45, "Gbps")],
         ]
         results = self.check_traffic(stream_configs, traffic_tasks, frame_size=68)
         self.pmd_con("stop")
@@ -1847,10 +1847,7 @@  class TestICEDCFQos(TestCase):
         ]
         results = self.check_traffic(stream_configs, traffic_tasks)
         self.testpmd_close()
-        pci = str(int(self.nic100g_pci[5:7]) - 1)
-        cmds = [
-            f"echo 1 > /sys/devices/pci0000:{pci}/0000:{pci}:00.0/{self.nic100g_pci}/reset",
-        ]
+        cmds = ["echo 1 > /sys/bus/pci/devices/%s/reset" % self.nic100g_pci]
         self.d_a_con(cmds)
         self.strict_mode_check_peak_tb_rate_preset(vfs_grp, commit_check=False)
         stream_configs = [