[V1] tests/kernelpf_iavf: optimize script

Message ID 20230308120644.1134889-1-songx.jiale@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] tests/kernelpf_iavf: optimize script |

Checks

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

Commit Message

Jiale, SongX March 8, 2023, 12:06 p.m. UTC
  to be compatible with i40e's mac rules and ensure that vf's mac address remains unchanged, 
reset vf's mac before the test starts.

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

Comments

Tu, Lijuan March 28, 2023, 12:50 a.m. UTC | #1
On Wed,  8 Mar 2023 12:06:44 +0000, Song Jiale <songx.jiale@intel.com> wrote:
> to be compatible with i40e's mac rules and ensure that vf's mac address remains unchanged, 
> reset vf's mac before the test starts.
> 
> Signed-off-by: Song Jiale <songx.jiale@intel.com>


Applied, thanks
  

Patch

diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py
index 8780bb54..6b6c573c 100644
--- a/tests/TestSuite_kernelpf_iavf.py
+++ b/tests/TestSuite_kernelpf_iavf.py
@@ -93,6 +93,9 @@  class TestKernelpfIavf(TestCase):
             self.destroy_vm_env()
         elif self.env_done is False:
             self.setup_vm_env()
+        self.dut.send_expect(
+            "ip link set %s vf 0 mac %s" % (self.host_intf, self.vf_mac), "# "
+        )
 
     def setup_vm_env(self, driver="default", set_vf_mac=True):
         """