Subject: Re: bug#21280: test failures: nar, syscalls, containers

From: [email-masked] (Ludovic Courtès)
Date: Thu, 20 Aug 2015 01:14:03 +0200

Leo Famulari <[email-masked]> skribis:

> On Tue, Aug 18, 2015, at 17:54, Ludovic Courtès wrote:
>> What is the file system of /home/leo/work/guix (see the output of the
>> ‘mount’ command)?
>
> $ mount
> [...]
> /dev/mapper/hostname--vg-home on /home type btrfs (rw,relatime,space_cache)
> [...]

OK.

>> and then run “make check TESTS=tests/nar.scm” from the top-level build
>> directory, and post both the top-level ‘nar.log’ file and
>> ‘tests/nar.log’?
>
> The logs are attached. I renamed tests/nar.log to tests-nar.log.

Hmm the output of ‘find’ in tests/nar.log suggests that the files are
indeed identical, so maybe it’s ‘file-tree-equal?’ that’s not working as
expected.

Could you try this patch and send tests/nar.log again?

diff --git a/tests/nar.scm b/tests/nar.scm
index b8e50c7..37a357b 100644
--- a/tests/nar.scm
+++ b/tests/nar.scm
@@ -112,7 +112,8 @@
   (file-system-fold (const #t)
                     (lambda (name stat result)    ; leaf
                       (and result
-                           (file=? name (sibling name))))
+                           (pk 'file=? name (sibling name)
+                               (file=? name (sibling name)))))
                     (lambda (name stat result)    ; down
                       result)
                     (lambda (name stat result)    ; up

diff --git a/guix/tests.scm b/guix/tests.scm
index cd8eda2..efa1a6f 100644
--- a/guix/tests.scm
+++ b/guix/tests.scm
@@ -101,7 +101,8 @@
 
 (define (file=? a b)
   "Return true if files A and B have the same type and same content."
-  (and (eq? (stat:type (lstat a)) (stat:type (lstat b)))
+  (and (eq? (pk 'stat a  (stat:type (lstat a)))
+            (pk 'stat2 b (stat:type (lstat b))))
        (case (stat:type (lstat a))
          ((regular)
           (equal?

Thanks in advance,
Ludo’.