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/containers.scm | |
| parent | 17448c8afa507bf26509cbd0a35836f910d0bf3b (diff) | |
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/containers.scm')
| -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 608902c41ad..1378b10f22b 100644 --- a/tests/containers.scm +++ b/tests/containers.scm | |||
| @@ -203,9 +203,10 @@ | |||
| 203 | 42 | 203 | 42 |
| 204 | ;; The parent and child are in the same namespaces. 'container-excursion' | 204 | ;; The parent and child are in the same namespaces. 'container-excursion' |
| 205 | ;; should notice that and avoid calling 'setns' since that would fail. | 205 | ;; should notice that and avoid calling 'setns' since that would fail. |
| 206 | (container-excursion (getpid) | 206 | (status:exit-val |
| 207 | (lambda () | 207 | (container-excursion (getpid) |
| 208 | (primitive-exit 42)))) | 208 | (lambda () |
| 209 | (primitive-exit 42))))) | ||
| 209 | 210 | ||
| 210 | (skip-if-unsupported) | 211 | (skip-if-unsupported) |
| 211 | (test-assert "container-excursion*" | 212 | (test-assert "container-excursion*" |
