* [dts] [PATCH V2] tests/link_status_interrupt: close nic link-down-on-close off
@ 2021-10-11 3:42 Jiale Song
2021-10-25 3:52 ` Tu, Lijuan
0 siblings, 1 reply; 4+ messages in thread
From: Jiale Song @ 2021-10-11 3:42 UTC (permalink / raw)
To: dts; +Cc: Jiale Song
some nics do not support this detection function, delete the check and directly close
nic link-down-on-close
Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dts] [PATCH V2] tests/link_status_interrupt: close nic link-down-on-close off
2021-10-11 3:42 [dts] [PATCH V2] tests/link_status_interrupt: close nic link-down-on-close off Jiale Song
@ 2021-10-25 3:52 ` Tu, Lijuan
[not found] ` <BN0PR11MB574369AB412ABEA91792B917E7839@BN0PR11MB5743.namprd11.prod.outlook.com>
0 siblings, 1 reply; 4+ messages in thread
From: Tu, Lijuan @ 2021-10-25 3:52 UTC (permalink / raw)
To: Jiale, SongX, dts; +Cc: Jiale, SongX
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Jiale Song
> Sent: 2021年10月11日 11:42
> To: dts@dpdk.org
> Cc: Jiale, SongX <songx.jiale@intel.com>
> Subject: [dts] [PATCH V2] tests/link_status_interrupt: close nic link-down-on-
> close off
>
> some nics do not support this detection function, delete the check and directly
> close nic link-down-on-close
>
The check have deal with the situation that some nics might be not support it. So I don't think there is any need for your patch.
> Signed-off-by: Jiale Song <songx.jiale@intel.com>
> ---
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts] [PATCH V2] tests/link_status_interrupt: close nic link-down-on-close off
@ 2021-10-09 9:00 Jiale Song
0 siblings, 0 replies; 4+ messages in thread
From: Jiale Song @ 2021-10-09 9:00 UTC (permalink / raw)
To: dts; +Cc: Jiale Song
since the link-down-on-close of the tester is turned on, but
not closed, the subsequent tests are affected.
Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
tests/TestSuite_link_status_interrupt.py | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/tests/TestSuite_link_status_interrupt.py b/tests/TestSuite_link_status_interrupt.py
index 5590d94..2ad1559 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):
"""
@@ -210,5 +194,4 @@ class TestLinkStatusInterrupt(TestCase):
Run after each test suite.
"""
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" % self.intf, "#", 10)
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-25 6:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 3:42 [dts] [PATCH V2] tests/link_status_interrupt: close nic link-down-on-close off Jiale Song
2021-10-25 3:52 ` Tu, Lijuan
[not found] ` <BN0PR11MB574369AB412ABEA91792B917E7839@BN0PR11MB5743.namprd11.prod.outlook.com>
2021-10-25 6:37 ` Tu, Lijuan
-- strict thread matches above, loose matches on Subject: below --
2021-10-09 9:00 Jiale Song
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).