test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V2] framework/tester: disable tester ports LLDP
@ 2019-12-16 23:06 Xinfeng Zhao
  2019-12-16 23:06 ` [dts] [PATCH V1] tests: add new features for compression test Xinfeng Zhao
  2019-12-20  8:03 ` [dts] [PATCH V2] framework/tester: disable tester ports LLDP Tu, Lijuan
  0 siblings, 2 replies; 5+ messages in thread
From: Xinfeng Zhao @ 2019-12-16 23:06 UTC (permalink / raw)
  To: dts; +Cc: Xinfeng Zhao

Signed-off-by: Xinfeng Zhao <xinfengx.zhao@intel.com>
---
 framework/tester.py | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/framework/tester.py b/framework/tester.py
index d7e74d4..5b4aff0 100644
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -174,6 +174,28 @@ class Tester(Crb):
         self.restore_interfaces()
         self.scan_ports()
 
+        self.disable_lldp()
+
+    def disable_lldp(self):
+        """
+        Disable tester ports LLDP.
+        """
+        result = self.send_expect("lldpad -d",  "# ")
+        if result:
+            self.logger.error(result.strip())
+
+        for port in self.ports_info:
+            if not "intf" in port.keys():
+                continue
+            eth = port["intf"]
+            out = self.send_expect("ethtool --show-priv-flags %s"
+                    % eth, "# ", alt_session=True)
+            if "disable-fw-lldp" in out:
+                self.send_expect("ethtool --set-priv-flags %s disable-fw-lldp on"
+                        % eth, "# ", alt_session=True)
+            self.send_expect("lldptool set-lldp -i %s adminStatus=disabled"
+                    % eth, "# ", alt_session=True)
+
     def get_local_port(self, remotePort):
         """
         Return tester local port connect to specified dut port.
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-12-20  8:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-16 23:06 [dts] [PATCH V2] framework/tester: disable tester ports LLDP Xinfeng Zhao
2019-12-16 23:06 ` [dts] [PATCH V1] tests: add new features for compression test Xinfeng Zhao
2019-12-17  8:26   ` Wan, Zhe
2019-12-20  8:02   ` Tu, Lijuan
2019-12-20  8:03 ` [dts] [PATCH V2] framework/tester: disable tester ports LLDP Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).