From nobody Tue Feb 10 13:33:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 162876555442395.34643505211818; Thu, 12 Aug 2021 03:52:34 -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-527-NSm5KWSKNJaiXZY7aAPZMQ-1; Thu, 12 Aug 2021 06:52:31 -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 0B5C11082922; Thu, 12 Aug 2021 10:52:26 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E297E779D0; Thu, 12 Aug 2021 10:52:25 +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 ABB49181A1CE; Thu, 12 Aug 2021 10:52:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 17CAoUVx015188 for ; Thu, 12 Aug 2021 06:50:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id CB055208DDBF; Thu, 12 Aug 2021 10:50:30 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C5545208DDBA for ; Thu, 12 Aug 2021 10:50:30 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (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 ADA8318A01A0 for ; Thu, 12 Aug 2021 10:50:30 +0000 (UTC) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-555-uhOazwv-MzqLkUF5NPYmbw-1; Thu, 12 Aug 2021 06:50:28 -0400 Received: by mail-pj1-f47.google.com with SMTP id w13-20020a17090aea0db029017897a5f7bcso10044059pjy.5 for ; Thu, 12 Aug 2021 03:50:28 -0700 (PDT) Received: from localhost ([38.94.109.214]) by smtp.gmail.com with ESMTPSA id y4sm10010238pjg.9.2021.08.12.03.50.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Aug 2021 03:50:27 -0700 (PDT) X-MC-Unique: NSm5KWSKNJaiXZY7aAPZMQ-1 X-MC-Unique: uhOazwv-MzqLkUF5NPYmbw-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=G8DKpb2KLIYlxjaZLEm1kQwRP1WSY3qjJABO/IldzfM=; b=iV0WFDvg1CtO8yBuUYmLqitOHaGDY98JvLtGdLuBhVgn+LFI7xTNIl6kdYyAgBH06w 8c6eNpMdMaBoAWROuPVl+BAtvYSl01I/GE5Kgkr094UgiWLyyZqHP6jUV70OVUBzYXQw fTK55UVCpWXoUQymSj73Da8JwPOlxZoz4qx/68yQH4nPGMlppTfHv2xCvT98zH4W2hEo UXSg4BU3ghcLFAwIJcujufaajFCQPT7njaVpoKuxBSjfR4LHTRRIXzzSlsreYE7GCmwc +N9eXZoylA1BGWJQfirC16crRaLPltWNGW17m+KdVVM3taTuHHEZ3BBGqTn5nKNtKV/j rZFA== X-Gm-Message-State: AOAM532XtYd1CwKEy0Leh7lVfgiW44/6q7lMvTyfNdM0i28j+EgOTUZH s32Nu/hKwpyICKRr17X2hlsa9E6jcZVOXKCMP1I= X-Google-Smtp-Source: ABdhPJxAdJHtiDwbiE/4Ktuz1gfjtieST0vXX5+0C79naWJamqRpjXX0PDDmT2rgQamsWHtsk8OyGA== X-Received: by 2002:a63:120e:: with SMTP id h14mr3233864pgl.215.1628765427392; Thu, 12 Aug 2021 03:50:27 -0700 (PDT) From: Luke Yue To: libvir-list@redhat.com Subject: [PATCH v3 06/11] test_driver: Implement virDomainGetIOThreadInfo Date: Thu, 12 Aug 2021 18:49:57 +0800 Message-Id: <20210812105002.197134-7-lukedyue@gmail.com> In-Reply-To: <20210812105002.197134-1-lukedyue@gmail.com> References: <20210812105002.197134-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.78 on 10.11.54.4 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: 1628765556601100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Luke Yue --- src/test/test_driver.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 2813320939..67337879ef 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -9490,6 +9490,34 @@ testDomainGetMessages(virDomainPtr dom, return rv; } =20 +static int +testDomainGetIOThreadInfo(virDomainPtr dom, + virDomainIOThreadInfoPtr **info, + unsigned int flags) +{ + virDomainObj *vm; + virDomainDef *targetDef =3D NULL; + unsigned int bitmap_size =3D 0; + int ret =3D -1; + + virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | + VIR_DOMAIN_AFFECT_CONFIG, -1); + + if (!(vm =3D testDomObjFromDomain(dom))) + goto cleanup; + + if (!(targetDef =3D virDomainObjGetOneDef(vm, flags))) + goto cleanup; + + bitmap_size =3D virDomainDefGetVcpus(targetDef); + + ret =3D virDomainDriverGetIOThreadsConfig(targetDef, info, bitmap_size= ); + + cleanup: + virDomainObjEndAPI(&vm); + return ret; +} + typedef enum { VIR_DOMAIN_IOTHREAD_ACTION_ADD, VIR_DOMAIN_IOTHREAD_ACTION_DEL, @@ -9685,6 +9713,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainGetVcpus =3D testDomainGetVcpus, /* 0.7.3 */ .domainGetVcpuPinInfo =3D testDomainGetVcpuPinInfo, /* 1.2.18 */ .domainGetMaxVcpus =3D testDomainGetMaxVcpus, /* 0.7.3 */ + .domainGetIOThreadInfo =3D testDomainGetIOThreadInfo, /* 7.7.0 */ .domainAddIOThread =3D testDomainAddIOThread, /* 7.7.0 */ .domainDelIOThread =3D testDomainDelIOThread, /* 7.7.0 */ .domainGetSecurityLabel =3D testDomainGetSecurityLabel, /* 7.5.0 */ --=20 2.32.0