From: Lijuan Tu <lijuan.tu@intel.com>
To: zhuwenhui <wenhuix.zhu@intel.com>, dts@dpdk.org
Subject: Re: [dts] [PATCH V2] kni/ethtool add judgment before the -a parameter
Date: Fri, 16 Nov 2018 03:43:22 +0800 [thread overview]
Message-ID: <d7e429c2-06cf-d675-e433-ee62429db6b9@intel.com> (raw)
In-Reply-To: <1542004887-38119-1-git-send-email-wenhuix.zhu@intel.com>
Applied with comments changed.
On 2018年11月12日 14:41, zhuwenhui wrote:
> According to whether the kernel supports
> "ETHTOOL_GLINKSETTINGS & ETHTOOL_SLINKSETTINGS", it is judged
> whether "ethtool "-a|--show-pause" works normally.
>
> Signed-off-by: zhuwenhui <wenhuix.zhu@intel.com>
> ---
> tests/TestSuite_kni.py | 19 ++++++++++++-------
> 1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py
> index 23d6d04..91408e4 100644
> --- a/tests/TestSuite_kni.py
> +++ b/tests/TestSuite_kni.py
> @@ -675,14 +675,19 @@ class TestKni(TestCase):
> "'ethtool -i' not supported")
> self.verify("Operation not supported" not in out,
> "'ethtool -i' not supported")
> -
> +
> # Request pause parameters
> - out = self.dut.send_expect("ethtool -a %s" % virtual_interface,
> - "# ")
> - self.verify("Pause parameters for %s" % virtual_interface in out,
> - "'ethtool -a' not supported")
> - self.verify("Operation not supported" not in out,
> - "ethtool '-a' not supported")
> + with open("/usr/include/linux/ethtool.h","r") as ethtool_h:
> + ethtool_contents = ethtool_h.read()
> + GSET = "ETHTOOL_GLINKSETTINGS"
> + SSET = "ETHTOOL_SLINKSETTINGS"
> + if (GSET in ethtool_contents) and (SSET in ethtool_contents):
> + out = self.dut.send_expect("ethtool -a %s" % virtual_interface,
> + "# ")
> + self.verify("Pause parameters for %s" % virtual_interface in out,
> + "'ethtool -a' not supported")
> + self.verify("Operation not supported" not in out,
> + "ethtool '-a' not supported")
>
> # Request statistics
> out = self.dut.send_expect("ethtool -S %s" % virtual_interface,
prev parent reply other threads:[~2018-11-15 11:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-12 6:41 zhuwenhui
2018-11-15 19:43 ` Lijuan Tu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d7e429c2-06cf-d675-e433-ee62429db6b9@intel.com \
--to=lijuan.tu@intel.com \
--cc=dts@dpdk.org \
--cc=wenhuix.zhu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).