tests: minor fixes
- FD leak - switch to xterm to test also on minimal template
This commit is contained in:
parent
06e82eccb0
commit
4d59f883a0
@ -90,7 +90,10 @@ class BackupTestsMixin(object):
|
||||
block_size = 4096
|
||||
|
||||
self.log.debug("Filling %s" % path)
|
||||
f = open(path, 'wb+')
|
||||
try:
|
||||
f = open(path, 'rb+')
|
||||
except FileNotFoundError:
|
||||
f = open(path, 'wb+')
|
||||
if size is None:
|
||||
f.seek(0, 2)
|
||||
size = f.tell()
|
||||
|
@ -925,15 +925,17 @@ int main(int argc, char **argv) {
|
||||
# it is important to have some changing content there, to generate
|
||||
# content update events (aka damage notify)
|
||||
proc = yield from self.testvm1.run(
|
||||
'gnome-terminal --full-screen -e top')
|
||||
'xterm -maximized -e top')
|
||||
|
||||
# help xdotool a little...
|
||||
yield from asyncio.sleep(2)
|
||||
if proc.returncode is not None:
|
||||
self.fail('xterm failed to start')
|
||||
# get window ID
|
||||
winid = (yield from asyncio.get_event_loop().run_in_executor(None,
|
||||
subprocess.check_output,
|
||||
['xdotool', 'search', '--sync', '--onlyvisible', '--class',
|
||||
self.testvm1.name + ':.*erminal'])).decode()
|
||||
self.testvm1.name + ':xterm'])).decode()
|
||||
xprop = yield from asyncio.get_event_loop().run_in_executor(None,
|
||||
subprocess.check_output,
|
||||
['xprop', '-notype', '-id', winid, '_QUBES_VMWINDOWID'])
|
||||
|
Loading…
Reference in New Issue
Block a user