diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2015-11-21 22:24:45 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2015-11-21 22:26:13 +0100 |
| commit | 82e64fc14eec9f01f5fee12782046496ebed9c72 (patch) | |
| tree | c4d8dff78313e4102be683137d9c1a03450f6338 /tests/guix-environment-container.sh | |
| parent | 6493fd04581a923d42a566a869b3490d3a159db7 (diff) | |
environment: Correctly handle abnormal exits.
Fixes <http://bugs.gnu.org/21958>.
* guix/scripts/environment.scm (status->exit-code): New procedure.
(exit/status, primitive-exit/status): Use it.
* tests/guix-environment-container.sh: Add test.
Diffstat (limited to 'tests/guix-environment-container.sh')
| -rw-r--r-- | tests/guix-environment-container.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/guix-environment-container.sh b/tests/guix-environment-container.sh index 5670d011179..703ab31d278 100644 --- a/tests/guix-environment-container.sh +++ b/tests/guix-environment-container.sh | |||
| @@ -81,3 +81,10 @@ grep $(guix build guile-bootstrap) $tmpdir/mounts | |||
| 81 | grep -e "$NIX_STORE_DIR/.*-bash" $tmpdir/mounts # bootstrap bash | 81 | grep -e "$NIX_STORE_DIR/.*-bash" $tmpdir/mounts # bootstrap bash |
| 82 | 82 | ||
| 83 | rm $tmpdir/mounts | 83 | rm $tmpdir/mounts |
| 84 | |||
| 85 | if guix environment --bootstrap --container \ | ||
| 86 | --ad-hoc bootstrap-binaries -- kill -SEGV 2 | ||
| 87 | then false; | ||
| 88 | else | ||
| 89 | test $? -gt 127 | ||
| 90 | fi | ||
