summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHugues Fafard <fafardh@posteo.de>2021-08-06 16:56:21 +0200
committerCole Robinson <crobinso@redhat.com>2021-10-04 13:31:54 -0400
commit5cfbbf57018c5f4a138559faed197292c9a83e42 (patch)
tree8d242569976d26afa6147a10d56325c4b3d13afb /tests
parentddcdd39dcb2d22d4883326e257a9d67c9e942d8a (diff)
downloadvirt-manager-5cfbbf57018c5f4a138559faed197292c9a83e42.tar.gz
cli: --cputune: add support for host cpu usage quotas
This includes support for the following options: * `shares` * `period` * `quota` * `global_period` * `global_quota` * `emulator_period` * `emulator_quota` * `iothread_period` * `iothread_quota`
Diffstat (limited to 'tests')
-rw-r--r--tests/data/cli/compare/virt-install-singleton-config-2.xml18
-rw-r--r--tests/test_cli.py6
2 files changed, 23 insertions, 1 deletions
diff --git a/tests/data/cli/compare/virt-install-singleton-config-2.xml b/tests/data/cli/compare/virt-install-singleton-config-2.xml
index 0107a4a7..5aad3b6e 100644
--- a/tests/data/cli/compare/virt-install-singleton-config-2.xml
+++ b/tests/data/cli/compare/virt-install-singleton-config-2.xml
@@ -238,6 +238,15 @@
</keywrap>
<on_lockfailure>ignore</on_lockfailure>
<cputune>
+ <shares>2048</shares>
+ <period>1000000</period>
+ <quota>-1</quota>
+ <global_period>1000000</global_period>
+ <global_quota>-1</global_quota>
+ <emulator_period>1000000</emulator_period>
+ <emulator_quota>-1</emulator_quota>
+ <iothread_period>1000000</iothread_period>
+ <iothread_quota>-1</iothread_quota>
<vcpupin vcpu="0" cpuset="0-3"/>
<emulatorpin cpuset="1,7"/>
<iothreadpin iothread="1" cpuset="1,7"/>
@@ -493,6 +502,15 @@
</keywrap>
<on_lockfailure>ignore</on_lockfailure>
<cputune>
+ <shares>2048</shares>
+ <period>1000000</period>
+ <quota>-1</quota>
+ <global_period>1000000</global_period>
+ <global_quota>-1</global_quota>
+ <emulator_period>1000000</emulator_period>
+ <emulator_quota>-1</emulator_quota>
+ <iothread_period>1000000</iothread_period>
+ <iothread_quota>-1</iothread_quota>
<vcpupin vcpu="0" cpuset="0-3"/>
<emulatorpin cpuset="1,7"/>
<iothreadpin iothread="1" cpuset="1,7"/>
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 86d9f9a7..7f672fbe 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -515,7 +515,11 @@ cell0.distances.sibling1.id=1,cell0.distances.sibling1.value=21,\
numa.cell1.distances.sibling0.id=0,numa.cell1.distances.sibling0.value=21,\
cell1.distances.sibling1.id=1,cell1.distances.sibling1.value=10,\
cache.mode=emulate,cache.level=3
---cputune vcpupin0.vcpu=0,vcpupin0.cpuset=0-3,emulatorpin.cpuset=1,7,iothreadpin0.iothread=1,iothreadpin0.cpuset=1,7,cachetune0.vcpus=0-3,cachetune0.cache0.level=3,cachetune0.cache0.id=0,cachetune0.cache0.type=both,cachetune0.cache0.size=3,cachetune0.cache0.unit=MiB,memorytune0.vcpus=0-3,memorytune0.node0.id=0,memorytune0.node0.bandwidth=60,vcpusched0.vcpus=0-3,^2,vcpusched0.scheduler=fifo,vcpusched0.priority=95
+--cputune shares=2048,period=1000000,quota=-1,global_period=1000000,global_quota=-1,emulator_period=1000000,emulator_quota=-1,iothread_period=1000000,iothread_quota=-1,\
+vcpupin0.vcpu=0,vcpupin0.cpuset=0-3,emulatorpin.cpuset=1,7,iothreadpin0.iothread=1,iothreadpin0.cpuset=1,7,\
+cachetune0.vcpus=0-3,cachetune0.cache0.level=3,cachetune0.cache0.id=0,cachetune0.cache0.type=both,cachetune0.cache0.size=3,cachetune0.cache0.unit=MiB,\
+memorytune0.vcpus=0-3,memorytune0.node0.id=0,memorytune0.node0.bandwidth=60,\
+vcpusched0.vcpus=0-3,^2,vcpusched0.scheduler=fifo,vcpusched0.priority=95
--iothreads iothreads=2,iothreadids.iothread1.id=1,iothreadids.iothread2.id=2
--metadata title=my-title,description=my-description,uuid=00000000-1111-2222-3333-444444444444,genid=e9392370-2917-565e-692b-d057f46512d6
--boot cdrom,fd,hd,network,menu=off,loader=/foo/bar,emulator=/new/emu,bootloader=/new/bootld,rebootTimeout=3,initargs="foo=bar baz=woo",initdir=/my/custom/cwd,inituser=tester,initgroup=1000,firmware=efi