From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 01E15A0C43; Mon, 11 Oct 2021 05:28:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C4A2B40E01; Mon, 11 Oct 2021 05:28:27 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 8D88740142 for ; Mon, 11 Oct 2021 05:28:25 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10133"; a="226746337" X-IronPort-AV: E=Sophos;i="5.85,363,1624345200"; d="scan'208";a="226746337" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2021 20:28:24 -0700 X-IronPort-AV: E=Sophos;i="5.85,363,1624345200"; d="scan'208";a="490291118" Received: from unknown (HELO dpdk-zhaohy-t.sh.intel.com) ([10.240.183.68]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2021 20:28:23 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Date: Mon, 11 Oct 2021 11:42:00 +0800 Message-Id: <1633923720-95214-1-git-send-email-songx.jiale@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V2] tests/link_status_interrupt: close nic link-down-on-close off X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" some nics do not support this detection function, delete the check and directly close nic link-down-on-close Signed-off-by: Jiale Song --- tests/TestSuite_link_status_interrupt.py | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/tests/TestSuite_link_status_interrupt.py b/tests/TestSuite_link_status_interrupt.py index 5590d94..861ca50 100755 --- a/tests/TestSuite_link_status_interrupt.py +++ b/tests/TestSuite_link_status_interrupt.py @@ -70,22 +70,6 @@ class TestLinkStatusInterrupt(TestCase): self.basic_intr_mode = ["msix", "legacy"] if self.drivername == "vfio-pci": self.basic_intr_mode.append("msi") - self.intfs = [self.tester.get_interface(self.tester.get_local_port(i)) for i in self.dut_ports] - # check link-down-on-close flag - self.flag = "link-down-on-close" - for intf in self.intfs: - check_flag = "ethtool --show-priv-flags %s" % intf - set_flag = "ethtool --set-priv-flags %s %s on" % (intf, self.flag) - out = self.tester.send_expect(check_flag, "#") - p = re.compile('%s\s+:\s+(\w+)' % self.flag) - res = re.search(p, out).group(1) - if res == "off": - self.tester.send_expect(set_flag, "#") - time.sleep(0.5) - out = self.tester.send_expect(check_flag, "#") - self.verify(re.search(p, out).group(1) == "on", "set %s %s on failed" % (intf, self.flag)) - elif not res: - self.logger.info("NIC %s might not support this case" % intf) def set_link_status_and_verify(self, dutPort, status): """ @@ -209,6 +193,7 @@ class TestLinkStatusInterrupt(TestCase): """ Run after each test suite. """ + self.intfs = [self.tester.get_interface(self.tester.get_local_port(i)) for i in self.dut_ports] if self.dut.get_os_type() != 'freebsd': for intf in self.intfs: - self.tester.send_expect("ethtool --set-priv-flags %s %s off" % (intf, self.flag), "#", 10) + self.tester.send_expect("ethtool --set-priv-flags %s link-down-on-close off" % intf, "# ") -- 2.17.1