mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
tests: extract pages-discard-hugepages out of hugepages-pages3
Similar thing happens as for pages-discard, it is not passed to QEMU. Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
1abcfa5c17
commit
9a6674c0ff
@ -13,8 +13,7 @@ QEMU_AUDIO_DRV=none \
|
||||
-object memory-backend-ram,id=ram-node0,size=268435456 \
|
||||
-numa node,nodeid=0,cpus=0,memdev=ram-node0 \
|
||||
-object memory-backend-file,id=ram-node1,prealloc=yes,\
|
||||
mem-path=/dev/hugepages1G/libvirt/qemu/-1-SomeDummyHugepagesGu,\
|
||||
discard-data=yes,size=805306368 \
|
||||
mem-path=/dev/hugepages1G/libvirt/qemu/-1-SomeDummyHugepagesGu,size=805306368 \
|
||||
-numa node,nodeid=1,cpus=1,memdev=ram-node1 \
|
||||
-uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \
|
||||
-display none \
|
||||
|
@ -15,8 +15,8 @@
|
||||
</os>
|
||||
<cpu>
|
||||
<numa>
|
||||
<cell id='0' cpus='0' memory='262144' unit='KiB' discard='no'/>
|
||||
<cell id='1' cpus='1' memory='786432' unit='KiB' discard='yes'/>
|
||||
<cell id='0' cpus='0' memory='262144' unit='KiB'/>
|
||||
<cell id='1' cpus='1' memory='786432' unit='KiB'/>
|
||||
</numa>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
|
27
tests/qemuxml2argvdata/pages-discard-hugepages.args
Normal file
27
tests/qemuxml2argvdata/pages-discard-hugepages.args
Normal file
@ -0,0 +1,27 @@
|
||||
LC_ALL=C \
|
||||
PATH=/bin \
|
||||
HOME=/home/test \
|
||||
USER=test \
|
||||
LOGNAME=test \
|
||||
QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/qemu-system-i686 \
|
||||
-name SomeDummyHugepagesGuest \
|
||||
-S \
|
||||
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
|
||||
-m 1024 \
|
||||
-smp 2,sockets=2,cores=1,threads=1 \
|
||||
-mem-prealloc \
|
||||
-mem-path /dev/hugepages2M/libvirt/qemu/-1-SomeDummyHugepagesGu \
|
||||
-numa node,nodeid=0,cpus=0,mem=256 \
|
||||
-numa node,nodeid=1,cpus=1,mem=768 \
|
||||
-uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
-nodefaults \
|
||||
-chardev socket,id=charmonitor,\
|
||||
path=/tmp/lib/domain--1-SomeDummyHugepagesGu/monitor.sock,server,nowait \
|
||||
-mon chardev=charmonitor,id=monitor,mode=control \
|
||||
-rtc base=utc \
|
||||
-no-shutdown \
|
||||
-no-acpi \
|
||||
-usb
|
34
tests/qemuxml2argvdata/pages-discard-hugepages.xml
Normal file
34
tests/qemuxml2argvdata/pages-discard-hugepages.xml
Normal file
@ -0,0 +1,34 @@
|
||||
<domain type='qemu'>
|
||||
<name>SomeDummyHugepagesGuest</name>
|
||||
<uuid>ef1bdff4-27f3-4e85-a807-5fb4d58463cc</uuid>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<currentMemory unit='KiB'>1048576</currentMemory>
|
||||
<memoryBacking>
|
||||
<hugepages/>
|
||||
</memoryBacking>
|
||||
<vcpu placement='static'>2</vcpu>
|
||||
<os>
|
||||
<type arch='i686' machine='pc'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<cpu>
|
||||
<numa>
|
||||
<cell id='0' cpus='0' memory='262144' unit='KiB' discard='no'/>
|
||||
<cell id='1' cpus='1' memory='786432' unit='KiB' discard='yes'/>
|
||||
</numa>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-i686</emulator>
|
||||
<controller type='usb' index='0'>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
||||
</controller>
|
||||
<controller type='pci' index='0' model='pci-root'/>
|
||||
<input type='mouse' bus='ps2'/>
|
||||
<input type='keyboard' bus='ps2'/>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
@ -947,6 +947,10 @@ mymain(void)
|
||||
DO_TEST("pages-discard",
|
||||
QEMU_CAPS_OBJECT_MEMORY_FILE,
|
||||
QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD);
|
||||
DO_TEST("pages-discard-hugepages",
|
||||
QEMU_CAPS_OBJECT_MEMORY_RAM,
|
||||
QEMU_CAPS_OBJECT_MEMORY_FILE,
|
||||
QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD);
|
||||
DO_TEST("hugepages-default", NONE);
|
||||
DO_TEST("hugepages-numa-default",
|
||||
QEMU_CAPS_OBJECT_MEMORY_FILE);
|
||||
@ -960,8 +964,7 @@ mymain(void)
|
||||
QEMU_CAPS_OBJECT_MEMORY_RAM,
|
||||
QEMU_CAPS_OBJECT_MEMORY_FILE);
|
||||
DO_TEST("hugepages-pages3", QEMU_CAPS_OBJECT_MEMORY_RAM,
|
||||
QEMU_CAPS_OBJECT_MEMORY_FILE,
|
||||
QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD);
|
||||
QEMU_CAPS_OBJECT_MEMORY_FILE);
|
||||
DO_TEST("hugepages-shared",
|
||||
QEMU_CAPS_OBJECT_MEMORY_RAM,
|
||||
QEMU_CAPS_OBJECT_MEMORY_FILE);
|
||||
|
@ -15,8 +15,8 @@
|
||||
</os>
|
||||
<cpu>
|
||||
<numa>
|
||||
<cell id='0' cpus='0' memory='262144' unit='KiB' discard='no'/>
|
||||
<cell id='1' cpus='1' memory='786432' unit='KiB' discard='yes'/>
|
||||
<cell id='0' cpus='0' memory='262144' unit='KiB'/>
|
||||
<cell id='1' cpus='1' memory='786432' unit='KiB'/>
|
||||
</numa>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
|
1
tests/qemuxml2xmloutdata/pages-discard-hugepages.xml
Symbolic link
1
tests/qemuxml2xmloutdata/pages-discard-hugepages.xml
Symbolic link
@ -0,0 +1 @@
|
||||
../qemuxml2argvdata/pages-discard-hugepages.xml
|
@ -326,6 +326,7 @@ mymain(void)
|
||||
DO_TEST("pmu-feature-off", NONE);
|
||||
|
||||
DO_TEST("pages-discard", NONE);
|
||||
DO_TEST("pages-discard-hugepages", NONE);
|
||||
DO_TEST("hugepages-default", NONE);
|
||||
DO_TEST("hugepages-numa-default-2M", NONE);
|
||||
DO_TEST("hugepages-numa-default-dimm", NONE);
|
||||
|
Loading…
Reference in New Issue
Block a user