[V1] tests/stats_checks: rebind interfaces after running test_xstats_check_vf

Message ID 1654670218-5658-1-git-send-email-yux.jiang@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] tests/stats_checks: rebind interfaces after running test_xstats_check_vf |

Checks

Context Check Description
ci/Intel-dts-pylama-test success Testing OK
ci/Intel-dts-format-test success Testing OK
ci/Intel-dts-suite-test success Testing OK

Commit Message

Yu Jiang June 8, 2022, 6:36 a.m. UTC
  From: "Yu.Jiang" <yux.jiang@intel.com>

test_xstats_check_vf: rebind interface to avoid it impact next suite.

Signed-off-by: Yu.Jiang <yux.jiang@intel.com>
---
 tests/TestSuite_stats_checks.py | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Tu, Lijuan June 15, 2022, 9:07 a.m. UTC | #1
On Wed,  8 Jun 2022 14:36:58 +0800, "Yu.Jiang" <yux.jiang@intel.com> wrote:
> From: "Yu.Jiang" <yux.jiang@intel.com>
> 
> test_xstats_check_vf: rebind interface to avoid it impact next suite.
> 
> Signed-off-by: Yu.Jiang <yux.jiang@intel.com>


Applied, thanks
  

Patch

diff --git a/tests/TestSuite_stats_checks.py b/tests/TestSuite_stats_checks.py
index 331e9c3b..7ebb74d5 100644
--- a/tests/TestSuite_stats_checks.py
+++ b/tests/TestSuite_stats_checks.py
@@ -260,6 +260,9 @@  class TestStatsChecks(TestCase):
         Run after each test case.
         """
         self.dut.kill_all()
+        if self._suite_result.test_case == "test_xstats_check_vf":
+            self.dut.destroy_sriov_vfs_by_port(self.dut_ports[0])
+            self.dut.bind_interfaces_linux(self.drivername)
 
     def tear_down_all(self):
         """