From nobody Sat Nov 15 07:40:52 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1753451588; cv=none; d=zohomail.com; s=zohoarc; b=KoghPJG3goIsMzZserDv1GNO+0HDvflXaW+En53JKizm0FJW+VY29yJySIV/nEVJo5B//9ZJVQfRBbqALcirFvEmgkhZdQYuygeGw31DdvdFwjJgkIi56jJ21VSH2LJAsEwrI4CZDj0m4XHKrNReiFM73qgHIgbuvghYAJ7fmYw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753451588; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cvSpiQ1SwZ1haFCTaBCprWzpxf+GZM90JxdKYWEWzrc=; b=Yek8+LBXw8MxSGVPnKM8ThHnABHFLO/BO9OBVRtiCGmae5XPNuF00MqNg3s2Wy53/HBen0G0r3pkYk+T8VLelUSH3a6y93p8o0VK2vVFWoErpbpTjVTGhZkXpTlsz2CvCKEwx9QVpiFj4UgW+riKtyq0JpCkNtZPd+w3NFTUi1U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1753451588539166.91568438850277; Fri, 25 Jul 2025 06:53:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ufIqs-0003Jh-0S; Fri, 25 Jul 2025 09:52:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ufIos-0008PL-Js for qemu-devel@nongnu.org; Fri, 25 Jul 2025 09:50:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ufIoq-0005Ze-AN for qemu-devel@nongnu.org; Fri, 25 Jul 2025 09:50:42 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-358-DB_ygEkrMF6zvSxRkm0JyQ-1; Fri, 25 Jul 2025 09:50:37 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DE217195608E; Fri, 25 Jul 2025 13:50:36 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.14]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7F7C618003FC; Fri, 25 Jul 2025 13:50:36 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 1A23121E6924; Fri, 25 Jul 2025 15:50:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1753451439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cvSpiQ1SwZ1haFCTaBCprWzpxf+GZM90JxdKYWEWzrc=; b=ENJJ1BDrGqVLSW71ugnI+jXm0i4UFPe2rflHXbVjEazLG49omJ6J1uMbKzrAOLJB2QDiFL hgX/o/7UPsg+pv7PzNh+DV3mZys1BPOXdJazNJl2bEfqU/sdYghDWxIL+9CnUtzfWKEnuJ EorbWtAyEH9yjIvb8MNM7d/TOxxHaSc= X-MC-Unique: DB_ygEkrMF6zvSxRkm0JyQ-1 X-Mimecast-MFC-AGG-ID: DB_ygEkrMF6zvSxRkm0JyQ_1753451437 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, berrange@redhat.com, eduardo@habkost.net, steven.sistare@oracle.com Subject: [PATCH 1/5] qtest/qom-test: Plug memory leak with -p Date: Fri, 25 Jul 2025 15:50:30 +0200 Message-ID: <20250725135034.2280477-2-armbru@redhat.com> In-Reply-To: <20250725135034.2280477-1-armbru@redhat.com> References: <20250725135034.2280477-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.175, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1753451589641116600 Content-Type: text/plain; charset="utf-8" The machine name g_strdup()ed by add_machine_test_case() is freed by test_machine(). Since the former runs for all machines, whereas the latter runs only for the selected test case's machines, this leaks the names of machines not selected, if any. Harmless, but fix it anyway: there is no need to dup in the first place, so don't. Signed-off-by: Markus Armbruster --- tests/qtest/qom-test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/qtest/qom-test.c b/tests/qtest/qom-test.c index 4ade1c728c..cb5dbfe329 100644 --- a/tests/qtest/qom-test.c +++ b/tests/qtest/qom-test.c @@ -220,7 +220,6 @@ static void test_machine(gconstpointer data) qobject_unref(response); =20 qtest_quit(qts); - g_free((void *)machine); } =20 static void add_machine_test_case(const char *mname) @@ -228,7 +227,7 @@ static void add_machine_test_case(const char *mname) char *path; =20 path =3D g_strdup_printf("qom/%s", mname); - qtest_add_data_func(path, g_strdup(mname), test_machine); + qtest_add_data_func(path, mname, test_machine); g_free(path); } =20 --=20 2.49.0 From nobody Sat Nov 15 07:40:52 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1753451556; cv=none; d=zohomail.com; s=zohoarc; b=LCacWEBkv7fAOGUH0ZNF8aQeTWxFP+7azb7s/ZjN0diH6CPRtLo8EWE7lNf4SLyRh8tTwyChxT9puUTZ+l+GxTfObZ+cgv09q++26N6TeRWR5APBXLSBBYTG+FWF5ZdZxw7qqCyVhSWkAeYpWkslLlaKyX+qYBD/kpm37TZZuWI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753451556; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=rnF8HW0U51J9PRsWKZGD7+44XDXZDNKdRUl1c4hdtE4=; b=VLHrgdcttIG8/tiNkq6ZkF9tUfxfNRS7w558qSQCXGDtBbYqUez+fw8I4DES2GyhrczIzYUq4kHnAoWaC4m+MzzYGBLiz0xcK41QHtkRa0mwndDPHp1YAP+mi0i8AXyI7eDGUTjdsuOoHTvBt3PjqTEs1vNvGT6ax8LMQlVXZa0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1753451556743216.6388295953367; Fri, 25 Jul 2025 06:52:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ufIpr-0001i0-Ns; Fri, 25 Jul 2025 09:51:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ufIos-0008OA-7e for qemu-devel@nongnu.org; Fri, 25 Jul 2025 09:50:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ufIoq-0005Zg-A8 for qemu-devel@nongnu.org; Fri, 25 Jul 2025 09:50:41 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-680-sGqxE6gGOT2vEk8O0EvbFQ-1; Fri, 25 Jul 2025 09:50:38 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2ABDE1800446; Fri, 25 Jul 2025 13:50:37 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.14]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B290219560AA; Fri, 25 Jul 2025 13:50:36 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 1EA1E21E6925; Fri, 25 Jul 2025 15:50:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1753451439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rnF8HW0U51J9PRsWKZGD7+44XDXZDNKdRUl1c4hdtE4=; b=JB+0+1gRDZnqN/2nQGr6YoxecxEzEI8NYGl69Qonvl/ug4CUpVAL74yuDjB5lw77XDJc02 RO/EClU5H7Fs2eLT2LWHlRZE233ic78yDWSzNzTWpjKdKUIrFyVab0l13uYmvZ1nO3sGLd XEdURG+9IstIwghdtjBH0SaE2llmesw= X-MC-Unique: sGqxE6gGOT2vEk8O0EvbFQ-1 X-Mimecast-MFC-AGG-ID: sGqxE6gGOT2vEk8O0EvbFQ_1753451437 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, berrange@redhat.com, eduardo@habkost.net, steven.sistare@oracle.com Subject: [PATCH 2/5] qtest/qom-test: Shallow testing of qom-list / qom-get Date: Fri, 25 Jul 2025 15:50:31 +0200 Message-ID: <20250725135034.2280477-3-armbru@redhat.com> In-Reply-To: <20250725135034.2280477-1-armbru@redhat.com> References: <20250725135034.2280477-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.175, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1753451559247116600 Content-Type: text/plain; charset="utf-8" This test traverses the QOM sub-tree rooted at /machine with a combination of qom-list and qom-get. In my x86_64 testing, it runs almost 12000 QMP commands in 34 seconds. With -m slow, we test more machines, and it takes almost 84000 commands in almost four minutes. Since commit 3dd93992ffb (tests/qtest/qom-test: unit test for qom-list-get), the test traverses this tree a second time, with qom-list-get. In my x86_64 testing, this takes some 200 QMP commands and around two seconds, and some 1100 in just under 12s with -m slow. Traversing the entire tree is useful, because it exercise the QOM property getters. Traversing it twice not so much. Make the qom-list / qom-get test shallow unless -m slow is given: don't recurse. Cuts the number of commands to around 600, and run time to under 5s for me. Signed-off-by: Markus Armbruster Reviewed-by: Steve Sistare --- tests/qtest/qom-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/qom-test.c b/tests/qtest/qom-test.c index cb5dbfe329..40bdc3639f 100644 --- a/tests/qtest/qom-test.c +++ b/tests/qtest/qom-test.c @@ -180,7 +180,7 @@ static void test_properties(QTestState *qts, const char= *path, bool recurse) links =3D g_slist_delete_link(links, links); } while (children) { - test_properties(qts, children->data, true); + test_properties(qts, children->data, g_test_slow()); g_free(children->data); children =3D g_slist_delete_link(children, children); } --=20 2.49.0 From nobody Sat Nov 15 07:40:52 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1753451667; cv=none; d=zohomail.com; s=zohoarc; b=aNQ+Cm68FaFSZmDnIq/f8yBIbdUvevGpal4n5EXWNJpCeIAO1GPtW4CqrUpaIymDUk07s0+CA1y5rYk+2CvmRzhFeVWFzRDBsSbg0XNeu4mEE/oKPh8713D8yNGTxwPcNjaC7uOxSjspYM3e1kJeIFSLVj1OaNZl6Ryfj9vW6+Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753451667; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=D4POndAMoFNWfMRjRqyc8AFnihTJrFXzP2n4vSATUpM=; b=SaHREr4gIFNaCIFXxMJLuCDSjbRdXD+QrGNeFdkodY4RrqtZgx2Rx3M+POhc5l2GeEHULyhGq3Zo4x80sfq/B9oly1qlFSEp7VGcrlvU3FKzh80OjEF+iBO29+vf+yPlQZWXMpSCur9y1wSt/OTTfwWGxsafuSKlcOl+1OJntjE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1753451667006401.79494187487546; Fri, 25 Jul 2025 06:54:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ufIsP-0006P7-GR; Fri, 25 Jul 2025 09:54:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ufIou-0008WL-Ho for qemu-devel@nongnu.org; Fri, 25 Jul 2025 09:50:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ufIos-0005ai-PD for qemu-devel@nongnu.org; Fri, 25 Jul 2025 09:50:44 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-661-7szoZeM0Mlem5ao7K-ZV8Q-1; Fri, 25 Jul 2025 09:50:38 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 06A831944CC6; Fri, 25 Jul 2025 13:50:37 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.14]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 95418300018D; Fri, 25 Jul 2025 13:50:36 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 2298A21E6935; Fri, 25 Jul 2025 15:50:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1753451441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D4POndAMoFNWfMRjRqyc8AFnihTJrFXzP2n4vSATUpM=; b=H4tSCQ6dOE0Tj0kGsba2LCiZCfZ+rhsCytSOLZZ2UiXVRDgAJN6Th4RlWovSodJDS8offn 9qHoTi3Qeh10AUdkbFsuCfFY9cVOL3OX+ladmnOVIdGqTRdq3Gqm90aBfquYM85MUjfSET ZOA/wwXgEnfJg75z8si8YE25NBl9RLg= X-MC-Unique: 7szoZeM0Mlem5ao7K-ZV8Q-1 X-Mimecast-MFC-AGG-ID: 7szoZeM0Mlem5ao7K-ZV8Q_1753451437 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, berrange@redhat.com, eduardo@habkost.net, steven.sistare@oracle.com Subject: [PATCH 3/5] qtest/qom-test: Traverse entire QOM tree Date: Fri, 25 Jul 2025 15:50:32 +0200 Message-ID: <20250725135034.2280477-4-armbru@redhat.com> In-Reply-To: <20250725135034.2280477-1-armbru@redhat.com> References: <20250725135034.2280477-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.175, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1753451668399116600 Content-Type: text/plain; charset="utf-8" This test traverses the QOM sub-tree rooted at /machine. Traverse the entire tree instead. The x86_64 test runs some 40 additional QMP commands, and stays under 5s for me. Signed-off-by: Markus Armbruster Reviewed-by: Steve Sistare --- tests/qtest/qom-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/qom-test.c b/tests/qtest/qom-test.c index 40bdc3639f..d358b69c7e 100644 --- a/tests/qtest/qom-test.c +++ b/tests/qtest/qom-test.c @@ -211,7 +211,7 @@ static void test_machine(gconstpointer data) =20 test_properties(qts, "/machine", true); =20 - qlist_append_str(paths, "/machine"); + qlist_append_str(paths, "/"); test_list_get(qts, paths); test_list_get_value(qts); =20 --=20 2.49.0 From nobody Sat Nov 15 07:40:52 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1753451630; cv=none; d=zohomail.com; s=zohoarc; b=k4hCbONZjQoYKSC80865BZJpDR3U6Ovfu1v/1SYLUnX8zLSUE0X3KRCf0am4tyDWN2L/96TNrbpd3eaXGQLpDUyNrHny4qjmASqjCM29sJ9+ETidh86ZfrnyndC7Y6PK6RdwfZCi4khbyG1O4Sou+YysVPaK4+EP7W5iQ6HhQys= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753451630; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=v1ERknPPuuJzDCkGJmDYDBxQ/sRl4VUUqp0yRv05pbQ=; b=oGlHfXlVUC8I4FCXrddgoxP17U9X4Up/ARjHDhPd3eVCnHAf/hp067K3o2nHmcXmBdlcmH2yjyki6F+c9nxmrd9SUaeTK2+51XLTxXCNASaxv81TybiIePg4Cb/QmB/zkfkwdBwA2OMh1hp7ICU4z4y7hD0IGssoC0uq/R7/MXc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1753451630292873.2657561156246; Fri, 25 Jul 2025 06:53:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ufIqz-0003Za-OZ; Fri, 25 Jul 2025 09:52:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ufIou-0008VO-BD for qemu-devel@nongnu.org; Fri, 25 Jul 2025 09:50:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ufIos-0005aS-BN for qemu-devel@nongnu.org; Fri, 25 Jul 2025 09:50:43 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-531-LfUICDWvNM-5RlXLA4XwKQ-1; Fri, 25 Jul 2025 09:50:37 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E27AE1800374; Fri, 25 Jul 2025 13:50:36 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.14]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9083F180035E; Fri, 25 Jul 2025 13:50:36 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 2681E21E6741; Fri, 25 Jul 2025 15:50:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1753451441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v1ERknPPuuJzDCkGJmDYDBxQ/sRl4VUUqp0yRv05pbQ=; b=WxX/+kKzT2rR+0PNcZngIwAiiw/ZFCLGKB+wZ2osGTIzWv66o/umaV3Rxt/A3OuQpbmm/V zTlE0ey7MjC5BIQpQQRKpu+0NyyKTslMraEkXMI9caeF2o2CL/gRvDZhWwL+lWVDfg/8sr Z4ai+YR+FyDBaj0BQMcSenJvgeBilNk= X-MC-Unique: LfUICDWvNM-5RlXLA4XwKQ-1 X-Mimecast-MFC-AGG-ID: LfUICDWvNM-5RlXLA4XwKQ_1753451437 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, berrange@redhat.com, eduardo@habkost.net, steven.sistare@oracle.com Subject: [PATCH 4/5] qtest/qom-test: Don't bother to execute QMP command quit Date: Fri, 25 Jul 2025 15:50:33 +0200 Message-ID: <20250725135034.2280477-5-armbru@redhat.com> In-Reply-To: <20250725135034.2280477-1-armbru@redhat.com> References: <20250725135034.2280477-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.175, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1753451632357116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Markus Armbruster Reviewed-by: Steve Sistare --- tests/qtest/qom-test.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/qtest/qom-test.c b/tests/qtest/qom-test.c index d358b69c7e..6421f2d9d9 100644 --- a/tests/qtest/qom-test.c +++ b/tests/qtest/qom-test.c @@ -215,10 +215,6 @@ static void test_machine(gconstpointer data) test_list_get(qts, paths); test_list_get_value(qts); =20 - response =3D qtest_qmp(qts, "{ 'execute': 'quit' }"); - g_assert(qdict_haskey(response, "return")); - qobject_unref(response); - qtest_quit(qts); } =20 --=20 2.49.0 From nobody Sat Nov 15 07:40:52 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1753451669; cv=none; d=zohomail.com; s=zohoarc; b=e4RlQIAPijHJeg8eCg2ub7rnvnDpobGHvu/L+dfjBo5u6jW1XhMH0KP4hZMWJ3Vq6g1HrlLbgMyYTipnawiO4/TyuLd/MlSqYPJaQ+Oa99D2juKEFiJfGj2PsupDlpOd1BV4YKXHagCxPtUhyEw0O8UTszWqmQyixNN70qjF9k4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753451669; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cYxXA5AaNzNygIUKDlww9nHpcZNyTTM820pmiVa4GrA=; b=SBghsLcrqj9aN0zOMLjTyzADdWY0QPFVwXWBjFOvqlVD+6wBp8NUQaM1vCzA4p/+eCV2kMrwhEB3/s8EMNsWW/IzwodWvbk0+OgeHXm8O7dRkbEXMpEDXt/ef2UnLeDU6JXh+vm/VX98VAXoxD4/ERTien5xCuCSFUXv3DFCli8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1753451669411103.41343077990825; Fri, 25 Jul 2025 06:54:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ufIsV-0006p5-1s; Fri, 25 Jul 2025 09:54:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ufIov-00009B-QE for qemu-devel@nongnu.org; Fri, 25 Jul 2025 09:50:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ufIos-0005ao-Uu for qemu-devel@nongnu.org; Fri, 25 Jul 2025 09:50:45 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-88-D2vk2cL1NCS7vN5NSo0CCA-1; Fri, 25 Jul 2025 09:50:40 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E752A195FDF2; Fri, 25 Jul 2025 13:50:39 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.14]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7E20419560AA; Fri, 25 Jul 2025 13:50:39 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 2A85421E6775; Fri, 25 Jul 2025 15:50:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1753451442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cYxXA5AaNzNygIUKDlww9nHpcZNyTTM820pmiVa4GrA=; b=DqcatrZsxWR9ME8pIdfH4rECzShTHcFLgeE9U1IYv6121FSZMHnxfT4FuFuI0PMl2D8L8o lPT4W6clFXazEIZKOw4SpGqBHo9DgEvExivgMKI7SZW5i/1XgeCRAsULbi4iluNEj80V5r nK06IJPjVQ8wnBVz0m7scI506S9N9HM= X-MC-Unique: D2vk2cL1NCS7vN5NSo0CCA-1 X-Mimecast-MFC-AGG-ID: D2vk2cL1NCS7vN5NSo0CCA_1753451440 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, berrange@redhat.com, eduardo@habkost.net, steven.sistare@oracle.com Subject: [PATCH 5/5] MAINTAINERS: Cover tests/qtest/qom-test.c Date: Fri, 25 Jul 2025 15:50:34 +0200 Message-ID: <20250725135034.2280477-6-armbru@redhat.com> In-Reply-To: <20250725135034.2280477-1-armbru@redhat.com> References: <20250725135034.2280477-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.175, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1753451670369116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Markus Armbruster --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index a462345618..12e7767909 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3445,6 +3445,7 @@ F: qom/ F: tests/unit/check-qom-interface.c F: tests/unit/check-qom-proplist.c F: tests/unit/test-qdev-global-props.c +F: tests/qtest/qom-test.c =20 QOM boilerplate conversion script M: Eduardo Habkost --=20 2.49.0