me
/
guix
Archived
1
0
Fork 0

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.
master
Ludovic Courtès 2022-11-17 10:26:01 +01:00
parent c9f927b704
commit 00b9ab0a83
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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.