guix-devel
[Top][All Lists]
Advanced

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

Re: Expressing system test dependencies


From: Maxim Cournoyer
Subject: Re: Expressing system test dependencies
Date: Tue, 31 Oct 2023 16:20:02 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

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 via email to

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