all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server 1/2] tests: cfg2cmd: also use minor version when comparing versions
Date: Wed, 27 May 2026 09:44:52 +0200	[thread overview]
Message-ID: <20260527074545.41948-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260527074545.41948-1-f.ebner@proxmox.com>

In practice, non-test callers will always pass the minor version too,
so do the same in the test. The tests do already specify a minor
version, it just was not passed to the check.

In preparation for making the minor version a required parameter for
runs_at_least_qemu_version() when switching to signatures with v5.36.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/test/run_config2command_tests.pl | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/test/run_config2command_tests.pl b/src/test/run_config2command_tests.pl
index 0341d2f9..5c3034ab 100755
--- a/src/test/run_config2command_tests.pl
+++ b/src/test/run_config2command_tests.pl
@@ -671,9 +671,10 @@ sub do_test($config_fn) {
     }
 
     # check if QEMU version set correctly and test version_cmp
-    (my $qemu_major = get_test_qemu_version()) =~ s/\..*$//;
-    die "runs_at_least_qemu_version returned false, maybe error in version_cmp?"
-        if !PVE::QemuServer::QMPHelpers::runs_at_least_qemu_version($vmid, $qemu_major);
+    (my $qemu_major, my $qemu_minor) = get_test_qemu_version() =~ m/^(\d+)\.(\d+)/;
+    if (!PVE::QemuServer::QMPHelpers::runs_at_least_qemu_version($vmid, $qemu_major, $qemu_minor)) {
+        die "runs_at_least_qemu_version returned false, maybe error in version_cmp?";
+    }
 
     $cmdline =~ s/ -/ \\\n  -/g; # same as qm showcmd --pretty
     $cmdline .= "\n";
-- 
2.47.3





  reply	other threads:[~2026-05-27  7:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27  7:44 [PATCH-SERIES qemu-server 0/2] use v5.36 for qmp helpers module Fiona Ebner
2026-05-27  7:44 ` Fiona Ebner [this message]
2026-05-27  7:44 ` [PATCH qemu-server 2/2] qmp helpers: use v5.36 and signatures Fiona Ebner

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=20260527074545.41948-2-f.ebner@proxmox.com \
    --to=f.ebner@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