From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v3 qemu-server 02/13] tests: add memory tests
Date: Thu, 2 Feb 2023 12:03:33 +0100 [thread overview]
Message-ID: <20230202110344.840195-3-aderumier@odiso.com> (raw)
In-Reply-To: <20230202110344.840195-1-aderumier@odiso.com>
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
test/cfg2cmd/memory-hotplug-hugepages.conf | 12 ++
.../cfg2cmd/memory-hotplug-hugepages.conf.cmd | 62 +++++++
test/cfg2cmd/memory-hotplug.conf | 11 ++
test/cfg2cmd/memory-hotplug.conf.cmd | 174 ++++++++++++++++++
test/cfg2cmd/memory-hugepages-1g.conf | 11 ++
test/cfg2cmd/memory-hugepages-1g.conf.cmd | 30 +++
test/cfg2cmd/memory-hugepages-2m.conf | 11 ++
test/cfg2cmd/memory-hugepages-2m.conf.cmd | 30 +++
test/run_config2command_tests.pl | 15 ++
9 files changed, 356 insertions(+)
create mode 100644 test/cfg2cmd/memory-hotplug-hugepages.conf
create mode 100644 test/cfg2cmd/memory-hotplug-hugepages.conf.cmd
create mode 100644 test/cfg2cmd/memory-hotplug.conf
create mode 100644 test/cfg2cmd/memory-hotplug.conf.cmd
create mode 100644 test/cfg2cmd/memory-hugepages-1g.conf
create mode 100644 test/cfg2cmd/memory-hugepages-1g.conf.cmd
create mode 100644 test/cfg2cmd/memory-hugepages-2m.conf
create mode 100644 test/cfg2cmd/memory-hugepages-2m.conf.cmd
diff --git a/test/cfg2cmd/memory-hotplug-hugepages.conf b/test/cfg2cmd/memory-hotplug-hugepages.conf
new file mode 100644
index 0000000..6cba31e
--- /dev/null
+++ b/test/cfg2cmd/memory-hotplug-hugepages.conf
@@ -0,0 +1,12 @@
+# TEST: memory hotplug with 1GB hugepage
+# QEMU_VERSION: 3.0
+cores: 2
+memory: 18432
+name: simple
+numa: 1
+ostype: l26
+smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
+sockets: 2
+vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8
+hotplug: memory
+hugepages: 1024
\ No newline at end of file
diff --git a/test/cfg2cmd/memory-hotplug-hugepages.conf.cmd b/test/cfg2cmd/memory-hotplug-hugepages.conf.cmd
new file mode 100644
index 0000000..6d4d8e8
--- /dev/null
+++ b/test/cfg2cmd/memory-hotplug-hugepages.conf.cmd
@@ -0,0 +1,62 @@
+/usr/bin/kvm \
+ -id 8006 \
+ -name 'simple,debug-threads=on' \
+ -no-shutdown \
+ -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \
+ -mon 'chardev=qmp,mode=control' \
+ -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
+ -mon 'chardev=qmp-event,mode=control' \
+ -pidfile /var/run/qemu-server/8006.pid \
+ -daemonize \
+ -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
+ -smp '4,sockets=2,cores=2,maxcpus=4' \
+ -nodefaults \
+ -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
+ -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \
+ -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \
+ -m 'size=2048,slots=255,maxmem=524288M' \
+ -object 'memory-backend-file,id=ram-node0,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -numa 'node,nodeid=0,cpus=0-1,memdev=ram-node0' \
+ -object 'memory-backend-file,id=ram-node1,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -numa 'node,nodeid=1,cpus=2-3,memdev=ram-node1' \
+ -object 'memory-backend-file,id=mem-dimm0,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -device 'pc-dimm,id=dimm0,memdev=mem-dimm0,node=0' \
+ -object 'memory-backend-file,id=mem-dimm1,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -device 'pc-dimm,id=dimm1,memdev=mem-dimm1,node=1' \
+ -object 'memory-backend-file,id=mem-dimm2,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -device 'pc-dimm,id=dimm2,memdev=mem-dimm2,node=0' \
+ -object 'memory-backend-file,id=mem-dimm3,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -device 'pc-dimm,id=dimm3,memdev=mem-dimm3,node=1' \
+ -object 'memory-backend-file,id=mem-dimm4,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -device 'pc-dimm,id=dimm4,memdev=mem-dimm4,node=0' \
+ -object 'memory-backend-file,id=mem-dimm5,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -device 'pc-dimm,id=dimm5,memdev=mem-dimm5,node=1' \
+ -object 'memory-backend-file,id=mem-dimm6,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -device 'pc-dimm,id=dimm6,memdev=mem-dimm6,node=0' \
+ -object 'memory-backend-file,id=mem-dimm7,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -device 'pc-dimm,id=dimm7,memdev=mem-dimm7,node=1' \
+ -object 'memory-backend-file,id=mem-dimm8,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -device 'pc-dimm,id=dimm8,memdev=mem-dimm8,node=0' \
+ -object 'memory-backend-file,id=mem-dimm9,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -device 'pc-dimm,id=dimm9,memdev=mem-dimm9,node=1' \
+ -object 'memory-backend-file,id=mem-dimm10,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -device 'pc-dimm,id=dimm10,memdev=mem-dimm10,node=0' \
+ -object 'memory-backend-file,id=mem-dimm11,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -device 'pc-dimm,id=dimm11,memdev=mem-dimm11,node=1' \
+ -object 'memory-backend-file,id=mem-dimm12,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -device 'pc-dimm,id=dimm12,memdev=mem-dimm12,node=0' \
+ -object 'memory-backend-file,id=mem-dimm13,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -device 'pc-dimm,id=dimm13,memdev=mem-dimm13,node=1' \
+ -object 'memory-backend-file,id=mem-dimm14,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -device 'pc-dimm,id=dimm14,memdev=mem-dimm14,node=0' \
+ -object 'memory-backend-file,id=mem-dimm15,size=1024M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -device 'pc-dimm,id=dimm15,memdev=mem-dimm15,node=1' \
+ -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
+ -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
+ -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \
+ -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \
+ -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \
+ -device 'VGA,id=vga,bus=pci.0,addr=0x2' \
+ -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' \
+ -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
+ -machine 'type=pc'
diff --git a/test/cfg2cmd/memory-hotplug.conf b/test/cfg2cmd/memory-hotplug.conf
new file mode 100644
index 0000000..386e61f
--- /dev/null
+++ b/test/cfg2cmd/memory-hotplug.conf
@@ -0,0 +1,11 @@
+# TEST: basic memory hotplug
+# QEMU_VERSION: 3.0
+cores: 2
+memory: 66560
+name: simple
+numa: 1
+ostype: l26
+smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
+sockets: 2
+vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8
+hotplug: memory
diff --git a/test/cfg2cmd/memory-hotplug.conf.cmd b/test/cfg2cmd/memory-hotplug.conf.cmd
new file mode 100644
index 0000000..2da7955
--- /dev/null
+++ b/test/cfg2cmd/memory-hotplug.conf.cmd
@@ -0,0 +1,174 @@
+/usr/bin/kvm \
+ -id 8006 \
+ -name 'simple,debug-threads=on' \
+ -no-shutdown \
+ -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \
+ -mon 'chardev=qmp,mode=control' \
+ -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
+ -mon 'chardev=qmp-event,mode=control' \
+ -pidfile /var/run/qemu-server/8006.pid \
+ -daemonize \
+ -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
+ -smp '4,sockets=2,cores=2,maxcpus=4' \
+ -nodefaults \
+ -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
+ -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \
+ -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \
+ -m 'size=1024,slots=255,maxmem=524288M' \
+ -object 'memory-backend-ram,id=ram-node0,size=512M' \
+ -numa 'node,nodeid=0,cpus=0-1,memdev=ram-node0' \
+ -object 'memory-backend-ram,id=ram-node1,size=512M' \
+ -numa 'node,nodeid=1,cpus=2-3,memdev=ram-node1' \
+ -object 'memory-backend-ram,id=mem-dimm0,size=512M' \
+ -device 'pc-dimm,id=dimm0,memdev=mem-dimm0,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm1,size=512M' \
+ -device 'pc-dimm,id=dimm1,memdev=mem-dimm1,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm2,size=512M' \
+ -device 'pc-dimm,id=dimm2,memdev=mem-dimm2,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm3,size=512M' \
+ -device 'pc-dimm,id=dimm3,memdev=mem-dimm3,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm4,size=512M' \
+ -device 'pc-dimm,id=dimm4,memdev=mem-dimm4,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm5,size=512M' \
+ -device 'pc-dimm,id=dimm5,memdev=mem-dimm5,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm6,size=512M' \
+ -device 'pc-dimm,id=dimm6,memdev=mem-dimm6,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm7,size=512M' \
+ -device 'pc-dimm,id=dimm7,memdev=mem-dimm7,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm8,size=512M' \
+ -device 'pc-dimm,id=dimm8,memdev=mem-dimm8,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm9,size=512M' \
+ -device 'pc-dimm,id=dimm9,memdev=mem-dimm9,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm10,size=512M' \
+ -device 'pc-dimm,id=dimm10,memdev=mem-dimm10,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm11,size=512M' \
+ -device 'pc-dimm,id=dimm11,memdev=mem-dimm11,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm12,size=512M' \
+ -device 'pc-dimm,id=dimm12,memdev=mem-dimm12,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm13,size=512M' \
+ -device 'pc-dimm,id=dimm13,memdev=mem-dimm13,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm14,size=512M' \
+ -device 'pc-dimm,id=dimm14,memdev=mem-dimm14,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm15,size=512M' \
+ -device 'pc-dimm,id=dimm15,memdev=mem-dimm15,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm16,size=512M' \
+ -device 'pc-dimm,id=dimm16,memdev=mem-dimm16,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm17,size=512M' \
+ -device 'pc-dimm,id=dimm17,memdev=mem-dimm17,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm18,size=512M' \
+ -device 'pc-dimm,id=dimm18,memdev=mem-dimm18,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm19,size=512M' \
+ -device 'pc-dimm,id=dimm19,memdev=mem-dimm19,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm20,size=512M' \
+ -device 'pc-dimm,id=dimm20,memdev=mem-dimm20,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm21,size=512M' \
+ -device 'pc-dimm,id=dimm21,memdev=mem-dimm21,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm22,size=512M' \
+ -device 'pc-dimm,id=dimm22,memdev=mem-dimm22,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm23,size=512M' \
+ -device 'pc-dimm,id=dimm23,memdev=mem-dimm23,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm24,size=512M' \
+ -device 'pc-dimm,id=dimm24,memdev=mem-dimm24,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm25,size=512M' \
+ -device 'pc-dimm,id=dimm25,memdev=mem-dimm25,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm26,size=512M' \
+ -device 'pc-dimm,id=dimm26,memdev=mem-dimm26,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm27,size=512M' \
+ -device 'pc-dimm,id=dimm27,memdev=mem-dimm27,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm28,size=512M' \
+ -device 'pc-dimm,id=dimm28,memdev=mem-dimm28,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm29,size=512M' \
+ -device 'pc-dimm,id=dimm29,memdev=mem-dimm29,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm30,size=512M' \
+ -device 'pc-dimm,id=dimm30,memdev=mem-dimm30,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm31,size=512M' \
+ -device 'pc-dimm,id=dimm31,memdev=mem-dimm31,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm32,size=1024M' \
+ -device 'pc-dimm,id=dimm32,memdev=mem-dimm32,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm33,size=1024M' \
+ -device 'pc-dimm,id=dimm33,memdev=mem-dimm33,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm34,size=1024M' \
+ -device 'pc-dimm,id=dimm34,memdev=mem-dimm34,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm35,size=1024M' \
+ -device 'pc-dimm,id=dimm35,memdev=mem-dimm35,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm36,size=1024M' \
+ -device 'pc-dimm,id=dimm36,memdev=mem-dimm36,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm37,size=1024M' \
+ -device 'pc-dimm,id=dimm37,memdev=mem-dimm37,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm38,size=1024M' \
+ -device 'pc-dimm,id=dimm38,memdev=mem-dimm38,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm39,size=1024M' \
+ -device 'pc-dimm,id=dimm39,memdev=mem-dimm39,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm40,size=1024M' \
+ -device 'pc-dimm,id=dimm40,memdev=mem-dimm40,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm41,size=1024M' \
+ -device 'pc-dimm,id=dimm41,memdev=mem-dimm41,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm42,size=1024M' \
+ -device 'pc-dimm,id=dimm42,memdev=mem-dimm42,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm43,size=1024M' \
+ -device 'pc-dimm,id=dimm43,memdev=mem-dimm43,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm44,size=1024M' \
+ -device 'pc-dimm,id=dimm44,memdev=mem-dimm44,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm45,size=1024M' \
+ -device 'pc-dimm,id=dimm45,memdev=mem-dimm45,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm46,size=1024M' \
+ -device 'pc-dimm,id=dimm46,memdev=mem-dimm46,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm47,size=1024M' \
+ -device 'pc-dimm,id=dimm47,memdev=mem-dimm47,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm48,size=1024M' \
+ -device 'pc-dimm,id=dimm48,memdev=mem-dimm48,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm49,size=1024M' \
+ -device 'pc-dimm,id=dimm49,memdev=mem-dimm49,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm50,size=1024M' \
+ -device 'pc-dimm,id=dimm50,memdev=mem-dimm50,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm51,size=1024M' \
+ -device 'pc-dimm,id=dimm51,memdev=mem-dimm51,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm52,size=1024M' \
+ -device 'pc-dimm,id=dimm52,memdev=mem-dimm52,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm53,size=1024M' \
+ -device 'pc-dimm,id=dimm53,memdev=mem-dimm53,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm54,size=1024M' \
+ -device 'pc-dimm,id=dimm54,memdev=mem-dimm54,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm55,size=1024M' \
+ -device 'pc-dimm,id=dimm55,memdev=mem-dimm55,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm56,size=1024M' \
+ -device 'pc-dimm,id=dimm56,memdev=mem-dimm56,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm57,size=1024M' \
+ -device 'pc-dimm,id=dimm57,memdev=mem-dimm57,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm58,size=1024M' \
+ -device 'pc-dimm,id=dimm58,memdev=mem-dimm58,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm59,size=1024M' \
+ -device 'pc-dimm,id=dimm59,memdev=mem-dimm59,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm60,size=1024M' \
+ -device 'pc-dimm,id=dimm60,memdev=mem-dimm60,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm61,size=1024M' \
+ -device 'pc-dimm,id=dimm61,memdev=mem-dimm61,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm62,size=1024M' \
+ -device 'pc-dimm,id=dimm62,memdev=mem-dimm62,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm63,size=1024M' \
+ -device 'pc-dimm,id=dimm63,memdev=mem-dimm63,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm64,size=2048M' \
+ -device 'pc-dimm,id=dimm64,memdev=mem-dimm64,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm65,size=2048M' \
+ -device 'pc-dimm,id=dimm65,memdev=mem-dimm65,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm66,size=2048M' \
+ -device 'pc-dimm,id=dimm66,memdev=mem-dimm66,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm67,size=2048M' \
+ -device 'pc-dimm,id=dimm67,memdev=mem-dimm67,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm68,size=2048M' \
+ -device 'pc-dimm,id=dimm68,memdev=mem-dimm68,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm69,size=2048M' \
+ -device 'pc-dimm,id=dimm69,memdev=mem-dimm69,node=1' \
+ -object 'memory-backend-ram,id=mem-dimm70,size=2048M' \
+ -device 'pc-dimm,id=dimm70,memdev=mem-dimm70,node=0' \
+ -object 'memory-backend-ram,id=mem-dimm71,size=2048M' \
+ -device 'pc-dimm,id=dimm71,memdev=mem-dimm71,node=1' \
+ -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
+ -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
+ -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \
+ -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \
+ -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \
+ -device 'VGA,id=vga,bus=pci.0,addr=0x2' \
+ -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' \
+ -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
+ -machine 'type=pc'
diff --git a/test/cfg2cmd/memory-hugepages-1g.conf b/test/cfg2cmd/memory-hugepages-1g.conf
new file mode 100644
index 0000000..8db2cca
--- /dev/null
+++ b/test/cfg2cmd/memory-hugepages-1g.conf
@@ -0,0 +1,11 @@
+# TEST: memory wih 1gb hugepages
+# QEMU_VERSION: 3.0
+cores: 2
+memory: 8192
+name: simple
+numa: 1
+ostype: l26
+smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
+sockets: 2
+vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8
+hugepages: 1024
\ No newline at end of file
diff --git a/test/cfg2cmd/memory-hugepages-1g.conf.cmd b/test/cfg2cmd/memory-hugepages-1g.conf.cmd
new file mode 100644
index 0000000..63792d2
--- /dev/null
+++ b/test/cfg2cmd/memory-hugepages-1g.conf.cmd
@@ -0,0 +1,30 @@
+/usr/bin/kvm \
+ -id 8006 \
+ -name 'simple,debug-threads=on' \
+ -no-shutdown \
+ -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \
+ -mon 'chardev=qmp,mode=control' \
+ -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
+ -mon 'chardev=qmp-event,mode=control' \
+ -pidfile /var/run/qemu-server/8006.pid \
+ -daemonize \
+ -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
+ -smp '4,sockets=2,cores=2,maxcpus=4' \
+ -nodefaults \
+ -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
+ -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \
+ -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \
+ -m 8192 \
+ -object 'memory-backend-file,id=ram-node0,size=4096M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -numa 'node,nodeid=0,cpus=0-1,memdev=ram-node0' \
+ -object 'memory-backend-file,id=ram-node1,size=4096M,mem-path=/run/hugepages/kvm/1048576kB,share=on,prealloc=yes' \
+ -numa 'node,nodeid=1,cpus=2-3,memdev=ram-node1' \
+ -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
+ -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
+ -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \
+ -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \
+ -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \
+ -device 'VGA,id=vga,bus=pci.0,addr=0x2' \
+ -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' \
+ -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
+ -machine 'type=pc'
diff --git a/test/cfg2cmd/memory-hugepages-2m.conf b/test/cfg2cmd/memory-hugepages-2m.conf
new file mode 100644
index 0000000..f0d65fb
--- /dev/null
+++ b/test/cfg2cmd/memory-hugepages-2m.conf
@@ -0,0 +1,11 @@
+# TEST: memory wih 2mb hugepages
+# QEMU_VERSION: 3.0
+cores: 2
+memory: 8192
+name: simple
+numa: 1
+ostype: l26
+smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
+sockets: 2
+vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8
+hugepages: 2
\ No newline at end of file
diff --git a/test/cfg2cmd/memory-hugepages-2m.conf.cmd b/test/cfg2cmd/memory-hugepages-2m.conf.cmd
new file mode 100644
index 0000000..287c0ed
--- /dev/null
+++ b/test/cfg2cmd/memory-hugepages-2m.conf.cmd
@@ -0,0 +1,30 @@
+/usr/bin/kvm \
+ -id 8006 \
+ -name 'simple,debug-threads=on' \
+ -no-shutdown \
+ -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \
+ -mon 'chardev=qmp,mode=control' \
+ -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
+ -mon 'chardev=qmp-event,mode=control' \
+ -pidfile /var/run/qemu-server/8006.pid \
+ -daemonize \
+ -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
+ -smp '4,sockets=2,cores=2,maxcpus=4' \
+ -nodefaults \
+ -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
+ -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \
+ -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \
+ -m 8192 \
+ -object 'memory-backend-file,id=ram-node0,size=4096M,mem-path=/run/hugepages/kvm/2048kB,share=on,prealloc=yes' \
+ -numa 'node,nodeid=0,cpus=0-1,memdev=ram-node0' \
+ -object 'memory-backend-file,id=ram-node1,size=4096M,mem-path=/run/hugepages/kvm/2048kB,share=on,prealloc=yes' \
+ -numa 'node,nodeid=1,cpus=2-3,memdev=ram-node1' \
+ -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
+ -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
+ -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \
+ -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \
+ -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \
+ -device 'VGA,id=vga,bus=pci.0,addr=0x2' \
+ -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' \
+ -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
+ -machine 'type=pc'
diff --git a/test/run_config2command_tests.pl b/test/run_config2command_tests.pl
index f097811..dafc3b8 100755
--- a/test/run_config2command_tests.pl
+++ b/test/run_config2command_tests.pl
@@ -178,6 +178,21 @@ $qemu_server_config->mock(
},
);
+my $qemu_server_memory;
+$qemu_server_memory = Test::MockModule->new('PVE::QemuServer::Memory');
+$qemu_server_memory->mock(
+ page_chunk => sub {
+ return 1;
+ },
+ host_numanode_exist => sub {
+ my ($id) = @_;
+ return 1;
+ },
+ get_host_phys_address_bits => sub {
+ return 46;
+ }
+);
+
my $pve_common_tools;
$pve_common_tools = Test::MockModule->new('PVE::Tools');
$pve_common_tools->mock(
--
2.30.2
next prev parent reply other threads:[~2023-02-02 11:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 11:03 [pve-devel] [PATCH v3 qemu-server 00/13] rework memory hotplug + virtiomem Alexandre Derumier
2023-02-02 11:03 ` [pve-devel] [PATCH v3 qemu-server 01/13] memory: extract some code to their own sub for mocking Alexandre Derumier
2023-02-03 13:44 ` Fiona Ebner
2023-02-02 11:03 ` Alexandre Derumier [this message]
2023-02-03 13:44 ` [pve-devel] [PATCH v3 qemu-server 02/13] tests: add memory tests Fiona Ebner
2023-02-02 11:03 ` [pve-devel] [PATCH v3 qemu-server 03/13] qemu_memory_hotplug: remove unused $opt arg Alexandre Derumier
2023-02-03 13:56 ` [pve-devel] applied: " Fiona Ebner
2023-02-02 11:03 ` [pve-devel] [PATCH v3 qemu-server 04/13] add memory parser Alexandre Derumier
2023-02-03 13:44 ` Fiona Ebner
2023-02-02 11:03 ` [pve-devel] [PATCH v3 qemu-server 05/13] memory: add get_static_mem && remove parse_hotplug_features Alexandre Derumier
2023-02-03 13:44 ` Fiona Ebner
2023-02-02 11:03 ` [pve-devel] [PATCH v3 qemu-server 06/13] config: memory: add 'max' option Alexandre Derumier
2023-02-03 13:44 ` Fiona Ebner
2023-02-02 11:03 ` [pve-devel] [PATCH v3 qemu-server 07/13] memory: get_max_mem: use config memory max Alexandre Derumier
2023-02-02 11:03 ` [pve-devel] [PATCH v3 qemu-server 08/13] memory: don't use foreach_reversedimm for unplug Alexandre Derumier
2023-02-03 13:45 ` Fiona Ebner
2023-02-02 11:03 ` [pve-devel] [PATCH v3 qemu-server 09/13] memory: use 64 slots && static dimm size when max is defined Alexandre Derumier
2023-02-03 13:45 ` Fiona Ebner
2023-02-02 11:03 ` [pve-devel] [PATCH v3 qemu-server 10/13] test: add memory-max tests Alexandre Derumier
2023-02-02 11:03 ` [pve-devel] [PATCH v3 qemu-server 11/13] memory: add virtio-mem support Alexandre Derumier
2023-02-03 13:46 ` Fiona Ebner
2023-02-03 15:48 ` DERUMIER, Alexandre
2023-02-02 11:03 ` [pve-devel] [PATCH v3 qemu-server 12/13] memory: virtio-mem : implement redispatch retry Alexandre Derumier
2023-02-02 11:03 ` [pve-devel] [PATCH v3 qemu-server 13/13] tests: add virtio-mem tests Alexandre Derumier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230202110344.840195-3-aderumier@odiso.com \
--to=aderumier@odiso.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox