diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-03-26 12:12:41 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-03-26 18:11:52 +0100 |
commit | 8a9922bdee875b3b5e1d928fc8e2121ffa99663a (patch) | |
tree | 8adebfe736224b37d4b1c9994e279925b55d17dc /tests | |
parent | ec8bc4a34e99363f80b0156587892b5623709098 (diff) | |
download | patches-8a9922bdee875b3b5e1d928fc8e2121ffa99663a.tar patches-8a9922bdee875b3b5e1d928fc8e2121ffa99663a.tar.gz |
environment: Use (gnu build accounts) for /etc/passwd handling.
* guix/scripts/environment.scm (launch-environment/container): Remove
call to 'mock-passwd'; instantiate a <password-entry> instead. Call
'write-passwd' to write the pasword database instead of using custom
code.
(mock-passwd): Remove.
* tests/guix-environment-container.sh: Test 'getpwuid'.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guix-environment-container.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/guix-environment-container.sh b/tests/guix-environment-container.sh index a2da9a0773..059c4d9213 100644 --- a/tests/guix-environment-container.sh +++ b/tests/guix-environment-container.sh @@ -44,6 +44,12 @@ else test $? = 42 fi +if test "x$USER" = "x"; then USER="`id -un`"; fi + +# Check whether /etc/passwd is valid. +guix environment -C --ad-hoc --bootstrap guile-bootstrap \ + -- guile -c "(exit (string=? \"$USER\" (passwd:name (getpwuid (getuid)))))" + # 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" |