From nobody Wed Nov 27 02:21:58 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=1562075566; cv=none; d=zoho.com; s=zohoarc; b=lCr/bvsu2dR/C70+1yYoh3R0TxOPXFnyYL5Lp56OYBRGA0DZm+mbrh+8yY8/qHi0NEQOKz0KuW8ydoAn3LdPLChPyoh93nwtmPeYbsuD6/TZQ1AqirYPs5ocgdUCO5B5YwZ+8fTYRJJhEdhUf3FAUYp4Ql+1LBAr3Q9XlxllYH4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562075566; 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=3NXFQ1F8BpWCWKR3SjP95lG262vLcl0KEijTKIx6/q4=; b=X48tn7AMLXv/Wrbh9pdqNmpqMWREJf/q0AM0UuGdwOJ+IrpajX6eQN0ZP6WM658+dJXRSnRvjal6/h65QDs1tHwkjVDeMy/iZdWv6TuEFtcicyRuePHbz6kUPyFawl2MD6BB7eS2JcHgxuLwUFE/4SqMj8gIAowxkj0k0o5dfks= 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 1562075566874249.53577683557205; Tue, 2 Jul 2019 06:52:46 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 21B542F8BF0; Tue, 2 Jul 2019 13:52:30 +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 E3D1317AA7; Tue, 2 Jul 2019 13:52:27 +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 9C412206D5; Tue, 2 Jul 2019 13:52:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x62Dpcn8029153 for ; Tue, 2 Jul 2019 09:51:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9DD7E1001DEF; Tue, 2 Jul 2019 13:51:38 +0000 (UTC) Received: from mx1.redhat.com (ext-mx12.extmail.prod.ext.phx2.redhat.com [10.5.110.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 993E31001DEE for ; Tue, 2 Jul 2019 13:51:36 +0000 (UTC) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.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 0867631628FF for ; Tue, 2 Jul 2019 13:51:22 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id u8so1135304wmm.1 for ; Tue, 02 Jul 2019 06:51:21 -0700 (PDT) Received: from archpc.localdomain (x8d1ee222.agdsn.tu-dresden.de. [141.30.226.34]) by smtp.gmail.com with ESMTPSA id p4sm15355004wrx.97.2019.07.02.06.51.18 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 02 Jul 2019 06:51:18 -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=uemAFiV310kkUlsJqqHwPJNnX3ORwXLSP8IV3FWA0qc=; b=kidu8HDv9U7WUwH+BMPQlKyBa28/KIJXAyhkCpZ+bNntCn0mtUNRl9vNFsXOvAjm/m 670ceQRrpzAtkRImzxVs5GHfMnpTD+S6H2Hq7zjyQTxCiWkRFhciTwcIpaeLwl7Dy5Rl DIgsXHmNoef68/+Xf7eplqx6LIzrjn1l4oNrL6/Amt2Q+xO6dzWmn2NEaeAAJa1oP6Gq LMMweOOtmINgLWR9ducufWg8e2nCW/CpcjrjqGfP6W2vaCR43P6a7EEpIc2CM/XwlgNL 82Fsz+SwEnmGRVWQ0irgvExR5XveWVX6/DVQGmeYycfq6ugPVF577XDSKMCR4XROTifY MRNg== 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=uemAFiV310kkUlsJqqHwPJNnX3ORwXLSP8IV3FWA0qc=; b=ZKhdzEs6FO8YnJPBlfPfwuL4xetbtzmSGZyAe6fjTMhVxrxSppZQlE92kXDy9ZwIKe R+9zdIA6x/bQwCZVkk90rUtB0m8RbY5h3MlGViPqDyqaIIj3eLg0uGQbK1Ype7FnrKvS AEFMy3FoWMTsWCg0DaksYxZQipf04HanR7uKFKADmCZLPnRU94Vp4Z6PxPee8Do8OFX0 sQv4PL5w4rkrjypdvPmP+wwv76v3qeDVtAKc8MqpA7eGManyJkDPUnjw+7EeZ0L60wYH cRm6p4OeIhGhKXeJ17rS3QdYERGSz2De6k7AAPNt8+cQYhGAf0tGU6s4PD562btAq+m4 eTTg== X-Gm-Message-State: APjAAAUjhq7vKDOF1VItg562XhEzHAkewf45vGQaqOAiE22CBE9v28er Uvha9nCFMGerfjpbtqWqVRxNWdbNBOw= X-Google-Smtp-Source: APXvYqyhyTokRGsBwpr7U7Uz+5uWpGu2RmYU4zc0rpkB7RiBTyslf228xPZF1T6oQBSPdVJGtdAUKg== X-Received: by 2002:a1c:e356:: with SMTP id a83mr3746991wmh.38.1562075479653; Tue, 02 Jul 2019 06:51:19 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Tue, 2 Jul 2019 15:49:43 +0200 Message-Id: <20190702134944.6258-4-stamatis.iliass@gmail.com> In-Reply-To: <20190702134944.6258-1-stamatis.iliass@gmail.com> References: <20190702134944.6258-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.41]); Tue, 02 Jul 2019 13:51:22 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 02 Jul 2019 13:51:22 +0000 (UTC) for IP:'209.85.128.67' DOMAIN:'mail-wm1-f67.google.com' HELO:'mail-wm1-f67.google.com' FROM:'stamatis.iliass@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.391 * (DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.128.67 mail-wm1-f67.google.com 209.85.128.67 mail-wm1-f67.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.41 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 3/4] 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.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 02 Jul 2019 13:52:40 +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 | 47 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 44090a7d71..15894d98ad 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2889,6 +2889,52 @@ testDomainGetMemoryParameters(virDomainPtr dom, return ret; } + +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)); + nodeset =3D virDomainNumatuneFormatNodeset(def->numa, NULL, -1); + + TEST_SET_PARAM(0, VIR_DOMAIN_NUMA_MODE, VIR_TYPED_PARAM_INT, mode); + TEST_SET_PARAM(1, VIR_DOMAIN_NUMA_NODESET, VIR_TYPED_PARAM_STRING, nod= eset); + + nodeset =3D NULL; + + if (*nparams > 2) + *nparams =3D 2; + + ret =3D 0; + cleanup: + virDomainObjEndAPI(&vm); + return ret; +} + + #undef TEST_SET_PARAM @@ -7325,6 +7371,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainGetMaxVcpus =3D testDomainGetMaxVcpus, /* 0.7.3 */ .domainGetXMLDesc =3D testDomainGetXMLDesc, /* 0.1.4 */ .domainGetMemoryParameters =3D testDomainGetMemoryParameters, /* 5.6.0= */ + .domainGetNumaParameters =3D testDomainGetNumaParameters, /* 5.6.0 */ .connectListDefinedDomains =3D testConnectListDefinedDomains, /* 0.1.1= 1 */ .connectNumOfDefinedDomains =3D testConnectNumOfDefinedDomains, /* 0.1= .11 */ .domainCreate =3D testDomainCreate, /* 0.1.11 */ -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list