From 8b076dfe5fb179fd45a144540bb8dace8ba6ae38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 8 Aug 2020 19:22:26 +0200 Subject: [PATCH] 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. --- qubes/tests/integ/qrexec.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qubes/tests/integ/qrexec.py b/qubes/tests/integ/qrexec.py index b357f5f6..2776e3de 100644 --- a/qubes/tests/integ/qrexec.py +++ b/qubes/tests/integ/qrexec.py @@ -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))