GNU bug report logs - #72362
[PATCH 0/2] Fix guix package tests on riscv64-linux.

Previous Next

Package: guix-patches;

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

Date: Tue, 30 Jul 2024 10:37:01 UTC

Severity: normal

Tags: patch

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

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 72362 in the body.
You can then email your comments to 72362 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#72362; Package guix-patches. (Tue, 30 Jul 2024 10:37:01 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. (Tue, 30 Jul 2024 10:37: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 0/2] Fix guix package tests on riscv64-linux.
Date: Tue, 30 Jul 2024 11:36:21 +0100
[Message part 1 (text/plain, inline)]
Christopher Baines (2):
  tests: gexp: Handle incorrect guile-bootstrap version for riscv.
  guix: tests: Increase timeout for test store connection.

 guix/tests.scm |  4 ++--
 tests/gexp.scm | 26 ++++++++++++++++++++------
 2 files changed, 22 insertions(+), 8 deletions(-)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix <at> cbaines.net, dev <at> jpoiret.xyz, ludo <at> gnu.org, othacehe <at> gnu.org, zimon.toutoune <at> gmail.com, me <at> tobias.gr, guix-patches <at> gnu.org:
bug#72362; Package guix-patches. (Tue, 30 Jul 2024 20:20:02 GMT) Full text and rfc822 format available.

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

From: Christopher Baines <mail <at> cbaines.net>
To: 72362 <at> debbugs.gnu.org
Subject: [PATCH 2/2] guix: tests: Increase timeout for test store connection.
Date: Tue, 30 Jul 2024 21:19:36 +0100
THe gexp->derivation, store copy test involves building derivations which
compile a bunch of Guile code, which can be quite slow on slow platforms like
riscv64-linux.

* guix/tests.scm (open-connection-for-tests): Increase #:timeout to 10
minutes.

Change-Id: Iccfd976ce21a8902d776b36f17f5fb91b957d90d
---
 guix/tests.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/guix/tests.scm b/guix/tests.scm
