From nobody Sun Nov 9 22:28:29 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1551984078203884.7004175755051; Thu, 7 Mar 2019 10:41:18 -0800 (PST) Received: from localhost ([127.0.0.1]:57177 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1xxD-0003Qf-6C for importer@patchew.org; Thu, 07 Mar 2019 13:41:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1wrP-0003tb-Pf for qemu-devel@nongnu.org; Thu, 07 Mar 2019 12:31:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1wrL-0000AM-1y for qemu-devel@nongnu.org; Thu, 07 Mar 2019 12:31:11 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:38204) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h1wrK-00009s-Qb for qemu-devel@nongnu.org; Thu, 07 Mar 2019 12:31:06 -0500 Received: by mail-wr1-x435.google.com with SMTP id g12so18408222wrm.5 for ; Thu, 07 Mar 2019 09:31:06 -0800 (PST) Received: from 640k.localdomain ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id d206sm9979753wmc.11.2019.03.07.09.31.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Mar 2019 09:31:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=6wsn5TmlzOb8al0LVcwLC8VFpkAqZc3G03KfRJQLCJI=; b=OiKcqR0Rof4XxzhMmzvsO/xAzBc7X+mOiXOnWyJLwWEuddJpR9simN2Le4lrFiIjc6 mswt4bLSuQZBt9rdIiQb3c+UO+NRSG6KL8ZPwi90SDjKsqYhyN8+BY0nidfCjknTQfNh zIVfO66Y2cc9ljjq2s9fqWrm/Uf1Kop8XMiK6hvvtCu8MenNxR8G/UiU8krdNbaMetj6 YOoX8t+mPUABz+JCHpZ2gJokc+5l/SR8ca76blMSosJNlTnDx+VjktM6aMNKpNx9OkOV bLW5t57IVrBveZk3wqwkrLMz+zNxP3fR+80g0b3p5d9t03NyOpUbFqjQBe4CefYqj5sa aqxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=6wsn5TmlzOb8al0LVcwLC8VFpkAqZc3G03KfRJQLCJI=; b=bv+0MYOkvHCVKnA1WtEnMWW670gk1Ogfq6+BtsIWPX3ugoeBWAjhkxGyblEHDqU/D5 zHNJaaJPgmHCXh4kfS1ETxSVQnJZHCEjWaP89h98S+3hFn//hkvvGJ1vA9C8hqmRzlrB LE3h5/qF+jDrdrm1Ub2SWIlkI676sPYec8Zp+yrkEs17Rx1pmBEltDD4wcjrsJY+ZdbN ZVXF1zTgFMdXSGnyPZVa9Qkv3Lwa7BWO/57MYc1cd9WZclAYVv98tdMjBnE6Ql2mjdN+ B1OqSa1no6zs4whsz2PacjfwS6MZbMC3nYUJljMp0eCgttGQwoiv049Q5nGINix2jyH0 ARug== X-Gm-Message-State: APjAAAWPclwuGdlIrhjyngdaVlJziKVfVfMGk9hR1ZOI7vU8R9U1+JCJ KXnsZhDYi/PjZ5NvoQZz36aEG+3D X-Google-Smtp-Source: APXvYqznALAL/MKBhL1Uwbyak3Lclj0IyoKfZTm5LaiBQ3AY9gdd4Xlpp7hlei5FeThJ+6Z+zhqhsA== X-Received: by 2002:a5d:4412:: with SMTP id z18mr7616798wrq.111.1551979865474; Thu, 07 Mar 2019 09:31:05 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 7 Mar 2019 18:29:58 +0100 Message-Id: <1551979804-6060-52-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1551979804-6060-1-git-send-email-pbonzini@redhat.com> References: <1551979804-6060-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::435 Subject: [Qemu-devel] [PULL 51/57] qos-test: spapr-phb test node X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, Emanuele Giuseppe Esposito , lviver@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Emanuele Giuseppe Esposito Convert tests/spapr-phb-test to a qgraph test node, spapr-phb-test. This test adds another spapr-pci-host-bridge device in the ppc64/pseries machine Signed-off-by: Emanuele Giuseppe Esposito Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 3 +-- tests/spapr-phb-test.c | 32 ++++++++++++++------------------ 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 0442be8..f257b50 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -235,7 +235,6 @@ check-qtest-ppc-y +=3D tests/boot-serial-test$(EXESUF) check-qtest-ppc-$(CONFIG_M48T59) +=3D tests/m48t59-test$(EXESUF) =20 check-qtest-ppc64-y +=3D $(check-qtest-ppc-y) -check-qtest-ppc64-$(CONFIG_PSERIES) +=3D tests/spapr-phb-test$(EXESUF) check-qtest-ppc64-$(CONFIG_PSERIES) +=3D tests/device-plug-test$(EXESUF) check-qtest-ppc64-$(CONFIG_POWERNV) +=3D tests/pnv-xscom-test$(EXESUF) check-qtest-ppc64-y +=3D tests/migration-test$(EXESUF) @@ -755,6 +754,7 @@ qos-test-obj-y +=3D tests/nvme-test.o qos-test-obj-y +=3D tests/pci-test.o qos-test-obj-y +=3D tests/pcnet-test.o qos-test-obj-y +=3D tests/sdhci-test.o +qos-test-obj-y +=3D tests/spapr-phb-test.o qos-test-obj-$(CONFIG_VHOST_NET_USER) +=3D tests/vhost-user-test.o $(chard= ev-obj-y) $(test-io-obj-y) qos-test-obj-y +=3D tests/virtio-test.o qos-test-obj-$(CONFIG_VIRTFS) +=3D tests/virtio-9p-test.o @@ -777,7 +777,6 @@ tests/rtc-test$(EXESUF): tests/rtc-test.o tests/m48t59-test$(EXESUF): tests/m48t59-test.o tests/hexloader-test$(EXESUF): tests/hexloader-test.o tests/endianness-test$(EXESUF): tests/endianness-test.o -tests/spapr-phb-test$(EXESUF): tests/spapr-phb-test.o $(libqos-obj-y) tests/prom-env-test$(EXESUF): tests/prom-env-test.o $(libqos-obj-y) tests/rtas-test$(EXESUF): tests/rtas-test.o $(libqos-spapr-obj-y) tests/fdc-test$(EXESUF): tests/fdc-test.o diff --git a/tests/spapr-phb-test.c b/tests/spapr-phb-test.c index d3522ea..39b5766 100644 --- a/tests/spapr-phb-test.c +++ b/tests/spapr-phb-test.c @@ -7,29 +7,25 @@ * This work is licensed under the terms of the GNU GPL, version 2 or late= r. * See the COPYING file in the top-level directory. */ -#include "qemu/osdep.h" =20 +#include "qemu/osdep.h" #include "libqtest.h" +#include "libqos/qgraph.h" =20 -#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) +/* Tests only initialization so far. TODO: Replace with functional tests, + * for example by producing pci-bus. + */ +static void test_phb_device(void *obj, void *data, QGuestAllocator *alloc) { } =20 -int main(int argc, char **argv) +static void register_phb_test(void) { - 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=3D30"); - - ret =3D g_test_run(); - - qtest_end(); - - return ret; + qos_add_test("spapr-phb-test", "ppc64/pseries", + test_phb_device, &(QOSGraphTestOptions) { + .edge.before_cmd_line =3D "-device spapr-pci-host-bri= dge" + ",index=3D30", + }); } + +libqos_init(register_phb_test); --=20 1.8.3.1