From: Lucas Meneghel Rodrigues <lmr@redhat.com>
To: Qingtang Zhou <qzhou@redhat.com>
Cc: autotest@test.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM Test: nicdriver_unload.py: Fix some failure whan running RHEL4.8 guest
Date: Sun, 13 Mar 2011 16:37:27 -0300 [thread overview]
Message-ID: <1300045047.1315.1.camel@freedom> (raw)
In-Reply-To: <1299219263-16517-1-git-send-email-qzhou@redhat.com>
On Fri, 2011-03-04 at 14:14 +0800, Qingtang Zhou wrote:
> 1. readlink in RHEL4.8 doesn't have a '-e' parameter, replace it with '-f'.
> 2. nic driver parameter path in '/sys' is different, get it from config file.
Hi, thanks for your patch! A little comment below:
> Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
> ---
> client/tests/kvm/tests/nicdriver_unload.py | 13 ++++++++++---
> client/tests/kvm/tests_base.cfg.sample | 9 +++++++++
> 2 files changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/client/tests/kvm/tests/nicdriver_unload.py b/client/tests/kvm/tests/nicdriver_unload.py
> index 15a73ce..4849f74 100644
> --- a/client/tests/kvm/tests/nicdriver_unload.py
> +++ b/client/tests/kvm/tests/nicdriver_unload.py
> @@ -26,9 +26,16 @@ def run_nicdriver_unload(test, params, env):
>
> ethname = kvm_test_utils.get_linux_ifname(session_serial,
> vm.get_mac_address(0))
> - sys_path = "/sys/class/net/%s/device/driver" % (ethname)
> - driver = os.path.basename(session_serial.cmd("readlink -e %s" %
> - sys_path).strip())
> +
> + # get ethernet driver from '/sys' directory.
> + # ethtool can do the same thing and doesn't care about os type.
> + # if we make sure all guests have ethtool, we can make a change here.
^ I wish we could count on ethtool installed on all guests, but from
what I could see, it is not available on the install DVD of some Fedora
and RHEL versions, so I guess it's safer to stick with the approach
we've been using.
Thanks!
> + sys_path = params.get("sys_path") % (ethname)
> +
> + # readlink in RHEL4.8 doesn't have '-e' param, should use '-f' in RHEL4.8.
> + readlink_cmd = params.get("readlink_command", "readlink -e")
> + driver = os.path.basename(session_serial.cmd("%s %s" % (readlink_cmd,
> + sys_path)).strip())
> logging.info("driver is %s", driver)
>
> try:
> diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample
> index eef8c97..7616888 100644
> --- a/client/tests/kvm/tests_base.cfg.sample
> +++ b/client/tests/kvm/tests_base.cfg.sample
> @@ -1009,6 +1009,9 @@ variants:
> file_transfer:
> tmp_dir = /tmp/
> clean_cmd = rm -f
> + nicdriver_unload:
> + readlink_command = readlink -e
> + sys_path = "/sys/class/net/%s/device/driver"
>
> variants:
> - Fedora:
> @@ -1602,6 +1605,9 @@ variants:
> cdrom_cd1 = isos/linux/RHEL-4.8-i386-DVD.iso
> md5sum_cd1 = b024f0af5079539d3ef51f71fed0b194
> md5sum_1m_cd1 = 969c197402b9058f28a278c1f807d15b
> + nicdriver_unload:
> + readlink_command = readlink -f
> + sys_path = "/sys/class/net/%s/driver"
>
>
> - 4.8.x86_64:
> @@ -1617,6 +1623,9 @@ variants:
> cdrom_cd1 = isos/linux/RHEL-4.8-x86_64-DVD.iso
> md5sum_cd1 = 696bc877b0200cc942626673fcc3fc09
> md5sum_1m_cd1 = b11ac0ef7fd345ad712966972db63886
> + nicdriver_unload:
> + readlink_command = readlink -f
> + sys_path = "/sys/class/net/%s/driver"
>
>
> - 5.3.i386:
prev parent reply other threads:[~2011-03-13 19:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 6:14 [PATCH] KVM Test: nicdriver_unload.py: Fix some failure whan running RHEL4.8 guest Qingtang Zhou
2011-03-13 19:37 ` Lucas Meneghel Rodrigues [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=1300045047.1315.1.camel@freedom \
--to=lmr@redhat.com \
--cc=autotest@test.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=qzhou@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.