index 8f6d040f1f..5a314eb395 100644
--- a/guix/tests.scm
+++ b/guix/tests.scm
@@ -86,11 +86,11 @@ (define* (open-connection-for-tests #:optional (uri (%daemon-socket-uri)))
              #f))
     (let ((store (open-connection uri)))
       ;; Make sure we build everything by ourselves.  When we build something,
-      ;; it should take at most 5 minutes.
+      ;; it should take at most 10 minutes.
       (set-build-options store
                          #:use-substitutes? #f
                          #:substitute-urls (%test-substitute-urls)
-                         #:timeout (* 5 60))
+                         #:timeout (* 10 60))
 
       ;; Use the bootstrap Guile when running tests, so we don't end up
       ;; building everything in the temporary test store.
-- 
2.45.2





Information forwarded to guix-patches <at> gnu.org:
bug#72362; Package guix-patches. (Tue, 30 Jul 2024 20:21:02 GMT) Full text and rfc822 format available.

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

From: Christopher Baines <mail <at> cbaines.net>
To: 72362 <at> debbugs.gnu.org
Subject: [PATCH 1/2] tests: gexp: Handle incorrect guile-bootstrap version for
 riscv.
Date: Tue, 30 Jul 2024 21:19:35 +0100
The tests currently fail when run on riscv-linux (affecting the guix package)
because Guile 3 is used as the bootstrap guile.  Correcting the package
version seems hard, so I'm just tweaking the tests to use the right effective
version for riscv64-linux.

* tests/gexp.scm (bootstrap-guile-effective-version): New procedure.
("gexp->derivation & with-extensions", "lower-gexp", "lower-gexp,
raw-derivation-file"): Use bootstrap-guile-effective-version.

Change-Id: I3995e1f6b58ada1baf38a8ec55b0173059dd0079
---
 tests/gexp.scm | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/tests/gexp.scm b/tests/gexp.scm
index 905009caee..b35bfc920f 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -47,6 +47,13 @@ (define-module (test-gexp)
 (define %store
   (open-connection-for-tests))
 
+(define (bootstrap-guile-effective-version)
+  ;; TODO The package version of %bootstrap-guile is incorrect for
+  ;; riscv64-linux
+  (if (string=? "riscv64-linux" (%current-system))
+      "3.0"
+      (package-version %bootstrap-guile)))
+
 ;; Globally disable grafts because they can trigger early builds.
 (%graft? #f)
 
@@ -1099,8 +1106,8 @@ (define %extension-package
                              (write (list the-answer (multiply 2))
                                     port)))))))
        (drv      (gexp->derivation "thingie" build
-                                   ;; %BOOTSTRAP-GUILE is 2.0.
-                                   #:effective-version "2.0"))
+                                   #:effective-version
+                                   (bootstrap-guile-effective-version)))
        (out ->   (derivation->output-path drv)))
     (mbegin %store-monad
       (built-derivations (list drv))
@@ -1120,7 +1127,8 @@ (define %extension-package
                          mkdir-p
                          the-answer))))
        (lexp     (lower-gexp exp
-                             #:effective-version "2.0")))
+                             #:effective-version
+                             (bootstrap-guile-effective-version))))
     (define (matching-input drv output)
       (lambda (input)
         (and (eq? (derivation-input-derivation input) drv)
@@ -1134,12 +1142,15 @@ (define %extension-package
                          (lowered-gexp-inputs lexp))
                    (member (string-append
                             (derivation->output-path extension-drv)
-                            "/share/guile/site/2.0")
+                            "/share/guile/site/"
+                            (bootstrap-guile-effective-version))
                            (lowered-gexp-load-path lexp))
                    (= 2 (length (lowered-gexp-load-path lexp)))
                    (member (string-append
                             (derivation->output-path extension-drv)
-                            "/lib/guile/2.0/site-ccache")
+                            "/lib/guile/"
+                            (bootstrap-guile-effective-version)
+                            "/site-ccache")
                            (lowered-gexp-load-compiled-path lexp))
                    (= 2 (length (lowered-gexp-load-compiled-path lexp)))
                    (eq? (derivation-input-derivation (lowered-gexp-guile lexp))
@@ -1149,7 +1160,10 @@ (define %extension-package
   (mlet* %store-monad ((thing -> (program-file "prog" #~(display "hi!")))
                        (exp -> #~(list #$(raw-derivation-file thing)))
                        (drv  (lower-object thing))
-                       (lexp (lower-gexp exp #:effective-version "2.0")))
+                       (lexp (lower-gexp
+                              exp
+                              #:effective-version
+                              (bootstrap-guile-effective-version))))
     (return (and (equal? `(list ,(derivation-file-name drv))
                          (lowered-gexp-sexp lexp))
                  (equal? (list (derivation-file-name drv))

base-commit: d8217355f2691a92a3c64fea939827a314952a77
-- 
2.45.2





Information forwarded to guix-patches <at> gnu.org:
bug#72362; Package guix-patches. (Thu, 01 Aug 2024 06:53:02 GMT) Full text and rfc822 format available.

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

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Christopher Baines <mail <at> cbaines.net>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>,
 Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>,
 Ludovic Courtès <ludo <at> gnu.org>,
 Tobias Geerinckx-Rice <me <at> tobias.gr>, 72362 <at> debbugs.gnu.org,
 Christopher Baines <guix <at> cbaines.net>
Subject: Re: [bug#72362] [PATCH 2/2] guix: tests: Increase timeout for test
 store connection.
Date: Thu, 01 Aug 2024 08:52:16 +0200
Hello Christopher.  These patches work great.  Previously and two days
ago, on a visionfive2 without cooling, I could not successfully do `guix
pull'.  From a git tree with your patch, I can pull now.  Could you also
update the guix package so I can reconfigure too?

The old guix package still has:

cd /var/log/guix/drvs/
gzip -cd ./d0/gp2srzylx04fgmw1br0w5dbk6wimyk-guix-1.4.0-23.843b85c.drv.gz

PASS: tests/gem.scm
FAIL: tests/gexp.scm
PASS: tests/git.scm

Your patch makes it much easier to turn visionfive2 in an independent
guix system that can upgrade itself.

Regards,
Florian




Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Thu, 01 Aug 2024 10:56:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Thu, 01 Aug 2024 10:56:02 GMT) Full text and rfc822 format available.

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

From: Christopher Baines <mail <at> cbaines.net>
To: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
Cc: 72362-done <at> debbugs.gnu.org
Subject: Re: [bug#72362] [PATCH 2/2] guix: tests: Increase timeout for test
 store connection.
Date: Thu, 01 Aug 2024 11:54:56 +0100
[Message part 1 (text/plain, inline)]
"pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de> writes:

> Hello Christopher.  These patches work great.  Previously and two days
> ago, on a visionfive2 without cooling, I could not successfully do `guix
> pull'.  From a git tree with your patch, I can pull now.  Could you also
> update the guix package so I can reconfigure too?

Thanks for taking a look. Note that these patches shouldn't affect guix
pull, since that doesn't run the guix testsuite.

I've pushed them to master as b4206a08badcc1b1fb276c09665ba481171d5cb3
and I'll update the guix package shortly.

Chris
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 29 Aug 2024 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 351 days ago.

Previous Next


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