[V1,2/4] tests/pmd_bonded_8023ad: modify the script to adapt to changes in dpdk

Message ID 20230209145351.1140496-3-songx.jiale@intel.com (mailing list archive)
State Superseded
Headers
Series modify the script to adapt to changes in dpdk |

Commit Message

Jiale, SongX Feb. 9, 2023, 2:53 p.m. UTC
  the display information of the binding port in dpdk-testpmd has changed.
modify the script to adapt to this change.

According to dpdk commit f3b5f3d35c59e1("app/testpmd: use dump API to show bonding info").

Signed-off-by: Song Jiale <songx.jiale@intel.com>
---
 tests/TestSuite_pmd_bonded_8023ad.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Patch

diff --git a/tests/TestSuite_pmd_bonded_8023ad.py b/tests/TestSuite_pmd_bonded_8023ad.py
index c1bf2759..1921a942 100644
--- a/tests/TestSuite_pmd_bonded_8023ad.py
+++ b/tests/TestSuite_pmd_bonded_8023ad.py
@@ -362,7 +362,9 @@  class TestBonding8023AD(TestCase):
         # create commandline option format
         bonding_name = "net_bonding0"
         slaves_pci = ["slave=" + pci for pci in slave_pcis]
-        bonding_mode = "mode={0}".format(str(MODE_LACP))
+        p = r"\w+\((\d+)\)"
+        mode_id = int(re.match(p, str(MODE_LACP)).group(1))
+        bonding_mode = "mode={0}".format(mode_id)
         agg_config = "agg_mode={0}"
         vdev_format = ",".join([bonding_name] + slaves_pci + [bonding_mode, agg_config])
         # command line option