all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Bruno Victal <mirai@makinata.eu>
Cc: guix-devel@gnu.org
Subject: Re: Expressing system test dependencies
Date: Tue, 31 Oct 2023 16:20:02 -0400	[thread overview]
Message-ID: <878r7ipmrx.fsf@gmail.com> (raw)
In-Reply-To: <87wmv9igyt.fsf@makinata.eu> (Bruno Victal's message of "Thu, 26 Oct 2023 15:41:30 +0100")

Hi Bruno,

Bruno Victal <mirai@makinata.eu> writes:

> Hi,
>
> There are system tests that would benefit from being able to express
> that their results are dependent on the result of other tests, when
> these constitute independent units, especially when there are
> configuration variants present. (e.g. gnu/tests/gdm.scm)
>
> Consider the following files/system-tests [1]:
> * gnu/tests/gdm.scm
>   Right now this module implements two tests: %test-gdm-x11 and
>   %test-gdm-wayland. (whose names are self-explanatory)
>
> * gnu/tests/vnc.scm
>   This module implements one test, %test-xvnc, in particular it does so
>   by testing the XDMCP feature using GDM.
>   Note: this module predates gnu/tests/gdm.scm.
>
> Here's where we would benefit from being able to express system-test
> dependencies. Clearly some of the “test-assert” clauses in
> gnu/tests/vnc.scm would be better placed in gnu/tests/gdm.scm as they
> are GDM specific tests. Since they constitute configuration variants of
> the service, it would be placed into a %test-gdm-autosuspend variable.
>
> The rationale for a test-dependency mechanism is as follows:
> Suppose we split the GDM specific test to (gnu tests gdm). Now let's say
> that we run %test-xvnc and it fails. Is the failure due to GDM or is it
> caused by something else? (within the %test-xvnc)
>
> By splitting the test to (gnu tests gdm) we would have to run the GDM
> tests first, which isn't obvious. If we could express a dependency here,
> the debugging experience is improved as we now have a way to know that a
> integral component involved in the test failed. (or could be used to
> rule out other parts)
>
> Since the system-test results are expressed as derivations, successful
> tests shouldn't result in duplicate runs so perhaps we could make use of
> this fact for the effect?

Ideally, any kind of tests would be independent from each other, but for
system tests where it's an integration of various components, we do rely
on the individual components used in a test working.

I'm not sure it's worth adding more complexity though; a failure in GDM
should have been caught at the time packaging/upgrading GDM with its own
test suite; it seems these cases would be very rare, and we have actual
real problems to fix (c.f. our bug tracker) :-).

-- 
Thanks,
Maxim


      reply	other threads:[~2023-10-31 20:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-26 14:41 Expressing system test dependencies Bruno Victal
2023-10-31 20:20 ` Maxim Cournoyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878r7ipmrx.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=mirai@makinata.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.