GNU bug report logs - #28600
[PATCH] tests: install: Switch to modifying the gc-root-service-type.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Mon, 25 Sep 2017 19:59:01 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28600 in the body.
You can then email your comments to 28600 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#28600; Package guix-patches. (Mon, 25 Sep 2017 19:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Baines <mail <at> cbaines.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 25 Sep 2017 19:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] tests: install: Switch to modifying the gc-root-service-type.
Date: Mon, 25 Sep 2017 20:58:10 +0100
Rather than adding the service to the system.

The previous approach is causing the system tests to fail, as the os already
contains a service of type gc-root-service-type, and the way that this service
extends the system-service doesn't compose, causing an error if its added
twice.

  ERROR: In procedure symlink: File exists

* gnu/tests/install.scm (operating-system-with-gc-roots): Modify the existing
  gc-root-service, rather than adding another.
---
 gnu/tests/install.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index 49743860e..28dfc3b8b 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -127,8 +127,9 @@
   "Return a variant of OS where ROOTS are registered as GC roots."
   (operating-system
     (inherit os)
-    (services (cons (service gc-root-service-type roots)
-                    (operating-system-user-services os)))))
+    (services
+     (modify-services (operating-system-user-services os)
+       (gc-root-service-type _ => roots)))))
 
 
 (define MiB (expt 2 20))
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#28600; Package guix-patches. (Mon, 25 Sep 2017 20:04:02 GMT) Full text and rfc822 format available.

Message #8 received at 28600 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28600 <at> debbugs.gnu.org
Subject: Re: [bug#28600] [PATCH] tests: install: Switch to modifying the
 gc-root-service-type.
Date: Mon, 25 Sep 2017 21:02:55 +0100
[Message part 1 (text/plain, inline)]
On Mon, 25 Sep 2017 20:58:10 +0100
Christopher Baines <mail <at> cbaines.net> wrote:

> Rather than adding the service to the system.
> 
> The previous approach is causing the system tests to fail, as the os
> already contains a service of type gc-root-service-type, and the way
> that this service extends the system-service doesn't compose, causing
> an error if its added twice.
> 
>   ERROR: In procedure symlink: File exists
> 
> * gnu/tests/install.scm (operating-system-with-gc-roots): Modify the
> existing gc-root-service, rather than adding another.
> ---
>  gnu/tests/install.scm | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
> index 49743860e..28dfc3b8b 100644
> --- a/gnu/tests/install.scm
> +++ b/gnu/tests/install.scm
> @@ -127,8 +127,9 @@
>    "Return a variant of OS where ROOTS are registered as GC roots."
>    (operating-system
>      (inherit os)
> -    (services (cons (service gc-root-service-type roots)
> -                    (operating-system-user-services os)))))
> +    (services
> +     (modify-services (operating-system-user-services os)
> +       (gc-root-service-type _ => roots)))))
>  
>  
>  (define MiB (expt 2 20))

Quite a few of the system tests seem to be failing, I got the
results below testing some version of Guix which I think roughly
equivalent to the master branch.

I think the above patch helps, but I'm not sure if it actually fixes
any of the failing tests, as I think there are other issues.

