From nobody Mon Feb 9 00:20:11 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=1565622889; cv=none; d=zoho.com; s=zohoarc; b=V6PozZkYtaiwqbUE+FBKXIn1Gk0Gaq5IsYT9Aj9ORHjLoiZdg5Q5LRV8Zs30VjR1bhQaTzlMu+OEHXIwqmP+uYflJQS/UZdB2a6X6kY6OO6RKFFXYZNxrmbbTZ77F2SvJzN0LC4HC8Jax+iz9gaOzyAop5Y8VDadzCCaQwKMjdc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565622889; 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=hzgRwpEfF4StWJlx8emi6KGucNAhqZKs4bGGFj6K49o=; b=enfgfnFHd+l7QLSeiDo6gyWxK5Mwi8TAUWL7T2egiPcHsrmpyW0LdbpGU5Vvf6qirqXqaCRToc67PKRhZDDUwpC7uerP++cITlxZMh6cDA1JP45amlWfvDp0RIaCrVKqtRhuUAJnT6M1REAuDZWUnAALWPWVDrHM+eBmXrHeD5Y= 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 1565622889430630.579754675488; Mon, 12 Aug 2019 08:14:49 -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 1522F3066FD9; Mon, 12 Aug 2019 15:14:48 +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 E80AC7D2FE; Mon, 12 Aug 2019 15:14:47 +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 AFEE618005C7; Mon, 12 Aug 2019 15:14:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7CFEktf026018 for ; Mon, 12 Aug 2019 11:14:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id 961F71902F; Mon, 12 Aug 2019 15:14:46 +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 9122113AD1 for ; Mon, 12 Aug 2019 15:14:43 +0000 (UTC) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) (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 BBB6913A82 for ; Mon, 12 Aug 2019 15:14:42 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id j16so2630152wrr.8 for ; Mon, 12 Aug 2019 08:14:42 -0700 (PDT) Received: from archlap.localdomain ([185.32.231.210]) by smtp.gmail.com with ESMTPSA id 24sm10369223wmf.10.2019.08.12.08.14.40 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 12 Aug 2019 08:14:40 -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=BpS5IUib2elJrpqJLqQbNumeCG31eR44THPQdHGWuWw=; b=YCYrV+s2R026BmGNaqJbK83HYP5TvxPDsB0yg33NCIw8d/2Hs2b7pWnjqFtrRCA07k w0QopnqHi6GfVXNheYVhC561JVEjz0oiUuSjqJROPootbtcGRHIxoOqixNNsVnVSTfnv gqlaM5owvkzExCd57wiOJqOrWwBWDY1oJz5lD2Wcw5yiECkiTPwqkaX56ssdTvJVzLVz gFbg5I6awSOxdi11uJXQGZYXSQyUfDTkaLiJwqwMqihC7GyGT5YBJZntiKy0b8qRw8RW kOBNJXSsChzAelvaQpV3ay9ViiLZHgmWnVFzWnjUju7LXoRkJBcZx68LeZt0PeqOirQc ZNCA== 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=BpS5IUib2elJrpqJLqQbNumeCG31eR44THPQdHGWuWw=; b=mc2izqsVb6l6n6LL4LlyEkpbae6nSAMQxxMyET0jQiS99UhjV/iGCKClyjocreBjtS WY87UHpgLG+QJuYFiYCDIDg4OktJ3Cg6x+kULPU4rHeBw1RmJf7stwKlf/27eO/pYYJM fUBv8Dt2sMK0YvTyLNWvUDeIpV2nBDscPaXipAC4vwBDCD5RoKhnFDiJoTa9BPMJuWyL GN7HuwZSzTt26hFVXs9cxUmmGZLQ8mWX8Y9s8ajrRKfuC9Djg+SQrATQazMZi82PNv91 5YvMcGEuDuWPlqpldwmA7nPHIT8NDLQL7LI6ReC5UFrfVgLxsSgGSanxdU6NcyuUOcb8 8PAw== X-Gm-Message-State: APjAAAVaMS5I5mo1pWYypIZzW48K7HfUXPwnokd2dEP0o0AU7UvkMc2G 2SgG1RxCdVUsUqROQsifFzWVe1m2iUw= X-Google-Smtp-Source: APXvYqzM12w2Rs2+Vel946vJw2gaMOGJG40C6A9MvH7mkHwAI8GHiQSigJ7WiSf0lyviYIOw6sZDiw== X-Received: by 2002:a5d:63d0:: with SMTP id c16mr36626949wrw.22.1565622881121; Mon, 12 Aug 2019 08:14:41 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Mon, 12 Aug 2019 18:13:12 +0300 Message-Id: <20190812151313.24329-4-stamatis.iliass@gmail.com> In-Reply-To: <20190812151313.24329-1-stamatis.iliass@gmail.com> References: <20190812151313.24329-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]); Mon, 12 Aug 2019 15:14:43 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 12 Aug 2019 15:14:43 +0000 (UTC) for IP:'209.85.221.67' DOMAIN:'mail-wr1-f67.google.com' HELO:'mail-wr1-f67.google.com' FROM:'stamatis.iliass@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.1 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.221.67 mail-wr1-f67.google.com 209.85.221.67 mail-wr1-f67.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 3/5] test_driver: implement virDomainPinIOThread 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.42]); Mon, 12 Aug 2019 15:14:48 +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 b4a883cb54..60d611245d 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -3047,6 +3047,56 @@ testDomainDelIOThread(virDomainPtr dom, } =20 =20 +static int +testDomainPinIOThread(virDomainPtr dom, + unsigned int iothread_id, + unsigned char *cpumap, + int maplen, + unsigned int flags) +{ + int ret =3D -1; + virDomainObjPtr vm =3D NULL; + virDomainDefPtr def =3D NULL; + virDomainIOThreadIDDefPtr iothrid =3D NULL; + virBitmapPtr cpumask =3D NULL; + + virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | + VIR_DOMAIN_AFFECT_CONFIG, -1); + + if (!(vm =3D testDomObjFromDomain(dom))) + goto cleanup; + + if (!(def =3D virDomainObjGetOneDef(vm, flags))) + goto cleanup; + + if (!(cpumask =3D virBitmapNewData(cpumap, maplen))) + goto cleanup; + + if (virBitmapIsAllClear(cpumask)) { + virReportError(VIR_ERR_INVALID_ARG, "%s", + _("Empty iothread cpumap list for pinning")); + goto cleanup; + } + + if (!(iothrid =3D virDomainIOThreadIDFind(def, iothread_id))) { + virReportError(VIR_ERR_INVALID_ARG, + _("iothreadid %d not found"), iothread_id); + goto cleanup; + } + + virBitmapFree(iothrid->cpumask); + iothrid->cpumask =3D cpumask; + iothrid->autofill =3D false; + + ret =3D 0; + cleanup: + if (ret < 0) + virBitmapFree(cpumask); + virDomainObjEndAPI(&vm); + return ret; +} + + static int testDomainSetUserPassword(virDomainPtr dom, const char *user ATTRIBUTE_UNUSED, @@ -9503,6 +9553,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainCoreDumpWithFormat =3D testDomainCoreDumpWithFormat, /* 1.2.3 */ .domainAddIOThread =3D testDomainAddIOThread, /* 5.7.0 */ .domainDelIOThread =3D testDomainDelIOThread, /* 5.7.0 */ + .domainPinIOThread =3D testDomainPinIOThread, /* 5.7.0 */ .domainSetUserPassword =3D testDomainSetUserPassword, /* 5.6.0 */ .domainPinEmulator =3D testDomainPinEmulator, /* 5.6.0 */ .domainGetEmulatorPinInfo =3D testDomainGetEmulatorPinInfo, /* 5.6.0 */ --=20 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list