From nobody Fri Nov 14 12:16:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 ARC-Seal: i=1; a=rsa-sha256; t=1587712395; cv=none; d=zohomail.com; s=zohoarc; b=SpRAvrWKHotagOxoGMFRniPxb1XoPHorsaJMFxz1R1MiLXdfZx0y3FmZ1Msm21V/945kH2oesSbs3mf/wUDPOsF+KvPZgCIkuwyc0SMFQEmPA9PQRyak35BI/BgcTwrJwjakHuWDsS3CjRGoDzQuYPJKRBpU82+GchKYQaelHSo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587712395; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=80XR/xJdkiaSsUBlAUPNI1WZu7i2xH3uYzIz8nK16JE=; b=lfBOjPcsnTiZnTNspfSQ2aNwPP3rWNCgkliVWE03gum4SXFWDT3Fyfqwg9YqvK11mWDcr2eU4nqZ8fgoy6RTLPIpGnpepbODXAieUXkTLDyNEt+oNae4QVI+iltlESYMYv7rA7ay7yDW7Xe696CzjPM1N/MmRPZZu3eImlWsvbo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1587712395981515.8017269775232; Fri, 24 Apr 2020 00:13:15 -0700 (PDT) Received: from localhost ([::1]:52826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRsWQ-0008Pc-Bi for importer@patchew.org; Fri, 24 Apr 2020 03:13:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41268) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRsV9-0006l4-D9 for qemu-devel@nongnu.org; Fri, 24 Apr 2020 03:11:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRsV8-0001pO-OH for qemu-devel@nongnu.org; Fri, 24 Apr 2020 03:11:55 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:21233 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jRsV8-0001nG-Aa for qemu-devel@nongnu.org; Fri, 24 Apr 2020 03:11:54 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-376-xuRwQdfzOEORcbTBR9QT0g-1; Fri, 24 Apr 2020 03:11:51 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 44FF3835B42; Fri, 24 Apr 2020 07:11:50 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-113-6.ams2.redhat.com [10.36.113.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 934DC60300; Fri, 24 Apr 2020 07:11:44 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 06DED11358BD; Fri, 24 Apr 2020 09:11:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587712313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=80XR/xJdkiaSsUBlAUPNI1WZu7i2xH3uYzIz8nK16JE=; b=DDJtsw69uiP0kes9IFnkBkYzLHVJUOKD+BpsY7TrOEPJhFwGPLOt+5tq5xj2WEsE4zJJ4n ofQIaiEEC3NM8kp+VdNuUfUIft6JS0Aibjt1TejU8TzavbPA7rYPSrx7iEmfvfGB82HE7e avgijx+6K3Xs+rR7PrEV55SALjGlUmY= X-MC-Unique: xuRwQdfzOEORcbTBR9QT0g-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 1/3] Makefile: Drop unused, broken target recurse-fuzz Date: Fri, 24 Apr 2020 09:11:40 +0200 Message-Id: <20200424071142.3525-2-armbru@redhat.com> In-Reply-To: <20200424071142.3525-1-armbru@redhat.com> References: <20200424071142.3525-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=205.139.110.61; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/24 02:57:59 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, thuth@redhat.com, alxndr@bu.edu, bsd@redhat.com, stefanha@redhat.com, pbonzini@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-Type: text/plain; charset="utf-8" Target recurse-fuzz depends on pc-bios/optionrom/fuzz, which can't be made. It's not used anywhere. Added in commit c621dc3e01c, looks like cargo cult. Delete. Signed-off-by: Markus Armbruster Reviewed-by: Alexander Bulekov --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 8a9113e666..34275f57c9 100644 --- a/Makefile +++ b/Makefile @@ -582,7 +582,6 @@ $(ROM_DIRS_RULES): =20 .PHONY: recurse-all recurse-clean recurse-install recurse-all: $(addsuffix /all, $(TARGET_DIRS) $(ROM_DIRS)) -recurse-fuzz: $(addsuffix /fuzz, $(TARGET_DIRS) $(ROM_DIRS)) recurse-clean: $(addsuffix /clean, $(TARGET_DIRS) $(ROM_DIRS)) recurse-install: $(addsuffix /install, $(TARGET_DIRS)) $(addsuffix /install, $(TARGET_DIRS)): all --=20 2.21.1 From nobody Fri Nov 14 12:16:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 ARC-Seal: i=1; a=rsa-sha256; t=1587712399; cv=none; d=zohomail.com; s=zohoarc; b=Y7QV+9Ynv0WVJw0dAlR18+mMfHWhCH6qXVwPNfUR5qDN5IdY5V8IIGZo8qf6Jq5+rVPv0+T3Csr6s8RkjFIosWzZaXHb7O6X/ss8qBimRyBlaVqH8TKMKbDI+L09sLbd8gi/orGO3qj1U1MpMqfuS1q1qpe7/faAaNlLRnsQsHg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587712399; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=974MMkGYvfFqQniI/YlNLM19wESA6cviVRCnYTEjgg8=; b=Iok5fm5vjSMf/jouUwQWtt2dSbmNS4d+6lU25tZoSgmPdHVbXmNNoMM0IRNhrk2nGqqYNJJ0WImUq13pgmSmVK6PmobzyYvbnILz80oc4+3S1Yt7kUioOHnlxN1nAkFy7GVggW1dPYfObsPvpkl8DJ1W+Wj5gEQLBRfq0a4nAvg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1587712399210610.7052272965896; Fri, 24 Apr 2020 00:13:19 -0700 (PDT) Received: from localhost ([::1]:52830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRsWT-0008RU-Rt for importer@patchew.org; Fri, 24 Apr 2020 03:13:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41282) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRsVA-0006l7-5z for qemu-devel@nongnu.org; Fri, 24 Apr 2020 03:11:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRsV9-0001tH-EN for qemu-devel@nongnu.org; Fri, 24 Apr 2020 03:11:55 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:26800 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jRsV9-0001nV-0r for qemu-devel@nongnu.org; Fri, 24 Apr 2020 03:11:55 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-278-7o0LdZb6PBGLkbLFV-j_wg-1; Fri, 24 Apr 2020 03:11:51 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9BBA28005B7; Fri, 24 Apr 2020 07:11:50 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-113-6.ams2.redhat.com [10.36.113.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 90FC25C1C8; Fri, 24 Apr 2020 07:11:44 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 09FFC11358BE; Fri, 24 Apr 2020 09:11:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587712313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=974MMkGYvfFqQniI/YlNLM19wESA6cviVRCnYTEjgg8=; b=BBhBbPd61+qF+wq8ejuaLMcAHwI8SsIWEYPMfT1j/tIv67Yby68ucZutRJU2ZtJIZ+3H8n qWe/o9RXQP0jTT/vhghpnjPnAOUFAclzcbmkysHCr5iEEkvf12NREKJSQsKW6QV87LQind TyNHzAIi18KGFZ1dJQgs5Qzoxom9bYU= X-MC-Unique: 7o0LdZb6PBGLkbLFV-j_wg-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 2/3] fuzz: Simplify how we compute available machines and types Date: Fri, 24 Apr 2020 09:11:41 +0200 Message-Id: <20200424071142.3525-3-armbru@redhat.com> In-Reply-To: <20200424071142.3525-1-armbru@redhat.com> References: <20200424071142.3525-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=205.139.110.61; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/24 02:57:59 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, thuth@redhat.com, alxndr@bu.edu, bsd@redhat.com, stefanha@redhat.com, pbonzini@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-Type: text/plain; charset="utf-8" apply_to_qlist(), apply_to_node() work with QObjects. This is designed for use by tests/qtest/qos-test.c, which gets the data in that form via QMP. Goes back to commit fc281c8020 "tests: qgraph API for the qtest driver framework". Commit 275ab39d86 "fuzz: add support for qos-assisted fuzz targets" added another user: qtest/fuzz/qos_fuzz.c. To get the data as QObjects, it uses qmp_marshal_query_machines() and qmp_marshal_qom_list_types(). All this code is rather cumbersome. Switch to working with generated QAPI types instead: * Replace apply_to_qlist() & friends by machines_apply_to_node() and types_apply_to_node(). * Have qos_fuzz.c use qmp_query_machines() and qmp_qom_list_types() instead. * Have qos_test.c convert from QObject to the QAPI types. Signed-off-by: Markus Armbruster Reviewed-by: Alexander Bulekov Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/qtest/libqos/qos_external.h | 8 +++- tests/qtest/fuzz/qos_fuzz.c | 34 ++++----------- tests/qtest/libqos/qos_external.c | 70 +++++++++++-------------------- tests/qtest/qos-test.c | 29 +++++++++---- 4 files changed, 59 insertions(+), 82 deletions(-) diff --git a/tests/qtest/libqos/qos_external.h b/tests/qtest/libqos/qos_ext= ernal.h index 7b44930c55..f63388cb30 100644 --- a/tests/qtest/libqos/qos_external.h +++ b/tests/qtest/libqos/qos_external.h @@ -20,8 +20,12 @@ #define QOS_EXTERNAL_H #include "libqos/qgraph.h" =20 -void apply_to_node(const char *name, bool is_machine, bool is_abstract); -void apply_to_qlist(QList *list, bool is_machine); +#include "libqos/malloc.h" +#include "qapi/qapi-types-machine.h" +#include "qapi/qapi-types-qom.h" + +void machines_apply_to_node(MachineInfoList *mach_info); +void types_apply_to_node(ObjectTypeInfoList *type_info); QGuestAllocator *get_machine_allocator(QOSGraphObject *obj); void *allocate_objects(QTestState *qts, char **path, QGuestAllocator **p_a= lloc); =20 diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c index af28c92866..87eadb0889 100644 --- a/tests/qtest/fuzz/qos_fuzz.c +++ b/tests/qtest/fuzz/qos_fuzz.c @@ -36,7 +36,6 @@ =20 #include "qapi/qapi-commands-machine.h" #include "qapi/qapi-commands-qom.h" -#include "qapi/qmp/qlist.h" =20 =20 void *fuzz_qos_obj; @@ -45,34 +44,19 @@ QGuestAllocator *fuzz_qos_alloc; static const char *fuzz_target_name; static char **fuzz_path_vec; =20 -/* - * Replaced the qmp commands with direct qmp_marshal calls. - * Probably there is a better way to do this - */ static void qos_set_machines_devices_available(void) { - QDict *req =3D qdict_new(); - QObject *response; - QDict *args =3D qdict_new(); - QList *lst; + MachineInfoList *mach_info; + ObjectTypeInfoList *type_info; =20 - qmp_marshal_query_machines(NULL, &response, &error_abort); - lst =3D qobject_to(QList, response); - apply_to_qlist(lst, true); + mach_info =3D qmp_query_machines(&error_abort); + machines_apply_to_node(mach_info); + qapi_free_MachineInfoList(mach_info); =20 - qobject_unref(response); - - - qdict_put_str(req, "execute", "qom-list-types"); - qdict_put_str(args, "implements", "device"); - qdict_put_bool(args, "abstract", true); - qdict_put_obj(req, "arguments", (QObject *) args); - - qmp_marshal_qom_list_types(args, &response, &error_abort); - lst =3D qobject_to(QList, response); - apply_to_qlist(lst, false); - qobject_unref(response); - qobject_unref(req); + type_info =3D qmp_qom_list_types(true, "device", true, true, + &error_abort); + types_apply_to_node(type_info); + qapi_free_ObjectTypeInfoList(type_info); } =20 static char **current_path; diff --git a/tests/qtest/libqos/qos_external.c b/tests/qtest/libqos/qos_ext= ernal.c index 398556dde0..c707dac3b9 100644 --- a/tests/qtest/libqos/qos_external.c +++ b/tests/qtest/libqos/qos_external.c @@ -29,62 +29,40 @@ #include "libqos/qgraph_internal.h" #include "libqos/qos_external.h" =20 - - -void apply_to_node(const char *name, bool is_machine, bool is_abstract) +static void machine_apply_to_node(const char *name) { - char *machine_name =3D NULL; - if (is_machine) { - const char *arch =3D qtest_get_arch(); - machine_name =3D g_strconcat(arch, "/", name, NULL); - name =3D machine_name; + char *machine_name =3D g_strconcat(qtest_get_arch(), "/", name, NULL); + + qos_graph_node_set_availability(machine_name, true); + g_free(machine_name); +} + +void machines_apply_to_node(MachineInfoList *mach_info) +{ + MachineInfoList *tail; + + for (tail =3D mach_info; tail; tail =3D tail->next) { + machine_apply_to_node(tail->value->name); + if (tail->value->alias) { + machine_apply_to_node(tail->value->alias); + } } +} + +static void type_apply_to_node(const char *name, bool is_abstract) +{ qos_graph_node_set_availability(name, true); if (is_abstract) { qos_delete_cmd_line(name); } - g_free(machine_name); } =20 -/** - * apply_to_qlist(): using QMP queries QEMU for a list of - * machines and devices available, and sets the respective node - * as true. If a node is found, also all its produced and contained - * child are marked available. - * - * See qos_graph_node_set_availability() for more info - */ -void apply_to_qlist(QList *list, bool is_machine) +void types_apply_to_node(ObjectTypeInfoList *type_info) { - const QListEntry *p; - const char *name; - bool abstract; - QDict *minfo; - QObject *qobj; - QString *qstr; - QBool *qbool; + ObjectTypeInfoList *tail; =20 - for (p =3D qlist_first(list); p; p =3D qlist_next(p)) { - minfo =3D qobject_to(QDict, qlist_entry_obj(p)); - qobj =3D qdict_get(minfo, "name"); - qstr =3D qobject_to(QString, qobj); - name =3D qstring_get_str(qstr); - - qobj =3D qdict_get(minfo, "abstract"); - if (qobj) { - qbool =3D qobject_to(QBool, qobj); - abstract =3D qbool_get_bool(qbool); - } else { - abstract =3D false; - } - - apply_to_node(name, is_machine, abstract); - qobj =3D qdict_get(minfo, "alias"); - if (qobj) { - qstr =3D qobject_to(QString, qobj); - name =3D qstring_get_str(qstr); - apply_to_node(name, is_machine, abstract); - } + for (tail =3D type_info; tail; tail =3D tail->next) { + type_apply_to_node(tail->value->name, tail->value->abstract); } } =20 diff --git a/tests/qtest/qos-test.c b/tests/qtest/qos-test.c index ad193f43a5..3062a13557 100644 --- a/tests/qtest/qos-test.c +++ b/tests/qtest/qos-test.c @@ -19,11 +19,12 @@ #include "qemu/osdep.h" #include #include "libqtest-single.h" +#include "qapi/error.h" #include "qapi/qmp/qdict.h" -#include "qapi/qmp/qbool.h" -#include "qapi/qmp/qstring.h" #include "qemu/module.h" -#include "qapi/qmp/qlist.h" +#include "qapi/qobject-input-visitor.h" +#include "qapi/qapi-visit-machine.h" +#include "qapi/qapi-visit-qom.h" #include "libqos/malloc.h" #include "libqos/qgraph.h" #include "libqos/qgraph_internal.h" @@ -51,13 +52,20 @@ static void qos_set_machines_devices_available(void) { QDict *response; QDict *args =3D qdict_new(); - QList *list; + QObject *ret; + Visitor *v; + MachineInfoList *mach_info; + ObjectTypeInfoList *type_info; =20 qtest_start("-machine none"); response =3D qmp("{ 'execute': 'query-machines' }"); - list =3D qdict_get_qlist(response, "return"); + ret =3D qdict_get(response, "return"); =20 - apply_to_qlist(list, true); + v =3D qobject_input_visitor_new(ret); + visit_type_MachineInfoList(v, NULL, &mach_info, &error_abort); + visit_free(v); + machines_apply_to_node(mach_info); + qapi_free_MachineInfoList(mach_info); =20 qobject_unref(response); =20 @@ -66,10 +74,13 @@ static void qos_set_machines_devices_available(void) =20 response =3D qmp("{'execute': 'qom-list-types'," " 'arguments': %p }", args); - g_assert(qdict_haskey(response, "return")); - list =3D qdict_get_qlist(response, "return"); + ret =3D qdict_get(response, "return"); =20 - apply_to_qlist(list, false); + v =3D qobject_input_visitor_new(ret); + visit_type_ObjectTypeInfoList(v, NULL, &type_info, &error_abort); + visit_free(v); + types_apply_to_node(type_info); + qapi_free_ObjectTypeInfoList(type_info); =20 qtest_end(); qobject_unref(response); --=20 2.21.1 From nobody Fri Nov 14 12:16:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 ARC-Seal: i=1; a=rsa-sha256; t=1587712479; cv=none; d=zohomail.com; s=zohoarc; b=JTC1P3j0AzhfCrj0dZE12yvUi3XOqEJQntpgAUFGJGR6BEIJIQ7Snxxumqb7rG48+WIh7WV66NfWqUoaKcgmn60zTDQMy5933HLUPqUZFfgU2ocNwFhthk9OQXUd4rj8Ltmf7OxqQyxoIpGwuZR2xq9Qozi/0M/e8OhvLAgAvA4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587712479; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=gQgMBQRmuraJ/Icikr6Y+eYuQvvDnaok6SjPFKfQgiE=; b=FFzyC0qLsw+/aNP76jteO2U+rwcH9OwxkvVgxyArlcDXPxRFhz19RgVW6rvcVf5b8E6EGDEru2paOqIUP8+RA5xIzGi/lwQ21hpCzZTNuepTjkoeEmjsFrKplld64KTB3YuOwSKQT9bGboqbEGXu3++iGtdFmmqQanC8VXALOQ8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1587712479126727.407996478793; Fri, 24 Apr 2020 00:14:39 -0700 (PDT) Received: from localhost ([::1]:52968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRsXl-0002jl-PJ for importer@patchew.org; Fri, 24 Apr 2020 03:14:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41300) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRsVA-0006lB-V6 for qemu-devel@nongnu.org; Fri, 24 Apr 2020 03:11:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRsV9-0001uQ-Mo for qemu-devel@nongnu.org; Fri, 24 Apr 2020 03:11:56 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:42243 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jRsV9-0001pT-AL for qemu-devel@nongnu.org; Fri, 24 Apr 2020 03:11:55 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-401-3WFO5xvHMGSVgbDhrpqfvg-1; Fri, 24 Apr 2020 03:11:50 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EFF64800580; Fri, 24 Apr 2020 07:11:49 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-113-6.ams2.redhat.com [10.36.113.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 96218100238A; Fri, 24 Apr 2020 07:11:44 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 0D7A011358BF; Fri, 24 Apr 2020 09:11:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587712314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gQgMBQRmuraJ/Icikr6Y+eYuQvvDnaok6SjPFKfQgiE=; b=SgVpOMfRwkzJFt4JqN5wIMHWrjBiCKDMJkbzwWNhukyGqqzIajkKUwxx4KICYVwDBDVslk qbLkO2/28Fy1Rpaux3lr0jRBZamvHMhL+qzAU7CVRNnVBlP/BDuj3dQz+SIs0OxytsQmm+ NjAcqDNbc2KsAkONr1Gf2dVOW4waFy0= X-MC-Unique: 3WFO5xvHMGSVgbDhrpqfvg-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 3/3] libqos: Give get_machine_allocator() internal linkage Date: Fri, 24 Apr 2020 09:11:42 +0200 Message-Id: <20200424071142.3525-4-armbru@redhat.com> In-Reply-To: <20200424071142.3525-1-armbru@redhat.com> References: <20200424071142.3525-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=207.211.31.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/24 03:07:34 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, thuth@redhat.com, alxndr@bu.edu, bsd@redhat.com, stefanha@redhat.com, pbonzini@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-Type: text/plain; charset="utf-8" Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/qtest/libqos/qos_external.h | 2 -- tests/qtest/libqos/qos_external.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/qtest/libqos/qos_external.h b/tests/qtest/libqos/qos_ext= ernal.h index f63388cb30..72d7f91707 100644 --- a/tests/qtest/libqos/qos_external.h +++ b/tests/qtest/libqos/qos_external.h @@ -18,7 +18,6 @@ =20 #ifndef QOS_EXTERNAL_H #define QOS_EXTERNAL_H -#include "libqos/qgraph.h" =20 #include "libqos/malloc.h" #include "qapi/qapi-types-machine.h" @@ -26,7 +25,6 @@ =20 void machines_apply_to_node(MachineInfoList *mach_info); void types_apply_to_node(ObjectTypeInfoList *type_info); -QGuestAllocator *get_machine_allocator(QOSGraphObject *obj); void *allocate_objects(QTestState *qts, char **path, QGuestAllocator **p_a= lloc); =20 #endif diff --git a/tests/qtest/libqos/qos_external.c b/tests/qtest/libqos/qos_ext= ernal.c index c707dac3b9..9f5180e18d 100644 --- a/tests/qtest/libqos/qos_external.c +++ b/tests/qtest/libqos/qos_external.c @@ -66,7 +66,7 @@ void types_apply_to_node(ObjectTypeInfoList *type_info) } } =20 -QGuestAllocator *get_machine_allocator(QOSGraphObject *obj) +static QGuestAllocator *get_machine_allocator(QOSGraphObject *obj) { return obj->get_driver(obj, "memory"); } --=20 2.21.1