TOTAL: 27
PASS: /gnu/store/62pr6a9gpza57yx7qzk6mhr6d0l750wa-tailon-test
PASS: /gnu/store/r06chj5z1sjwf839qyd0sg1lni8na137-mpd-test
PASS: /gnu/store/p111z34c1in1h6g2gwqbncqlwnb65m6s-basic
PASS: /gnu/store/pixmmgv3ms5fam9h9x7lawq71jr6sx22-memcached-test
PASS: /gnu/store/4ns63ifvdd019m0pdgypx3xyvnhh7asw-elogind
PASS: /gnu/store/cck9b28c7nrjb6hnmb6b2f53dngz1zk0-dicod
PASS: /gnu/store/yxkbmsad9ji59wd8f2w4g7zby5vjf4cg-exim-test
PASS: /gnu/store/9a5i3y1mq51l352k8gksf18v43myihb0-opensmtpd-test
PASS: /gnu/store/9dvmrk9wjyki6ij4k7rg3wp0yi4miydh-prosody
PASS: /gnu/store/0p8mpifvqwrn7pcgs15pvd9v5akxadly-inetd-test
PASS: /gnu/store/h2xd8gdzjam94zbw1rapkcdpczg6nxa0-nfs
PASS: /gnu/store/y2xlfj2kqz5119ibz88v7np49zn4qq2s-rsync-test
PASS: /gnu/store/98yj0djybbahp7mmbhp9w8aq1700b98h-openssh
PASS: /gnu/store/s1sjx6kp3zdbbb79qj6mw2d4n1zy5fwa-dropbear
PASS: /gnu/store/jh45gkxlz40xcjbqr44fvkjcwabamrsm-libvirt-test
PASS: /gnu/store/4m3csmgrb6lm8825y8z1mbns1r5jvlbc-nginx-test
FAIL: /gnu/store/fz270kg3fsb79gmgrn4g3jhlvdncsy7p-nss-mdns
FAIL: /gnu/store/2brmg8qyhig1fg8f1dxcnz2ii9q2jm55-mcron
FAIL: /gnu/store/0mn5w20mgjcjlcl43dqs1mzp855bh7dd-halt
FAIL: /gnu/store/zbmp1x95h7skfw9ns3k21lx7vk5nqb53-iso-image-installer
FAIL: /gnu/store/mac0aa8r5711mivzhhar43a5dyg1in67-installed-os
FAIL: /gnu/store/gk4zc3g40lnm2ijps27hkwrrd1yvajkn-installed-extlinux-os
FAIL: /gnu/store/9653l9z5mqjpjs75b17h2k449s5lf689-btrfs-root-os
FAIL: /gnu/store/cnp72hfl9nd08m3zqb93vhr8b59bdng0-raid-root-os
FAIL: /gnu/store/3qqp3ps3s6hilw6zgriyvm3qpca8a0kv-encrypted-root-os
FAIL: /gnu/store/n2a8hvrppj5c34cgd8m41yz6zxj1yhk2-separate-store-os
FAIL: /gnu/store/2np47fqwi4vmhls0l69la6mbwayv1ygq-separate-home-os
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28600; Package guix-patches. (Tue, 26 Sep 2017 07:47:02 GMT) Full text and rfc822 format available.

Message #11 received at 28600 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Christopher Baines <mail <at> cbaines.net>
Cc: 28600 <at> debbugs.gnu.org
Subject: Re: [bug#28600] [PATCH] tests: install: Switch to modifying the
 gc-root-service-type.
Date: Tue, 26 Sep 2017 09:46:10 +0200
Hi!

Christopher Baines <mail <at> cbaines.net> skribis:

> Rather than adding the service to the system.
>
> The previous approach is causing the system tests to fail, as the os already
> contains a service of type gc-root-service-type, and the way that this service
> extends the system-service doesn't compose, causing an error if its added
> twice.
>
>   ERROR: In procedure symlink: File exists

Good catch!

> * gnu/tests/install.scm (operating-system-with-gc-roots): Modify the existing
>   gc-root-service, rather than adding another.
> ---
>  gnu/tests/install.scm | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
> index 49743860e..28dfc3b8b 100644
> --- a/gnu/tests/install.scm
> +++ b/gnu/tests/install.scm
> @@ -127,8 +127,9 @@
>    "Return a variant of OS where ROOTS are registered as GC roots."
>    (operating-system
>      (inherit os)
> -    (services (cons (service gc-root-service-type roots)
> -                    (operating-system-user-services os)))))
> +    (services
> +     (modify-services (operating-system-user-services os)
> +       (gc-root-service-type _ => roots)))))

What about:

  (services (cons (simple-service 'extra-root
                                  gc-root-service-type roots)
                  (operating-system-user-services os)))

This would make sure there’s always a single ‘gc-root-service-type’
instance, and we’re just extending it with additional roots, rather than
overriding what it does.

I can push that if it works for you.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#28600; Package guix-patches. (Tue, 26 Sep 2017 08:01:02 GMT) Full text and rfc822 format available.

