[PATCH 0/2] Fix guix package tests on riscv64-linux.

  • Done
  • quality assurance status badge
Details
2 participants
  • Christopher Baines
  • pelzflorian (Florian Pelz)
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal

Debbugs page

Christopher Baines wrote 7 months ago
(address . guix-patches@gnu.org)
87plqv2ml6.fsf@cbaines.net
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(-)
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmaowiVfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xc/Zw//RNFISBcvQ0mRtd/h3P9uOq/3N+xJMkA/
JhqRY95GIJQYwZUD7Zv2CXcgmKTtdHM4WxSiFlLw0Mg0iDApzFIO0BPoPDvg9Twi
5Mxdfa+seQwxPdpCPxcHSNbiSFnkWSBw9+mIioSivmxR6/R7oyCQVFCa4TL3eoVf
cTw8vjg1dA7IchN8QnK+jJHQgnYTz0gaMuGWBqpeQDf/K1Xn0ZDPGxfs/6rH/Lc0
8uWfbvCnqVwWd03w5QPicdF+r3PAAq8Bl+J+B1WoXwuFsbDe5/18K1+BMw9BPFrd
EgAMsA2BhnapG+dc/dCOj/N9PTP5ofGU+fZzxY8riUk1mv0bShT+96dWs89mwJk7
i9xg0qnmQPSG2Q+NxcrTajYILy0AIE6600PzKVt0NzhNgQcxz6zgJkUxg2tfemy5
z3P8XzQv0DPSphBFJrwHsxvxwilkJQCmCiOFEmF8KjB5k4kmITr5WxevI1lvyfT5
9sGfDj+RQwvorcgqAE64THiwlVLB26z5GPLvt6YSvRD/orLUXcPWiFztIzUl+jYb
NBibBnMqmu7RlL4lUgcSf2ITgCwxKCjIGfuvtXQi6k5nEeeLjQUvsZDRW7bt1l7E
qDwoRG97QY/6l1e6rBW3yu+ksUBr8SO06z8OGUegG6OH4Z0PI9bZC4VlM6Mz8kbt
ZHoEKN3iTvk=
=McOh
-----END PGP SIGNATURE-----

Christopher Baines wrote 7 months ago
[PATCH 2/2] guix: tests: Increase timeout for test store connection.
(address . 72362@debbugs.gnu.org)
e5a917e0744c6949ae072d0173ea5085ed3836bc.1722370776.git.mail@cbaines.net
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(-)

Toggle diff (20 lines)
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
Christopher Baines wrote 7 months ago
[PATCH 1/2] tests: gexp: Handle incorrect guile-bootstrap version for riscv.
(address . 72362@debbugs.gnu.org)
97135935a85d4b8133369a9222ab3a8bf53c14c7.1722370776.git.mail@cbaines.net
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(-)

Toggle diff (73 lines)
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
pelzflorian (Florian Pelz) wrote 7 months ago
Re: [bug#72362] [PATCH 2/2] guix: tests: Increase timeout for test store connection.
(name . Christopher Baines)(address . mail@cbaines.net)
87ed787n1b.fsf@pelzflorian.de
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
Christopher Baines wrote 7 months ago
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)(address . 72362-done@debbugs.gnu.org)
874j84343j.fsf@cbaines.net
"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> writes:

Toggle quote (5 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmaraYBfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XfMuhAAoN0ne7KL+6ZP9rfk7IMMmqlA/Y5BBO3B
SYIc62GuNzVUOYQvjxmKqzYLbcx9Qd4V0Jfx2x3NZ1FYzuf/GwtNRCJ7W7kKb6wn
SG/tAj7KdXGFV/pi0+1wdKKFQ4Pp9snLuB0/vw9d/5+9So/nNZ1ERUS5M7DGvlLz
axXr+bdWV18oa9ThhqQPohE55QH+R1aXK1R8BXBN1zWWhuuQzB5sDv8hPEeDol4t
e2ay8e3DuwrwZSe3IC/8RJvMXzu5/Vdhm9cCYUKBU/9G0aBdVD05KWRWtORvGikt
EKCZeqgUi1d7eItnhNDAB3K/jd9DNMWa0fP8UkdWyVXhCZwxg8cujDgA31U8V07J
OWeDitJxu+B2OVO1i92ALOpCKV3mJKP/jlIS42fZz/1Wvz4Z6dO/yNvxEiS+37cK
wDZvAL+o4e+tOy4W4knXxJbeIhiRqLXu7IW+SQ0dMINz2PQUQG8rpF7ICU821ux6
wIhzwyJxDpbGXdCPRWCUnKjmn70tAY4IMVBE6FPovj7+ly4Q0sXKFHm+prUHRu1W
JWscyzk7+Xe5KfxDQm26a+s2gADrLDbQ68oQhHzqpmanl4NseeZSnYK2IIt2rjVk
hlcTBsarWbqxjCyk45d/fokuHHlSJqKJqDwiMMNqQT294MJD5MTq0a95Q5q1uowR
jJiLRKUemPY=
=OsEr
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 72362@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72362
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help