From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vm61q-0004iU-BP for qemu-devel@nongnu.org; Thu, 28 Nov 2013 13:09:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vm61g-0002bU-9v for qemu-devel@nongnu.org; Thu, 28 Nov 2013 13:09:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vm61g-0002bM-0g for qemu-devel@nongnu.org; Thu, 28 Nov 2013 13:09:20 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rASI9Id6026827 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 28 Nov 2013 13:09:19 -0500 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-104.ams2.redhat.com [10.36.116.104]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rASI9HnH029081 for ; Thu, 28 Nov 2013 13:09:18 -0500 From: Laszlo Ersek Date: Thu, 28 Nov 2013 19:09:11 +0100 Message-Id: <1385662155-15212-1-git-send-email-lersek@redhat.com> Subject: [Qemu-devel] [PATCH v2 0/4] i440fx-test: check firmware visibility List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org v1 blurb: > Marcel's commit > > commit a53ae8e934cd54686875b5bcfc2f434244ee55d6 > Author: Marcel Apfelbaum > Date: Mon Sep 16 11:21:16 2013 +0300 > > hw/pci: partially handle pci master abort > > has exposed a conflict (an unintended, unordered overlap) between the > memory ranges "pci-hole" and "system.flash". When the boot firmware is > passed with -pflash, the "pci-hole" region hides it, and the guest > cannot execute the firmware. > > The test cases added by this series should help avoid regressions in > this area. > > On top of v1.7.0-rc0, the "/i440fx/firmware/bios" test passes even > without fixing the memory region conflict (consistently with the fact > that we never noticed the conflict in practice due to using -bios > exclusively). > > The "/i440fx/firmware/pflash" test catches the problem, unless one of > the discussed fixes are applied (ie. shrinking "pci-hole", or > explicitly ordering it under "system.flash"): > > $ tests/i440fx-test --verbose > [...] > GTest: run: /i440fx/firmware/bios > (MSG: qemu cmdline: -S -display none -bios /tmp/fw_blob_MA3Y5W) > GTest: result: OK > GTest: run: /i440fx/firmware/pflash > (MSG: qemu cmdline: -S -display none -pflash /tmp/fw_blob_ELLU5W) > ** > ERROR:tests/i440fx-test.c:368:test_i440fx_firmware: assertion failed > (buf[i] == (char unsigned)i): (0x000000ff == 0x00000000) > Aborted The test passes with v1.7.0. Changes in v2: - Rebased ("-display none" is the default now). - I looked into memory management prudence in qtest, and I can see that we don't care about leaking small objects at all. (See for example qpci_device_foreach(), which calls qpci_device_find() in a loop, and leaks the retval every time.) Laszlo Ersek (4): i440fx-test: qtest_start() should be paired with qtest_end() i440fx-test: give each GTest case its own qtest i440fx-test: generate temporary firmware blob i440fx-test: verify firmware under 4G and 1M, both -bios and -pflash tests/i440fx-test.c | 169 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 152 insertions(+), 17 deletions(-) -- 1.8.3.1