[V1] tests/ethtool let command execute on tester

Message ID 20221121091743.7908-1-dukaix.yuan@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] tests/ethtool let command execute on tester |

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

Yuan, DukaiX Nov. 21, 2022, 9:17 a.m. UTC
  The original command is executed on the DUT.
But actually needs to be executed on the tester.
Modify the code to make the command execute on the tester.

Signed-off-by: Dukai Yuan <dukaix.yuan@intel.com>
---
 tests/TestSuite_ethtool_stats.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Tu, Lijuan Nov. 22, 2022, 7:40 a.m. UTC | #1
On Mon, 21 Nov 2022 17:17:43 +0800, Dukai Yuan <dukaix.yuan@intel.com> wrote:
> The original command is executed on the DUT.
> But actually needs to be executed on the tester.
> Modify the code to make the command execute on the tester.
> 
> Signed-off-by: Dukai Yuan <dukaix.yuan@intel.com>


Applied, thanks
  

Patch

diff --git a/tests/TestSuite_ethtool_stats.py b/tests/TestSuite_ethtool_stats.py
index abaf05a3..a148b7a9 100644
--- a/tests/TestSuite_ethtool_stats.py
+++ b/tests/TestSuite_ethtool_stats.py
@@ -56,7 +56,7 @@  class TestEthtoolStats(TestCase):
         # make sure interface in link up status
         src_intf, src_mac = self.link_topo
         cmd = "ifconfig {0} up".format(src_intf)
-        self.d_a_con(cmd)
+        self.tester.alt_session.send_expect(cmd, "# ")
         # send out packet
         for frame_size in self.frame_sizes:
             headers_size = sum([HEADER_SIZE[x] for x in ["eth", "ip", "udp"]])