Patchwork tests: Don't check file-systems in container tests.

login
register
mail settings
Submitter Andy Patterson
Date Nov. 13, 2016, 3:20 a.m.
Message ID <20161112222028.235925fb@uwaterloo.ca>
Download mbox | patch
Permalink /patch/17438/
State New
Headers show

Comments

Andy Patterson - Nov. 13, 2016, 3:20 a.m.
Hello,

The containers test was hanging for me, and this patch fixed the
problem.

--
Andy

From 945ad44acf489b7f3a398d4ab739ec2b48477502 Mon Sep 17 00:00:00 2001
From: Andy Patterson <ajpatter@uwaterloo.ca>
Date: Sat, 12 Nov 2016 22:10:01 -0500
Subject: [PATCH] tests: Don't check file-systems in container tests.

* tests/containers.scm ("call-with-container, mnt namespace"): Don't
check file-system in 'call-with-container' call.
* tests/containers.scm
("call-with-container, mnt namespace, wrong bindmount"): Likewise.
---
 tests/containers.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Ludovic Courtès - Nov. 13, 2016, 12:05 p.m.
Hi,

Andy Patterson <ajpatter@uwaterloo.ca> skribis:

> The containers test was hanging for me, and this patch fixed the
> problem.

[...]

> From 945ad44acf489b7f3a398d4ab739ec2b48477502 Mon Sep 17 00:00:00 2001
> From: Andy Patterson <ajpatter@uwaterloo.ca>
> Date: Sat, 12 Nov 2016 22:10:01 -0500
> Subject: [PATCH] tests: Don't check file-systems in container tests.
>
> * tests/containers.scm ("call-with-container, mnt namespace"): Don't
> check file-system in 'call-with-container' call.
> * tests/containers.scm
> ("call-with-container, mnt namespace, wrong bindmount"): Likewise.
> ---
>  tests/containers.scm | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/containers.scm b/tests/containers.scm
> index ccd122a..745b56b 100644
> --- a/tests/containers.scm
> +++ b/tests/containers.scm
> @@ -84,7 +84,8 @@
>     (call-with-container (list (file-system
>                                  (device "none")
>                                  (mount-point "/testing")
> -                                (type "tmpfs")))
> +                                (type "tmpfs")
> +                                (check? #f)))

Do you know exactly how/why it was hanging?  I imagine
‘mount-file-system’ would try to invoke fsck.tmpfs, which doesn’t exist,
thus we get a REPL, which hangs forever.

I guess the real question is why I didn’t experience it, hmm…

Thanks,
Ludo’.
Andy Patterson - Nov. 13, 2016, 3:51 p.m.
On Sun, 13 Nov 2016 13:05:43 +0100
ludo@gnu.org (Ludovic Courtès) wrote:

> Hi,
> 
> Andy Patterson <ajpatter@uwaterloo.ca> skribis:
> 
> > The containers test was hanging for me, and this patch fixed the
> > problem.  
> 
> [...]
> 
> > From 945ad44acf489b7f3a398d4ab739ec2b48477502 Mon Sep 17 00:00:00
> > 2001 From: Andy Patterson <ajpatter@uwaterloo.ca>
> > Date: Sat, 12 Nov 2016 22:10:01 -0500
> > Subject: [PATCH] tests: Don't check file-systems in container tests.
> >
> > * tests/containers.scm ("call-with-container, mnt namespace"): Don't
> > check file-system in 'call-with-container' call.
> > * tests/containers.scm
> > ("call-with-container, mnt namespace, wrong bindmount"): Likewise.
> > ---
> >  tests/containers.scm | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/containers.scm b/tests/containers.scm
> > index ccd122a..745b56b 100644
> > --- a/tests/containers.scm
> > +++ b/tests/containers.scm
> > @@ -84,7 +84,8 @@
> >     (call-with-container (list (file-system
> >                                  (device "none")
> >                                  (mount-point "/testing")
> > -                                (type "tmpfs")))
> > +                                (type "tmpfs")
> > +                                (check? #f)))  
> 
> Do you know exactly how/why it was hanging?  I imagine
> ‘mount-file-system’ would try to invoke fsck.tmpfs, which doesn’t
> exist, thus we get a REPL, which hangs forever.
> 

I did get a REPL (in the log file), so you're probably right.

> I guess the real question is why I didn’t experience it, hmm…
> 

Not sure, but I first noticed the problem when guix-devel was building
during a system reconfigure. That might be easier to reproduce.

> Thanks,
> Ludo’.

Thanks.

--
Andy
Marius Bakke - Nov. 14, 2016, 10:05 a.m.
Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Andy Patterson <ajpatter@uwaterloo.ca> skribis:
>
>> The containers test was hanging for me, and this patch fixed the
>> problem.
>
> [...]
>
>> From 945ad44acf489b7f3a398d4ab739ec2b48477502 Mon Sep 17 00:00:00 2001
>> From: Andy Patterson <ajpatter@uwaterloo.ca>
>> Date: Sat, 12 Nov 2016 22:10:01 -0500
>> Subject: [PATCH] tests: Don't check file-systems in container tests.
>>
>> * tests/containers.scm ("call-with-container, mnt namespace"): Don't
>> check file-system in 'call-with-container' call.
>> * tests/containers.scm
>> ("call-with-container, mnt namespace, wrong bindmount"): Likewise.
>> ---
>>  tests/containers.scm | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/containers.scm b/tests/containers.scm
>> index ccd122a..745b56b 100644
>> --- a/tests/containers.scm
>> +++ b/tests/containers.scm
>> @@ -84,7 +84,8 @@
>>     (call-with-container (list (file-system
>>                                  (device "none")
>>                                  (mount-point "/testing")
>> -                                (type "tmpfs")))
>> +                                (type "tmpfs")
>> +                                (check? #f)))
>
> Do you know exactly how/why it was hanging?  I imagine
> ‘mount-file-system’ would try to invoke fsck.tmpfs, which doesn’t exist,
> thus we get a REPL, which hangs forever.
>
> I guess the real question is why I didn’t experience it, hmm…

This is failing for me on master, I think the guix development snapshot
needs to be updated to include this fix.
Ludovic Courtès - Nov. 14, 2016, 2:42 p.m.
Marius Bakke <mbakke@fastmail.com> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hi,
>>
>> Andy Patterson <ajpatter@uwaterloo.ca> skribis:
>>
>>> The containers test was hanging for me, and this patch fixed the
>>> problem.
>>
>> [...]
>>
>>> From 945ad44acf489b7f3a398d4ab739ec2b48477502 Mon Sep 17 00:00:00 2001
>>> From: Andy Patterson <ajpatter@uwaterloo.ca>
>>> Date: Sat, 12 Nov 2016 22:10:01 -0500
>>> Subject: [PATCH] tests: Don't check file-systems in container tests.
>>>
>>> * tests/containers.scm ("call-with-container, mnt namespace"): Don't
>>> check file-system in 'call-with-container' call.
>>> * tests/containers.scm
>>> ("call-with-container, mnt namespace, wrong bindmount"): Likewise.
>>> ---
>>>  tests/containers.scm | 6 ++++--
>>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/tests/containers.scm b/tests/containers.scm
>>> index ccd122a..745b56b 100644
>>> --- a/tests/containers.scm
>>> +++ b/tests/containers.scm
>>> @@ -84,7 +84,8 @@
>>>     (call-with-container (list (file-system
>>>                                  (device "none")
>>>                                  (mount-point "/testing")
>>> -                                (type "tmpfs")))
>>> +                                (type "tmpfs")
>>> +                                (check? #f)))
>>
>> Do you know exactly how/why it was hanging?  I imagine
>> ‘mount-file-system’ would try to invoke fsck.tmpfs, which doesn’t exist,
>> thus we get a REPL, which hangs forever.
>>
>> I guess the real question is why I didn’t experience it, hmm…
>
> This is failing for me on master, I think the guix development snapshot
> needs to be updated to include this fix.

I believe commit 198eac2bca075d0e71e504f1e8c46fddc62171bb solves that.

I don’t think the regression has anything to do with it the recent
changes though.  It’s just that, contrary to what was intended in
package-management.scm, this container test wasn’t skipped, and it
happens to fail surprisingly in the build environment (for reasons that
one of us will undoubtedly elucidate so we don’t remain frustrated!).

Thanks,
Ludo’.

Patch

diff --git a/tests/containers.scm b/tests/containers.scm
index ccd122a..745b56b 100644
--- a/tests/containers.scm
+++ b/tests/containers.scm
@@ -84,7 +84,8 @@ 
    (call-with-container (list (file-system
                                 (device "none")
                                 (mount-point "/testing")
-                                (type "tmpfs")))
+                                (type "tmpfs")
+                                (check? #f)))
      (lambda ()
        (assert-exit (file-exists? "/testing")))
      #:namespaces '(user mnt))))
@@ -99,7 +100,8 @@ 
                                    (device "/does-not-exist")
                                    (mount-point "/foo")
                                    (type "none")
-                                   (flags '(bind-mount))))
+                                   (flags '(bind-mount))
+                                   (check? #f)))
         (const #t)
         #:namespaces '(user mnt)))
     (lambda args