qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/6] tests: Add network filter tests to the chec


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH 2/6] tests: Add network filter tests to the check-qtest-s390x list
Date: Fri, 18 Aug 2017 10:47:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

On 18.08.2017 09:54, Cornelia Huck wrote:
> On Thu, 17 Aug 2017 16:02:00 +0200
> Thomas Huth <address@hidden> wrote:
> 
>> On 17.08.2017 10:41, Cornelia Huck wrote:
[...]
>>> I'm wondering if we could unify selection of the network device
>>> somehow. There's probably two cases:
>>> - Test a specific device. This obviously needs to be decided
>>>   individually.
>>> - Just use a functional network device. For s390x, this will be
>>>   virtio-net-ccw; for other architectures, this test uses e1000, while
>>>   one of the tests below uses rtl8139 (why?). A helper for that may be
>>>   useful.  
>>
>> Maybe ... OTOH, this likely increases also test coverage if we do not
>> use the same PCI NIC in all the tests...?
> 
> It just looks like a bit of unneeded churn to me.
> 
> Re coverage: Do we have a very simple test that we can run for all kind
> of NICs? This would give some reliable testing for various devices
> instead of having to rely on people picking different devices for their
> tests...

I think there is only the pxe-tester that comes close to a generic NIC
tester. But there are two issues:
1) You need a firmware that has a driver for the NIC
2) It's not a very fast test, so adding lots of NICs there might slow
   down "make check" quite a bit.

(There are also some dedicated NIC tests available already, e.g.
tests/rtl8139-test.c tests at least some aspects of that NIC.)

Hmm, maybe we could also use a function that returns a different NIC for
the i386 and x86_64 architectures, something like:

char *get_preferred_nic_name(void)
{
    const char *arch = qtest_get_arch();

    if (g_str_equal(arch, "i386")) {
        return "rtl8139";
    } else if (g_str_equal(arch, "s390x")) {
        return "virtio-net-ccw";
    } else if (g_str_equal(arch, "ppc64")) {
        return "spapr-vlan";
    } else {
        return "e1000";
    }
}

That way, we'd also get test coverage for both, e1000 and rtl8139... ?

 Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]