tests: adjust for qrexec-client-vm exit code

It now consistently returns remote exit code, not a local one.
Check 'cat' exit code instead.
This commit is contained in:
Marek Marczykowski-Górecki 2020-03-11 00:17:42 +01:00
parent 7a750ea9c8
commit d033457f3d
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -304,7 +304,9 @@ class TC_00_AppVMMixin(object):
stdout, _ = self.loop.run_until_complete(asyncio.wait_for( stdout, _ = self.loop.run_until_complete(asyncio.wait_for(
self.testvm1.run_for_stdio('''\ self.testvm1.run_for_stdio('''\
/usr/lib/qubes/qrexec-client-vm dom0 test.Abort \ /usr/lib/qubes/qrexec-client-vm dom0 test.Abort \
/bin/cat /dev/zero; test $? -eq 141 -o $? -eq 1'''), /bin/sh -c 'cat /dev/zero; echo $? >/tmp/exit-code';
e=$(cat /tmp/exit-code);
test $e -eq 141 -o $e -eq 1'''),
timeout=10)) timeout=10))
except asyncio.TimeoutError: except asyncio.TimeoutError:
self.fail("Timeout, probably stdout wasn't closed") self.fail("Timeout, probably stdout wasn't closed")