Skip to content

Commit

Permalink
tests: wait for child process in test qubes_desktop_run
Browse files Browse the repository at this point in the history
Don't leave children, as cleanup_loop will (rightfully) detect it as a
leak.
  • Loading branch information
marmarek committed Aug 22, 2024
1 parent c6b15f1 commit c793ffc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion qubes/tests/integ/vm_qrexec_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def test_012_qubes_desktop_run(self):
else:
xterm_desktop_path = xterm_desktop_path_debian
self.loop.run_until_complete(self.wait_for_session(self.testvm1))
self.loop.run_until_complete(
p = self.loop.run_until_complete(
self.testvm1.run('qubes-desktop-run {}'.format(xterm_desktop_path)))
title = 'user@{}'.format(self.testvm1.name)
if self.template.count("whonix"):
Expand All @@ -168,6 +168,11 @@ def test_012_qubes_desktop_run(self):
'windowactivate', '--sync', 'type', 'exit\n'])

self.wait_for_window(title, show=False)
try:
self.loop.run_until_complete(asyncio.wait_for(p.wait(), 5))
except asyncio.TimeoutError:
p.terminate()
self.loop.run_until_complete(p.wait())

def test_100_qrexec_filecopy(self):
self.loop.run_until_complete(asyncio.gather(
Expand Down

0 comments on commit c793ffc

Please sign in to comment.