From nobody Thu Apr 25 21:57:26 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=1562910997; cv=none; d=zoho.com; s=zohoarc; b=kqhpueh2RpZpmgEAEa3+H8pACiKzgqwZYwE9hb50BvBdjajGwMEXEwPm+hiPFcrpE9f2SWYKzJ3ZY0TBA0zFtIWC+du69x3tLue3qduMkHiu1XZDVA1HBtjO8cKdahjtSy42M+EsARDQ2VJ1sODpjSz9kq9INEffVP8/8ikuOfo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562910997; 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=q7qcrrdvWd6aJOoS+vZV7ug/oMEoeOdel2JJy02nlcI=; b=QVmVFF5OT7p2OfFqm2rMnM6NtM1BNTKtiEP/wfCsF1txP75B8+5KAWaJDXfqj3fTXJDioUzNkXf5TONtJUd/lUAxwLHdNIBk4NXXvcQSn7fokohBSAbwgy7OcTVacs56sDhaQYNNxXOXxqgBGjuGdY3gyiYqOYnCfYXjlHpp+uA= 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 1562910997866179.2009867230762; Thu, 11 Jul 2019 22:56:37 -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 A4D27308219E; Fri, 12 Jul 2019 05:56:35 +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 6D12060635; Fri, 12 Jul 2019 05:56:35 +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 E799318184AC; Fri, 12 Jul 2019 05:56:34 +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 x6C5uY4J032618 for ; Fri, 12 Jul 2019 01:56:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 05A0A60A9A; Fri, 12 Jul 2019 05:56:34 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0013E60635 for ; Fri, 12 Jul 2019 05:56:31 +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 D411E85543 for ; Fri, 12 Jul 2019 05:56:30 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id g67so3580562wme.1 for ; Thu, 11 Jul 2019 22:56:30 -0700 (PDT) Received: from archlap.localdomain (5-203-144-54.mobile.nym.cosmote.net. [5.203.144.54]) by smtp.gmail.com with ESMTPSA id p26sm10344165wrp.58.2019.07.11.22.56.25 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 22:56:28 -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=iLusx4kKAya53515iUOZku1G+disXvJ4AVz5Vs4Nhmg=; b=S9LfxY0PC2O25hdqzftTrk2Yjj/dW+RHdwyO4HgxwvqRGaChs3sKnW4eR/5l/8LYu7 FjJOeID+5VJgzvcAiBH3ZOuJC8WRIqjqf2PICOaAd1b1UCdJoMA5o+jRJL3kj2gCfUcl wMuh8KTgZhk4gIfVoddbG2wzzYWu2vfBj8su3Cjg3oKZoTxUtvuuiFBGYghsIgsepcSU DAPWCN+icbCRuhxUmeRl7NJbW2AKSJb/KML32365JA65gocW8qPu3ru5GZzxn6SBdLUN Muj1V5iXc7L2Rb+uQx9j/Cu2Oetv2yZu9YUPGv8KeYO25d8dJBi2tvi/KgxzQrN7YYyU kiRQ== 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=iLusx4kKAya53515iUOZku1G+disXvJ4AVz5Vs4Nhmg=; b=HgIJ9isLQyg58SfyBD8BTOQjFAv2GInCX0plPUz3+30Wf9OFETl6U92Df5hh8a6Nhg ZclwvcqjCtDyNeJ2hK6FQVATgo4/zO1QbaCWVAj3zciGcchsatkkmNJ4Z2moVhk3hGf4 aErWI4seJoQQMqghciN0hAXYTrdeij3496LtFWJb/oMOVaotGOmMZHzWs1N/D0dGLzLf VekBVeuuEdDayY6DUuovL6M68Pnj0wBs7MlM0H8sm0CJgf9rIry1xYSFvAltYoPx4/qe IC0IrG3EnS5/tkRkYt3qQm62czA/5GGdMGDq3NPQD2soh/9y13RQ+QpPKz0uCVujAYRh 40HA== X-Gm-Message-State: APjAAAXr9HvnvrBaSgronyY5tJ8hg7bOUlNQuO/v0NsNhndCo/xAITGm XU/fxHjyX0QqXJeAuLSXck+ffglChATGaA== X-Google-Smtp-Source: APXvYqyb3t7ynTbaIzSY4x24FExeJC9De+srDpxGyaGIKpn7hfwh16QPvF1L/0pFkXYsLTVYjwJLDw== X-Received: by 2002:a05:600c:303:: with SMTP id q3mr7816565wmd.130.1562910989134; Thu, 11 Jul 2019 22:56:29 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Fri, 12 Jul 2019 07:55:33 +0200 Message-Id: <20190712055535.9099-2-stamatis.iliass@gmail.com> In-Reply-To: <20190712055535.9099-1-stamatis.iliass@gmail.com> References: <20190712055535.9099-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.28]); Fri, 12 Jul 2019 05:56:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 12 Jul 2019 05:56:31 +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.194 * (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, PDS_NO_HELO_DNS, 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.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 1/3] test_driver: consider flags in testDomainSetMemoryFlags 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.47]); Fri, 12 Jul 2019 05:56:36 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Update the current or max memory, on the persistent or live definition depending on the flags which are currently ignored. Signed-off-by: Ilias Stamatis Reviewed-by: Erik Skultety --- src/test/test_driver.c | 51 +++++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index c10344f6cd..90910060ed 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2473,24 +2473,59 @@ static int testDomainSetMemoryFlags(virDomainPtr do= main, unsigned long memory, unsigned int flags) { - virDomainObjPtr privdom; + virDomainObjPtr vm; + virDomainDefPtr def; int ret =3D -1; - virCheckFlags(0, -1); + virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | + VIR_DOMAIN_AFFECT_CONFIG | + VIR_DOMAIN_MEM_MAXIMUM, -1); - if (!(privdom =3D testDomObjFromDomain(domain))) + if (!(vm =3D testDomObjFromDomain(domain))) return -1; - if (memory > virDomainDefGetMemoryTotal(privdom->def)) { - virReportError(VIR_ERR_INVALID_ARG, __FUNCTION__); + if (!(def =3D virDomainObjGetOneDef(vm, flags))) goto cleanup; + + if (flags & VIR_DOMAIN_MEM_MAXIMUM) { + if (virDomainObjCheckActive(vm)) { + virReportError(VIR_ERR_OPERATION_INVALID, "%s", + _("cannot resize the maximum memory on an " + "active domain")); + goto cleanup; + } + + if (virDomainNumaGetNodeCount(def->numa) > 0) { + virReportError(VIR_ERR_OPERATION_INVALID, "%s", + _("initial memory size of a domain with NUMA " + "nodes cannot be modified with this API")); + goto cleanup; + } + + if (def->mem.max_memory && def->mem.max_memory < memory) { + virReportError(VIR_ERR_OPERATION_INVALID, "%s", + _("cannot set initial memory size greater than " + "the maximum memory size")); + goto cleanup; + } + + virDomainDefSetMemoryTotal(def, memory); + + if (def->mem.cur_balloon > memory) + def->mem.cur_balloon =3D memory; + } else { + if (memory > virDomainDefGetMemoryTotal(def)) { + virReportError(VIR_ERR_INVALID_ARG, "%s", + _("cannot set memory higher than max memory")); + goto cleanup; + } + + def->mem.cur_balloon =3D memory; } - privdom->def->mem.cur_balloon =3D memory; ret =3D 0; - cleanup: - virDomainObjEndAPI(&privdom); + virDomainObjEndAPI(&vm); return ret; } -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 21:57:26 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=1562911027; cv=none; d=zoho.com; s=zohoarc; b=ki7KiSl3OigVS5wGNbIds5tlRFF8EQVl2DjXCMF8EO1+c9lv/yOb/oxvoSbR46X/npA8aotdig35NE11KvGGoWI6jmRYupvfBjv2bhlPzQyQO0A1WFSP2dHX0rSIh34j+KeUWWV9GEe3RzQFgMd2igZNmgzIgrX3Dk3ps7y7QdI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562911027; 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=FCTQwhsekjScnKzeTukR0lEtkq6NTSJ3XTFUmCT/TKk=; b=a2UZKEYQGnTRAJC+Y/fTldTWeG3zPdSGj52IlXaHKsCryt6jjxlst0QPrmUGNNYwIKYCVv3VBKiVsvLgF3++pUiFnVc8USDZsTJ56AKrRMXvgJSRbEVsFJ0cjPcvADxw97Na5n2ad0HYHDY0c/Hrk0ymmnyA692cfiFzjkCoMVQ= 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 156291102789378.05189991159023; Thu, 11 Jul 2019 22:57:07 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4FB5859474; Fri, 12 Jul 2019 05:57:06 +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 2A8A85C69A; Fri, 12 Jul 2019 05:57:06 +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 DF19818184AD; Fri, 12 Jul 2019 05:57:05 +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 x6C5v5Ep000539 for ; Fri, 12 Jul 2019 01:57:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0595B413C; Fri, 12 Jul 2019 05:57:05 +0000 (UTC) Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.42]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F3E355D9C5 for ; Fri, 12 Jul 2019 05:57:02 +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 808843091DC3 for ; Fri, 12 Jul 2019 05:57:01 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id l2so7702349wmg.0 for ; Thu, 11 Jul 2019 22:57:01 -0700 (PDT) Received: from archlap.localdomain (5-203-144-54.mobile.nym.cosmote.net. [5.203.144.54]) by smtp.gmail.com with ESMTPSA id p26sm10344165wrp.58.2019.07.11.22.56.53 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 22:56:59 -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=NVsKZDtfuB94STYt0jiOcbcoPhA4a0YIg/FSMj7PkdI=; b=sKk759qZKX1/ZAzqXbL2MOHyKaDTgglfDnAPSrAWCwJjXh1wmpas1TpXz3640Iuk8m moy36p5Cew+6DibaQ8k77P7XU0ah8nh7Y5j2dTwzQ6xB7aphBV5/slYEgCuYKPw+Qkzs Igi5vl23uSh8hBNw2hyMwc5GUIenDym5IBCWW3vlMwToI1hlkTuFr8MJQ2m0LpuapD9t eNESQ2GDIf2f0go4D+UbhMuERdMQ9BXIvZmkuaymxKd1VRaG61g5mXNZTFwlJS8SE+cX 2IQUA/akrKFRSOcqJchBIUyQZS16ZTkuzjgSZ5telhXfiNYHJ6G/FD9PSayVdWTA8czX dUZw== 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=NVsKZDtfuB94STYt0jiOcbcoPhA4a0YIg/FSMj7PkdI=; b=laxAIibwj3Sg2wyBKKLTv5XoYr/3jr/Cfekf5ecjMQuSi7x9OHCoHp2ERXqnZtFgFW XlfD2NJ3zbSn4zI5SRhRgpl6LUet9ZNARVZW/kwTwunO8X3G+9QmgKM8ROOYs6N9i0Pg kjeT5w0YSoj4PGmfyKJ0oOQxqNb7vJF1Y+MjxT86pg5IDvgSBWCpmqdaM5vi/Xh4A8/G EyuU531N1WZaCQw/b4wo0EsazEFopFlq7SzNAoLS7WGCl9575BCBkAKKail0qKPyDxB6 qeMdON/6P5wg2URz4f7FSlaXv2eSu6Ct3agVTNC40UPFEIQD9XJfzBfww+n6MAzUC6BM JGWg== X-Gm-Message-State: APjAAAWDOxgN2ahox2HPzvY53Y8sojwEMtc+/RBt8SB4EwbEEjOyGtA/ PDZa1BeTXLgJxFItjTaxaMy8oosED2hLgA== X-Google-Smtp-Source: APXvYqzCXhRDw7CcJft9OrjNF19uIAt68QCMdEFUC9u8mnAKS6Z1pxvKASorp7AdrBh3NR6miD7YqA== X-Received: by 2002:a1c:3883:: with SMTP id f125mr7296203wma.18.1562911019815; Thu, 11 Jul 2019 22:56:59 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Fri, 12 Jul 2019 07:55:34 +0200 Message-Id: <20190712055535.9099-3-stamatis.iliass@gmail.com> In-Reply-To: <20190712055535.9099-1-stamatis.iliass@gmail.com> References: <20190712055535.9099-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.42]); Fri, 12 Jul 2019 05:57:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 12 Jul 2019 05:57:01 +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.194 * (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, PDS_NO_HELO_DNS, 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.42 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 2/3] test_driver: testDomainSetMemory should forward the call with VIR_DOMAIN_AFFECT_LIVE 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 12 Jul 2019 05:57:06 +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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 90910060ed..6b39b78a93 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2532,7 +2532,7 @@ static int testDomainSetMemoryFlags(virDomainPtr doma= in, static int testDomainSetMemory(virDomainPtr domain, unsigned long memory) { - return testDomainSetMemoryFlags(domain, memory, 0); + return testDomainSetMemoryFlags(domain, memory, VIR_DOMAIN_AFFECT_LIVE= ); } static int -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 21:57:26 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=1562911068; cv=none; d=zoho.com; s=zohoarc; b=OpkZXjHZ70TCmcKzgNJ56jUf6YDxsUy6cSTgN99qCYyLKS1k504ceQ7PmJF8Bn+UTmN6yHh6BZ69u/AyBctFpKM/KcRAgM02nb+FWq+IRA6fmPXsQLxYhkCuhYyOJwoIrOciRE411ERqQFXg8VUE28ugwlNUMXIWkQX6vnnk/lA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562911068; 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=8Y2Ie7fcD9UgSABWJyM048yglhFDWbB55tyWqZ1HBMw=; b=hWbdQFmXs6V5WwCiFhroo/MAQNqk/2oIjweFnz8cfiGRNbzm4TaOiVUBN9A6ZHoAh8YiAYckYTXYLGs9Bch5I+yxpVH6AFlrJYB7ONf1674Y4tgO4N4lbGsCY4ierUr7oKmuMME5AqvrIl8P5X46oweMj+GxXERTxQuk1z+tUQE= 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 1562911068781655.3645075903419; Thu, 11 Jul 2019 22:57:48 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 00EB52F8BEE; Fri, 12 Jul 2019 05:57:47 +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 D34CB5C22E; Fri, 12 Jul 2019 05:57:46 +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 9544941F53; Fri, 12 Jul 2019 05:57:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6C5viu7000893 for ; Fri, 12 Jul 2019 01:57:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id DBC0460BFC; Fri, 12 Jul 2019 05:57:44 +0000 (UTC) Received: from mx1.redhat.com (ext-mx19.extmail.prod.ext.phx2.redhat.com [10.5.110.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D475660BFB for ; Fri, 12 Jul 2019 05:57:42 +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 95189307D911 for ; Fri, 12 Jul 2019 05:57:41 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id 31so8621218wrm.1 for ; Thu, 11 Jul 2019 22:57:41 -0700 (PDT) Received: from archlap.localdomain (5-203-144-54.mobile.nym.cosmote.net. [5.203.144.54]) by smtp.gmail.com with ESMTPSA id p26sm10344165wrp.58.2019.07.11.22.57.37 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 22:57:39 -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=xPCnXVpSFNbrRWKa8d6iXw4wnslJ9TrUDVmleeb4LQ0=; b=IICemFmo8JD70vDvkCV578b1tcocqqSVOQDNrbOyQZlRo31o4nnt7PdeZxpTWblT14 Qn4r9EsUlEjWQskb/aXsXK0NzzUS01QOmO7R2rmOOz0nH9pA52cFsRflG8h2qzl6RjKf l1SiIqRXxAQK/KLSHj+OFknW2p/cVOioEwpxRlyHHh+TNZ8O13Ps2INZrTmpDK1OveSp cOjrJFHbDem5dsTCnPeyCD2bjYrp14BZxU5ANiP/nsJiSSQeDonb+HBQ7VstqT8wA+GR Wcq3g98FQ6FuCjbbvgavoRaiBNVFdkK/PMr6/Icpl/bffiMdP50H2KHdp9tjw9wynNF9 Es8A== 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=xPCnXVpSFNbrRWKa8d6iXw4wnslJ9TrUDVmleeb4LQ0=; b=o1fwgRM1rWlchzzak2lngNEwnp8+Iwz6pksNy/M+gvs687VMq53M9KV43v+vvLESVE F1XvDvYBsoseCPrR9ntCbV9TMnEUAaeCv23LqxGt6H/YGltAse7ljddyz2pymAuTh7EM Z5PN7v8oYnKkgeMnnWWG+3mxluIQXitlmBylbynpX6ZigTYeTf7L8dw7dE0FczVz8Gds G3020UVQF8FWeugwY6BcJXRlxFzOWLL7b+ThpOE2X05iQB7dwszAW6pc64spZUDO8SJ2 26RTMeVt93BkH2d2hHZ28ajh/zEUiPDiTsUOGRR5jgbGyxb56fmeKeWa4wulRB65m91F EkJg== X-Gm-Message-State: APjAAAUH50aY1692xCYyGV2f34eH6z3nLmA2R7JoRKrrE1ysFmRBfBTj +z97XWP3Kns+sQ7Lix0ajZKDI+GtGbcTEw== X-Google-Smtp-Source: APXvYqzgkuqc9UzCYBzTHvBnK3BQ/EVt1vjtfi4MSXwzvD3cP5n7PVaqqd6M0RImrxH5DNyQGsxsug== X-Received: by 2002:a5d:680d:: with SMTP id w13mr9355261wru.141.1562911059931; Thu, 11 Jul 2019 22:57:39 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Fri, 12 Jul 2019 07:55:35 +0200 Message-Id: <20190712055535.9099-4-stamatis.iliass@gmail.com> In-Reply-To: <20190712055535.9099-1-stamatis.iliass@gmail.com> References: <20190712055535.9099-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.48]); Fri, 12 Jul 2019 05:57:41 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 12 Jul 2019 05:57:41 +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: 1.195 * (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, PDS_NO_HELO_DNS, 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.48 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 3/3] test_driver: testDomainSetMaxMemory should simply forward the call 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 12 Jul 2019 05:57:47 +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 | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 6b39b78a93..8aea739387 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2454,20 +2454,6 @@ testDomainGetMaxMemory(virDomainPtr domain) return ret; } -static int testDomainSetMaxMemory(virDomainPtr domain, - unsigned long memory) -{ - virDomainObjPtr privdom; - - if (!(privdom =3D testDomObjFromDomain(domain))) - return -1; - - /* XXX validate not over host memory wrt to other domains */ - virDomainDefSetMemoryTotal(privdom->def, memory); - - virDomainObjEndAPI(&privdom); - return 0; -} static int testDomainSetMemoryFlags(virDomainPtr domain, unsigned long memory, @@ -2535,6 +2521,14 @@ static int testDomainSetMemory(virDomainPtr domain, return testDomainSetMemoryFlags(domain, memory, VIR_DOMAIN_AFFECT_LIVE= ); } + +static int testDomainSetMaxMemory(virDomainPtr domain, + unsigned long memory) +{ + return testDomainSetMemoryFlags(domain, memory, VIR_DOMAIN_MEM_MAXIMUM= ); +} + + static int testDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags) { -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list