Received: from eggs.gnu.org ([2001:4830:134:3::10]:41712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH7iF-00010D-Em for qemu-devel@nongnu.org; Fri, 30 Jan 2015 04:18:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YH7iC-0005fX-74 for qemu-devel@nongnu.org; Fri, 30 Jan 2015 04:18:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH7iC-0005fT-06 for qemu-devel@nongnu.org; Fri, 30 Jan 2015 04:18:00 -0500 From: Markus Armbruster References: <1414481739-19939-1-git-send-email-armbru@redhat.com> <545244CA.5010809@suse.de> <87egtk3f5i.fsf@blackfin.pond.sub.org> <87d26akd9f.fsf@blackfin.pond.sub.org> Date: Fri, 30 Jan 2015 10:17:51 +0100 In-Reply-To: <87d26akd9f.fsf@blackfin.pond.sub.org> (Markus Armbruster's message of "Mon, 19 Jan 2015 16:21:00 +0100") Message-ID: <87lhkktyo0.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 00/10] pci: Partial conversion to realize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= Cc: pbonzini@redhat.com, arei.gonglei@huawei.com, mst@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com Markus Armbruster writes: > Markus Armbruster writes: > >> Andreas F=C3=A4rber writes: >> >>> Hi Markus, >>> >>> Am 28.10.2014 um 08:35 schrieb Markus Armbruster: >>>> While discussing Gonglei's "[PATCH v2 00/19] usb: convert device init >>>> to realize", Paolo called the PCI conversion job "Gargantuan". This >>>> series attempts to crack it into manageable jobs. >>> >>> Thanks for giving this a stab! What kept me from diving into the PCI >>> converstion was that I first invested into qtests for the non-default >>> PCI devices. How many of the converted devices are actually covered in >>> qtest? >> >> Can't tell offhand, but I can find out. > > The vast majority of my conversions are utterly trivial [PATCH 03]: > change return type to void, rename, put into ->realize instead of > ->init. I could enumerate the devices so changed and look for qtests, > but I feel it's rather pointless busywork. But if you should insist... > > The remaining conversions are all very, very simple: > > * PATCH 05: "pcnet" > > Utterly trivial after trivial PATCH 04 changed a helper's return type > to void. > > There's pcnet-test.c, which basically tests "-device pcnet doesn't > explode right away". > > * PATCH 06: "pci-serial", "pci-serial-2x", "pci-serial-4x" > > Two error paths trivially converted from qerror_report_err() to > error_propagate(). > > Not covered in qtest as far as I can tell. > > * PATCH 07: "ich9-ahci" > > One pci_add_capability() replaced by pci_add_capability2(). The > former is a wrapper around the latter which additionally passes any > error to error_report(), then frees it. Straightforward conversion of > the error path to error_setg(). > > Not covered in qtest as far as I can tell. > > * PATCH 08: "cirrus-vga" > > One error path trivially converted from error_report() to > error_setg(). > > There's display-vga-test.c, which tests "-device cirrus-vga doesn't > explode right away". > > * PATCH 09: "qxl-vga", "qxl" > > Two error paths trivially converted from error_report() to > error_setg(). > > Not covered in qtest as far as I can tell. > > * PATCH 10: "kvm-pci-assign" > > Two error paths trivially converted from qerror_report_err() to > error_propagate(). > > Not covered in qtest as far as I can tell. > > I'm prepared to drop conversions you consider risky without test > coverage (although I have a hard time seeing risks, considering how > silly-simple my conversions are). But I'd really like to get the core > changes plus some examples in. This series passes all tests added by my "qtest: Generic PCI device test" series. That series covers realizing every PCI device, except for * blacklisted devices, and * devices not included in the x86 targets (because the test runs only for the x86 targets, just like all of $(check-qtest-pci-y)). Devices in the above list of not entirely trivial conversions that aren't covered: * "kvm-pci-assign" is blacklisted because it requires a suitable host device to pass through. * "qxl" is blacklisted because "-device qxl" crashes. However, "qxl-vga" executes the patched code as well, and *is* covered. Andreas, if you object to any of my conversions without additional test coverage, please enumerate the devices whose conversion you want me to drop.