[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: tests: root-unmount: Wait for the first QEMU process to finish.
From: |
guix-commits |
Subject: |
01/02: tests: root-unmount: Wait for the first QEMU process to finish. |
Date: |
Thu, 17 Nov 2022 05:11:55 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 00b9ab0a8332528bdfb4aee58ddb975596cb2042
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Nov 17 10:26:01 2022 +0100
tests: root-unmount: Wait for the first QEMU process to finish.
There was a tiny possibility that the first QEMU process would still be
running by the time we launch the second one.
* gnu/build/marionette.scm (marionette-pid): Export.
* gnu/tests/base.scm (run-root-unmount-test)[test]: Add 'waitpid' call.
---
gnu/build/marionette.scm | 1 +
gnu/tests/base.scm | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/gnu/build/marionette.scm b/gnu/build/marionette.scm
index f4b219e842..b8fba61d06 100644
--- a/gnu/build/marionette.scm
+++ b/gnu/build/marionette.scm
@@ -28,6 +28,7 @@
#:use-module (ice-9 popen)
#:use-module (ice-9 regex)
#:export (marionette?
+ marionette-pid
make-marionette
marionette-eval
wait-for-file
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index 64cd6a911a..87518b4bfe 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -695,7 +695,13 @@ in a loop. See <http://bugs.gnu.org/26931>.")
;; Halt the system.
(marionette-eval '(system* "/run/current-system/profile/sbin/halt")
- marionette))
+ marionette)
+
+ (display "waiting for marionette to complete...")
+ (force-output)
+ (false-if-exception (waitpid (marionette-pid marionette)))
+ (display " done\n")
+ (force-output))
;; Remove the sockets used by the marionette above to avoid
;; EADDRINUSE.