tests: workaround a race in qrexec test

qrexec-client-vm may return earlier than it's child process (it exits
right away, without waiting for its child). Add a small wait before
reading exit code from a file.
This commit is contained in:
Marek Marczykowski-Górecki 2020-08-08 19:22:26 +02:00
parent 1abf949faf
commit 8b076dfe5f
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -201,6 +201,7 @@ class TC_00_QrexecMixin(object):
self.testvm1.run_for_stdio('''\
/usr/lib/qubes/qrexec-client-vm dom0 test.Abort \
/bin/sh -c 'cat /dev/zero; echo $? >/tmp/exit-code';
sleep 1;
e=$(cat /tmp/exit-code);
test $e -eq 141 -o $e -eq 1'''),
timeout=10))