From nobody Sun Feb 8 14:53:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1563877116; cv=none; d=zoho.com; s=zohoarc; b=TcpdLr9B0UlLeb6+//VNot31h6L4vBPXkPVOBUiDYG4zso50U7VgKDTAhxyH//Z/g4Q+vCjIGsCg2gkQsaXYAKkPT6Yg3dU/RKnZOKyGW7XJ+DynBwRYDQXkUPt6qrTCj5GwMYbaZ/rkWwERYetXtq5Itm3Cp/AYbSG3/w9pwpc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563877116; h=Content-Type:Content-Transfer-Encoding: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:ARC-Authentication-Results; bh=3osBxJzkrOjTy9RplXMnTqgJadJnAcXgvump7JUu/aM=; b=lYTlujaCbDMSIA9vRMTZNHyvJWFBO6FaVUis9K+WqPow/vUXg6xzyI2F8/zqV5FPcnzTNN5d99uzDg+Y+0ugkthrG8MWZFf/wDZjCAYtOyCg99WKRKCEGr0P3f7tC9v1dM8SyP89oizWDRVvf8v4SXS/qOxN8dA8OX1rRhoTSa4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1563877116535878.4975440267416; Tue, 23 Jul 2019 03:18:36 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0C90430821A0; Tue, 23 Jul 2019 10:18:35 +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 DE7525D9CC; Tue, 23 Jul 2019 10:18:34 +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 77F4518089C8; Tue, 23 Jul 2019 10:18:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6NAIWXf018343 for ; Tue, 23 Jul 2019 06:18:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 82C275C230; Tue, 23 Jul 2019 10:18:32 +0000 (UTC) Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7CC005C220 for ; Tue, 23 Jul 2019 10:18:30 +0000 (UTC) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 21E1D2CD7E6 for ; Tue, 23 Jul 2019 10:18:29 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id n9so42622135wru.0 for ; Tue, 23 Jul 2019 03:18:29 -0700 (PDT) Received: from archpc.localdomain (x8d1ee222.agdsn.tu-dresden.de. [141.30.226.34]) by smtp.gmail.com with ESMTPSA id y6sm36270081wrp.12.2019.07.23.03.18.26 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Jul 2019 03:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=wM2KWNiOGMVXByhjCweJWN9r75AayE6s+9lY44/oyUI=; b=B/DYKPHq87jt7pX1HLQQEYa2YMDwitJD3crvI++/AdwXFffpDl7B9+o3U0rvOT1W3b aY5SFxP6NTRG99/UJPzPnymWLRH7FFsQc5nwUkk3+eC9NG1wgSHh2UA5QkebHciQy9hP oTI1r6CUPhT4ciKP9vFlioWomHLH+0fCgGTJh1bu/XKkC7YkxbSoiDe98SvWboUcH57R hRCVceLIeBt9SvRPEpC78VUc5AO85joWGIZkxZiTIf6Q60MirlDOLaQF20FFM9wNJ3gp Q5/wiurYXIzzV93NwuIZUk9cYqqJatcngKJkFqGuqEMWHm1MbH2EMeDaawnuWpMaJclA jvxA== 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=wM2KWNiOGMVXByhjCweJWN9r75AayE6s+9lY44/oyUI=; b=jUe6SYHwQIag0C4HwOANIRILuzIlqFeFgVJXvZXQEK85kW66Ey8eHUdKJqhYcopLUf AeIK0yDaOAawnP2jTly5USET06KTIF6RO2nCa7v/6XG1ix1DZh5ADTVAhPpqnU3t8Adw HgRxXtyJKpos4K6YOi83VxoT2kKAdqNpEQq0Gh3Ej7gyUr5t+Z/lymzGDY4q4DsWS0J3 PJTkj36alvv/5FALCKUKO2bkX3KOOw7N8xOLKC2C5P4uLcszKFHCuzYJ/KRyAYXRZXp3 fbsfHn5c1njr3/Y4P+OZdiXmEmPsYnhGVPpuGfKmKL/tLaoadF1FOvS7bUc2pWz4NPIg 6QUg== X-Gm-Message-State: APjAAAUdIrBX5SKAv700aXQsAgPU02ANSKjM3Z6OpyKXEdCV4q+teMTM O4kVoI2BQ8+9sai657VAbUI/JmVYjto1iw== X-Google-Smtp-Source: APXvYqwuiJjxaxeOw7xV3IHfdZ9OChcvUCoi2Fx9hgQKwmGca4hhux0ll46w+FGNv4No+nXuxWMSfQ== X-Received: by 2002:adf:eb49:: with SMTP id u9mr77419209wrn.215.1563877107473; Tue, 23 Jul 2019 03:18:27 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Tue, 23 Jul 2019 12:17:54 +0200 Message-Id: <20190723101757.1927-2-stamatis.iliass@gmail.com> In-Reply-To: <20190723101757.1927-1-stamatis.iliass@gmail.com> References: <20190723101757.1927-1-stamatis.iliass@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 23 Jul 2019 10:18:29 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 23 Jul 2019 10:18:29 +0000 (UTC) for IP:'209.85.221.65' DOMAIN:'mail-wr1-f65.google.com' HELO:'mail-wr1-f65.google.com' FROM:'stamatis.iliass@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.099 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS) 209.85.221.65 mail-wr1-f65.google.com 209.85.221.65 mail-wr1-f65.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/4] test_driver: implement virDomainAddIOThread 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 23 Jul 2019 10:18:35 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Ilias Stamatis Reviewed-by: Erik Skultety --- src/test/test_driver.c | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 2e33a9dd55..313cf5e7ef 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2603,6 +2603,56 @@ testDomainSetVcpusFlags(virDomainPtr domain, unsigne= d int nrCpus, } +static int +testDomainAddIOThread(virDomainPtr dom, + unsigned int iothread_id, + unsigned int flags) +{ + virDomainObjPtr vm =3D NULL; + virDomainDefPtr def =3D NULL; + virDomainIOThreadIDDefPtr iothrid =3D NULL; + int ret =3D -1; + + virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | + VIR_DOMAIN_AFFECT_CONFIG, -1); + + if (iothread_id =3D=3D 0) { + virReportError(VIR_ERR_INVALID_ARG, "%s", + _("invalid value of 0 for iothread_id")); + return -1; + } + + if (!(vm =3D testDomObjFromDomain(dom))) + goto cleanup; + + if (!(def =3D virDomainObjGetOneDef(vm, flags))) + goto cleanup; + + if (virDomainIOThreadIDFind(def, iothread_id)) { + virReportError(VIR_ERR_INVALID_ARG, + _("an IOThread is already using iothread_id '%u'"), + iothread_id); + goto cleanup; + } + + if (VIR_ALLOC(iothrid) < 0) + goto cleanup; + + iothrid->iothread_id =3D iothread_id; + + if (VIR_APPEND_ELEMENT_COPY(def->iothreadids, def->niothreadids, iothr= id) < 0) + goto cleanup; + + ret =3D 0; + + cleanup: + if (ret < 0) + virDomainIOThreadIDDefFree(iothrid); + virDomainObjEndAPI(&vm); + return ret; +} + + static int testDomainSetUserPassword(virDomainPtr dom, const char *user ATTRIBUTE_UNUSED, @@ -7742,6 +7792,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainSaveImageGetXMLDesc =3D testDomainSaveImageGetXMLDesc, /* 5.5.0= */ .domainCoreDump =3D testDomainCoreDump, /* 0.3.2 */ .domainCoreDumpWithFormat =3D testDomainCoreDumpWithFormat, /* 1.2.3 */ + .domainAddIOThread =3D testDomainAddIOThread, /* 5.6.0 */ .domainSetUserPassword =3D testDomainSetUserPassword, /* 5.6.0 */ .domainSetVcpus =3D testDomainSetVcpus, /* 0.1.4 */ .domainSetVcpusFlags =3D testDomainSetVcpusFlags, /* 0.8.5 */ -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list