Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qubes/tests/integ/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
23 changes: 23 additions & 0 deletions qubes/tests/integ/dom0_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions qubes/tests/integ/grub.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down