From nobody Mon Apr 29 06:27:40 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; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1564042798; cv=none; d=zoho.com; s=zohoarc; b=erg7c5VPlWx+bPfDXTJn9LUp49cX455ikF7YrPio1qCpV6WHVk6J7L02scbRffrOjD0TIhXj0gLNXd9pi13bgmOekg9sCkCmvXqMA9l77ILx3KskWgoAG2Jcx3b3Z6iK8MZ/mKEYAb/rM+XjJPllklFWpb2YAgU8Z/JF0mDCAPo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564042798; h=Content-Type:Content-Transfer-Encoding:Cc: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=kjMwNNOrZW/SDVUDn3nAh03O6VCtbKPoTbOgHyfbRsI=; b=jY2AF7jPHZ+6isvbmE7HRnIN2JjwbzRh5TyBRVHEXvgT+MFe36kJ69hTn70K0zj+cOPTTnyK5vlL8FRaxNAZh7Q4NbhqwSHsv775V4mJH5A+6Xk2IW1IbgBel4z6CPXQXTelxVOj9+jhpQ7Ez96U8j2znwY6YaiRMXkAUaHkoJM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass 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 1564042798361432.7727911756383; Thu, 25 Jul 2019 01:19:58 -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 D104A30A7C6E; Thu, 25 Jul 2019 08:19:56 +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 A9EF15F7DC; Thu, 25 Jul 2019 08:19:56 +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 6C36C1800209; Thu, 25 Jul 2019 08:19:56 +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 x6P8JqFq012551 for ; Thu, 25 Jul 2019 04:19:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 571D660D5E; Thu, 25 Jul 2019 08:19:52 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB70F6062E; Thu, 25 Jul 2019 08:19:49 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Thu, 25 Jul 2019 10:19:38 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 1/3] util: cgroup: Add missing parameter @maxthreads to virCgroupNewMachine 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.42]); Thu, 25 Jul 2019 08:19:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Commit @d5572f62e32 forgot to add maxthreads to the non-Linux definition of the function, thus breaking the MinGW build. Signed-off-by: Erik Skultety Reviewed-by: J=C3=A1n Tomko --- src/util/vircgroup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 9daf62795e..2270a520d6 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -2891,6 +2891,7 @@ virCgroupNewMachine(const char *name ATTRIBUTE_UNUSED, int *nicindexes ATTRIBUTE_UNUSED, const char *partition ATTRIBUTE_UNUSED, int controllers ATTRIBUTE_UNUSED, + unsigned int maxthreads ATTRIBUTE_UNUSED, virCgroupPtr *group ATTRIBUTE_UNUSED) { virReportSystemError(ENXIO, "%s", --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Apr 29 06:27:40 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; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1564042797; cv=none; d=zoho.com; s=zohoarc; b=cgM5cuLrX0UbyKOw27d2VCalJOl96rmWU6OvDSZ5oHH8l/uecJ4ZbdBWhNo+qx7heWhkLHnb7chZ3AmDiTPyx83wbZ6tT+jNQmjuevK4FC4our3H1U9tsPJ+lKiLXebAXhjU1RQ3s5hnr9gv/5XmxS7If5MNongjpngSHaErAH4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564042797; h=Content-Type:Content-Transfer-Encoding:Cc: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=w0IH6m3qOSrvsc8ZXdl77x+OZ2OipnCUrQ2aJ+S1MFU=; b=Khfd2KLs47IsyG1AuDgnJW0+vrxztafI+nhp1shiYAKfG34/pDH3FiHrhOV2919l/VgfdrAM5ynNCdKa+YIaquXx2S2uCwRn5jG7p5LOAPeALyUBLB/I75RNCbJsH4SDecl+cpe7Ud6AMSpy29LwFJ+KDlvK0esaR0+d5KFUP2A= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass 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 1564042797504558.0080115937392; Thu, 25 Jul 2019 01:19:57 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 11263A3B63; Thu, 25 Jul 2019 08:19:56 +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 E28585C6DA; Thu, 25 Jul 2019 08:19:55 +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 A28083CBD; Thu, 25 Jul 2019 08:19:55 +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 x6P8JtJH012562 for ; Thu, 25 Jul 2019 04:19:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 19D7760D5E; Thu, 25 Jul 2019 08:19:55 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6563E5C6C5; Thu, 25 Jul 2019 08:19:52 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Thu, 25 Jul 2019 10:19:39 +0200 Message-Id: <771ae742a4b416d5eb6c21c6374615a5bc315860.1564042601.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 2/3] test_driver: Fix testDomainSetMemoryFlags' behaviour on config change 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 25 Jul 2019 08:19:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" When commit @6ac402c456a added the API whenever VIR_DOMAIN_MEM_MAXIMUM was passed the code always checked whether the domain was active and therefore failed with an error even though only a config change was requested. Fix the issue by replacing virDomainObjGetOneDef with virDomainObjGetOneDefState which tells us what definition we're performing the change on. Signed-off-by: Erik Skultety Reviewed-by: J=C3=A1n Tomko --- src/test/test_driver.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 56f6b78ecc..da044027bf 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2524,6 +2524,7 @@ static int testDomainSetMemoryFlags(virDomainPtr doma= in, virDomainObjPtr vm; virDomainDefPtr def; int ret =3D -1; + bool live =3D false; =20 virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG | @@ -2532,11 +2533,11 @@ static int testDomainSetMemoryFlags(virDomainPtr do= main, if (!(vm =3D testDomObjFromDomain(domain))) return -1; =20 - if (!(def =3D virDomainObjGetOneDef(vm, flags))) + if (!(def =3D virDomainObjGetOneDefState(vm, flags, &live))) goto cleanup; =20 if (flags & VIR_DOMAIN_MEM_MAXIMUM) { - if (virDomainObjIsActive(vm)) { + if (live) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("cannot resize the maximum memory on an " "active domain")); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Apr 29 06:27:40 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; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1564042801; cv=none; d=zoho.com; s=zohoarc; b=aXddHCmkNy/ry5zdF27htjVkgL1w/w7K3jwS0VzF+x1X5E/xpQdifhfRWI2AJ/P7HuOCsTuJ6WDpjIOOKToqPgPpBva6pgDFnCBnb0Gg9xylv1YFsKIqaa7fTE+yuD59Ia7iMjX9CpR4bmc99yNQuDfXgfwIbvPhB7tiV8q0nPo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564042801; h=Content-Type:Content-Transfer-Encoding:Cc: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=BKBPXi7oArArPNkLiPgCBwmw7skm2b577MfDUIi0+ko=; b=LhDrG292rSfxek+ctPvX6+c17Ze5AbigxDIqlM6YdBtUT2O7SW/X46XYKTg1zx/AizZmuAAkaR3198e89a/DXziz0lxGinbScwvST+IOLy2TkT1ZSegESTVJRNuS0e5N0FT1BfFYB4pQNL6hKAfcYfo5epcGKKDGOuMHAcUU6S4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass 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 1564042801618648.5622141589704; Thu, 25 Jul 2019 01:20:01 -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 C70CE300D1CA; Thu, 25 Jul 2019 08:19:59 +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 9CD0D611A2; Thu, 25 Jul 2019 08:19:59 +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 473E718045CF; Thu, 25 Jul 2019 08:19:59 +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 x6P8Jwaf012572 for ; Thu, 25 Jul 2019 04:19:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 159F9611A2; Thu, 25 Jul 2019 08:19:58 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id EB3AE5C6C5; Thu, 25 Jul 2019 08:19:55 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Thu, 25 Jul 2019 10:19:40 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 3/3] tests: optparse: Use --config with the setmaxmem command 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.40]); Thu, 25 Jul 2019 08:20:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The virsh-optparse test broke after commit @6ac402c456a because it always assumed the max memory limit can be adjusted on a running domain which used to be the case in the old code. This is only a hot fix for the CI build. The proper fix here is to re-write the whole test in a self-test/unit-test manner where we only test virsh's ability to parse various values, not running actual commands. Signed-off-by: Erik Skultety Reviewed-by: J=C3=A1n Tomko --- tests/virsh-optparse | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/virsh-optparse b/tests/virsh-optparse index 1aef8d8d95..090d6c205c 100755 --- a/tests/virsh-optparse +++ b/tests/virsh-optparse @@ -219,13 +219,13 @@ test -s out && fail=3D1 compare exp-err err || fail=3D1 =20 # Numeric value with valid suffix -virsh -q -c $test_url setmaxmem test 42MB >out 2>err || fail=3D1 +virsh -q -c $test_url setmaxmem test 42MB --config >out 2>err || fail=3D1 test -s out && fail=3D1 test -s err && fail=3D1 =20 # Numeric value bigger than INT_MAX. No failure here because # scaled numeric values are unsigned long long -virsh -q -c $test_url setmaxmem test 2147483648 >out 2>err || fail=3D1 +virsh -q -c $test_url setmaxmem test 2147483648 --config >out 2>err || fai= l=3D1 test -s out && fail=3D1 test -s err && fail=3D1 =20 @@ -248,7 +248,7 @@ test -s out && fail=3D1 compare exp-err err || fail=3D1 =20 # Numeric value -virsh -q -c $test_url setmaxmem test 42 >out 2>err || fail=3D1 +virsh -q -c $test_url setmaxmem test 42 --config >out 2>err || fail=3D1 test -s out && fail=3D1 test -s err && fail=3D1 =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list