From nobody Sat May 4 03:43:53 2024 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=1561639975; cv=none; d=zoho.com; s=zohoarc; b=oVnHNdXBqCuSydFK35nkx9rpAjW4xpXHVwq8C/VX2Yl9kf5jWESfPgolwS+CuYM9Re6OLHE95SSh7ud9SbleQOczdFJbn0liol5A//KyGLpvP545xAtskS4XJCM046WWHf/x2odipxHu8P+ryQ2ZLux28O0EXfUYt5Kvx8/l8vY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561639975; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=SfroNGkw94ESOs1+UQcOOHS0g9JArieiVudbiL5h31o=; b=SzYV3ySOe9C8ih1BRLeL/Vg2BzwO7A7IT8QPNWgJJ0DBGlWGMdgu7TTbvfoMfNN8xZ3O85ea/RcgqIxSllYI66f3+zD7vZb0T08KPj8OhTnWJ5TaS37mzmQ668efysDT4f+lo2nvNCDzZNSLZ4NaVSOcHfqCv97ZMuP4L53Pds0= 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 15616399758261011.1090843253875; Thu, 27 Jun 2019 05:52:55 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5E3E5308FEC4; Thu, 27 Jun 2019 12:52:01 +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 A8FE527097; Thu, 27 Jun 2019 12:51:52 +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 6C45B206D1; Thu, 27 Jun 2019 12:51:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5RCp546030080 for ; Thu, 27 Jun 2019 08:51:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 908461A8F5; Thu, 27 Jun 2019 12:51:05 +0000 (UTC) Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8AEA5196F7 for ; Thu, 27 Jun 2019 12:51:03 +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 C15D13082B43 for ; Thu, 27 Jun 2019 12:50:51 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id f9so2400171wre.12 for ; Thu, 27 Jun 2019 05:50:51 -0700 (PDT) Received: from archpc.localdomain (x8d1ee222.agdsn.tu-dresden.de. [141.30.226.34]) by smtp.gmail.com with ESMTPSA id t12sm2390120wrw.53.2019.06.27.05.50.48 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 27 Jun 2019 05:50:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=V3cQGjKhf9jw2i5MtjrkYfgiMf68IUsVJ2dR8yXw00M=; b=SeuCJHBG/IXN9DOe0rF/CLe9u2XuVV+g8x56AschHKpE8gO0FglGUlyH0slBj/9j8v ny2YY8NNcp7b/eGymk1C9wNGIAYvbmi2+IqMwjGppRVimFXk67W5fmn66Jc4bHvX9liH oVHmzsJFFcYJX3+IKmckvasKHJC6cLi9m+thWy97sdU8it6KtLrZ0UHQ4mwATORgQOxl AD6rRmC9zqiUWp7TrWVmnubO2NP+M5lNAxO2CuUtMNJYf8uHD9f1cTUf0oZBJ25ku2j/ zJvWoRn2wIHA1UV6JTrZf7GVmLzhtiEqQgvDxa7DPbBI6qLZnHe1eX4PNKygwmoAM2Zd /w5g== 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:mime-version :content-transfer-encoding; bh=V3cQGjKhf9jw2i5MtjrkYfgiMf68IUsVJ2dR8yXw00M=; b=Sxqq7Vx987P2DzZWgjKADEGC9a0JtLYTbYXADISmBeTMfkVPuhfNno3+7N3BQX/J5q m38l81XAe2kZt2lTUSRJXcH/jP7p7wXYzbiMEqWiGsfNQ78DGDnlSiJty7ImJ9myWoqs qKde/tNNTRlSu7tie35YTYMtWmqGuHYukcTfMHpHoC+uDa/mOWfzS2zHkB3E3gdzpeqb 9B3n3ZJegeJZRaRHoDFFBwKc7RczhFw4OievRMFNjIdtax4Y0iVXrxDaHXU3lucZlqL0 2RApDBz9YTXG91O5joH8r3oF31YlwOOYqYGPqvotYdfs9QVFBWWbfPaWJ4d/SJlo47N3 9XtA== X-Gm-Message-State: APjAAAXDDT2aSlJTwRP+6Zg2D3uhr1uNEBT50j2iSW3yYOjUcTd9s3yn 8Zlqp4yo9/a/d1J4D61RWl29Rl7yD7SFLA== X-Google-Smtp-Source: APXvYqzmSi5hkwwLWoNmXlUxewovyh0bvAYgWEDfl+0tbDWynb94GIkKk80MmRIE/jZB7oxHyKFPNg== X-Received: by 2002:adf:f581:: with SMTP id f1mr3254275wro.179.1561639849980; Thu, 27 Jun 2019 05:50:49 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Thu, 27 Jun 2019 14:50:46 +0200 Message-Id: <20190627125046.21111-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.45]); Thu, 27 Jun 2019 12:50:52 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Thu, 27 Jun 2019 12:50:52 +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.109 (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.84 on 10.5.110.45 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] test_driver: implement virDomainGetNumaParameters 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.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Thu, 27 Jun 2019 12:52:52 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 4b1f2724a0..d0d4d9e270 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2405,6 +2405,53 @@ testDomainCoreDump(virDomainPtr domain, } +static int +testDomainGetNumaParameters(virDomainPtr dom, + virTypedParameterPtr params, + int *nparams, + unsigned int flags) +{ + virDomainObjPtr vm =3D NULL; + virDomainNumatuneMemMode mode =3D VIR_DOMAIN_NUMATUNE_MEM_STRICT; + VIR_AUTOFREE(char *) nodeset =3D NULL; + int ret =3D -1; + + virCheckFlags(VIR_DOMAIN_AFFECT_CURRENT | + VIR_DOMAIN_AFFECT_LIVE | + VIR_DOMAIN_AFFECT_CONFIG | + VIR_TYPED_PARAM_STRING_OKAY, -1); + + if ((*nparams) =3D=3D 0) { + *nparams =3D 2; + return 0; + } + + if (!(vm =3D testDomObjFromDomain(dom))) + goto cleanup; + + ignore_value(virDomainNumatuneGetMode(vm->def->numa, -1, &mode)); + if (0 < *nparams && virTypedParameterAssign(¶ms[0], VIR_DOMAIN_NUM= A_MODE, + VIR_TYPED_PARAM_INT, mode)= < 0) + goto cleanup; + + nodeset =3D virDomainNumatuneFormatNodeset(vm->def->numa, NULL, -1); + if (1 < *nparams && (!nodeset || virTypedParameterAssign(¶ms[1], + VIR_DOMAIN_NU= MA_NODESET, + VIR_TYPED_PAR= AM_STRING, + nodeset) < 0)) + goto cleanup; + nodeset =3D NULL; + + if (*nparams > 2) + *nparams =3D 2; + + ret =3D 0; + cleanup: + virDomainObjEndAPI(&vm); + return ret; +} + + static char * testDomainGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED) { @@ -7251,6 +7298,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainReboot =3D testDomainReboot, /* 0.1.1 */ .domainDestroy =3D testDomainDestroy, /* 0.1.1 */ .domainDestroyFlags =3D testDomainDestroyFlags, /* 4.2.0 */ + .domainGetNumaParameters =3D testDomainGetNumaParameters, /* 5.6.0 */ .domainGetOSType =3D testDomainGetOSType, /* 0.1.9 */ .domainGetLaunchSecurityInfo =3D testDomainGetLaunchSecurityInfo, /* 5= .5.0 */ .domainGetMaxMemory =3D testDomainGetMaxMemory, /* 0.1.4 */ -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list