all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server v2 3/4] tests: cfg2cmd: add agent guest-fsfreeze config tests
Date: Wed, 25 Mar 2026 22:28:04 +0100	[thread overview]
Message-ID: <20260325213415.3861690-4-t.lamprecht@proxmox.com> (raw)
In-Reply-To: <20260325213415.3861690-1-t.lamprecht@proxmox.com>

Ensure the different agent sub-property variants, including the
deprecated freeze-fs-on-backup key, are parsed without affecting
the QEMU command line.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---

Pondered about using a symlink for the expected .cmd file,  as they are
all the same, or alternatively add a new "these configs must be parsed
OK" test harness, but the files are rather small, git will deduplicate
and we can add such a harness anytime (out of scope here).

 .../cfg2cmd/qga-fs-freeze-backup-legacy.conf  |  2 ++
 .../qga-fs-freeze-backup-legacy.conf.cmd      | 29 +++++++++++++++++++
 src/test/cfg2cmd/qga-fs-freeze.conf           |  2 ++
 src/test/cfg2cmd/qga-fs-freeze.conf.cmd       | 29 +++++++++++++++++++
 src/test/cfg2cmd/qga-minimal.conf             |  2 ++
 src/test/cfg2cmd/qga-minimal.conf.cmd         | 29 +++++++++++++++++++
 6 files changed, 93 insertions(+)
 create mode 100644 src/test/cfg2cmd/qga-fs-freeze-backup-legacy.conf
 create mode 100644 src/test/cfg2cmd/qga-fs-freeze-backup-legacy.conf.cmd
 create mode 100644 src/test/cfg2cmd/qga-fs-freeze.conf
 create mode 100644 src/test/cfg2cmd/qga-fs-freeze.conf.cmd
 create mode 100644 src/test/cfg2cmd/qga-minimal.conf
 create mode 100644 src/test/cfg2cmd/qga-minimal.conf.cmd

