summaryrefslogtreecommitdiff
path: root/gnu/tests
AgeCommit message (Collapse)Author
2022-07-15gnu: tests: Fix guix-data-service test.Timotej Lazar
Since revision 32, guix-data-service starts immediately but returns an HTTP error code until initialization is complete. Adjust the test accordingly, and remove the increased startup time limit. * gnu/services/guix.scm (guix-data-service): Use default #:pid-file-timeout. * gnu/tests/guix.scm (guix-data-service): Retry the http-get test several times to give the service time to initialize. Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-07-01image: Add default value for partition initializer.Ludovic Courtès
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.
2022-07-01services: root-file-system: Cleanly unmount upon shutdown.Ludovic Courtès
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.
2022-06-24tests: ldap: Increase VM memory size.Timotej Lazar
With the default limit of 512 MB the test sometimes fails, in different ways. Fixes https://issues.guix.gnu.org/55206. * gnu/tests/ldap.scm (run-ldap-test): Increase memory size to 1024 MiB. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-06-24tests: docker: Relax marionette timeout.Maxim Cournoyer
The tests would otherwise fail on an old desktop. * gnu/tests/docker.scm (run-docker-test) <make-marionette>: Specify a timeout of 60 s. (run-docker-system-test) <make-marionette>: Likewise.
2022-06-17gnu: tests: Add seatd/greetd based minimal desktop system tests.muradm
* gnu/tests/desktop.scm (minimal-desktop): seatd/greetd based minimal desktop test Signed-off-by: Lars-Dominik Braun <ldb@leibniz-psychology.org>
2022-06-10services: jami: Modernize to adjust to Shepherd 0.9+ changes.Maxim Cournoyer
This partially fixes <https://issues.guix.gnu.org/54786>, allowing the 'jami' and 'jami-provisioning' system tests to pass again. In version 0.9.0, Shepherd constructors are now run concurrently, via cooperative scheduling (Guile Fibers). The Jami service previously relied on blocking sleeps while polling for D-Bus services to become ready after forking a process; this wouldn't work anymore since while blocking the service process wouldn't be given the chance to finish starting. The new reliance on Fibers in Shepherd's fork+exec-command in the helper 'send-dbus' procedure also meant that it wouldn't work outside of Shepherd anymore. Finally, the 'start-service' Shepherd procedure used in the test suite would cause the Jami daemon to be spawned multiple times (a bug introduced in Shepherd 0.9.0). To fix/simplify these problems, this change does the following: 1. Use the Guile AC/D-Bus library for D-Bus communication, which simplify things, such as avoiding the need to fork 'dbus-send' processes. 2. The non-blocking 'sleep' version of Fiber is used for the 'with-retries' waiting syntax. 3. A 'dbus' package variant is used to adjust the session bus configuration, tailoring it for the use case at hand. 4. Avoid start-service in the tests, preferring 'jami-service-available?' for now. * gnu/build/jami-service.scm (parse-dbus-reply, strip-quotes) (deserialize-item, serialize-boolean, dbus-dict->alist) (dbus-array->list, parse-account-ids, parse-account-details) (parse-contacts): Delete procedures. (%send-dbus-binary, %send-dbus-bus, %send-dbus-user, %send-dbus-group) (%send-dbus-debug): Delete parameters. (jami-service-running?): New procedure. (send-dbus/configuration-manager): Rename to... (call-configuration-manager-method): ... this. Turn METHOD into a positional argument. Turn ARGUMENTS into an optional argument. Invoke `call-dbus-method' instead of `send-dbus', adjusting callers accordingly. (get-account-ids, id->account-details, id->account-details) (id->volatile-account-details, username->id, add-account remove-account) (username->contacts, remove-contact, add-contact, set-account-details) (set-all-moderators, username->all-moderators?, username->moderators) (set-moderator): Adjust accordingly. (with-retries, send-dbus, dbus-available-services) (dbus-service-available?): Move to ... * gnu/build/dbus-service.scm: ... this new module. (send-dbus): Rewrite to use the Guile AC/D-Bus library. (%dbus-query-timeout, sleep*): New variables. (%current-dbus-connection): New parameter. (initialize-dbus-connection!, argument->signature-type) (call-dbus-method): New procedures. (dbus-available-services): Adjust accordingly. * gnu/local.mk (GNU_SYSTEM_MODULES): Register new module. * gnu/packages/glib.scm (dbus-for-jami): New variable. * gnu/services/telephony.scm: (jami-configuration)[dbus]: Default to dbus-for-jami. (jami-dbus-session-activation): Write a D-Bus daemon configuration file at '/var/run/jami/session-local.conf'. (jami-shepherd-services): Add the closure of guile-ac-d-bus and guile-fibers as extensions. Adjust imported modules. Remove no longer used parameters. <jami-dbus-session>: Use a PID file, avoiding the need for the manual synchronization. <jami>: Set DBUS_SESSION_BUS_ADDRESS environment variable. Poll using 'jami-service-available?' instead of 'dbus-service-available?'. * gnu/tests/telephony.scm (run-jami-test): Add needed Guile extensions. Set DBUS_SESSION_BUS_ADDRESS environment variable. Adjust all tests to use 'jami-service-available?' to determine if the service is started rather than the now problematic Shepherd's 'start-service'.
2022-06-05tests: childhurd: Make sure "guix build -d" works.Ludovic Courtès
* gnu/tests/virtualization.scm (run-childhurd-test) ["guix-daemon up and running"]: New test.
2022-06-05tests: childhurd: Generalize command execution over SSH.Ludovic Courtès
* gnu/tests/virtualization.scm (run-childhurd-test)[run-uname-over-ssh]: Rename to... [run-command-over-ssh]: ... this. Add 'command' parameter and honor it. ["SSH up and running"]: Adjust accordingly.
2022-05-22services: openssh: Listen on both IPv4 and IPv6.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/55335>. Reported by Christopher Baines <mail@cbaines.net>. * gnu/services/ssh.scm (openssh-shepherd-service)[inetd-style?]: New variable. <start>: Use it. When using 'make-inetd-constructor', pass a list of endpoints as is possible with the Shepherd 0.9.1. <stop>: Adjust accordingly. * gnu/tests/ssh.scm (run-ssh-test)["wait for port 22"]: Rename to... ["wait for port 22, IPv4"]: ... this. ["wait for port 22, IPv6"]: New test.
2022-05-01services: bitlbee: Use 'make-inetd-constructor'.Ludovic Courtès
* gnu/services/messaging.scm (bitlbee-shepherd-service): Add call to 'least-authority-wrapper'. In 'start' method, use 'make-inetd-constructor' when available. * gnu/tests/messaging.scm (run-bitlbee-test)["valid PID"]: Remove test.
2022-05-01tests: Fix tailon test.Mathieu Othacehe
This is a follow-up of 73eeeeafbb0765f76834b53c9fe6cf3c8f740840. * gnu/tests/web.scm (run-tailon-test): Wait for the TCP port 8080 instead of relying on start-service. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-04-29tests: Avoid starting services to check whether they're running.Ludovic Courtès
Fixes a regression introduced in the Shepherd 0.9.0 whereby clients can start a service that is already being started, leading to two instances of the process (and usually failure of the second attempt to start it). Partly fixes <https://issues.guix.gnu.org/54786>. Reported by Mathieu Othacehe. * gnu/tests/version-control.scm (run-cgit-test) ["nginx running", "fcgiwrap running"]: Wail for a file/TCP port instead of starting the service. (run-git-http-test)["nginx running"]: Likewise. (run-gitile-test)["nginx running"]: Likewise.
2022-04-08tests: Add "encrypted-home-os" installation test.Ludovic Courtès
* gnu/tests/install.scm (%encrypted-home-os) (%encrypted-home-installation-script) (enter-luks-passphrase-for-home) (%test-encrypted-home-os): New variables.
2022-04-07services: openssh: Start as an inetd service.Ludovic Courtès
* gnu/services/ssh.scm (openssh-shepherd-service): Use 'make-inetd-constructor' when it is defined. (<openssh-configuration>)[max-connections]: New field. * gnu/tests/ssh.scm (run-ssh-test)["sshd PID"]: Adjust to cope with PID-FILE being #f. * gnu/tests/ssh.scm (%test-openssh): Pass #f as the 'pid-file' argument. * doc/guix.texi (Networking Services): Document 'max-connections'.
2022-03-19tests: install: Add two new Btrfs RAID10 install test.Maxim Cournoyer
* gnu/tests/install.scm (%btrfs-raid10-root-os) (%btrfs-raid10-root-os): New variables. (%btrfs-raid10-root-installation-script): Likewise. (%test-btrfs-raid10-root-images): Likewise. (%test-btrfs-raid10-root-os, %test-btrfs-raid10-root-os-degraded): New tests.
2022-03-19tests: install: Enable the use of multiple disk devices for tests.Maxim Cournoyer
* gnu/tests/install.scm (run-install)[packages]: Unconditionally add to OS. [NUMBER-OF-DISKS]: Add argument, update doc and adjust. The returned gexp output is now a list of images rather than the image itself. * gnu/tests/install.scm (qemu-command*): Rename IMAGE argument to IMAGES, to account for the above change. Adjust doc. Generate a QEMU '-drive' argument for each disk image. (%test-installed-os): Rename the IMAGE variable to IMAGES. (%test-installed-extlinux-os): Likewise. (%test-iso-image-installer): Likewise. (%test-separate-home-os): Likewise. (%test-separate-store-os): Likewise. (%test-raid-root-os): Likewise. (%test-encrypted-root-os): Likewise. (%test-lvm-separate-home-os): Likewise. (%test-encrypted-root-not-boot-os): Likewise. (%test-btrfs-root-os): Likewise. (%test-btrfs-raid-root-os): Likewise. (%test-btrfs-root-on-subvolume-os): Likewise. (%test-jfs-root-os): Likewise. (%test-f2fs-root-os): Likewise. (%test-xfs-root-os): Likewise. (guided-installation-test): Likewise.
2022-03-19tests: install: Streamline 'qemu-command/writable-image'.Maxim Cournoyer
* gnu/tests/install.scm (qemu-command/writable-image): Replace the use of a writable backing file by the use of the '-snapshot' option, and rename to... (qemu-command*): ... this, adjusting all calls.
2022-03-19tests: install: Adjust the timeouts on two failing tests.Maxim Cournoyer
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.
2022-02-21tests: nix: Remove tab characters.Mathieu Othacehe
* gnu/tests/package-management.scm: Remove them.
2022-02-21tests: nix: Fix it.Mathieu Othacehe
The <nix/config.nix> support has been removed in Nix 2.4: https://github.com/NixOS/nix/pull/4025. Rely on the store ping command instead to check that we can communicate with the daemon. * gnu/tests/package-management.scm (run-nix-test): Use the store ping command instead of building a dummy derivation.
2022-01-31services: guix: Add nar-herder-service-type.Christopher Baines
* gnu/services/guix.scm (<nar-herder-configuration>): New record type. (nar-herder-configuration, nar-herder-configuration?, nar-herder-configuration-package, nar-herder-configuration-user, nar-herder-configuration-group, nar-herder-configuration-mirror nar-herder-configuration-database nar-herder-configuration-database-dump nar-herder-configuration-host nar-herder-configuration-port nar-herder-configuration-storage nar-herder-configuration-storage-limit nar-herder-configuration-storage-nar-removal-criteria nar-herder-shepherd-services, nar-herder-activation, nar-herder-account): New procedures. (nar-herder-service-type): New variable. * gnu/tests/guix.scm (%test-nar-herder): New variable. * doc/guix.texi (Guix Services): Document the new service.
2022-01-29tests: Add system test for TimescaleDB.Marius Bakke
* gnu/tests/databases.scm (%timescaledb-os, run-timescaledb-test, %test-timescaledb): New variables.
2022-01-29tests: postgresql: Test the default PostgreSQL.Marius Bakke
* gnu/tests/databases.scm (%postgresql-os): Change from POSTGRESQL-10 to POSTGRESQL.
2022-01-13services: Adjust the jami service for the upgraded jami.Maxim Cournoyer
* gnu/services/telephony.scm (jami-configuration)[jamid]: Rename libring to libjami. * gnu/services/telephony.scm (jami-configuration->command-line-arguments): Adjust daemon file name. * gnu/services/telephony.scm (jami-service-type): Adjust doc. * gnu/tests/telephony.scm (run-jami-test): Check for 'jamid' process, not 'dring'. * doc/guix.texi (Telephony Services): Adjust doc for the jami-qt to jami and libring to libjami packages renaming.
2021-12-28installer: Recommend 'ntp-service-type' for non-graphical systems.Leo Famulari
We had several bug reports with a root cause of "the clock was incorrect" from users who used the installer to install a non-graphical Guix System. * gnu/installer/services.scm (%system-services): Add the ntp-service-type. * gnu/installer/newt/services.scm (run-system-administration-cbt-page): New variable. (run-services-page): Use run-system-administration-cbt-page when not installing a desktop. * gnu/installer/tests.scm (choose-services): Add and use a choose-misc-service? procedure. * gnu/tests/install.scm (installation-target-os-for-gui-tests)<services>: Add ntp-service-type.
2021-12-23tests: rsync: Fix it.Mathieu Othacehe
* gnu/tests/rsync.scm ("Test file not copied to read-only share"): This returns the error code 1 and not 10.
2021-12-23tests: reconfigure: Fix it.Mathieu Othacehe
* gnu/tests/reconfigure.scm (run-install-bootloader-test): Use a non volatile VM so that a bootloader configuration file is installed.
2021-12-23tests: nfs: Fix nfs-root-fs test.Mathieu Othacehe
This test has probably never been working. Rename it nfs-full, and test that an NFS server can be started in a VM and mounted in another VM. * gnu/tests/nfs.scm (run-nfs-root-fs-test): Rename it ... (run-nfs-full-test): ... this way. (%test-nfs-root-fs): Rename it ... (%test-nfs-full): ... this way.
2021-12-23tests: docker: Fix it.Mathieu Othacehe
The docker tests are broken because the docker overlay doesn't support running on our own storage overlay. Use the new <virtual-machine> volatile? field to spawn a VM with a persistent storage and no overlay. * gnu/tests/docker.scm (run-docker-test): Add the docker-tarball to the gc roots as the host store is not shared anymore. Spawn a VM without volatile storage. (run-docker-system-test): Ditto. (%test-docker-system): Adapt it to use the image API.
2021-12-23Remove VM generation dead-code.Mathieu Othacehe
This code duplicates the (gnu system image) and (gnu build image) code. Using VM for image generation is not needed, not portable and really slow. Remove all the VM image generation code to make sure that only the image API is used. * gnu/build/vm.scm: Remove it. Move the qemu-command procedure to ... * gnu/build/marionette.scm: ... here. * gnu/local.mk (GNU_SYSTEM_MODULES): Adapt it. * tests/modules.scm: Ditto. * gnu/tests/install.scm: Ditto. * gnu/system/vm.scm: Adapt it and remove expression->derivation-in-linux-vm, qemu-img, system-qemu-image/shared-store and system-docker-image procedures. * doc/guix.texi (G-Expressions): Adapt it.
2021-12-21tests: rsync: Define several modules.Ludovic Courtès
* gnu/tests/rsync.scm (run-rsync-test)["Test file not copied to read-only share", "Test file correctly received from read-only share"]: New tests. (%rsync-os): Define two modules.
2021-12-13tests: static-networking: Adjust to new style.Ludovic Courtès
* gnu/tests/networking.scm (run-static-networking-test)[test]: Remove 'mkdir', 'chdir', and 'exit' calls'. Add 'test-runner-current' call.
2021-12-13Merge branch 'master' into core-updates-frozenLudovic Courtès
2021-12-12tests: Replace uses of deprecated 'static-networking-service'.Ludovic Courtès
* gnu/tests/ganeti.scm (%ganeti-os): Replace call to 'static-networking-service' by instantiating STATIC-NETWORKING-SERVICE-TYPE. * gnu/tests/networking.scm (%test-static-networking) (%openvswitch-os, %dhcpd-os): Likewise.
2021-12-12services: static-networking: Change interface to mimic netlink.Ludovic Courtès
* gnu/services/base.scm (<static-networking>)[interface, ip, netmask] [gateway]: Remove. [addresses, links, routes]: New fields. [requirement]: Default to '(udev). (<network-address>, <network-link>, <network-route>): New record types. (ensure-no-separate-netmask, %ensure-no-separate-netmask): Remove. (ipv6-address?, cidr->netmask, ip+netmask->cidr) (network-set-up/hurd, network-tear-down/hurd) (network-set-up/linux, network-tear-down/linux) (static-networking->hurd-pfinet-options): New procedures. (static-networking-shepherd-service): New procedure. (static-networking-shepherd-services): Rewrite in terms of the above. (static-networking-service): Deprecate. Adjust to new 'static-networking' API. (%base-services): Likewise. * gnu/system/install.scm (%installation-services): Likewise. * gnu/system/hurd.scm (%base-services/hurd): Likewise, and separate 'loopback' from 'networking'. * gnu/build/hurd-boot.scm (set-hurd-device-translators): Remove "servers/socket/2". * gnu/tests/networking.scm (run-openvswitch-test)["networking has started on ovs0"]: Check for 'networking instead of 'networking-ovs0, which is no longer provided. * doc/guix.texi (Networking Setup): Document the new interface. Remove documentation of 'static-networking-service'. (Virtualization Services): Change Ganeti example to use the new interface.
2021-12-12tests: openvswitch: Check whether ovs0 is up.Ludovic Courtès
* gnu/tests/networking.scm (run-openvswitch-test)["ovs0 is up"]: New test.
2021-12-12tests: Add 'static-networking' test.Ludovic Courtès
* gnu/tests/networking.scm (run-static-networking-test): New procedure. (%test-static-networking): New variable.
2021-12-10Merge remote-tracking branch 'signed/master' into core-updatesMathieu Othacehe
2021-12-06tests: patchwork: Use the default PostgreSQL.Marius Bakke
* gnu/tests/web.scm (patchwork-os)[services]: Change from POSTGRESQL-10 to POSTGRESQL.
2021-12-01tests: install: Use the swap-space record.Mathieu Othacehe
This fixes the following error: In gnu/services/base.scm: 2228:56 4 (_ #<<uuid> type: dce bv: #vu8(17 17 17 17 34 34 51 51 …>) In gnu/build/file-systems.scm: 239:13 3 (swap-space->flags-bit-mask #<<uuid> type: dce bv: #vu8…>) In ice-9/boot-9.scm: 1685:16 2 (raise-exception _ #:continuable? _) 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure swap-space-priority: Wrong type argument: #<<uuid> type: dce bv: #vu8(17 17 17 17 34 34 51 51 68 68 18 52 86 120 154 188)> * gnu/tests/install.scm (installation-target-os-for-gui-tests): Use the swap-space record.
2021-11-23tests: Fix installation tests.Mathieu Othacehe
Use a CEST timezone as this is the assumed timezone in the run-basic-test procedure. * gnu/tests/install.scm (%encrypted-root-not-boot-os, %btrfs-root-on-subvolume-os): Use a CEST timezone.
2021-11-17Merge branch 'master' into core-updates-frozenLudovic Courtès
2021-11-15gnu: hpcguix-web: Update to 0.2.0.Ludovic Courtès
* gnu/packages/web.scm (hpcguix-web): Update to 0.2.0. [arguments]: In 'wrap-program' phase, add guile-zlib to DEPS. [native-inputs]: Add GUILE. [inputs]: Add GUILE-ZLIB, GUILE-COMMONMARK, and GUILE-JSON. [propagated-inputs]: Remove. These were pointless. * gnu/services/web.scm (<hpcguix-web-configuration>)[address, port]: New fields. * doc/guix.texi (Web Services): Document them. * gnu/tests/web.scm (%hpcguix-web-os): Add 'address'.
2021-11-11gnu: glibc: Look for the current timezone in /etc/localtime.Ludovic Courtè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>
2021-10-18Merge remote-tracking branch 'signed/master' into core-updatesMathieu Othacehe
2021-10-18tests: Pass '-F qcow2' to 'qemu-img create'.Ludovic Courtès
Fixes a regression introduced in 0b5e128750ed40d4348f2eb49d328b81dba9181a, whereby 'qemu-img create ...' as used here would fail with: qemu-img: disk.img: Backing file specified without backing format thereby breaking tests from (gnu tests install). * gnu/tests/install.scm (qemu-command/writable-image): Pass "-F qcow2".
2021-10-12Merge remote-tracking branch 'origin/master' into core-updates-frozen.Mathieu Othacehe
2021-10-11gnu: ganeti: Update to 3.0.1.Marius Bakke
* gnu/packages/virtualization.scm (ganeti): Update to 3.0.1. [source](patches): Remove obsolete. * gnu/tests/ganeti.scm (%ganeti-os): Adjust network configuration so QEMU port forwarding can work. (run-ganeti-test): Remove unused port mapping. Adjust and enable previously failing test. * gnu/packages/patches/ganeti-deterministic-manual.patch, gnu/packages/patches/ganeti-drbd-compat.patch, gnu/packages/patches/ganeti-os-disk-size.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly.
2021-10-06tests: gitile: Increase VM memory size.Mathieu Othacehe
* gnu/tests/version-control.scm (run-gitile-test): Increase memory size to 1024 MiB.