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: 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 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 )