Received: from eggs.gnu.org ([2001:4830:134:3::10]:39926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLv1g-0008Cc-Ha for qemu-devel@nongnu.org; Thu, 12 Feb 2015 09:46:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLv1c-00085d-CK for qemu-devel@nongnu.org; Thu, 12 Feb 2015 09:45:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLv1c-00085Z-4n for qemu-devel@nongnu.org; Thu, 12 Feb 2015 09:45:52 -0500 From: Markus Armbruster References: <1422543520-8604-1-git-send-email-armbru@redhat.com> <54CA6A49.2040408@suse.de> Date: Thu, 12 Feb 2015 15:45:48 +0100 In-Reply-To: <54CA6A49.2040408@suse.de> ("Andreas =?utf-8?Q?F=C3=A4rber=22?= =?utf-8?Q?'s?= message of "Thu, 29 Jan 2015 18:13:45 +0100") Message-ID: <87d25fyyqr.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH RFC 0/1] qtest: Generic PCI device test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= Cc: qemu-devel@nongnu.org, mst@redhat.com Andreas F=C3=A4rber writes: > Hi Markus, > > Again thanks for digging into this. > > Am 29.01.2015 um 15:58 schrieb Markus Armbruster: >> This test does everything a number of existing tests currently do: >>=20 >> ac97-test.c e1000-test.c es1370-test.c eepro100-test.c >> ne2000-test.c nvme-test.c pcnet-test.c rtl8139-test.c >> tpci200-test.c virtio-balloon-test.c virtio-rng-test.c >> vmxnet3-test.c >>=20 >> They are all marked "TODO: Replace with functional tests". Options >>=20 >> * Delete them now, undelete when we add functional tests >>=20 >> * Keep them, blacklist the devices in pci-devs-test.c >>=20 >> * Live with the duplicated testing >>=20 >> Andreas, I guess you got an opinion here. > > My preference would be to not remove device files. "Functional tests" > refers to doing real device-specific MMIO or PIO, and the intent of > contributing such stubs, beyond the basic -device init/realize testing, > was lowering the hurdle so that maintainers can require bugfixers to > contribute a matching test case where applicable. Yes, asking people who aren't familiar with device tests to create one from scratch is asking a lot. Asking them to copy a skeleton and flesh it out is much more practical. Almost as good as fleshing out one of your stubs, I think. A non-skeleton test for a really simple PCI device could serve as skeleton. wdt_i6300esb.c is a possible candidate. >> There's overlap with a few others: >>=20 >> i82801b11-test.c usb-hcd-ehci-test.c usb-hcd-ohci-test.c >> usb-hcd-xhci-test.c virtio-blk-test.c virtio-net-test.c >> virtio-scsi-test.c virtio-serial-test.c >>=20 >> Options: >>=20 >> * Blacklist the devices in pci-devs-test.c >>=20 >> * Live with the duplicated testing >>=20 >> Andreas? > > Not having reviewed the respective test code yet, I would suggest to > keep generic tests in pci-devs-test.c and to rather drop generic tests > from device-specific files (de-duplication). Makes sense to me. However, some existing device-specific files won't have any tests left then. What do you want me to do with them? > While I haven't benchmarked it, I assume that the bigger contributor to > qtest runtime is the overhead of spawning qemu-system-* processes rather > than running multiple tests per process. So living with duplication may > be a convenience option. My new test is a pig in that regard: it runs qemu-system-FOO once per non-blacklisted PCI device. I could pack tests into fewer runs by using more than just a single PCI slot. i440FX can do 30 without a pci-bridge (would probably a bad idea for this test) and multifunction (certainly a bad idea). However, when a test fails, the culprit isn't as obvious then. Do you want me to try that?