From patchwork Mon Feb 17 22:24:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 321215 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3BD8C2C007C for ; Tue, 18 Feb 2014 10:28:46 +1100 (EST) Received: from localhost ([::1]:44582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFWoC-0006gm-6F for incoming@patchwork.ozlabs.org; Mon, 17 Feb 2014 17:37:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFWcv-0002Lu-Pk for qemu-devel@nongnu.org; Mon, 17 Feb 2014 17:25:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFWcn-00065S-Mb for qemu-devel@nongnu.org; Mon, 17 Feb 2014 17:25:25 -0500 Received: from cantor2.suse.de ([195.135.220.15]:41656 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFWcn-00065L-Ge for qemu-devel@nongnu.org; Mon, 17 Feb 2014 17:25:17 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1B123ACA0 for ; Mon, 17 Feb 2014 22:25:17 +0000 (UTC) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Mon, 17 Feb 2014 23:24:37 +0100 Message-Id: <1392675899-21210-28-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1392675899-21210-1-git-send-email-afaerber@suse.de> References: <1392675899-21210-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.135.220.15 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PULL v2 27/49] tests: Add tpci200 qtest X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Acked-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi Signed-off-by: Andreas Färber --- tests/Makefile | 3 +++ tests/tpci200-test.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 tests/tpci200-test.c diff --git a/tests/Makefile b/tests/Makefile index cfd0052..107300a 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -82,6 +82,8 @@ check-qtest-pci-y += tests/ne2000-test$(EXESUF) gcov-files-pci-y += hw/net/ne2000.c check-qtest-pci-y += $(check-qtest-virtio-y) gcov-files-pci-y += $(gcov-files-virtio-y) hw/virtio/virtio-pci.c +check-qtest-pci-y += tests/tpci200-test$(EXESUF) +gcov-files-pci-y += hw/char/tpci200.c check-qtest-i386-y = tests/endianness-test$(EXESUF) check-qtest-i386-y += tests/fdc-test$(EXESUF) @@ -228,6 +230,7 @@ tests/eepro100-test$(EXESUF): tests/eepro100-test.o tests/vmxnet3-test$(EXESUF): tests/vmxnet3-test.o tests/ne2000-test$(EXESUF): tests/ne2000-test.o tests/virtio-net-test$(EXESUF): tests/virtio-net-test.o +tests/tpci200-test$(EXESUF): tests/tpci200-test.o tests/qom-test$(EXESUF): tests/qom-test.o tests/blockdev-test$(EXESUF): tests/blockdev-test.o $(libqos-pc-obj-y) tests/qdev-monitor-test$(EXESUF): tests/qdev-monitor-test.o $(libqos-pc-obj-y) diff --git a/tests/tpci200-test.c b/tests/tpci200-test.c new file mode 100644 index 0000000..9ae0127 --- /dev/null +++ b/tests/tpci200-test.c @@ -0,0 +1,33 @@ +/* + * QTest testcase for tpci200 PCI-IndustryPack bridge + * + * Copyright (c) 2014 SUSE LINUX Products GmbH + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include +#include +#include "libqtest.h" +#include "qemu/osdep.h" + +/* Tests only initialization so far. TODO: Replace with functional tests */ +static void nop(void) +{ +} + +int main(int argc, char **argv) +{ + int ret; + + g_test_init(&argc, &argv, NULL); + qtest_add_func("/tpci200/nop", nop); + + qtest_start("-device tpci200"); + ret = g_test_run(); + + qtest_end(); + + return ret; +}