diff --git a/src/test/cfg2cmd/qga-fs-freeze-backup-legacy.conf b/src/test/cfg2cmd/qga-fs-freeze-backup-legacy.conf
new file mode 100644
index 00000000..14ef474d
--- /dev/null
+++ b/src/test/cfg2cmd/qga-fs-freeze-backup-legacy.conf
@@ -0,0 +1,2 @@
+# TEST: Ensure the deprecated freeze-fs-on-backup agent key is still parsed.
+agent: enabled=1,freeze-fs-on-backup=0
diff --git a/src/test/cfg2cmd/qga-fs-freeze-backup-legacy.conf.cmd b/src/test/cfg2cmd/qga-fs-freeze-backup-legacy.conf.cmd
new file mode 100644
index 00000000..41b185e0
--- /dev/null
+++ b/src/test/cfg2cmd/qga-fs-freeze-backup-legacy.conf.cmd
@@ -0,0 +1,29 @@
+/usr/bin/kvm \
+  -id 8006 \
+  -name 'vm8006,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-ms=5000' \
+  -mon 'chardev=qmp-event,mode=control' \
+  -pidfile /var/run/qemu-server/8006.pid \
+  -daemonize \
+  -smp '1,sockets=1,cores=1,maxcpus=1' \
+  -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 512 \
+  -global 'PIIX4_PM.disable_s3=1' \
+  -global 'PIIX4_PM.disable_s4=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 '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' \
+  -chardev 'socket,path=/var/run/qemu-server/8006.qga,server=on,wait=off,id=qga0' \
+  -device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' \
+  -device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' \
+  -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
+  -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
+  -machine 'type=pc+pve0'
diff --git a/src/test/cfg2cmd/qga-fs-freeze.conf b/src/test/cfg2cmd/qga-fs-freeze.conf
new file mode 100644
index 00000000..c32e143e
--- /dev/null
+++ b/src/test/cfg2cmd/qga-fs-freeze.conf
@@ -0,0 +1,2 @@
+# TEST: Ensure agent sub-properties do not affect the QEMU command line.
+agent: 1,guest-fsfreeze=1
diff --git a/src/test/cfg2cmd/qga-fs-freeze.conf.cmd b/src/test/cfg2cmd/qga-fs-freeze.conf.cmd
new file mode 100644
index 00000000..41b185e0
--- /dev/null
+++ b/src/test/cfg2cmd/qga-fs-freeze.conf.cmd
@@ -0,0 +1,29 @@
+/usr/bin/kvm \
+  -id 8006 \
+  -name 'vm8006,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-ms=5000' \
+  -mon 'chardev=qmp-event,mode=control' \
+  -pidfile /var/run/qemu-server/8006.pid \
+  -daemonize \
+  -smp '1,sockets=1,cores=1,maxcpus=1' \
+  -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 512 \
+  -global 'PIIX4_PM.disable_s3=1' \
+  -global 'PIIX4_PM.disable_s4=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 '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' \
+  -chardev 'socket,path=/var/run/qemu-server/8006.qga,server=on,wait=off,id=qga0' \
+  -device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' \
+  -device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' \
+  -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
+  -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
+  -machine 'type=pc+pve0'
diff --git a/src/test/cfg2cmd/qga-minimal.conf b/src/test/cfg2cmd/qga-minimal.conf
new file mode 100644
index 00000000..86560065
--- /dev/null
+++ b/src/test/cfg2cmd/qga-minimal.conf
@@ -0,0 +1,2 @@
+# TEST: Ensure agent sub-properties do not affect the QEMU command line.
+agent: 1
diff --git a/src/test/cfg2cmd/qga-minimal.conf.cmd b/src/test/cfg2cmd/qga-minimal.conf.cmd
new file mode 100644
index 00000000..41b185e0
--- /dev/null
+++ b/src/test/cfg2cmd/qga-minimal.conf.cmd
@@ -0,0 +1,29 @@
+/usr/bin/kvm \
+  -id 8006 \
+  -name 'vm8006,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-ms=5000' \
+  -mon 'chardev=qmp-event,mode=control' \
+  -pidfile /var/run/qemu-server/8006.pid \
+  -daemonize \
+  -smp '1,sockets=1,cores=1,maxcpus=1' \
+  -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 512 \
+  -global 'PIIX4_PM.disable_s3=1' \
+  -global 'PIIX4_PM.disable_s4=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 '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' \
+  -chardev 'socket,path=/var/run/qemu-server/8006.qga,server=on,wait=off,id=qga0' \
+  -device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' \
+  -device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' \
+  -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
+  -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
+  -machine 'type=pc+pve0'
-- 
2.47.3





  parent reply	other threads:[~2026-03-25 21:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25 21:28 [PATCH qemu-server v2 0/4] rework fs-freeze agent property Thomas Lamprecht
2026-03-25 21:28 ` [PATCH qemu-server v2 1/4] agent: add should_fs_freeze helper Thomas Lamprecht
2026-03-26 12:55   ` Fiona Ebner
2026-03-27  1:12     ` Thomas Lamprecht
2026-03-25 21:28 ` [PATCH qemu-server v2 2/4] agent: treat freeze-fs-on-backup as alias for guest-fsfreeze Thomas Lamprecht
2026-03-26 12:55   ` Fiona Ebner
2026-03-26 23:05     ` Thomas Lamprecht
2026-03-27  8:53       ` Fiona Ebner
2026-03-25 21:28 ` Thomas Lamprecht [this message]
2026-03-26 12:55   ` [PATCH qemu-server v2 3/4] tests: cfg2cmd: add agent guest-fsfreeze config tests Fiona Ebner
2026-03-25 21:28 ` [PATCH qemu-server v2 4/4] qga: rename guest-fsfreeze to freeze-fs Thomas Lamprecht
2026-03-26  9:08   ` Maximiliano Sandoval
2026-03-26 21:46     ` Thomas Lamprecht
2026-03-26 12:55   ` Fiona Ebner
2026-03-26 23:16 ` applied: [PATCH qemu-server v2 0/4] rework fs-freeze agent property Thomas Lamprecht

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=20260325213415.3861690-4-t.lamprecht@proxmox.com \
    --to=t.lamprecht@proxmox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal