On Mon, 2010-08-23 at 17:08 +0800, Amos Kong wrote:
> Repeatedly load/unload nic driver, try to transfer file between guest and host
> by threads at the same time, and check the md5sum.
> 
> Changes from v1:
> - Use a new method to get nic driver name
> - Use utils.hash_file() to get md5sum
> 
> Signed-off-by: Amos Kong <[email protected]>
> ---
>  0 files changed, 0 insertions(+), 0 deletions(-)

snip

> +
> +    ethname = kvm_test_utils.get_linux_ifname(session, vm.get_macaddr(0))
> +    temp_path = "/sys/class/net/%s/device/driver" % (ethname)
> +    if os.path.islink(temp_path):
> +        driver = os.path.split(os.path.realpath(temp_path))[-1]
> +    else:
> +        raise error.TestError("Could not find driver name")
> +    logging.info("driver is %s" % driver)

^ I just noticed this when re-testing the patchset this morning. Indeed,
as this is should be executed in the guest, it won't work. Then I coded
an alternated method of doing it using the same idea, but with readlink:

    ethname = kvm_test_utils.get_linux_ifname(session, vm.get_mac_address(0))
    sys_path = "/sys/class/net/%s/device/driver" % (ethname)
    s, o = session.get_command_status_output('readlink -e %s' % sys_path)
    if s:
        raise error.TestError("Could not find driver name")
    driver = os.path.basename(o)
    logging.info("driver is %s", driver)

I'll continue to go over all the tests and will try to send an updated
version of the patchset.

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to