Skip to content

Commit

Permalink
tests/storage: wait for full user session before doing rest of the test
Browse files Browse the repository at this point in the history
Clean VM shutdown may timeout if its initiated before full startup, so
make sure the full startup is completed first.
  • Loading branch information
marmarek committed Oct 26, 2018
1 parent f1d4f27 commit 342d651
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions qubes/tests/integ/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def _test_000_volatile(self):
del coro_maybe
self.app.save()
yield from (self.vm1.start())
yield from self.wait_for_session(self.vm1)

# volatile image not clean
yield from (self.vm1.run_for_stdio(
Expand Down Expand Up @@ -112,6 +113,7 @@ def _test_001_non_volatile(self):
del coro_maybe
self.app.save()
yield from self.vm1.start()
yield from self.wait_for_session(self.vm1)
# non-volatile image not clean
yield from self.vm1.run_for_stdio(
'head -c {} /dev/zero 2>&1 | diff -q /dev/xvde - 2>&1'.format(size),
Expand Down Expand Up @@ -197,6 +199,9 @@ def _test_003_snapshot(self):
self.app.save()
yield from self.vm1.start()
yield from self.vm2.start()
yield from asyncio.wait(
[self.wait_for_session(self.vm1), self.wait_for_session(self.vm2)])


try:
yield from self.vm1.run_for_stdio(
Expand Down Expand Up @@ -285,6 +290,7 @@ def _test_004_snapshot_non_persistent(self):
del coro_maybe
self.app.save()
yield from self.vm2.start()
yield from self.wait_for_session(self.vm2)

# snapshot image not clean
yield from self.vm2.run_for_stdio(
Expand Down

0 comments on commit 342d651

Please sign in to comment.