mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
container: Gracefully report mount errors in the child process.
Fixes <http://bugs.gnu.org/23306>. * gnu/build/linux-container.scm (run-container): Use 'socketpair' instead of 'pipe'. Rename 'in' to 'child' and 'out' to 'parent'. Send a 'ready message or an exception argument list from the child to the parent; adjust the parent accordingly. * tests/containers.scm ("call-with-container, mnt namespace, wrong bind mount"): New test. * tests/guix-environment-container.sh: Add test with --expose=/does-not-exist.
This commit is contained in:
parent
4c14d4eaa7
commit
c06f6db7a4
3 changed files with 52 additions and 12 deletions
|
@ -44,6 +44,16 @@ else
|
|||
test $? = 42
|
||||
fi
|
||||
|
||||
# Make sure file-not-found errors in mounts are reported.
|
||||
if guix environment --container --ad-hoc --bootstrap guile-bootstrap \
|
||||
--expose=/does-not-exist -- guile -c 1 2> "$tmpdir/error"
|
||||
then
|
||||
false
|
||||
else
|
||||
grep "/does-not-exist" "$tmpdir/error"
|
||||
grep "[Nn]o such file" "$tmpdir/error"
|
||||
fi
|
||||
|
||||
# Make sure that the right directories are mapped.
|
||||
mount_test_code="
|
||||
(use-modules (ice-9 rdelim)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue