From 66de5649d4ed0efbd36975e05ef380b9a87dfbe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 3 Aug 2026 03:11:39 +0200 Subject: [PATCH 1/3] tests: dom0 update via qubes-vm-update --- qubes/tests/integ/dom0_update.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/qubes/tests/integ/dom0_update.py b/qubes/tests/integ/dom0_update.py index 6d558ebb1..7c4ebd48c 100644 --- a/qubes/tests/integ/dom0_update.py +++ b/qubes/tests/integ/dom0_update.py @@ -333,6 +333,26 @@ def update_func_salt(self): self.fail("salt pkg.uptodate failed: " + f_log.read()) del proc + def update_func_qubes_vm_update(self): + logpath = os.path.join(self.tmpdir, "dom0-update-output.txt") + with open(logpath, "w") as f_log: + proc = self.loop.run_until_complete( + asyncio.create_subprocess_exec( + "qubes-vm-update", + "--targets=dom0", + "--force-update", + "--show-output", + stdout=f_log, + stderr=subprocess.STDOUT, + ) + ) + self.loop.run_until_complete(proc.wait()) + if proc.returncode: + del proc + with open(logpath) as f_log: + self.fail("qubes-vm-update failed: " + f_log.read()) + del proc + def _test_000_update(self, do_update_func): """Dom0 update tests @@ -380,6 +400,9 @@ def test_000_update(self): def test_000_update_salt(self): self._test_000_update(self.update_func_salt) + def test_000_update_qubes_vm_update(self): + self._test_000_update(self.update_func_qubes_vm_update) + def test_001_update_check(self): """Check if dom0 updates check works""" self.app.domains[0].features["updates-available"] = False From fbf80716ed369d24cf45f54459194d2233e97cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 4 Aug 2026 00:53:15 +0200 Subject: [PATCH 2/3] tests: increase tolerance in HVM audio tests when running in QEMU Timing precision is not great in nested virt. This test usually fails with error like "too short audio, expected 10s, got 7.768299319727891". The test is already running also on real hardware, and there it's more reliable, but keep running it on nested virt, as it's more flexible scheduling-wise. --- qubes/tests/integ/audio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubes/tests/integ/audio.py b/qubes/tests/integ/audio.py index b613d7e8b..0914d258e 100644 --- a/qubes/tests/integ/audio.py +++ b/qubes/tests/integ/audio.py @@ -201,7 +201,7 @@ def check_audio_sample(self, sample, sfreq): if in_qemu and self.testvm1.features.get("audio-model"): # be less strict on HVM tests in nested virt, the test environment # has huge overhead already - margin = 0.80 + margin = 0.70 if rec_size < margin * 441000: fname = f"/tmp/audio-sample-{self.id()}.raw" with open(fname, "wb") as f: From f0ef90c1af7f4a98699e928a2f0375f0abfc0b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 4 Aug 2026 02:28:54 +0200 Subject: [PATCH 3/3] tests: reduce maxmem of HVM on nested virt cont I missed one of the grub tests. Fixes: 7448ed2e "tests: reduce maxmem of HVM when running in nested virt" --- qubes/tests/integ/grub.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qubes/tests/integ/grub.py b/qubes/tests/integ/grub.py index 2c417346d..569deef8f 100644 --- a/qubes/tests/integ/grub.py +++ b/qubes/tests/integ/grub.py @@ -171,6 +171,8 @@ def test_010_template_based_vm(self): "TemplateVM", name=self.make_vm_name("template"), label="red" ) self.test_template.virt_mode = self.virt_mode + if self.virt_mode == "hvm": + self.set_hvm(self.test_template) self.test_template.features.update( self.app.domains[self.template].features )