From nobody Wed May 1 22:48:17 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=1561751967; cv=none; d=zoho.com; s=zohoarc; b=czS5kd/wpe0LPyuc03v3dqJSEdbLMPlVjXwgTdolG9yumBoF0qQ2XxX0iw7g/GhUXpCl3AImQLQzyL0kZcv3CEeSkJEjOsrAn67320Qgl1l+6CshYXgmHw/vAmPz9/baNN/Ja+QFMPWUyKUvcx80kpuufMisq7NIqA0mygZqL1o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561751967; 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=SnpHHqnoZzBiWUP5wCV/bGzuki+fp1UV7w1nywvQ4tU=; b=cYE7tuXoFRbXSoqGJqofhJqnIXFmPnvKUJmKNO2aJe9fp1UN88zO/aAdHb5EjIOrTCepKeDbmyVXFShSHE4RJSs7DKOigoaUJy4QF9f4pR35rJcxXTbFAVJrz2R+04C4SvHS8Rn+3o8L0K/yhfmAlvThDUt4Ttqbrs+jd01GNb0= 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 1561751967121699.7491805139587; Fri, 28 Jun 2019 12:59:27 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 66A27A3B48; Fri, 28 Jun 2019 19:58:50 +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 A905D1001284; Fri, 28 Jun 2019 19:58:42 +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 08A73206D2; Fri, 28 Jun 2019 19:58:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5SJsVDC026221 for ; Fri, 28 Jun 2019 15:54:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 456856013D; Fri, 28 Jun 2019 19:54:31 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4113F6013A for ; Fri, 28 Jun 2019 19:54:28 +0000 (UTC) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) (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 068882F8BD3 for ; Fri, 28 Jun 2019 19:54:20 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id g135so10183689wme.4 for ; Fri, 28 Jun 2019 12:54:19 -0700 (PDT) Received: from archpc.localdomain (x8d1ee222.agdsn.tu-dresden.de. [141.30.226.34]) by smtp.gmail.com with ESMTPSA id t15sm3024900wrx.84.2019.06.28.12.54.15 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 28 Jun 2019 12:54:17 -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=9xSdmiYwQ/PwbRCDIsc682OJXKRsI+eQel+IQSrNbVU=; b=cWd1TA2DLS34nf8ODgdr3tBwCP8p6jnkogS7oCsxDTC0vf3eNmOzEM1EY6B1r//A+e rRsrDQnadUdKkMNxf9/Mu6U+NyDlNtRFqIKkITtBwrT+jIvYFVdmw86w00D4aTiNLgLu 28EwjDrYCLi8iNjgYcQOwf0j3oI7zcyjlUhNU34Gd/rXt+wInpzB9iDBTlIQwpcBZDqf SXxp3l3D3Va/bFYRrZxodrjOer2wa6b4qAlVscC6YpXqmSRpvxzYigZ5UqedDUCDf2kQ LK+iFgOiGO27900MBqK7eaTxkh8Hw3UpD222pTTyq8orulMiHuVohbFDSIoJncQGHxMb gxTQ== 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=9xSdmiYwQ/PwbRCDIsc682OJXKRsI+eQel+IQSrNbVU=; b=IGf9lzOMjcqtlDYu6XSFx9rOOJzVqWUS5yshdIytVNoAPqCNb5G2XBJ2NrGZjS1/P/ E8j4C7NC4BV6/pY0EK10+7/BsDvPgozKh9Xj48RP0GGItM5DGqAkKGnmtgivcItemyLB lDuRxPrsbNw35pPfLEdvpd/6RwGu/Ap0sHn7VYwwoCrwkXGBMuPjai1oL+W27ToPN8Nr d6bGF9ePcgsfchK4x9Yvl9XKxmkn7sNpXqgsWF4PHdL8JmdsIVNN2P7VmSyu9rniJipJ P00xtfCpk5rfG8IkBb+80W2unB91yl1w/aGTUThn6KIb/04J+LwAH+7lCkqjCl8874Cz 6PEw== X-Gm-Message-State: APjAAAXAxl5UDe/Illk4zmrgg/Wz4E70/eZpYpiuWW4EmvDcRQWd+VoA CP8h9tw5GliQ6bQLAAwI7PK9uXhVKhQlUw== X-Google-Smtp-Source: APXvYqzder0WZfk9mnCv6Jb+TjAW4F2fMOsbLZDKsKmcwfgSwoHvdxsSNE1NBLBVf6NKxjk1J+chNQ== X-Received: by 2002:a1c:8049:: with SMTP id b70mr7981100wmd.33.1561751658318; Fri, 28 Jun 2019 12:54:18 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Fri, 28 Jun 2019 21:54:13 +0200 Message-Id: <20190628195413.23282-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.38]); Fri, 28 Jun 2019 19:54:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 28 Jun 2019 19:54:20 +0000 (UTC) for IP:'209.85.128.66' DOMAIN:'mail-wm1-f66.google.com' HELO:'mail-wm1-f66.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.128.66 mail-wm1-f66.google.com 209.85.128.66 mail-wm1-f66.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2] 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.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 28 Jun 2019 19:59:15 +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 | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 4b1f2724a0..dc6d3b078c 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2405,6 +2405,57 @@ testDomainCoreDump(virDomainPtr domain, } +static int +testDomainGetNumaParameters(virDomainPtr dom, + virTypedParameterPtr params, + int *nparams, + unsigned int flags) +{ + virDomainObjPtr vm =3D NULL; + virDomainDefPtr def =3D NULL; + virDomainNumatuneMemMode mode =3D VIR_DOMAIN_NUMATUNE_MEM_STRICT; + VIR_AUTOFREE(char *) nodeset =3D NULL; + int ret =3D -1; + + virCheckFlags(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; + + if (!(def =3D virDomainObjGetOneDef(vm, flags))) + goto cleanup; + + ignore_value(virDomainNumatuneGetMode(def->numa, -1, &mode)); + if (*nparams > 0 && + virTypedParameterAssign(¶ms[0], VIR_DOMAIN_NUMA_MODE, VIR_TYPE= D_PARAM_INT, mode) < 0) + goto cleanup; + + nodeset =3D virDomainNumatuneFormatNodeset(def->numa, NULL, -1); + if (*nparams > 1 && (!nodeset || + virTypedParameterAssign(¶ms[1], + VIR_DOMAIN_NUMA_NODESET, + VIR_TYPED_PARAM_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 +7302,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