summaryrefslogtreecommitdiff
path: root/gnu/tests/base.scm
Commit message (Collapse)AuthorAge
* image: Add default value for partition initializer.Ludovic Courtès2022-07-01
| | | | | | | | | | | 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.
* services: root-file-system: Cleanly unmount upon shutdown.Ludovic Courtès2022-07-01
| | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/56209>. Reported by angry rectangle <angryrectangle@cock.li>. * gnu/packages/admin.scm (shepherd-0.9)[modules, snippet]: New fields. * gnu/services/base.scm (%root-file-system-shepherd-service): In 'stop' method, remove 'call-with-blocked-asyncs'. When 'mount' throws to 'system-error, call (@ (fibers) sleep) and try again. * gnu/tests/base.scm (run-root-unmount-test): New procedure. (%test-root-unmount): New variable.
* tests: install: Adjust the timeouts on two failing tests.Maxim Cournoyer2022-03-19
| | | | | | | | 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.
* gnu: glibc: Look for the current timezone in /etc/localtime.Ludovic Courtès2021-11-11
| | | | | | | | | | | | | | | | | | | 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>
* tests: base: Fix the screendump test.Mathieu Othacehe2021-09-27
| | | | | * gnu/tests/base.scm (run-basic-test): Look for the screendump capture where it has been saved, in the output directory.
* tests: Reduce boilerplate for users of 'system-test-runner'.Ludovic Courtès2021-09-26
| | | | | | | | | | | | | | | | * gnu/tests/audio.scm, gnu/tests/base.scm, gnu/tests/ci.scm, gnu/tests/cups.scm, gnu/tests/databases.scm, gnu/tests/desktop.scm, gnu/tests/dict.scm, gnu/tests/docker.scm, gnu/tests/file-sharing.scm, gnu/tests/ganeti.scm, gnu/tests/guix.scm, gnu/tests/ldap.scm, gnu/tests/linux-modules.scm, gnu/tests/mail.scm, gnu/tests/messaging.scm, gnu/tests/monitoring.scm, gnu/tests/networking.scm, gnu/tests/nfs.scm, gnu/tests/package-management.scm, gnu/tests/reconfigure.scm, gnu/tests/rsync.scm, gnu/tests/security-token.scm, gnu/tests/singularity.scm, gnu/tests/ssh.scm, gnu/tests/telephony.scm, gnu/tests/version-control.scm, gnu/tests/virtualization.scm, gnu/tests/web.scm: Remove (mkdir #$output) (chdir #$output) and pass #$output as argument to 'system-test-runner'.
* tests: Adjust to SRFI-64 as found in Guile 3.0.7.Ludovic Courtès2021-09-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Guile 3.0.7, 'test-runner-current' is set to #f upon 'test-end'. Consequently, the previous strategy, where we'd call 'test-runner-current' after 'test-end', no longer works. Instead, set the test runner in each test right before 'test-begin'. * gnu/build/marionette.scm (system-test-runner): New procedure. * gnu/tests/audio.scm (run-mpd-test): Replace (exit (= ...)) idiom by (test-runner-current (system-test-runner)). * gnu/tests/base.scm (run-basic-test) (run-cleanup-test, run-mcron-test, run-nss-mdns-test): Likewise. * gnu/tests/ci.scm (run-laminar-test): Likewise. * gnu/tests/cups.scm (run-cups-test): Likewise. * gnu/tests/databases.scm (run-memcached-test) (run-postgresql-test, run-mysql-test): Likewise. * gnu/tests/desktop.scm (run-elogind-test): Likewise. * gnu/tests/dict.scm (run-dicod-test): Likewise. * gnu/tests/docker.scm (run-docker-test): Likewise. (run-docker-system-test): Likewise. * gnu/tests/file-sharing.scm (run-transmission-daemon-test): Likewise. * gnu/tests/ganeti.scm (run-ganeti-test): Likewise. * gnu/tests/guix.scm (run-guix-build-coordinator-test): Likewise. (run-guix-data-service-test): Likewise. * gnu/tests/ldap.scm (run-ldap-test): Likewise. * gnu/tests/linux-modules.scm (run-loadable-kernel-modules-test-base): Likewise. * gnu/tests/mail.scm (run-opensmtpd-test) (run-exim-test, run-dovecot-test, run-getmail-test): Likewise. * gnu/tests/messaging.scm (run-xmpp-test) (run-bitlbee-test, run-quassel-test): Likewise. * gnu/tests/monitoring.scm (run-prometheus-node-exporter-server-test) (run-zabbix-server-test): Likewise. * gnu/tests/networking.scm (run-inetd-test, run-openvswitch-test) (run-dhcpd-test, run-tor-test, run-iptables-test, run-ipfs-test): Likewise. * gnu/tests/nfs.scm (run-nfs-test) (run-nfs-server-test, run-nfs-root-fs-test): Likewise. * gnu/tests/package-management.scm (run-nix-test): Likewise. * gnu/tests/reconfigure.scm (run-switch-to-system-test) (run-upgrade-services-test, run-install-bootloader-test): Likewise. * gnu/tests/rsync.scm (run-rsync-test): Likewise. * gnu/tests/security-token.scm (run-pcscd-test): Likewise. * gnu/tests/singularity.scm (run-singularity-test): Likewise. * gnu/tests/ssh.scm (run-ssh-test): Likewise. * gnu/tests/telephony.scm (run-jami-test): Likewise. * gnu/tests/version-control.scm (run-cgit-test): Likewise. (run-git-http-test, run-gitolite-test, run-gitile-test): Likewise. * gnu/tests/virtualization.scm (run-libvirt-test, run-childhurd-test): Likewise. * gnu/tests/web.scm (run-webserver-test, run-php-fpm-test) (run-hpcguix-web-server-test, run-tailon-test, run-patchwork-test): Likewise.
* tests: halt: Fix it.Mathieu Othacehe2021-04-13
| | | | | | | | 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.
* tests: Fix nss-mdns test.Mathieu Othacehe2020-10-26
| | | | * gnu/tests/base.scm (run-nss-mdns-test): Use full "avahi-browse" path.
* tests: install: Fix gui-installed-desktop-os-encrypted test.Mathieu Othacehe2020-09-10
| | | | | | | * 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".
* services: guix: Add 'set-http-proxy' action.Ludovic Courtès2020-04-07
| | | | | | | | | | | | | | 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.
* services: syslog: Create log files as non-world-readable.Ludovic Courtès2020-04-06
| | | | | | | | | | 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.
* tests: 'run-basic-test' can enter a root password.Ludovic Courtès2020-03-05
| | | | * gnu/tests/base.scm (run-basic-test): Add #:root-password and honor it.
* tests: Import (guix build utils) in the marionette.Ludovic Courtès2019-06-24
| | | | | | | * gnu/tests/install.scm (%minimal-os)[marionette-configuration](imported-modules): Add (guix build utils). * gnu/tests/base.scm (run-basic-test)["skeletons in home directories"]: Use (guix build utils) explicitly.
* tests: Skip unreliable "herd invalidate nscd" test.Ludovic Courtès2019-05-15
| | | | | * gnu/tests/base.scm (run-basic-test)["nscd invalidate action, wrong table"]: Skip unconditionally.
* tests: 'getlogin' test creates its file atomically.Ludovic Courtès2019-05-15
| | | | | | | 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.
* services: Log-in services now require "pam_loginuid".Ludovic Courtès2019-05-09
| | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/35553>. Reported by Bruno Haible <bruno@clisp.org>. * gnu/services/base.scm (login-pam-service): Pass #:login-uid? #t to 'unix-pam-service'. * gnu/services/ssh.scm (lsh-pam-services, openssh-pam-services): Likewise. * gnu/services/xorg.scm (slim-pam-service): Likewise. (gdm-pam-service): Likewise for "gdm-autologin" and "gdm-password". * gnu/tests/base.scm (run-basic-test)["getlogin on tty1"]: New test. * gnu/tests/ssh.scm (run-ssh-test): Add #:test-getlogin? parameter. ["getlogin"]: New test. (%test-dropbear): Pass #:test-getlogin? #f.
* activation: Shared system home directories are now 555 and root-owned.Ludovic Courtès2019-03-08
| | | | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/34788>. Reported by Jack Hill <jackhill@jackhill.us>. Regression introduced by the combination of 8bb76f3d44c1f5ffec8011819494db306a51d801 and 0ae735bcc8ff7fdc89d67b492bdee9091ee19e86: /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.
* tests: Use non-deprecated (guix store) API.Ludovic Courtès2019-03-04
| | | | | | | This is a followup to f9e8a12379c6fefc9e5c3c7fc3926599bbefc013. * gnu/tests/base.scm (run-basic-test)["/run/current-system is a GC root"]: Use 'store-protocol-error?' instead of 'nix-protocol-error?'.
* services: avahi: Deprecate the 'avahi-service' procedure.Ludovic Courtès2019-01-16
| | | | | | | | | | | | * gnu/services/avahi.scm (<avahi-configuration>): Export getters. Add default values. (avahi-service-type)[default-value]: New field. (avahi-service): Mark as deprecated. * gnu/services/desktop.scm (%desktop-services): Use the 'service' form instead of calling 'avahi-service'. * gnu/tests/base.scm (%avahi-os): Likewise. * doc/guix.texi (Base Services): Adjust example accordingly. (Networking Services): Update accordingly.
* services: Deprecate a few more service procedures.Ludovic Courtès2019-01-11
| | | | | | | | | | | | | | | | | | 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.
* file-systems: Spawn a REPL only when interaction is possible.Ludovic Courtès2018-12-18
| | | | | | | | | | | 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.
* activation: Aways pass '-d HOME' to 'useradd'.Ludovic Courtès2018-11-18
| | | | | | | | | | | | | 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.
* services: nscd: Add 'invalidate' and 'statistics' actions.Ludovic Courtès2018-11-13
| | | | | | | | | | * gnu/services/base.scm (nscd-action-procedure, nscd-actions): New procedures. (nscd-shepherd-service): Add 'modules' and 'actions' fields. * gnu/tests/base.scm (run-basic-test)["nscd invalidate action"] ["nscd invalidate action, wrong table"]: New tests. * doc/guix.texi (Services): Mention 'herd doc nscd action'. (Base Services): Document the actions.
* services: dhcp-client: Deprecate 'dhcp-client-service' procedure.Ludovic Courtès2018-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/services/networking.scm (dhcp-client-service-type): Add default value. * gnu/system/examples/bare-bones.tmpl: Use (service dhcp-client-service-type) instead of (dhcp-client-service). * gnu/system/examples/beaglebone-black.tmpl: Likewise. * gnu/tests/base.scm (%avahi-os): Likewise. * gnu/tests/databases.scm (%memcached-os): Likewise. (%mongodb-os): Likewise. * gnu/tests/dict.scm (%dicod-os): Likewise. * gnu/tests/mail.scm (%opensmtpd-os): Likewise. (%exim-os): Likewise. (%dovecot-os): Likewise. * gnu/tests/messaging.scm (run-xmpp-test): Likewise. (run-bitlbee-test): Likewise. * gnu/tests/monitoring.scm (%prometheus-node-exporter-os): Likewise. * gnu/tests/networking.scm (%inetd-os): Likewise. (run-iptables-test): Likewise. * gnu/tests/nfs.scm (%base-os): Likewise. * gnu/tests/rsync.scm (%rsync-os): Likewise. * gnu/tests/ssh.scm (run-ssh-test): Likewise. * gnu/tests/version-control.scm (%cgit-os): Likewise. (%git-http-os): Likewise. (%gitolite-os): Likewise. * gnu/tests/virtualization.scm (%libvirt-os): Likewise. * gnu/tests/web.scm (%httpd-os): Likewise. (%nginx-os): Likewise. (%varnish-os): Likewise. (%php-fpm-os): Likewise. (%hpcguix-web-os): Likewise. (%tailon-os): Likewise. * tests/guix-system.sh: Likewise. * doc/guix.texi (Networking Services): Document 'dhcp-client-service-type' and remove 'dhcp-client-service'.
* tests: base: Add Guile-Gcrypt & co. to the search path.Ludovic Courtès2018-09-08
| | | | | | | | | | Fixes a regression introduced in ca719424455465fca4b872c371daf2a46de88b33, 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.
* services: mcron: Add 'schedule' action.Ludovic Courtès2018-07-13
| | | | | | | | | | Inspired by <https://lists.gnu.org/archive/html/help-guix/2018-07/msg00035.html>. * gnu/services/mcron.scm (shepherd-schedule-action): New procedure. (mcron-shepherd-services): Add 'actions' field. * gnu/tests/base.scm (run-mcron-test)["schedule action"]: New test. * doc/guix.texi (Scheduled Job Execution): Mention 'herd schedule'.
* tests: basic: Wait for /var/run/shepherd/socket to be ready.Ludovic Courtès2018-07-03
| | | | * gnu/tests/base.scm (run-basic-test)["shepherd socket ready"]: New test.
* services: boot: Take gexps instead of monadic gexps.Ludovic Courtès2018-06-20
| | | | | | | | | | | | | | | * gnu/services.scm (compute-boot-script): Rename 'mexps' to 'gexps' and remove 'mlet' form. (boot-service-type): Update comment. (cleanup-gexp): Remove 'with-monad' and 'return'. (activation-script): Rewrite in non-monadic style: use 'scheme-file' instead of 'gexp->file'. (gexps->activation-gexp): Remove 'mlet', return a gexp. * gnu/services/shepherd.scm (shepherd-boot-gexp): Remove 'with-monad' and 'return'. * gnu/system.scm (operating-system-boot-script): Remove outdated comment. * gnu/tests/base.scm (%cleanup-os): For 'dirty-service', remove 'with-monad' and 'return'.
* services: cleanup: Expect file names to be UTF-8-encoded.Ludovic Courtès2018-06-20
| | | | | | | | | | 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.
* tests: Honor the return value of 'start-service'.Clément Lassieur2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | Since commit dc7b3e56337ee9d8dcd8fe7d5cab71ef536d024f, '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.
* gnu: mcron: Update to 1.1.1.Ludovic Courtès2018-04-19
| | | | | | | | | | | | 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.
* gnu: mcron: Update to 1.1 and deprecate "mcron2".Ludovic Courtès2018-03-19
| | | | | | | | | | * gnu/packages/guile.scm (mcron): Update to 1.1. [native-inputs]: Add TZDATA-FOR-TESTS. [arguments]: New field. (mcron2): Define using 'deprecated-package'. * gnu/services/mcron.scm: Replace 'mcron2' with 'mcron'. * doc/guix.texi (Scheduled Job Execution): Likewise. * gnu/tests/base.scm (%mcron-os): Remove comment about mcron2.
* tests: Remove outdated comment.Ludovic Courtès2018-02-19
| | | | * gnu/tests/base.scm (run-basic-test): Remove outdated comment.
* tests: mcron: Adjust use of 'wait-for-file'.Ludovic Courtès2017-09-26
| | | | | | | | | | Fixes a regression introduced in 8bd5231485cdeb02078c4294badb3a1e7caa0fe0, 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'.
* marionette: 'wait-for-file' can be passed a read procedure.Ludovic Courtès2017-09-08
| | | | | | | * 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.
* services: user-processes: Reap child processes.Ludovic Courtès2017-08-28
| | | | | | | | | | Fixes <http://bugs.gnu.org/26931>. Reported by Leo Famulari <leo@famulari.name>. * gnu/services/base.scm (user-processes-service-type)[stop]: Add 'reap-children' loop. * gnu/tests/base.scm (run-halt-test): New procedure. (%test-halt): New variable.
* tests: Use 'virtual-machine' records instead of monadic procedures.Ludovic Courtès2017-07-20
| | | | | | | | | | | | | | | * gnu/tests/base.scm (%test-basic-os): Use 'let*' instead of 'mlet*' and 'virtual-machine' instead of 'system-qemu-image/shared-store-script'. (run-mcron-test): Likewise. (run-nss-mdns-test): Likewise. * gnu/tests/dict.scm (run-dicod-test): Likewise. * gnu/tests/mail.scm (run-opensmtpd-test): Likewise. (run-exim-test): Likewise. * gnu/tests/messaging.scm (run-xmpp-test): Likewise. * gnu/tests/networking.scm (run-inetd-test): Likewise. * gnu/tests/nfs.scm (run-nfs-test): Likewise. * gnu/tests/ssh.scm (run-ssh-test): Likewise. * gnu/tests/web.scm (run-nginx-test): Likewise.
* marionette: Factorize 'wait-for-file'.Ludovic Courtès2017-06-12
| | | | | | | | | | | * 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.
* activation: Change permissions on /root to #o700.Ludovic Courtès2017-05-30
| | | | | | | | | 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.
* services: user-homes: Do not create home directories marked as no-create.Ludovic Courtès2017-05-18
| | | | | | | | | | | | Fixes a bug whereby GuixSD would create the /nonexistent directory, from user 'nobody', even though it has 'create-home-directory?' set to #f. * gnu/build/activation.scm (activate-users+groups): Add comment for \#:create-home?. (activate-user-home)[ensure-user-home]: Skip when CREATE-HOME? is #f or SYSTEM? is #t. * gnu/tests/base.scm (run-basic-test)["no extra home directories"]: New tests.
* tests: "basic" test loads (guix …) modules from the right place.Ludovic Courtès2017-05-13
| | | | | | | | This is a followup to 7561881f2a5d2dc463c24713745eca03e67044bf. * gnu/tests/base.scm (run-basic-test)["/run/current-system is a GC root"]: Remove 'set!' statements, add 'add-to-load-path' statement for GUIX.
* tests: Strengthen GC root test.Ludovic Courtès2017-05-13
| | | | | * gnu/tests/base.scm (run-basic-test)["/run/current-system is a GC root"]: Check for a specific return value, 'success!.
* services: 'service-parameters' becomes 'service-value'.Ludovic Courtès2017-04-16
| | | | | | | | | * gnu/services.scm (<service>)[parameters]: Rename to... [value]: ... this. Change calls to 'service-parameters' to 'service-value'. * gnu/system.scm, gnu/tests/base.scm, guix/scripts/system.scm, tests/services.scm: Likewise. * doc/guix.texi (Service Reference): Adjust accordingly.
* tests: Introduce 'simple-operating-system' and use it.Ludovic Courtès2017-04-01
| | | | | | | | | | | | | | * gnu/tests.scm (%simple-os): New macro. (simple-operating-system): New macro. * gnu/tests/base.scm (%simple-os): Define using 'simple-operating-system'. (%mcron-os): Use 'simple-operating-system'. * gnu/tests/mail.scm (%opensmtpd-os): Likewise. * gnu/tests/messaging.scm (%base-os, os-with-service): Remove. (run-xmpp-test): Use 'simple-operating-system'. * gnu/tests/networking.scm (%inetd-os): Likewise. * gnu/tests/ssh.scm (%base-os, os-with-service): Remove. (run-ssh-test): Use 'simple-operating-system'. * gnu/tests/web.scm (%nginx-os): Likewise.
* services: Add 'special-files-service-type'.Ludovic Courtès2017-02-08
| | | | | | | | | | | | | * gnu/build/activation.scm (activate-/bin/sh): Remove. (activate-special-files): New procedure. * gnu/services.scm (activation-script): Remove call to 'activate-/bin/sh'. (special-files-service-type): New variable. (extra-special-file): New procedure. * gnu/services/base.scm (%base-services): Add SPECIAL-FILES-SERVICE-TYPE instance. * gnu/tests/base.scm (run-basic-test)[special-files]: New variables. ["special files"]: New test.
* activation: Set the right owner for home directories.Ludovic Courtès2017-02-04
| | | | | | | | | | | | | | This fixes a regression introduced in ae763b5b0b7d5e7316a3d0efe991fe8ab2261031 whereby home directories and skeletons would be root-owned. * gnu/build/activation.scm (copy-account-skeletons): Make 'directory' a keyword parameter. Add #:uid and #:gid and honor them. [set-owner]: New procedure. (activate-user-home): Add call to 'getpw' and 'chown'. Pass UID and GID to 'copy-account-skeletons'. * gnu/tests/base.scm (run-basic-test)["skeletons in home directories"]: Test file ownership under HOME.
* system: Create home directories once 'file-systems' is up.Ludovic Courtès2017-02-01
| | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/21108>. Reported by Andy Patterson <ajpatter@uwaterloo.ca> and Leo Famulari <leo@famulari.name>. * gnu/build/activation.scm (activate-users+groups)[activate-user]: Pass #:create-home? #t iff CREATE-HOME? and SYSTEM?. (activate-user-home): New procedure. * gnu/system/shadow.scm (account-shepherd-service): New procedure. (account-service-type)[extensions]: Add SHEPHERD-ROOT-SERVICE-TYPE extension. * gnu/tests/base.scm (run-basic-test)["home"] ["skeletons in home directories"]: New tests. * gnu/tests/install.scm (%separate-home-os, %separate-home-os-source) (%test-separate-home-os): New variables.
* services: Create /var/log/wtmp upon activation.Ludovic Courtès2017-01-24
| | | | | | | | This fixes a bug whereby /var/log/wtmp would never be created, and thus accounting information would be lost. * gnu/services.scm (activation-script): Create /var/log/wtmp. * gnu/tests/base.scm (run-basic-test)["wtmp entry"]: New test.
* services: Create /var/run/utmpx upon activation.Ludovic Courtès2017-01-19
| | | | | | | | This fixes a bug whereby /var/run/utmpx would never be created, and thus accounting information would be missing. * gnu/services.scm (activation-script): Create /var/run/utmpx. * gnu/tests/base.scm (run-basic-test)["utmpx entry"]: New test.