tests: Fix race condition in 'container-excursion*' test.

* tests/containers.scm ("container-excursion*"): Move (namespace pid)
call before (kill pid SIGKILL).
This commit is contained in:
Ludovic Courtès 2017-05-31 10:02:42 +02:00
parent bbc4167995
commit 3e89491741
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 2 additions and 1 deletions

View File

@ -194,11 +194,12 @@
%namespaces 1 %namespaces 1
(lambda () (lambda ()
(sleep 100)))) (sleep 100))))
(expected (namespaces pid))
(result (container-excursion* pid (result (container-excursion* pid
(lambda () (lambda ()
(namespaces 1))))) (namespaces 1)))))
(kill pid SIGKILL) (kill pid SIGKILL)
(equal? result (namespaces pid)))))) (equal? result expected)))))
(skip-if-unsupported) (skip-if-unsupported)
(test-equal "container-excursion*, same namespaces" (test-equal "container-excursion*, same namespaces"