From nobody Sat Feb 7 08:28:20 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=1562070821; cv=none; d=zoho.com; s=zohoarc; b=lrSzdaHtue+RIuMjhjrt4eva8JoRcvmkjZO1bX7W9CPylqr8MHWu5b8QcEwXdEwKg2pKQ3xcAy7QXSiUPxGXw+a1B5mqdpbYwUUrUBCyBUIDv2di/ow9YyB541tjLUInLhg3lVRxMlSRNQzRvumvswyr6shmIVxzYBSHM+31XWA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562070821; 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=1qd+Du5N24GP4uW+8GmXCMnAlATbKZb0ZYbVqBQxJ+8=; b=Zso7BM/zwR95C7yUAx+k5Fsix4++TA3RmCgVLQ7IjWTDuP5eds9HnZzraxdyI5iAOi9PBRJfgRMmEtfJcPCxqC48yHi7N/WdRxZ/XYYSsaOvDUmslQn+BhuHJhLe7z0DnwfopO1pZKEMkuC0f+/HJ98MGNqiuKTDCrFSnZm7Wsc= 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 1562070821798398.6794640642112; Tue, 2 Jul 2019 05:33:41 -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 23CD5C057F2E; Tue, 2 Jul 2019 12:33:34 +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 E630B5D968; Tue, 2 Jul 2019 12:33:29 +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 95D69206D4; Tue, 2 Jul 2019 12:33:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x62CTwu2006168 for ; Tue, 2 Jul 2019 08:29:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 140812E036; Tue, 2 Jul 2019 12:29:58 +0000 (UTC) Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0DA252E034 for ; Tue, 2 Jul 2019 12:29:58 +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 46DA4309266B for ; Tue, 2 Jul 2019 12:29:44 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id x4so17603289wrt.6 for ; Tue, 02 Jul 2019 05:29:44 -0700 (PDT) Received: from archpc.localdomain (x8d1ee222.agdsn.tu-dresden.de. [141.30.226.34]) by smtp.gmail.com with ESMTPSA id g2sm2573991wmh.0.2019.07.02.05.29.41 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 02 Jul 2019 05:29:42 -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=Q4XFsWQimx/KdxWsP/s+UZ70t9e2/KXY1NRXRa/dxSg=; b=LCllLeOkOcIniolr8cOSgI+kb26G20abVBqQZYQqpp+QAAXqsWqwiYku0a9wYMfNIj RxlCKuZMzJmdB4CtdlwUNF6fxkJre04piHB4OcjySPvrCBApiMIHUC5kFtC/JQBEGqEm R56c5o2C/phYvifHXt9+9Cfn/LULN7h+WAVlkrhHLp9k9Wt0esJv2dCfb7GNUkmCV+DY 7/EuppBe5VK5Z0jtl9fL8g0f3iBP0CHThyuabvQhvzWg3/ER1qjaJDTIs4srgSk3crY0 gPxNdKaPHJXvDkSteN4h1HYD5OXZTjXNt9lw2l7MFj+bk4s/cU612ZElXm/UeS0r6mD1 r0kQ== 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=Q4XFsWQimx/KdxWsP/s+UZ70t9e2/KXY1NRXRa/dxSg=; b=Wd6UF9Tj0yWVProj1IAFlHCr0+ho/hEyLHVFFymWpyEvwAORXY9K69fntGdoZtb1ut FboCoUGl7ENRRvzIIxDMFELPWPVDVFxkMY2sjNPljG+uZk9pDCmJT5wuUolZnJT+Tgyb xqU2CarelTcyN7FobCR9uzcel2gaf65BVzgWciFu0bAI9CQOrP5ITzcJ2yeXmniBzeeg wJ5lvsy2wkd0z2aPOq3bxiGxipmwfXQiQ++HfV0Jy8w2s2WOLqxB6A7gsolUTHusccIK 04w9I5e6nyGNSfBXDg0MGEmfDtkax3ueGuN6yI6YpYxMNTB3mQASesXA1Mo5h89nnhKc kfkA== X-Gm-Message-State: APjAAAWbiijF17P+BCX5brbnAm9gMWFcFc+Q0XzZVbsr3cM3ZqV+VYAt NF2+JrwDbu+ezHNlYWOliBAWg62YijM= X-Google-Smtp-Source: APXvYqx4aXZUoUzRKq3VQYeWt+AcNACZhKjfD1goVcrdpgYVPenu5H7+sLsFNILQSoOT64qq0n68pA== X-Received: by 2002:a5d:628d:: with SMTP id k13mr24817400wru.317.1562070582652; Tue, 02 Jul 2019 05:29:42 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Tue, 2 Jul 2019 14:29:00 +0200 Message-Id: <20190702122902.10726-3-stamatis.iliass@gmail.com> In-Reply-To: <20190702122902.10726-1-stamatis.iliass@gmail.com> References: <20190702122902.10726-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.43]); Tue, 02 Jul 2019 12:29:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 02 Jul 2019 12:29:44 +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.11 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_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.84 on 10.5.110.43 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/4] test_driver: implement virDomainGetMemoryParameters 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.32]); Tue, 02 Jul 2019 12:33: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 | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 29b388e2d3..3c60d8dd0a 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2851,6 +2851,45 @@ static char *testDomainGetXMLDesc(virDomainPtr domai= n, unsigned int flags) goto cleanup +static int +testDomainGetMemoryParameters(virDomainPtr dom, + virTypedParameterPtr params, + int *nparams, + unsigned int flags) +{ + int ret =3D -1; + virDomainObjPtr vm =3D NULL; + virDomainDefPtr def =3D NULL; + + virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | + VIR_DOMAIN_AFFECT_CONFIG | + VIR_TYPED_PARAM_STRING_OKAY, -1); + + if ((*nparams) =3D=3D 0) { + *nparams =3D 3; + return 0; + } + + if (!(vm =3D testDomObjFromDomain(dom))) + goto cleanup; + + if (!(def =3D virDomainObjGetOneDef(vm, flags))) + goto cleanup; + + TEST_SET_PARAM(0, VIR_DOMAIN_MEMORY_HARD_LIMIT, VIR_TYPED_PARAM_ULLONG= , def->mem.hard_limit); + TEST_SET_PARAM(1, VIR_DOMAIN_MEMORY_SOFT_LIMIT, VIR_TYPED_PARAM_ULLONG= , def->mem.soft_limit); + TEST_SET_PARAM(2, VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT, VIR_TYPED_PARAM_U= LLONG, def->mem.swap_hard_limit); + + if (*nparams > 3) + *nparams =3D 3; + + ret =3D 0; + cleanup: + virDomainObjEndAPI(&vm); + return ret; +} + + static int testConnectNumOfDefinedDomains(virConnectPtr conn) { testDriverPtr privconn =3D conn->privateData; @@ -7283,6 +7322,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainGetVcpuPinInfo =3D testDomainGetVcpuPinInfo, /* 1.2.18 */ .domainGetMaxVcpus =3D testDomainGetMaxVcpus, /* 0.7.3 */ .domainGetXMLDesc =3D testDomainGetXMLDesc, /* 0.1.4 */ + .domainGetMemoryParameters =3D testDomainGetMemoryParameters, /* 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