On 18.08.2017 09:54, Cornelia Huck wrote:
> On Thu, 17 Aug 2017 16:02:00 +0200
> Thomas Huth <[email protected]> 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