diff options
author | Ludovic Courtès <ludo@gnu.org> | 2023-01-29 22:13:53 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-01-30 22:24:27 +0100 |
commit | 52eb3db19cb9e5c294c86a8552a4baaa5b473672 (patch) | |
tree | ba94f91ca1d18cb07917ed3a45f43f03c1ac3a85 /tests | |
parent | 17448c8afa507bf26509cbd0a35836f910d0bf3b (diff) | |
download | guix-52eb3db19cb9e5c294c86a8552a4baaa5b473672.tar.gz |
container: Correctly report exit status.
* gnu/build/linux-container.scm (container-excursion): Return the raw status value. * tests/containers.scm ("container-excursion, same namespaces"): Add 'status:exit-val' call. * guix/scripts/container/exec.scm (guix-container-exec): Correctly handle the different cases.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/containers.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/containers.scm b/tests/containers.scm index 608902c41a..1378b10f22 100644 --- a/tests/containers.scm +++ b/tests/containers.scm @@ -203,9 +203,10 @@ 42 ;; The parent and child are in the same namespaces. 'container-excursion' ;; should notice that and avoid calling 'setns' since that would fail. - (container-excursion (getpid) - (lambda () - (primitive-exit 42)))) + (status:exit-val + (container-excursion (getpid) + (lambda () + (primitive-exit 42))))) (skip-if-unsupported) (test-assert "container-excursion*" |