From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNntP-0001pr-7O for qemu-devel@nongnu.org; Wed, 12 Mar 2014 14:28:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNntG-00064B-CU for qemu-devel@nongnu.org; Wed, 12 Mar 2014 14:28:39 -0400 Received: from cantor2.suse.de ([195.135.220.15]:43616 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNntG-00062N-6h for qemu-devel@nongnu.org; Wed, 12 Mar 2014 14:28:30 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 12 Mar 2014 19:28:27 +0100 Message-Id: <1394648907-20096-16-git-send-email-afaerber@suse.de> In-Reply-To: <1394648907-20096-1-git-send-email-afaerber@suse.de> References: <1394648907-20096-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH qom-next v3 15/15] tests: Add spapr-pci-host-bridge qtest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , =?UTF-8?q?Andreas=20F=C3=A4rber?= From: Alexey Kardashevskiy This adds a test whether sPAPR PHB can be added via the command line. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Andreas F=C3=A4rber --- tests/Makefile | 3 +++ tests/spapr-phb-test.c | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 tests/spapr-phb-test.c diff --git a/tests/Makefile b/tests/Makefile index bf6c0a9..8887512 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -155,6 +155,8 @@ check-qtest-arm-y =3D tests/tmp105-test$(EXESUF) gcov-files-arm-y +=3D hw/misc/tmp105.c check-qtest-ppc-y +=3D tests/boot-order-test$(EXESUF) check-qtest-ppc64-y +=3D tests/boot-order-test$(EXESUF) +check-qtest-ppc64-y +=3D tests/spapr-phb-test$(EXESUF) +gcov-files-ppc64-y +=3D ppc64-softmmu/hw/ppc/spapr_pci.c check-qtest-microblazeel-y =3D $(check-qtest-microblaze-y) check-qtest-xtensaeb-y =3D $(check-qtest-xtensa-y) =20 @@ -251,6 +253,7 @@ libqos-omap-obj-y =3D $(libqos-obj-y) tests/libqos/i2= c-omap.o tests/rtc-test$(EXESUF): tests/rtc-test.o tests/m48t59-test$(EXESUF): tests/m48t59-test.o tests/endianness-test$(EXESUF): tests/endianness-test.o +tests/spapr-phb-test$(EXESUF): tests/spapr-phb-test.o $(libqos-obj-y) tests/fdc-test$(EXESUF): tests/fdc-test.o tests/ide-test$(EXESUF): tests/ide-test.o $(libqos-pc-obj-y) tests/hd-geo-test$(EXESUF): tests/hd-geo-test.o diff --git a/tests/spapr-phb-test.c b/tests/spapr-phb-test.c new file mode 100644 index 0000000..b629de4 --- /dev/null +++ b/tests/spapr-phb-test.c @@ -0,0 +1,35 @@ +/* + * QTest testcase for SPAPR PHB + * + * Authors: + * Alexey Kardashevskiy + * + * This work is licensed under the terms of the GNU GPL, version 2 or la= ter. + * See the COPYING file in the top-level directory. + */ +#include + +#include "libqtest.h" + +#define TYPE_SPAPR_PCI_HOST_BRIDGE "spapr-pci-host-bridge" + +/* Tests only initialization so far. TODO: Replace with functional tests= */ +static void test_phb_device(void) +{ +} + +int main(int argc, char **argv) +{ + int ret; + + g_test_init(&argc, &argv, NULL); + qtest_add_func("/spapr-phb/device", test_phb_device); + + qtest_start("-device " TYPE_SPAPR_PCI_HOST_BRIDGE ",index=3D100"); + + ret =3D g_test_run(); + + qtest_end(); + + return ret; +} --=20 1.8.4.5