* gnu/tests/base.scm (run-basic-test)["shepherd services"]: Use
‘append-map’ on live service provisions to match what
‘operating-system-shepherd-service-names’ does.
Change-Id: Ie54082eed6c7b8d37d3428711e71c11e80940235
The previous code worked "by chance": 'start' from (shepherd service)
happened to be in scope because the marionette REPL is created by a mere
'primitive-fork', and 'start' happened to kinda work.
* gnu/tests/base.scm (run-basic-test): Use 'start-service' from (gnu
services herd), not 'start' from (shepherd service), which is not
supposed to work.
* gnu/tests/install.scm (run-install): Likewise.
* gnu/tests/base.scm (%test-basic-os): Rename to ...
(test-basic-os): ... this, and turn into procedure that takes optional KERNEL
argument.
(%test-basic-os): Use that procedure.
(%test-linux-libre-5.15, %test-linux-libre-5.10, %test-linux-libre-5.4,
%test-linux-libre-4.19, %test-linux-libre-4.14, %test-linux-libre-4.9): New
tests.
There was a tiny possibility that the first QEMU process would still be
running by the time we launch the second one.
* gnu/build/marionette.scm (marionette-pid): Export.
* gnu/tests/base.scm (run-root-unmount-test)[test]: Add 'waitpid' call.
It has only one user, which is better suited for wait-for-screen-text anyway.
* gnu/tests/base.scm (run-basic-test): Refactor to use wait-for-screen-text
instead of marionette-screen-text.
Previously, the default value would lead to a wrong-type-to-apply crash.
* gnu/system/image.scm (system-disk-image)[image-builder]: When
'partition-initializer' returns #f, fall back to
INITIALIZE-ROOT-PARTITION.
* gnu/tests/base.scm (run-root-unmount-test)[test-image]: Remove
'initializer' field of partition.
* gnu/image.scm (<partition>)[initializer]: Add comment.
The 'login on tty1' and 'getlogin on tty1' tests were failing on a machine
equipped with slower hard drives.
* gnu/tests/base.scm (run-basic-test)
["login on tty1", "getlogin on tty1"]: Bump timeout from 10 to 30 s.
Fixes <https://issues.guix.gnu.org/50830>.
Reported by podiki on #guix.
Previously, glibc 2.33 would look for
/gnu/store/...-glibc-2.33/etc/localtime instead of /etc/localtime.
* gnu/packages/base.scm (glibc)[arguments]: Remove #:make-flags.
[phases]: In 'pre-configure', modify 'inet/Makefile' instead of
'sunrpc/Makefile' since this is where these bits are in 2.33.
(glibc-2.31)[arguments]: Add 'set-etc-rpc-installation-directory'
phase.
(glibc-2.30): Inherit from GLIBC-2.31.
* gnu/tests/base.scm (run-basic-test)["libc honors /etc/localtime"]: New
test.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This fixes: <https://issues.guix.gnu.org/47727>. The OCR prompt detection is
failing, so remove it altogether. It looks like the test doesn't need the
prompt detection delay to work properly.
* gnu/tests/base.scm (run-halt-test): Remove failing OCR detection.
* gnu/tests/base.scm (run-basic-test): Add a 'desktop?' argument. Wait 30
seconds before trying to switch to TTY1 on desktop.
* gnu/tests/install.scm (guided-installation-test): Use 512MiB of RAM and pass
the desktop argument to "run-basic-test".
Fixes <https://bugs.gnu.org/25569>.
Reported by Divan Santana <divan@santanas.co.za>.
* gnu/services/base.scm (shepherd-set-http-proxy-action): New procedure.
(guix-shepherd-service): Add 'actions' field. Change 'start' to a
lambda; check the value of the "http_proxy" environment variable and
add "http_proxy" and "https_proxy" to #:environment-variables as a
function of that.
* gnu/tests/base.scm (run-basic-test)["guix-daemon set-http-proxy
action", "guix-daemon set-http-proxy action, clear"]: New tests.
* doc/guix.texi (Base Services): Document it.
Partly fixes <https://bugs.gnu.org/40405>.
Reported by Diego Nicola Barbato <dnbarbato@posteo.de>.
* gnu/services/base.scm (syslog-service-type): Change 'start' method to
set umask to #o137 before spawning syslogd.
* gnu/tests/base.scm (run-basic-test)["/var/log/messages is not
world-readable"]: New test.
Previously we could end up reading an empty /root/login-id file.
* gnu/tests/base.scm (run-basic-test)["getlogin on tty1"]: Create
/root/login-id atomically.
Fixes <https://bugs.gnu.org/34788>.
Reported by Jack Hill <jackhill@jackhill.us>.
Regression introduced by the combination of
8bb76f3d44 and
0ae735bcc8: /var/empty would be 700 and
owned by one of the system accounts (thus inaccessible to others), and
/var/run/dbus would be 700 as well, thereby preventing D-Bus clients
from connecting to the daemon.
* gnu/build/activation.scm (duplicates): New procedure.
(activate-users+groups)[system-accounts]: New variable.
Use it. Make shared system account home directories #o555 and
root-owned.
* gnu/services/dbus.scm (dbus-activation): Make /var/run/dbus #o755.
* gnu/tests/base.scm (run-basic-test): Test the ownership and
permissions of /var/empty.
This is a followup to f9e8a12379.
* gnu/tests/base.scm (run-basic-test)["/run/current-system is a GC
root"]: Use 'store-protocol-error?' instead of 'nix-protocol-error?'.
These procedures were already either undocumented (and de facto
deprecated) or documented as deprecated or redundant.
* gnu/services/base.scm (guix-service, guix-publish-service): Mark as
deprecated.
* gnu/services/mcron.scm (mcron-service): Likewise.
* gnu/services/networking.scm (tor-service): Likewise.
* doc/guix.texi (Scheduled Job Execution): Remove 'mcron-service' and
adjust example.
(Networking Services): Remove 'tor-service'.
* gnu/tests/base.scm (%mcron-os): Use 'mcron-service-type' instead of
'mcron-service'.
* gnu/tests/networking.scm (%tor-os): Use 'tor-service-type' instead of
'tor-service'.
* tests/guix-system.sh: Likewise.
Fixes <https://bugs.gnu.org/23697>.
Reported by Jan Nieuwenhuizen <janneke@gnu.org>.
* gnu/build/file-systems.scm (check-file-system): Call 'start-repl' only
if current-input-port passes 'isatty?'.
* gnu/services/shepherd.scm (shepherd-configuration-file): After
'for-each' expression, call 'redirect-port'.
* gnu/tests/base.scm (run-basic-test)["stdin is /dev/null"]: New test.
Fixes <https://bugs.gnu.org/33422>.
Reported by fps.
* gnu/build/activation.scm (add-user): Always pass "-d HOME" when HOME
is true. Pass "--create-home" only when HOME, CREATE-HOME?, and SYSTEM?
are true.
(activate-users+groups): Pass #:create-home? create-home? to
'ensure-user'.
* gnu/tests/base.scm (run-basic-test)["accounts"]: Test 'passwd:dir' as
well.
Fixes a regression introduced in
ca71942445, whereby (gcrypt hash) would
not be found in the system under test, leading to a failure of the
"/run/current-system is a GC root" test.
* gnu/tests/base.scm (run-basic-test)[guix&co]: New variable.
[test]: Add all of GUIX&CO to %LOAD-PATH.
Fixes <https://bugs.gnu.org/26353>.
Reported by Danny Milosavljevic <dannym@scratchpost.org>.
* gnu/services.scm (cleanup-gexp): Add 'setenv' and 'setlocale' calls
before 'delete-file-recursively'.
* gnu/tests/base.scm (%cleanup-os, %test-cleanup): New variables.
(run-cleanup-test): New procedure.
Since commit dc7b3e5633, 'start-service' returns
the Shepherd's representation of the service as a sexp, and '#f' if the
service fails to start. Also, it doesn't throw an exception when the service
fails to start, so relying on an exception instead of relying on its return
value is a false positive.
* gnu/tests/base.scm (run-nss-mdns-test): Split tests so to check the return
value of 'start-service'.
(run-mcron-test, run-nss-mdns-test): Use 'test-assert' with the return value
of 'start-service'.
* gnu/tests/admin.scm (run-tailon-test): Idem.
* gnu/tests/dict.scm (run-dicod-test): Idem.
* gnu/tests/mail.scm (run-opensmtpd-test, run-exim-test, run-dovecot-test):
Idem.
* gnu/tests/messaging.scm (run-xmpp-test, run-bitlbee-test): Idem.
* gnu/tests/nfs.scm (run-nfs-test): Idem.
* gnu/tests/rsync.scm (run-rsync-test): Idem.
* gnu/tests/ssh.scm (run-ssh-test): Idem.
* gnu/tests/version-control.scm (run-cgit-test, run-git-http-test): Idem.
* gnu/tests/web.scm (run-php-fpm-test): Idem.
Fixes <https://bugs.gnu.org/31113>.
Reported by George myglc2 Clemmer <myglc2@gmail.com>.
* gnu/packages/guile.scm (mcron): Update to 1.1.1.
[arguments]: Change timezone in 'set-timezone' phase. Remove
'disable-schedule-test' and 'wrap-programs' phases. Add 'adjust-tests'
phase.
* gnu/tests/base.scm (%mcron-os): Change JOB1 to use the 'next-seconds'
form.
Fixes a regression introduced in
8bd5231485, whereby returning #<eof> would
no longer work (since #<eof> would be in the cdr of the result, and thus
it would not get converted to a string.)
* gnu/tests/base.scm (run-mcron-test)["root's job with command"]: Pass
#:read to 'wait-for-file'.
* gnu/build/marionette.scm (wait-for-file): Add #:read parameter and
honor it.
* gnu/tests/base.scm (run-basic-test)["login on tty1"]: Use
'wait-for-file' instead of inline code.
* gnu/build/marionette.scm (wait-for-file): New procedure.
* gnu/tests/base.scm (run-mcron-test)[test](wait-for-file): Remove.
Pass second argument in 'wait-for-file' calls.
* gnu/tests/ssh.scm (run-ssh-test)[test](wait-for-file): Remove.
Pass second argument in 'wait-for-file' calls.
* gnu/tests/messaging.scm (run-xmpp-test)[test](guest-wait-for-file):
Remove.
Use 'wait-for-file' instead, with second argument.
Reported by Alex Griffin <a@ajgrf.com>.
Fixes <http://bugs.gnu.org/27135>.
* gnu/build/activation.scm (add-user): When UID is zero, add 'chmod'
call.
* gnu/tests/base.scm (run-basic-test)["permissions on /root"]: New test.