[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System tests

From: Ludovic Courtès
Subject: Re: System tests
Date: Tue, 21 Jun 2016 10:56:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)


address@hidden (Ludovic Courtès) skribis:

> I just pushed a couple of new modules to run system tests.  As done in
> NixOS¹ (in Perl + Bash), the idea is to run the system under test in a
> VM and to instrument the guest system with a backdoor so we can fiddle
> with it from the outside.
> Here, the backdoor is obviously a Guile REPL, which is pretty cool.  :-)
> Currently there’s only one test series, in (gnu tests base).  You’re
> welcome to look at it and comment!  The ‘marionette’ procedures used in
> there are what allows us to execute code in the system under test.
> In the system under test, we can of course call any system call that
> Guile provides, we can use (gnu system herd) to query the Shepherd, etc.
> The ‘marionette-type’ procedure allows us to simulate typing at the
> keyboard, although that’s a bit harder to use due to lack of
> synchronization.
> Anyway, to run the test:
>   make check-system

Commit 94b4274d0dc5768bac255980c7e785bd3dff261f adds a (pretty
expensive) test for the installation procedure, in (gnu tests install).

It works by:

  1. Rebuilding the current Guix, i.e., the Guix in the current load
     path; see ‘current-guix’ in (gnu packages package-management) for
     the tricks that are used.

  2. Building the installation image defined in (gnu system install)

        a. the current Guix (instead of the ‘guix-devel’ snapshot
           necessary so we know what packages it will use);

        b. the marionette service for test instrumentation;

        c. additional GC roots added via the new ‘gc-root-service-type’,
           to ensure that the store items needed by the system we will
           install are already available in the installation image (this
           is necessary since the installation image has no network
           access and wouldn’t be able to download/build stuff as
           happens “in real life”.)

  3. Booting this installation image and running the installation
     procedure as documented in “System Installation”.  The result is a
     qcow2 image containing the installed system.

  4. Booting the installed system and running the “basic” test series
     described above and defined in (gnu tests base).

This proved to be more involved than I initially hoped for, but I like
the end result.  :-)

Next step is to use it to test the fix for encrypted roots at

If everything goes well, Hydra will eventually run these tests
(currently evaluation is failing badly…).

Comments welcome!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]