Message #14 received at 28600 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 28600 <at> debbugs.gnu.org
Subject: Re: [bug#28600] [PATCH] tests: install: Switch to modifying the
 gc-root-service-type.
Date: Tue, 26 Sep 2017 09:00:48 +0100
[Message part 1 (text/plain, inline)]
On Tue, 26 Sep 2017 09:46:10 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:

> Hi!
> 
> Christopher Baines <mail <at> cbaines.net> skribis:
> 
> > Rather than adding the service to the system.
> >
> > The previous approach is causing the system tests to fail, as the
> > os already contains a service of type gc-root-service-type, and the
> > way that this service extends the system-service doesn't compose,
> > causing an error if its added twice.
> >
> >   ERROR: In procedure symlink: File exists  
> 
> Good catch!
> 
> > * gnu/tests/install.scm (operating-system-with-gc-roots): Modify
> > the existing gc-root-service, rather than adding another.
> > ---
> >  gnu/tests/install.scm | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
> > index 49743860e..28dfc3b8b 100644
> > --- a/gnu/tests/install.scm
> > +++ b/gnu/tests/install.scm
> > @@ -127,8 +127,9 @@
> >    "Return a variant of OS where ROOTS are registered as GC roots."
> >    (operating-system
> >      (inherit os)
> > -    (services (cons (service gc-root-service-type roots)
> > -                    (operating-system-user-services os)))))
> > +    (services
> > +     (modify-services (operating-system-user-services os)
> > +       (gc-root-service-type _ => roots)))))  
> 
> What about:
> 
>   (services (cons (simple-service 'extra-root
>                                   gc-root-service-type roots)
>                   (operating-system-user-services os)))
> 
> This would make sure there’s always a single ‘gc-root-service-type’
> instance, and we’re just extending it with additional roots, rather
> than overriding what it does.

That fixes this issue, but I'm not sure what it means for the tests. If
the roots are not replaced, then the bare-bones-os will be present as
well as the roots added for each test.

This is just a thought though, I'm fine with either fix.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28600; Package guix-patches. (Tue, 26 Sep 2017 08:41:02 GMT) Full text and rfc822 format available.

Message #17 received at 28600 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Christopher Baines <mail <at> cbaines.net>
Cc: 28600 <at> debbugs.gnu.org
Subject: Re: [bug#28600] [PATCH] tests: install: Switch to modifying the
 gc-root-service-type.
Date: Tue, 26 Sep 2017 10:39:50 +0200
Christopher Baines <mail <at> cbaines.net> skribis:

> FAIL: /gnu/store/2brmg8qyhig1fg8f1dxcnz2ii9q2jm55-mcron

Commit 077f1e6384fbd28ffd02e9e10a413bb3c24aaa15 fixes this one.

The “halt” test works for me.

I haven’t looked at the installation tests.

Ludo’.




Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Tue, 26 Sep 2017 08:47:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Tue, 26 Sep 2017 08:47:02 GMT) Full text and rfc822 format available.

Message #22 received at 28600-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Christopher Baines <mail <at> cbaines.net>
Cc: 28600-done <at> debbugs.gnu.org
Subject: Re: [bug#28600] [PATCH] tests: install: Switch to modifying the
 gc-root-service-type.
Date: Tue, 26 Sep 2017 10:46:02 +0200
Christopher Baines <mail <at> cbaines.net> skribis:

> On Tue, 26 Sep 2017 09:46:10 +0200
> ludo <at> gnu.org (Ludovic Courtès) wrote:

[...]

>> What about:
>> 
>>   (services (cons (simple-service 'extra-root
>>                                   gc-root-service-type roots)
>>                   (operating-system-user-services os)))
>> 
>> This would make sure there’s always a single ‘gc-root-service-type’
>> instance, and we’re just extending it with additional roots, rather
>> than overriding what it does.
>
> That fixes this issue, but I'm not sure what it means for the tests. If
> the roots are not replaced, then the bare-bones-os will be present as
> well as the roots added for each test.

I think it’s OK, because that’s what we want to test: we want to test
the installation image with few modifications compared to what we’re
shipping.

Pushed as 945a8fc240dbc48e3e4e212ef527eadc70231d39.

Now to see if there are still issues?

Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 24 Oct 2017 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 183 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.