GNU bug report logs - #40482
Test failure in tests/packages.scm after merging master into core-updates

Previous Next

Package: guix;

Reported by: Marius Bakke <mbakke <at> fastmail.com>

Date: Tue, 7 Apr 2020 11:32:02 UTC

Severity: normal

Merged with 40535

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

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 40482 in the body.
You can then email your comments to 40482 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 bug-guix <at> gnu.org:
bug#40482; Package guix. (Tue, 07 Apr 2020 11:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Marius Bakke <mbakke <at> fastmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 07 Apr 2020 11:32:02 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: bug-guix <at> gnu.org
Subject: Test failure in tests/packages.scm after merging master into
 core-updates
Date: Tue, 07 Apr 2020 13:31:24 +0200
[Message part 1 (text/plain, inline)]
On the current "core-updates" branch (commit
a533c5a1835cbeafaf595c4474e2ce6adde7de8d), one test starts to fail if
commits 190ddfe21e3d87719733d12fb9b5eb176125a49f and
a187cc562890895ad41dfad00eb1d5c4a4b00936 are applied:

--8<---------------cut here---------------start------------->8---
test-name: package-transitive-supported-systems, implicit inputs
location: tests/packages.scm:362
source:
+ (test-equal
+   "package-transitive-supported-systems, implicit inputs"
+   %supported-systems
+   (let ((p (dummy-package
+              "foo"
+              (build-system gnu-build-system)
+              (supported-systems
+                `("does-not-exist" "foobar" ,@%supported-systems)))))
+     (parameterize
+       ((%current-system "armhf-linux"))
+       (package-transitive-supported-systems p))))
expected-value: ("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "mips64el-linux" "i586-gnu")
actual-value: ("x86_64-linux" "i686-linux")
result: FAIL
--8<---------------cut here---------------end--------------->8---

After some trial and error I found that simply removing the test added
by commit a187cc562890895ad41dfad00eb1d5c4a4b00936 will make the above
test pass!

Moving the test further down the file (after the one above) will _also_
succeed.  Apparently there is some side effect caused by running the new
test that leaks into the test mentioned above.

For completeness, here is the new test that makes the above fail.

--8<---------------cut here---------------start------------->8---
test-name: transaction-upgrade-entry, grafts
location: tests/packages.scm:151
source:
+ (test-assert
+   "transaction-upgrade-entry, grafts"
+   (with-build-handler
+     (const 'failed!)
+     (parameterize
+       ((%graft? #t))
+       (let* ((old (dummy-package "foo" (version "1")))
+              (bar (dummy-package
+                     "bar"
+                     (version "0")
+                     (replacement old)))
+              (new (dummy-package
+                     "foo"
+                     (version "1")
+                     (inputs `(("bar" ,bar)))))
+              (tx (mock ((gnu packages)
+                         find-best-packages-by-name
+                         (const (list new)))
+                        (transaction-upgrade-entry
+                          %store
+                          (manifest-entry
+                            (inherit (package->manifest-entry old))
+                            (item (string-append
+                                    (%store-prefix)
+                                    "/"
+                                    (make-string 32 #\e)
+                                    "-foo-1")))
+                          (manifest-transaction)))))
+         (and (match (manifest-transaction-install tx)
+                     ((($ <manifest-entry> "foo" "1" "out" item))
+                      (eq? item new)))
+              (null? (manifest-transaction-remove tx)))))))
actual-value: #t
result: PASS
--8<---------------cut here---------------end--------------->8---
[signature.asc (application/pgp-signature, inline)]

Merged 40482 40535. Request was from Marius Bakke <mbakke <at> fastmail.com> to control <at> debbugs.gnu.org. (Fri, 10 Apr 2020 12:36:02 GMT) Full text and rfc822 format available.

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Fri, 10 Apr 2020 22:37:02 GMT) Full text and rfc822 format available.

Notification sent to Marius Bakke <mbakke <at> fastmail.com>:
bug acknowledged by developer. (Fri, 10 Apr 2020 22:37:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 40482-done <at> debbugs.gnu.org
Subject: Re: bug#40482: Test failure in tests/packages.scm after merging
 master into core-updates
Date: Sat, 11 Apr 2020 00:36:00 +0200
Hello,

Marius Bakke <mbakke <at> fastmail.com> skribis:

> On the current "core-updates" branch (commit
> a533c5a1835cbeafaf595c4474e2ce6adde7de8d), one test starts to fail if
> commits 190ddfe21e3d87719733d12fb9b5eb176125a49f and
> a187cc562890895ad41dfad00eb1d5c4a4b00936 are applied:
>
> test-name: package-transitive-supported-systems, implicit inputs
> location: tests/packages.scm:362
> source:
> + (test-equal
> +   "package-transitive-supported-systems, implicit inputs"
> +   %supported-systems
> +   (let ((p (dummy-package
> +              "foo"
> +              (build-system gnu-build-system)
> +              (supported-systems
> +                `("does-not-exist" "foobar" ,@%supported-systems)))))
> +     (parameterize
> +       ((%current-system "armhf-linux"))
> +       (package-transitive-supported-systems p))))
> expected-value: ("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "mips64el-linux" "i586-gnu")
> actual-value: ("x86_64-linux" "i686-linux")
> result: FAIL
>
>
> After some trial and error I found that simply removing the test added
> by commit a187cc562890895ad41dfad00eb1d5c4a4b00936 will make the above
> test pass!

This is fixed by e85d4cecbe253e59a8a2a42b6ce427d96ff10534.

This has to do with memoization of things that are actually
system-dependent.  This is why you’d see this side effect: in one case,
the first thing memoized would be the armhf graph, in the other case it
would be the x86_64 one.

Concretely,

  guix build coreutils -s x86_64-linux -s armhf-linux

would return the right derivation for x86_64 and a bogus one for armhf
(one that depends on Mes, Gash, etc.).

Thanks,
Ludo’.




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Fri, 10 Apr 2020 22:37:02 GMT) Full text and rfc822 format available.

Notification sent to Jan Nieuwenhuizen <janneke <at> gnu.org>:
bug acknowledged by developer. (Fri, 10 Apr 2020 22:37:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 09 May 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 352 days ago.

Previous Next


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