unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Expressing system test dependencies
@ 2023-10-26 14:41 Bruno Victal
  2023-10-31 20:20 ` Maxim Cournoyer
  0 siblings, 1 reply; 2+ messages in thread
From: Bruno Victal @ 2023-10-26 14:41 UTC (permalink / raw)
  To: guix-devel

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?


[1]: guix: 33f5b747b4a0a508e1ffc94a5bf425cff707c6e3

-- 
Thanks,
Bruno.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Expressing system test dependencies
  2023-10-26 14:41 Expressing system test dependencies Bruno Victal
@ 2023-10-31 20:20 ` Maxim Cournoyer
  0 siblings, 0 replies; 2+ messages in thread
From: Maxim Cournoyer @ 2023-10-31 20:20 UTC (permalink / raw)
  To: Bruno Victal; +Cc: guix-devel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-31 20:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-26 14:41 Expressing system test dependencies Bruno Victal
2023-10-31 20:20 ` Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).