From nobody Mon Feb 9 00:19:57 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 16260895668331008.1131434162495; Mon, 12 Jul 2021 04:32:46 -0700 (PDT) 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-322-K0Tmand5POKMofwqnzM5HA-1; Mon, 12 Jul 2021 07:32:44 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 13521100C611; Mon, 12 Jul 2021 11:32:39 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E344560871; Mon, 12 Jul 2021 11:32:38 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1E0264EA29; Mon, 12 Jul 2021 11:32:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16CBWZ0G020869 for ; Mon, 12 Jul 2021 07:32:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id B23B46B5B8; Mon, 12 Jul 2021 11:32:35 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ACF806B5BF for ; Mon, 12 Jul 2021 11:32:32 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E1E9780D2B6 for ; Mon, 12 Jul 2021 11:32:31 +0000 (UTC) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-581-F48y7Nz6OhKDaHGNv27vlg-1; Mon, 12 Jul 2021 07:32:29 -0400 Received: by mail-pf1-f177.google.com with SMTP id 17so16128929pfz.4 for ; Mon, 12 Jul 2021 04:32:29 -0700 (PDT) Received: from localhost ([103.142.141.217]) by smtp.gmail.com with ESMTPSA id o34sm17766315pgm.6.2021.07.12.04.32.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 04:32:28 -0700 (PDT) X-MC-Unique: K0Tmand5POKMofwqnzM5HA-1 X-MC-Unique: F48y7Nz6OhKDaHGNv27vlg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KRG9C1HKMwPjnk2BruBSB8UsaZ//UvzSq8dkJiIrSqU=; b=MSaJWXS7c+h7o6/3otsKku5IwXwILHZt25PuM5ylLrNBFkYnvtCZdA6QFga8vTztXB FRxzD1XbpHXIZS1772LaLtMWzIElud2EnA4uZocfbn//ptZ2AURmz9MGya8RAlU58+VN EqRNOY6KmTF3ZA5/Wkmw1/hiLzAn1XVCU6/Pn63fQlhTWlvr6nTSacfjQKphnp3KjiP0 qH7E73fKSdeRc/VO5UdzhCu15GrfEZ7EfY4gGbOHvT44QYibCAVGPyTfSjqp4615tTk/ U2khhqnMNAlQSP+59/2pQPkHAUL+IaLYai6zDizG8U6pSYuymfbBe2uRloXpKUYMZltJ E67A== X-Gm-Message-State: AOAM532lA/FPDyxDS+ysUpobyfpQR7n1U6gdD5wTlRH2jTaqPyidIN4A a0QJyBQiel9NJvYxa36t4oFPYAohsZk3ebNdMIU= X-Google-Smtp-Source: ABdhPJys1E37de8hq9Lh0ckjrhtIGZugnDFAIWzmGDxtEVMI0YnnUJylPOwY29RCFbeBzJu8sPmuWA== X-Received: by 2002:a62:ed06:0:b029:32c:a800:ba47 with SMTP id u6-20020a62ed060000b029032ca800ba47mr2403918pfh.56.1626089548719; Mon, 12 Jul 2021 04:32:28 -0700 (PDT) From: Luke Yue To: libvir-list@redhat.com Subject: [PATCH v4 2/4] test_driver: Implement virDomainGetMessages Date: Mon, 12 Jul 2021 19:32:15 +0800 Message-Id: <20210712113217.60492-3-lukedyue@gmail.com> In-Reply-To: <20210712113217.60492-1-lukedyue@gmail.com> References: <20210712113217.60492-1-lukedyue@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1626089567879100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Luke Yue --- src/test/test_driver.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 65710b78ef..ef406a3d99 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -9331,6 +9331,26 @@ testDomainCheckpointDelete(virDomainCheckpointPtr ch= eckpoint, return ret; } =20 +static int +testDomainGetMessages(virDomainPtr dom, + char ***msgs, + unsigned int flags) +{ + virDomainObj *vm =3D NULL; + int rv =3D -1; + + virCheckFlags(VIR_DOMAIN_MESSAGE_DEPRECATION | + VIR_DOMAIN_MESSAGE_TAINTING, -1); + + if (!(vm =3D testDomObjFromDomain(dom))) + return -1; + + rv =3D virDomainObjGetMessages(vm, msgs, flags); + + virDomainObjEndAPI(&vm); + return rv; +} + /* * Test driver */ @@ -9489,6 +9509,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainCheckpointLookupByName =3D testDomainCheckpointLookupByName, /*= 5.6.0 */ .domainCheckpointGetParent =3D testDomainCheckpointGetParent, /* 5.6.0= */ .domainCheckpointDelete =3D testDomainCheckpointDelete, /* 5.6.0 */ + .domainGetMessages =3D testDomainGetMessages, /* 7.6.0 */ }; =20 static virNetworkDriver testNetworkDriver =3D { --=20 2.32.0