unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57039: `make check' yields two failed tests.
@ 2022-08-07 14:13 Pierre-Henry Fröhring
  2022-08-09 13:50 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Pierre-Henry Fröhring @ 2022-08-07 14:13 UTC (permalink / raw)
  To: 57039

[-- Attachment #1: Type: text/plain, Size: 887 bytes --]

Hello Guix,

I've just ran these commands for submitting packages : 

#+begin_src bash
  cd ~/src/guix
  git checkout master
  git pull
  guix shell -D guix --pure
  ./bootstrap
  ./configure --localstatedir=/var
  make
  make check
#+end_src


which gave me this result:

#+begin_src result
 
=======================================================================
=====
  Testsuite summary for GNU Guix 1.3.0.22877-c0e713
 
=======================================================================
=====
  # TOTAL: 2243
  # PASS:  2230
  # SKIP:  8
  # XFAIL: 3
  # FAIL:  2
  # XPASS: 0
  # ERROR: 0
 
=======================================================================
=====
  See ./test-suite.log
  Please report to bug-guix@gnu.org
 
=======================================================================
=====
#+end_src


So, I've attached the logs to this email.

Thanks,
PHF

[-- Attachment #2: test-suite.log --]
[-- Type: text/x-log, Size: 179519 bytes --]

===================================================
   GNU Guix 1.3.0.22877-c0e713: ./test-suite.log
===================================================

# TOTAL: 2243
# PASS:  2230
# SKIP:  8
# XFAIL: 3
# FAIL:  2
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: tests/channels
====================

test-name: channel-instance-metadata returns default if .guix-channel does not exist
location: /home/phf/src/guix/tests/channels.scm:117
source:
+ (test-equal
+   "channel-instance-metadata returns default if .guix-channel does not exist"
+   '("/" ())
+   (let ((metadata
+           (channel-instance-metadata instance--boring)))
+     (list (channel-metadata-directory metadata)
+           (channel-metadata-dependencies metadata))))
expected-value: ("/" ())
actual-value: ("/" ())
result: PASS

test-name: channel-instance-metadata and default dependencies
location: /home/phf/src/guix/tests/channels.scm:123
source:
+ (test-equal
+   "channel-instance-metadata and default dependencies"
+   '()
+   (channel-metadata-dependencies
+     (channel-instance-metadata instance--no-deps)))
expected-value: ()
actual-value: ()
result: PASS

test-name: channel-instance-metadata and directory
location: /home/phf/src/guix/tests/channels.scm:127
source:
+ (test-equal
+   "channel-instance-metadata and directory"
+   "/modules"
+   (channel-metadata-directory
+     (channel-instance-metadata
+       instance--sub-directory)))
expected-value: "/modules"
actual-value: "/modules"
result: PASS

test-name: channel-instance-metadata rejects unsupported version
location: /home/phf/src/guix/tests/channels.scm:132
source:
+ (test-equal
+   "channel-instance-metadata rejects unsupported version"
+   1
+   (guard (c ((and (message-condition? c) (error-location? c))
+              (location-line (error-location c))))
+          (channel-instance-metadata
+            instance--unsupported-version)))
expected-value: 1
actual-value: 1
result: PASS

test-name: channel-instance-metadata returns <channel-metadata>
location: /home/phf/src/guix/tests/channels.scm:138
source:
+ (test-assert
+   "channel-instance-metadata returns <channel-metadata>"
+   (every (@@ (guix channels) channel-metadata?)
+          (map channel-instance-metadata
+               (list instance--no-deps
+                     instance--simple
+                     instance--with-dupes))))
actual-value: #t
result: PASS

test-name: channel-instance-metadata dependencies are channels
location: /home/phf/src/guix/tests/channels.scm:145
source:
+ (test-assert
+   "channel-instance-metadata dependencies are channels"
+   (let ((deps ((@@ (guix channels)
+                    channel-metadata-dependencies)
+                (channel-instance-metadata instance--simple))))
+     (match deps (((? channel? dep)) #t) (_ #f))))
actual-value: #t
result: PASS

test-name: latest-channel-instances includes channel dependencies
location: /home/phf/src/guix/tests/channels.scm:152
source:
+ (test-assert
+   "latest-channel-instances includes channel dependencies"
+   (let* ((channel (channel (name 'test) (url "test")))
+          (test-dir
+            (channel-instance-checkout instance--simple)))
+     (mock ((guix git)
+            update-cached-checkout
+            (lambda* (url #:key ref starting-commit)
+              (match url
+                     ("test" (values test-dir "caf3cabba9e" #f))
+                     (_ (values
+                          (channel-instance-checkout instance--no-deps)
+                          "abcde1234"
+                          #f)))))
+           (with-store
+             store
+             (let ((instances
+                     (latest-channel-instances store (list channel))))
+               (and (eq? 2 (length instances))
+                    (lset= eq?
+                           '(test test-channel)
+                           (map (compose
+                                  channel-name
+                                  channel-instance-channel)
+                                instances))))))))
actual-value: #t
result: PASS

test-name: latest-channel-instances excludes duplicate channel dependencies
location: /home/phf/src/guix/tests/channels.scm:171
source:
+ (test-assert
+   "latest-channel-instances excludes duplicate channel dependencies"
+   (let* ((channel (channel (name 'test) (url "test")))
+          (test-dir
+            (channel-instance-checkout instance--with-dupes)))
+     (mock ((guix git)
+            update-cached-checkout
+            (lambda* (url #:key ref starting-commit)
+              (match url
+                     ("test" (values test-dir "caf3cabba9e" #f))
+                     (_ (values
+                          (channel-instance-checkout instance--no-deps)
+                          "abcde1234"
+                          #f)))))
+           (with-store
+             store
+             (let ((instances
+                     (latest-channel-instances store (list channel))))
+               (and (= 2 (length instances))
+                    (lset= eq?
+                           '(test test-channel)
+                           (map (compose
+                                  channel-name
+                                  channel-instance-channel)
+                                instances))
+                    (find (lambda (instance)
+                            (and (eq? (channel-name
+                                        (channel-instance-channel instance))
+                                      'test-channel)
+                                 (string=?
+                                   (channel-commit
+                                     (channel-instance-channel instance))
+                                   "abc1234")))
+                          instances)))))))
actual-value: #<<channel-instance> channel: #<<channel> name: test-channel url: "https://example.com/test-channel" branch: "master" commit: "abc1234" introduction: #f location: ((filename . "guix/channels.scm") (line . 262) (column . 19))> commit: "abcde1234" checkout: "/home/phf/src/guix/test-tmp/store/anacarmfl1xycpv3sdmh7bwgxmlq2zsj-test-channel-abcde12">
result: PASS

hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /tmp/guix-directory.W4tDRU/.git/
[master (root-commit) e6e86ec] first commit
 1 file changed, 1 insertion(+)
 create mode 100644 a.txt
[master a2e39d8] second commit
 1 file changed, 1 insertion(+)
 create mode 100644 b.scm
test-name: latest-channel-instances #:validate-pull
location: /home/phf/src/guix/tests/channels.scm:201
source:
+ (test-equal
+   "latest-channel-instances #:validate-pull"
+   'descendant
+   (let/ec
+     return
+     (with-temporary-git-repository
+       directory
+       '((add "a.txt" "A")
+         (commit "first commit")
+         (add "b.scm" "#t")
+         (commit "second commit"))
+       (with-repository
+         directory
+         repository
+         (let* ((commit1 (find-commit repository "first"))
+                (commit2 (find-commit repository "second"))
+                (spec (channel
+                        (url (string-append "file://" directory))
+                        (name 'foo)))
+                (new (channel
+                       (inherit spec)
+                       (commit (oid->string (commit-id commit2)))))
+                (old (channel
+                       (inherit spec)
+                       (commit (oid->string (commit-id commit1))))))
+           (define (validate-pull channel current commit relation)
+             (return
+               (and (eq? channel old)
+                    (string=?
+                      (oid->string (commit-id commit2))
+                      current)
+                    (string=?
+                      (oid->string (commit-id commit1))
+                      commit)
+                    relation)))
+           (with-store
+             store
+             (latest-channel-instances
+               store
+               (list old)
+               #:current-channels
+               (list new)
+               #:validate-pull
+               validate-pull)))))))
expected-value: descendant
actual-value: descendant
result: PASS

test-name: channel-instances->manifest
location: /home/phf/src/guix/tests/channels.scm:234
source:
+ (test-assert
+   "channel-instances->manifest"
+   (let* ((spec (lambda deps
+                  `(channel
+                     (version 0)
+                     (dependencies
+                       ,@(map (lambda (dep)
+                                `(channel
+                                   (name ,dep)
+                                   (url "http://example.org")))
+                              deps)))))
+          (guix (make-instance #:name 'guix))
+          (instance0 (make-instance #:name 'a))
+          (instance1
+            (make-instance #:name 'b #:spec (spec 'a)))
+          (instance2
+            (make-instance #:name 'c #:spec (spec 'b)))
+          (instance3
+            (make-instance #:name 'd #:spec (spec 'c 'a))))
+     (%graft? #f)
+     (let ((source (channel-instance-checkout guix)))
+       (mkdir (string-append source "/build-aux"))
+       (call-with-output-file
+         (string-append
+           source
+           "/build-aux/build-self.scm")
+         (lambda (port)
+           (write '(begin
+                     (use-modules (guix) (gnu packages bootstrap))
+                     (lambda _ (package->derivation %bootstrap-guile)))
+                  port))))
+     (with-store
+       store
+       (let ()
+         (define manifest
+           (run-with-store
+             store
+             (channel-instances->manifest
+               (list guix
+                     instance0
+                     instance1
+                     instance2
+                     instance3))))
+         (define entries (manifest-entries manifest))
+         (define (depends? drv in out)
+           (let ((set (list->set
+                        (requisites
+                          store
+                          (list (derivation-file-name drv)))))
+                 (in (map derivation-file-name in))
+                 (out (map derivation-file-name out)))
+             (and (every (cut set-contains? set <>) in)
+                  (not (any (cut set-contains? set <>) out)))))
+         (define (lookup name)
+           (run-with-store
+             store
+             (lower-object
+               (manifest-entry-item
+                 (manifest-lookup
+                   manifest
+                   (manifest-pattern (name name)))))))
+         (let ((drv-guix (lookup "guix"))
+               (drv0 (lookup "a"))
+               (drv1 (lookup "b"))
+               (drv2 (lookup "c"))
+               (drv3 (lookup "d")))
+           (and (depends?
+                  drv-guix
+                  '()
+                  (list drv0 drv1 drv2 drv3))
+                (depends? drv0 (list) (list drv1 drv2 drv3))
+                (depends? drv1 (list drv0) (list drv2 drv3))
+                (depends? drv2 (list drv1) (list drv3))
+                (depends? drv3 (list drv2 drv0) (list))))))))
actual-value: #t
result: PASS

hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /tmp/guix-directory.twSRoh/.git/
[master (root-commit) af5e5ac] the commit
 1 file changed, 1 insertion(+)
 create mode 100644 a.txt
test-name: channel-news, no news
location: /home/phf/src/guix/tests/channels.scm:311
source:
+ (test-equal
+   "channel-news, no news"
+   '()
+   (with-temporary-git-repository
+     directory
+     '((add "a.txt" "A") (commit "the commit"))
+     (with-repository
+       directory
+       repository
+       (let ((channel
+               (channel
+                 (url (string-append "file://" directory))
+                 (name 'foo)))
+             (latest (reference-name->oid repository "HEAD")))
+         (channel-news-for-commit
+           channel
+           (oid->string latest))))))
expected-value: ()
actual-value: ()
result: PASS

hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /tmp/guix-directory.AUNVuF/.git/
[master (root-commit) 431a69c] first commit
 1 file changed, 1 insertion(+)
 create mode 100644 .guix-channel
[master fcfbf48] second commit
 1 file changed, 1 insertion(+)
 create mode 100644 src/a.txt
[master 2d94a55] third commit
 1 file changed, 1 insertion(+)
 create mode 100644 news.scm
[master 68fd50a] fourth commit
 1 file changed, 1 insertion(+)
 create mode 100644 src/b.txt
[master 1464ac6] fifth commit
 1 file changed, 1 insertion(+), 1 deletion(-)
test-name: channel-news, one entry
location: /home/phf/src/guix/tests/channels.scm:323
source:
+ (test-assert
+   "channel-news, one entry"
+   (with-temporary-git-repository
+     directory
+     `((add ".guix-channel"
+            ,(object->string
+               '(channel (version 0) (news-file "news.scm"))))
+       (commit "first commit")
+       (add "src/a.txt" "A")
+       (commit "second commit")
+       (tag "tag-for-first-news-entry")
+       (add "news.scm"
+            ,(lambda (repository)
+               (let ((previous
+                       (reference-name->oid repository "HEAD")))
+                 (object->string
+                   `(channel-news
+                      (version 0)
+                      (entry (commit ,(oid->string previous))
+                             (title (en "New file!") (eo "Nova dosiero!"))
+                             (body (en "Yeah, a.txt."))))))))
+       (commit "third commit")
+       (add "src/b.txt" "B")
+       (commit "fourth commit")
+       (add "news.scm"
+            ,(lambda (repository)
+               (let ((second
+                       (commit-id
+                         (find-commit repository "second commit")))
+                     (previous
+                       (reference-name->oid repository "HEAD")))
+                 (object->string
+                   `(channel-news
+                      (version 0)
+                      (entry (commit ,(oid->string previous))
+                             (title (en "Another file!"))
+                             (body (en "Yeah, b.txt.")))
+                      (entry (tag "tag-for-first-news-entry")
+                             (title (en "Old news.") (eo "Malnova?oj."))
+                             (body (en "For a.txt"))))))))
+       (commit "fifth commit"))
+     (with-repository
+       directory
+       repository
+       (define (find-commit* message)
+         (oid->string
+           (commit-id (find-commit repository message))))
+       (let ((channel
+               (channel
+                 (url (string-append "file://" directory))
+                 (name 'foo)))
+             (commit1 (find-commit* "first commit"))
+             (commit2 (find-commit* "second commit"))
+             (commit3 (find-commit* "third commit"))
+             (commit4 (find-commit* "fourth commit"))
+             (commit5 (find-commit* "fifth commit")))
+         (and (null? (channel-news-for-commit channel commit2))
+              (lset= string=?
+                     (map channel-news-entry-commit
+                          (channel-news-for-commit channel commit5))
+                     (list commit2 commit4))
+              (lset= equal?
+                     (map channel-news-entry-title
+                          (channel-news-for-commit channel commit5))
+                     '((("en" . "Another file!"))
+                       (("en" . "Old news.") ("eo" . "Malnova?oj."))))
+              (lset= string=?
+                     (map channel-news-entry-commit
+                          (channel-news-for-commit channel commit3))
+                     (list commit2))
+              (lset= string=?
+                     (map channel-news-entry-commit
+                          (channel-news-for-commit channel commit3 commit1))
+                     (list commit2))
+              (lset= string=?
+                     (map channel-news-entry-commit
+                          (channel-news-for-commit channel commit5 commit3))
+                     (list commit4))
+              (lset= string=?
+                     (map channel-news-entry-commit
+                          (channel-news-for-commit channel commit5 commit1))
+                     (list commit4 commit2))
+              (lset= equal?
+                     (map channel-news-entry-tag
+                          (channel-news-for-commit channel commit5 commit1))
+                     '(#f "tag-for-first-news-entry")))))))
actual-value: #f
result: FAIL

hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /tmp/guix-directory.2Qu24a/.git/
[master (root-commit) e6458b0] first commit
 2 files changed, 2 insertions(+)
 create mode 100644 .guix-channel
 create mode 100644 src/a.txt
[master 78c9327] second commit
 1 file changed, 1 insertion(+)
 create mode 100644 news.scm
test-name: channel-news, annotated tag
location: /home/phf/src/guix/tests/channels.scm:411
source:
+ (test-assert
+   "channel-news, annotated tag"
+   (with-temporary-git-repository
+     directory
+     `((add ".guix-channel"
+            ,(object->string
+               '(channel (version 0) (news-file "news.scm"))))
+       (add "src/a.txt" "A")
+       (commit "first commit")
+       (tag "tag-for-first-news-entry"
+            "This is an annotated tag.")
+       (add "news.scm"
+            ,(lambda (repository)
+               (let ((previous
+                       (reference-name->oid repository "HEAD")))
+                 (object->string
+                   `(channel-news
+                      (version 0)
+                      (entry (tag "tag-for-first-news-entry")
+                             (title (en "New file!"))
+                             (body (en "Yeah, a.txt."))))))))
+       (commit "second commit"))
+     (with-repository
+       directory
+       repository
+       (define (find-commit* message)
+         (oid->string
+           (commit-id (find-commit repository message))))
+       (let ((channel
+               (channel
+                 (url (string-append "file://" directory))
+                 (name 'foo)))
+             (commit1 (find-commit* "first commit"))
+             (commit2 (find-commit* "second commit")))
+         (and (null? (channel-news-for-commit channel commit1))
+              (lset= equal?
+                     (map channel-news-entry-title
+                          (channel-news-for-commit channel commit2))
+                     '((("en" . "New file!"))))
+              (lset= string=?
+                     (map channel-news-entry-tag
+                          (channel-news-for-commit channel commit2))
+                     (list "tag-for-first-news-entry"))
+              (lset= string=?
+                     (map channel-news-entry-commit
+                          (channel-news-for-commit channel commit2))
+                     (list commit1)))))))
actual-value: #t
result: PASS

hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /tmp/guix-directory.29Hev4/.git/
[master (root-commit) c3a6baf] first commit
 1 file changed, 1 insertion(+)
 create mode 100644 a.txt
[master caac996] second commit
 1 file changed, 1 insertion(+)
 create mode 100644 b.scm
test-name: latest-channel-instances, missing introduction for 'guix'
location: /home/phf/src/guix/tests/channels.scm:458
source:
+ (test-assert
+   "latest-channel-instances, missing introduction for 'guix'"
+   (with-temporary-git-repository
+     directory
+     '((add "a.txt" "A")
+       (commit "first commit")
+       (add "b.scm" "#t")
+       (commit "second commit"))
+     (with-repository
+       directory
+       repository
+       (let* ((commit1 (find-commit repository "first"))
+              (commit2 (find-commit repository "second"))
+              (channel
+                (channel
+                  (url (string-append "file://" directory))
+                  (name 'guix))))
+         (guard (c ((formatted-message? c)
+                    (->bool
+                      (string-contains
+                        (formatted-message-string c)
+                        "introduction"))))
+                (with-store
+                  store
+                  (latest-channel-instances store (list channel))
+                  #f))))))
actual-value: #t
result: PASS

gpg: keybox '/tmp/guix-directory.ErtK60/pubring.kbx' created
gpg: /tmp/guix-directory.ErtK60/trustdb.gpg: trustdb created
gpg: key 771F49CBFAAE072D: public key "Ed Two-Fifty <ludo+test-ecc@chbouib.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: key 771F49CBFAAE072D: "Ed Two-Fifty <ludo+test-ecc@chbouib.org>" 1 new signature
gpg: key 771F49CBFAAE072D: secret key imported
gpg: Total number processed: 1
gpg:         new signatures: 1
gpg:       secret keys read: 1
gpg:   secret keys imported: 1
gpg: key 82240EDCAB80DA83: public key "Charlie Guix <charlie@example.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: key 82240EDCAB80DA83: "Charlie Guix <charlie@example.org>" 1 new signature
gpg: key 82240EDCAB80DA83: secret key imported
gpg: Total number processed: 1
gpg:         new signatures: 1
gpg:       secret keys read: 1
gpg:   secret keys imported: 1
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /tmp/guix-directory.2pm6Op/.git/
[master (root-commit) 191a8db] first commit
 3 files changed, 12 insertions(+)
 create mode 100644 .guix-authorizations
 create mode 100644 .guix-channel
 create mode 100644 signer.key
[master 98fa4d0] second commit
 1 file changed, 1 insertion(+)
 create mode 100644 random
test-name: authenticate-channel, wrong first commit signer
location: /home/phf/src/guix/tests/channels.scm:479
source:
+ (test-equal
+   "authenticate-channel, wrong first commit signer"
+   #t
+   (with-fresh-gnupg-setup
+     (list %ed25519-public-key-file
+           %ed25519-secret-key-file
+           %ed25519-2-public-key-file
+           %ed25519-2-secret-key-file)
+     (with-temporary-git-repository
+       directory
+       `((add ".guix-channel"
+              ,(object->string
+                 '(channel
+                    (version 0)
+                    (keyring-reference "master"))))
+         (add ".guix-authorizations"
+              ,(object->string
+                 `(authorizations
+                    (version 0)
+                    ((,(key-fingerprint %ed25519-public-key-file)
+                      (name "Charlie"))))))
+         (add "signer.key"
+              ,(call-with-input-file
+                 %ed25519-public-key-file
+                 get-string-all))
+         (commit
+           "first commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file)))
+         (add "random" ,(random-text))
+         (commit
+           "second commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file))))
+       (with-repository
+         directory
+         repository
+         (let* ((commit1 (find-commit repository "first"))
+                (commit2 (find-commit repository "second"))
+                (intro (make-channel-introduction
+                         (commit-id-string commit1)
+                         (openpgp-public-key-fingerprint
+                           (read-openpgp-packet %ed25519-2-public-key-file))))
+                (channel
+                  (channel
+                    (name 'example)
+                    (url (string-append "file://" directory))
+                    (introduction intro))))
+           (guard (c ((formatted-message? c)
+                      (and (string-contains
+                             (formatted-message-string c)
+                             "initial commit")
+                           (equal?
+                             (formatted-message-arguments c)
+                             (list (oid->string (commit-id commit1))
+                                   (key-fingerprint %ed25519-public-key-file)
+                                   (key-fingerprint
+                                     %ed25519-2-public-key-file))))))
+                  (authenticate-channel
+                    channel
+                    directory
+                    (commit-id-string commit2)
+                    #:keyring-reference-prefix
+                    "")
+                  'failed))))))
expected-value: #t
actual-value: #t
result: PASS

gpg: keybox '/tmp/guix-directory.9Dhvlu/pubring.kbx' created
gpg: /tmp/guix-directory.9Dhvlu/trustdb.gpg: trustdb created
gpg: key 771F49CBFAAE072D: public key "Ed Two-Fifty <ludo+test-ecc@chbouib.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: key 771F49CBFAAE072D: "Ed Two-Fifty <ludo+test-ecc@chbouib.org>" 1 new signature
gpg: key 771F49CBFAAE072D: secret key imported
gpg: Total number processed: 1
gpg:         new signatures: 1
gpg:       secret keys read: 1
gpg:   secret keys imported: 1
gpg: key 82240EDCAB80DA83: public key "Charlie Guix <charlie@example.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: key 82240EDCAB80DA83: "Charlie Guix <charlie@example.org>" 1 new signature
gpg: key 82240EDCAB80DA83: secret key imported
gpg: Total number processed: 1
gpg:         new signatures: 1
gpg:       secret keys read: 1
gpg:   secret keys imported: 1
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /tmp/guix-directory.TxvkRu/.git/
[master (root-commit) 191a8db] first commit
 3 files changed, 12 insertions(+)
 create mode 100644 .guix-authorizations
 create mode 100644 .guix-channel
 create mode 100644 signer.key
Switched to branch 'alternate-branch'
[alternate-branch 8226a82] intro commit
 1 file changed, 1 insertion(+)
 create mode 100644 something.txt
Switched to branch 'master'
[master 5918de1] second commit
 1 file changed, 1 insertion(+)
 create mode 100644 random
test-name: authenticate-channel, not a descendant of introductory commit
location: /home/phf/src/guix/tests/channels.scm:529
source:
+ (test-equal
+   "authenticate-channel, not a descendant of introductory commit"
+   #t
+   (with-fresh-gnupg-setup
+     (list %ed25519-public-key-file
+           %ed25519-secret-key-file
+           %ed25519-2-public-key-file
+           %ed25519-2-secret-key-file)
+     (with-temporary-git-repository
+       directory
+       `((add ".guix-channel"
+              ,(object->string
+                 '(channel
+                    (version 0)
+                    (keyring-reference "master"))))
+         (add ".guix-authorizations"
+              ,(object->string
+                 `(authorizations
+                    (version 0)
+                    ((,(key-fingerprint %ed25519-public-key-file)
+                      (name "Charlie"))))))
+         (add "signer.key"
+              ,(call-with-input-file
+                 %ed25519-public-key-file
+                 get-string-all))
+         (commit
+           "first commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file)))
+         (branch "alternate-branch")
+         (checkout "alternate-branch")
+         (add "something.txt" ,(random-text))
+         (commit
+           "intro commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file)))
+         (checkout "master")
+         (add "random" ,(random-text))
+         (commit
+           "second commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file))))
+       (with-repository
+         directory
+         repository
+         (let* ((commit1 (find-commit repository "first"))
+                (commit2 (find-commit repository "second"))
+                (commit0
+                  (commit-lookup
+                    repository
+                    (reference-target
+                      (branch-lookup repository "alternate-branch"))))
+                (intro (make-channel-introduction
+                         (commit-id-string commit0)
+                         (openpgp-public-key-fingerprint
+                           (read-openpgp-packet %ed25519-public-key-file))))
+                (channel
+                  (channel
+                    (name 'example)
+                    (url (string-append "file://" directory))
+                    (introduction intro))))
+           (guard (c ((formatted-message? c)
+                      (and (string-contains
+                             (formatted-message-string c)
+                             "not a descendant")
+                           (equal?
+                             (formatted-message-arguments c)
+                             (list (oid->string (commit-id commit2))
+                                   (oid->string (commit-id commit0)))))))
+                  (authenticate-channel
+                    channel
+                    directory
+                    (commit-id-string commit2)
+                    #:keyring-reference-prefix
+                    "")
+                  'failed))))))
expected-value: #t
actual-value: #t
result: PASS

gpg: keybox '/tmp/guix-directory.a4T78L/pubring.kbx' created
gpg: /tmp/guix-directory.a4T78L/trustdb.gpg: trustdb created
gpg: key 771F49CBFAAE072D: public key "Ed Two-Fifty <ludo+test-ecc@chbouib.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: key 771F49CBFAAE072D: "Ed Two-Fifty <ludo+test-ecc@chbouib.org>" 1 new signature
gpg: key 771F49CBFAAE072D: secret key imported
gpg: Total number processed: 1
gpg:         new signatures: 1
gpg:       secret keys read: 1
gpg:   secret keys imported: 1
gpg: key 82240EDCAB80DA83: public key "Charlie Guix <charlie@example.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: key 82240EDCAB80DA83: "Charlie Guix <charlie@example.org>" 1 new signature
gpg: key 82240EDCAB80DA83: secret key imported
gpg: Total number processed: 1
gpg:         new signatures: 1
gpg:       secret keys read: 1
gpg:   secret keys imported: 1
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /tmp/guix-directory.IiFeWM/.git/
[master (root-commit) a109e15] zeroth commit
 2 files changed, 2 insertions(+)
 create mode 100644 .guix-authorizations
 create mode 100644 .guix-channel
[master bf2d4b4] first commit
 1 file changed, 1 insertion(+)
 create mode 100644 a.txt
[master e08b50e] second commit
 1 file changed, 1 insertion(+)
 create mode 100644 b.txt
[master 22ad3aa] third commit
 1 file changed, 1 insertion(+)
 create mode 100644 c.txt
Switched to branch 'channel-keyring'
[channel-keyring 56b23bc] keyring commit
 2 files changed, 19 insertions(+)
 create mode 100644 other.key
 create mode 100644 signer.key
Switched to branch 'master'
Updating channel 'test' from Git repository at 'test'...
Updating channel 'test-channel' from Git repository at 'https://example.com/test-channel'...
Updating channel 'test' from Git repository at 'test'...
Updating channel 'test-channel' from Git repository at 'https://example.com/test-channel'...
Updating channel 'test-channel' from Git repository at 'https://example.com/test-channel'...
Updating channel 'foo' from Git repository at 'file:///tmp/guix-directory.W4tDRU'...
Updating channel 'guix' from Git repository at 'file:///tmp/guix-directory.29Hev4'...
random seed for tests: 1659057669
Authenticating channel 'example', commits 191a8db to 98fa4d0 (1 new commits)...
Authenticating channel 'example', commits 8226a82 to 5918de1 (1 new commits)...
Authenticating channel 'example', commits bf2d4b4 to e08b50e (1 new commits)...
\r^[[K[##############################################################################]\r^[[KAuthenticating channel 'example', commits bf2d4b4 to 22ad3aa (1 new commits)...
\r^[[K[##############################################################################]\r^[[Ktest-name: authenticate-channel, .guix-authorizations
location: /home/phf/src/guix/tests/channels.scm:587
source:
+ (test-equal
+   "authenticate-channel, .guix-authorizations"
+   #t
+   (with-fresh-gnupg-setup
+     (list %ed25519-public-key-file
+           %ed25519-secret-key-file
+           %ed25519-2-public-key-file
+           %ed25519-2-secret-key-file)
+     (with-temporary-git-repository
+       directory
+       `((add ".guix-channel"
+              ,(object->string
+                 '(channel
+                    (version 0)
+                    (keyring-reference "channel-keyring"))))
+         (add ".guix-authorizations"
+              ,(object->string
+                 `(authorizations
+                    (version 0)
+                    ((,(key-fingerprint %ed25519-public-key-file)
+                      (name "Charlie"))))))
+         (commit "zeroth commit")
+         (add "a.txt" "A")
+         (commit
+           "first commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file)))
+         (add "b.txt" "B")
+         (commit
+           "second commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file)))
+         (add "c.txt" "C")
+         (commit
+           "third commit"
+           (signer
+             ,(key-fingerprint %ed25519-2-public-key-file)))
+         (branch "channel-keyring")
+         (checkout "channel-keyring")
+         (add "signer.key"
+              ,(call-with-input-file
+                 %ed25519-public-key-file
+                 get-string-all))
+         (add "other.key"
+              ,(call-with-input-file
+                 %ed25519-2-public-key-file
+                 get-string-all))
+         (commit "keyring commit")
+         (checkout "master"))
+       (with-repository
+         directory
+         repository
+         (let* ((commit1 (find-commit repository "first"))
+                (commit2 (find-commit repository "second"))
+                (commit3 (find-commit repository "third"))
+                (intro (make-channel-introduction
+                         (commit-id-string commit1)
+                         (openpgp-public-key-fingerprint
+                           (read-openpgp-packet %ed25519-public-key-file))))
+                (channel
+                  (channel
+                    (name 'example)
+                    (url (string-append "file://" directory))
+                    (introduction intro))))
+           (and (authenticate-channel
+                  channel
+                  directory
+                  (commit-id-string commit2)
+                  #:keyring-reference-prefix
+                  "")
+                (guard (c ((unauthorized-commit-error? c)
+                           (and (oid=? (git-authentication-error-commit c)
+                                       (commit-id commit3))
+                                (bytevector=?
+                                  (openpgp-public-key-fingerprint
+                                    (unauthorized-commit-error-signing-key c))
+                                  (openpgp-public-key-fingerprint
+                                    (read-openpgp-packet
+                                      %ed25519-2-public-key-file))))))
+                       (authenticate-channel
+                         channel
+                         directory
+                         (commit-id-string commit3)
+                         #:keyring-reference-prefix
+                         "")
+                       'failed)))))))
expected-value: #t
actual-value: #t
result: PASS

gpg: keybox '/tmp/guix-directory.gHFpd8/pubring.kbx' created
gpg: /tmp/guix-directory.gHFpd8/trustdb.gpg: trustdb created
gpg: key 771F49CBFAAE072D: public key "Ed Two-Fifty <ludo+test-ecc@chbouib.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: key 771F49CBFAAE072D: "Ed Two-Fifty <ludo+test-ecc@chbouib.org>" 1 new signature
gpg: key 771F49CBFAAE072D: secret key imported
gpg: Total number processed: 1
gpg:         new signatures: 1
gpg:       secret keys read: 1
gpg:   secret keys imported: 1
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /tmp/guix-directory.6b2L4R/.git/
[master (root-commit) fb81efb] zeroth commit
 3 files changed, 12 insertions(+)
 create mode 100644 .guix-authorizations
 create mode 100644 .guix-channel
 create mode 100644 signer.key
[master 9dba1da] unsigned commit
 1 file changed, 1 insertion(+)
 create mode 100644 foo.txt
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /tmp/guix-directory.dTYBPf/.git/
[master (root-commit) 732f7dc] single commit
 1 file changed, 1 insertion(+)
 create mode 100644 .guix-channel
Updating channel 'test' from Git repository at '/tmp/guix-directory.dTYBPf'...
Updating channel 'test-channel' from Git repository at '/tmp/guix-directory.6b2L4R'...
Authenticating channel 'test-channel', commits fb81efb to 9dba1da (1 new commits)...
\r^[[K[##############################################################################]\r^[[Ktest-name: latest-channel-instances, authenticate dependency
location: /home/phf/src/guix/tests/channels.scm:656
source:
+ (test-equal
+   "latest-channel-instances, authenticate dependency"
+   #t
+   (with-fresh-gnupg-setup
+     (list %ed25519-public-key-file
+           %ed25519-secret-key-file)
+     (with-temporary-git-repository
+       dependency-directory
+       `((add ".guix-channel"
+              ,(object->string
+                 '(channel
+                    (version 0)
+                    (keyring-reference "master"))))
+         (add ".guix-authorizations"
+              ,(object->string `(authorizations (version 0) ())))
+         (add "signer.key"
+              ,(call-with-input-file
+                 %ed25519-public-key-file
+                 get-string-all))
+         (commit
+           "zeroth commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file)))
+         (add "foo.txt" "evil")
+         (commit "unsigned commit"))
+       (with-repository
+         dependency-directory
+         dependency
+         (let* ((commit0 (find-commit dependency "zeroth"))
+                (commit1 (find-commit dependency "unsigned"))
+                (intro `(channel-introduction
+                          (version 0)
+                          (commit ,(commit-id-string commit0))
+                          (signer
+                            ,(openpgp-format-fingerprint
+                               (openpgp-public-key-fingerprint
+                                 (read-openpgp-packet
+                                   %ed25519-public-key-file)))))))
+           (with-temporary-git-repository
+             directory
+             `((add ".guix-channel"
+                    ,(object->string
+                       `(channel
+                          (version 0)
+                          (dependencies
+                            (channel
+                              (name test-channel)
+                              (url ,dependency-directory)
+                              (introduction ,intro))))))
+               (commit "single commit"))
+             (let ((channel (channel (name 'test) (url directory))))
+               (guard (c ((unsigned-commit-error? c)
+                          (oid=? (git-authentication-error-commit c)
+                                 (commit-id commit1))))
+                      (with-store
+                        store
+                        (latest-channel-instances store (list channel))
+                        'failed)))))))))
expected-value: #t
actual-value: #t
result: PASS


SKIP: tests/cpio
================

test-name: file->cpio-header + write-cpio-header + read-cpio-header
location: /home/phf/src/guix/tests/cpio.scm:37
source:
+ (test-assert
+   "file->cpio-header + write-cpio-header + read-cpio-header"
+   (let* ((file (search-path %load-path "guix.scm"))
+          (header (file->cpio-header file)))
+     (call-with-values
+       (lambda () (open-bytevector-output-port))
+       (lambda (port get-bv)
+         (write-cpio-header header port)
+         (let ((port (open-bytevector-input-port (get-bv))))
+           (equal? header (read-cpio-header port)))))))
actual-value: #t
result: PASS

test-name: bit-identical to GNU cpio's output
location: /home/phf/src/guix/tests/cpio.scm:49
source:
+ (test-assert
+   "bit-identical to GNU cpio's output"
+   (call-with-temporary-output-file
+     (lambda (link _)
+       (delete-file link)
+       (symlink "chbouib" link)
+       (let ((files (cons* "/"
+                           (canonicalize-path
+                             (dirname (search-path %load-path "guix.scm")))
+                           link
+                           (map (compose
+                                  canonicalize-path
+                                  (cut search-path %load-path <>))
+                                '("guix.scm"
+                                  "guix/build/syscalls.scm"
+                                  "guix/packages.scm")))))
+         (call-with-temporary-output-file
+           (lambda (ref-file _)
+             (let ((pipe (open-pipe*
+                           OPEN_WRITE
+                           %cpio-program
+                           "-o"
+                           "-O"
+                           ref-file
+                           "-H"
+                           "newc"
+                           "--null")))
+               (for-each
+                 (lambda (file) (format pipe "~a\x00" file))
+                 files)
+               (and (zero? (close-pipe pipe))
+                    (call-with-temporary-output-file
+                      (lambda (file port)
+                        (write-cpio-archive files port)
+                        (close-port port)
+                        (or (file=? ref-file file)
+                            (throw 'cpio-archives-differ
+                                   files
+                                   ref-file
+                                   file
+                                   (stat:size (stat ref-file))
+                                   (stat:size (stat file))))))))))))))
result: SKIP


SKIP: tests/crate
=================

test-name: guix-package->crate-name
location: /home/phf/src/guix/tests/crate.scm:326
source:
+ (test-equal
+   "guix-package->crate-name"
+   "rustc-serialize"
+   (guix-package->crate-name
+     (dummy-package
+       "rust-rustc-serialize"
+       (source
+         (dummy-origin
+           (uri (crate-uri "rustc-serialize" "1.0")))))))
expected-value: "rustc-serialize"
actual-value: "rustc-serialize"
result: PASS

test-name: crate->guix-package
location: /home/phf/src/guix/tests/crate.scm:335
source:
+ (test-assert
+   "crate->guix-package"
+   (mock ((guix http-client)
+          http-fetch
+          (lambda (url . rest)
+            (match url
+                   ("https://crates.io/api/v1/crates/foo"
+                    (open-input-string test-foo-crate))
+                   ("https://crates.io/api/v1/crates/foo/1.0.3/download"
+                    (set! test-source-hash
+                      (bytevector->nix-base32-string
+                        (sha256
+                          (string->bytevector "empty file\n" "utf-8"))))
+                    (open-input-string "empty file\n"))
+                   ("https://crates.io/api/v1/crates/foo/1.0.3/dependencies"
+                    (open-input-string test-foo-dependencies))
+                   ("https://crates.io/api/v1/crates/leaf-alice"
+                    (open-input-string test-leaf-alice-crate))
+                   ("https://crates.io/api/v1/crates/leaf-alice/0.7.5/download"
+                    (set! test-source-hash
+                      (bytevector->nix-base32-string
+                        (sha256
+                          (string->bytevector "empty file\n" "utf-8"))))
+                    (open-input-string "empty file\n"))
+                   ("https://crates.io/api/v1/crates/leaf-alice/0.7.5/dependencies"
+                    (open-input-string test-leaf-alice-dependencies))
+                   (_ (error "Unexpected URL: " url)))))
+         (match (crate->guix-package "foo")
+                ((define-public 'rust-foo-1
+                   (package
+                     (name "rust-foo")
+                     (version "1.0.3")
+                     (source
+                       (origin
+                         (method url-fetch)
+                         (uri (crate-uri "foo" 'version))
+                         (file-name
+                           (string-append name "-" version ".tar.gz"))
+                         (sha256 (base32 (? string? hash)))))
+                     (build-system 'cargo-build-system)
+                     (arguments
+                       ('quasiquote
+                        (#:skip-build?
+                         #t
+                         #:cargo-inputs
+                         (("rust-leaf-alice"
+                           ('unquote 'rust-leaf-alice-0.7))))))
+                     (home-page "http://example.com")
+                     (synopsis "summary")
+                     (description "summary")
+                     (license (list license:expat license:asl2.0))))
+                 (string=? test-source-hash hash))
+                (x (pk 'fail x #f)))))
result: SKIP

test-name: cargo-recursive-import
location: /home/phf/src/guix/tests/crate.scm:388
source:
+ (test-assert
+   "cargo-recursive-import"
+   (mock ((guix http-client)
+          http-fetch
+          (lambda (url . rest)
+            (match url
+                   ("https://crates.io/api/v1/crates/root"
+                    (open-input-string test-root-crate))
+                   ("https://crates.io/api/v1/crates/root/1.0.4/download"
+                    (set! test-source-hash
+                      (bytevector->nix-base32-string
+                        (sha256
+                          (string->bytevector "empty file\n" "utf-8"))))
+                    (open-input-string "empty file\n"))
+                   ("https://crates.io/api/v1/crates/root/1.0.4/dependencies"
+                    (open-input-string test-root-dependencies))
+                   ("https://crates.io/api/v1/crates/intermediate-a"
+                    (open-input-string test-intermediate-a-crate))
+                   ("https://crates.io/api/v1/crates/intermediate-a/1.0.42/download"
+                    (set! test-source-hash
+                      (bytevector->nix-base32-string
+                        (sha256
+                          (string->bytevector "empty file\n" "utf-8"))))
+                    (open-input-string "empty file\n"))
+                   ("https://crates.io/api/v1/crates/intermediate-a/1.0.42/dependencies"
+                    (open-input-string
+                      test-intermediate-a-dependencies))
+                   ("https://crates.io/api/v1/crates/intermediate-b"
+                    (open-input-string test-intermediate-b-crate))
+                   ("https://crates.io/api/v1/crates/intermediate-b/1.2.3/download"
+                    (set! test-source-hash
+                      (bytevector->nix-base32-string
+                        (sha256
+                          (string->bytevector "empty file\n" "utf-8"))))
+                    (open-input-string "empty file\n"))
+                   ("https://crates.io/api/v1/crates/intermediate-b/1.2.3/dependencies"
+                    (open-input-string
+                      test-intermediate-b-dependencies))
+                   ("https://crates.io/api/v1/crates/leaf-alice"
+                    (open-input-string test-leaf-alice-crate))
+                   ("https://crates.io/api/v1/crates/leaf-alice/0.7.5/download"
+                    (set! test-source-hash
+                      (bytevector->nix-base32-string
+                        (sha256
+                          (string->bytevector "empty file\n" "utf-8"))))
+                    (open-input-string "empty file\n"))
+                   ("https://crates.io/api/v1/crates/leaf-alice/0.7.5/dependencies"
+                    (open-input-string test-leaf-alice-dependencies))
+                   ("https://crates.io/api/v1/crates/leaf-bob"
+                    (open-input-string test-leaf-bob-crate))
+                   ("https://crates.io/api/v1/crates/leaf-bob/3.0.1/download"
+                    (set! test-source-hash
+                      (bytevector->nix-base32-string
+                        (sha256
+                          (string->bytevector "empty file\n" "utf-8"))))
+                    (open-input-string "empty file\n"))
+                   ("https://crates.io/api/v1/crates/leaf-bob/3.0.1/dependencies"
+                    (open-input-string test-leaf-bob-dependencies))
+                   (_ (error "Unexpected URL: " url)))))
+         (match (crate-recursive-import "root")
+                (((define-public 'rust-leaf-alice-0.7
+                    (package
+                      (name "rust-leaf-alice")
+                      (version "0.7.5")
+                      (source
+                        (origin
+                          (method url-fetch)
+                          (uri (crate-uri "leaf-alice" version))
+                          (file-name
+                            (string-append name "-" version ".tar.gz"))
+                          (sha256 (base32 (? string? hash)))))
+                      (build-system cargo-build-system)
+                      (arguments ('quasiquote (#:skip-build? #t)))
+                      (home-page "http://example.com")
+                      (synopsis "summary")
+                      (description "summary")
+                      (license (list license:expat license:asl2.0))))
+                  (define-public 'rust-leaf-bob-3
+                    (package
+                      (name "rust-leaf-bob")
+                      (version "3.0.1")
+                      (source
+                        (origin
+                          (method url-fetch)
+                          (uri (crate-uri "leaf-bob" version))
+                          (file-name
+                            (string-append name "-" version ".tar.gz"))
+                          (sha256 (base32 (? string? hash)))))
+                      (build-system cargo-build-system)
+                      (arguments ('quasiquote (#:skip-build? #t)))
+                      (home-page "http://example.com")
+                      (synopsis "summary")
+                      (description "summary")
+                      (license (list license:expat license:asl2.0))))
+                  (define-public 'rust-intermediate-b-1
+                    (package
+                      (name "rust-intermediate-b")
+                      (version "1.2.3")
+                      (source
+                        (origin
+                          (method url-fetch)
+                          (uri (crate-uri "intermediate-b" version))
+                          (file-name
+                            (string-append name "-" version ".tar.gz"))
+                          (sha256 (base32 (? string? hash)))))
+                      (build-system cargo-build-system)
+                      (arguments
+                        ('quasiquote
+                         (#:skip-build?
+                          #t
+                          #:cargo-inputs
+                          (("rust-leaf-bob" ('unquote rust-leaf-bob-3))))))
+                      (home-page "http://example.com")
+                      (synopsis "summary")
+                      (description "summary")
+                      (license (list license:expat license:asl2.0))))
+                  (define-public 'rust-intermediate-a-1
+                    (package
+                      (name "rust-intermediate-a")
+                      (version "1.0.42")
+                      (source
+                        (origin
+                          (method url-fetch)
+                          (uri (crate-uri "intermediate-a" version))
+                          (file-name
+                            (string-append name "-" version ".tar.gz"))
+                          (sha256 (base32 (? string? hash)))))
+                      (build-system cargo-build-system)
+                      (arguments
+                        ('quasiquote
+                         (#:skip-build?
+                          #t
+                          #:cargo-inputs
+                          (("rust-intermediate-b"
+                            ('unquote rust-intermediate-b-1))
+                           ("rust-leaf-alice"
+                            ('unquote 'rust-leaf-alice-0.7))
+                           ("rust-leaf-bob" ('unquote rust-leaf-bob-3))))))
+                      (home-page "http://example.com")
+                      (synopsis "summary")
+                      (description "summary")
+                      (license (list license:expat license:asl2.0))))
+                  (define-public 'rust-root-1
+                    (package
+                      (name "rust-root")
+                      (version "1.0.4")
+                      (source
+                        (origin
+                          (method url-fetch)
+                          (uri (crate-uri "root" version))
+                          (file-name
+                            (string-append name "-" version ".tar.gz"))
+                          (sha256 (base32 (? string? hash)))))
+                      (build-system cargo-build-system)
+                      (arguments
+                        ('quasiquote
+                         (#:cargo-inputs
+                          (("rust-intermediate-a"
+                            ('unquote rust-intermediate-a-1))
+                           ("rust-intermediate-b"
+                            ('unquote rust-intermediate-b-1))
+                           ("rust-leaf-alice"
+                            ('unquote 'rust-leaf-alice-0.7))
+                           ("rust-leaf-bob" ('unquote rust-leaf-bob-3))))))
+                      (home-page "http://example.com")
+                      (synopsis "summary")
+                      (description "summary")
+                      (license (list license:expat license:asl2.0)))))
+                 #t)
+                (x (pk 'fail x #f)))))
result: SKIP

test-name: licenses: MIT OR Apache-2.0
location: /home/phf/src/guix/tests/crate.scm:562
source:
+ (test-equal
+   "licenses: MIT OR Apache-2.0"
+   '(license:expat license:asl2.0)
+   (string->license "MIT OR Apache-2.0"))
expected-value: (license:expat license:asl2.0)
actual-value: (license:expat license:asl2.0)
result: PASS

test-name: licenses: Apache-2.0 / MIT
location: /home/phf/src/guix/tests/crate.scm:566
source:
+ (test-equal
+   "licenses: Apache-2.0 / MIT"
+   '(license:asl2.0 license:expat)
+   (string->license "Apache-2.0 / MIT"))
expected-value: (license:asl2.0 license:expat)
actual-value: (license:asl2.0 license:expat)
result: PASS

test-name: licenses: Apache-2.0 WITH LLVM-exception
location: /home/phf/src/guix/tests/crate.scm:570
source:
+ (test-equal
+   "licenses: Apache-2.0 WITH LLVM-exception"
+   '(license:asl2.0 unknown-license!)
+   (string->license
+     "Apache-2.0 WITH LLVM-exception"))
expected-value: (license:asl2.0 unknown-license!)
actual-value: (license:asl2.0 unknown-license!)
result: PASS

test-name: licenses: MIT/Apache-2.0 AND BSD-2-Clause
location: /home/phf/src/guix/tests/crate.scm:574
source:
+ (test-equal
+   "licenses: MIT/Apache-2.0 AND BSD-2-Clause"
+   '(license:expat license:asl2.0 license:bsd-2)
+   (string->license
+     "MIT/Apache-2.0 AND BSD-2-Clause"))
expected-value: (license:expat license:asl2.0 license:bsd-2)
actual-value: (license:expat license:asl2.0 license:bsd-2)
result: PASS

test-name: licenses: MIT/Apache-2.0
location: /home/phf/src/guix/tests/crate.scm:578
source:
+ (test-equal
+   "licenses: MIT/Apache-2.0"
+   '(license:expat license:asl2.0)
+   (string->license "MIT/Apache-2.0"))
expected-value: (license:expat license:asl2.0)
actual-value: (license:expat license:asl2.0)
result: PASS

test-name: self-test: rust-docopt 0.8.x is gone, please adjust the test case
location: /home/phf/src/guix/tests/crate.scm:619
source:
+ (test-assert
+   "self-test: rust-docopt 0.8.x is gone, please adjust the test case"
+   (not (null? (find-packages-by-name "rust-docopt" "0.8"))))
actual-value: #t
result: PASS

test-name: cargo-recursive-import-hoors-existing-packages
location: /home/phf/src/guix/tests/crate.scm:623
source:
+ (test-assert
+   "cargo-recursive-import-hoors-existing-packages"
+   (mock ((guix http-client)
+          http-fetch
+          (lambda (url . rest)
+            (match url
+                   ("https://crates.io/api/v1/crates/doctool"
+                    (open-input-string test-doctool-crate))
+                   ("https://crates.io/api/v1/crates/doctool/2.2.2/download"
+                    (set! test-source-hash
+                      (bytevector->nix-base32-string
+                        (sha256
+                          (string->bytevector "empty file\n" "utf-8"))))
+                    (open-input-string "empty file\n"))
+                   ("https://crates.io/api/v1/crates/doctool/2.2.2/dependencies"
+                    (open-input-string test-doctool-dependencies))
+                   (_ (error "Unexpected URL: " url)))))
+         (match (crate-recursive-import "doctool")
+                (((define-public 'rust-doctool-2
+                    (package
+                      (name "rust-doctool")
+                      (version "2.2.2")
+                      (source
+                        (origin
+                          (method url-fetch)
+                          (uri (crate-uri "doctool" version))
+                          (file-name
+                            (string-append name "-" version ".tar.gz"))
+                          (sha256 (base32 (? string? hash)))))
+                      (build-system cargo-build-system)
+                      (arguments
+                        ('quasiquote
+                         (#:cargo-inputs
+                          (("rust-docopt" ('unquote 'rust-docopt-0.8))))))
+                      (home-page "http://example.com")
+                      (synopsis "summary")
+                      (description "summary")
+                      (license (list license:expat license:asl2.0)))))
+                 #t)
+                (x (pk 'fail x #f)))))
result: SKIP


SKIP: tests/gremlin
===================

test-name: elf-dynamic-info-needed, executable
location: /home/phf/src/guix/tests/gremlin.scm:57
source:
+ (test-assert
+   "elf-dynamic-info-needed, executable"
+   (let* ((elf (call-with-input-file %guile-executable read-elf))
+          (dyninfo (elf-dynamic-info elf)))
+     (or (not dyninfo)
+         (lset<=
+           string=?
+           (list (string-append "libguile-" (effective-version))
+                 "libc")
+           (map (lambda (lib)
+                  (string-take lib (string-contains lib ".so")))
+                (elf-dynamic-info-needed dyninfo))))))
actual-value: #t
result: PASS

test-name: file-needed/recursive
location: /home/phf/src/guix/tests/gremlin.scm:75
source:
+ (test-assert
+   "file-needed/recursive"
+   (let* ((needed
+            (file-needed/recursive %guile-executable))
+          (pipe (dynamic-wind
+                  (lambda ()
+                    (setenv "LD_TRACE_LOADED_OBJECTS" "yup"))
+                  (lambda ()
+                    (open-pipe* OPEN_READ %guile-executable))
+                  (lambda () (unsetenv "LD_TRACE_LOADED_OBJECTS")))))
+     (define ldd-rx
+       (make-regexp
+         "^[[:blank:]]+([[:graph:]]+ => )?([[:graph:]]+) .*$"))
+     (define (read-ldd-output port)
+       (let loop ((result '()))
+         (match (read-line port)
+                ((? eof-object?) (reverse result))
+                ((= (cut regexp-exec ldd-rx <>) m)
+                 (if m
+                   (loop (cons (match:substring m 2) result))
+                   (loop result))))))
+     (define ground-truth
+       (remove
+         (lambda (entry)
+           (or (string-prefix? "linux-vdso.so" entry)
+               (string-prefix? "linux-vdso32.so" entry)
+               (string-prefix? "linux-vdso64.so" entry)
+               (string-prefix? "linux-gate.so" entry)
+               (and (target-aarch64?)
+                    (string-contains entry (glibc-dynamic-linker)))))
+         (read-ldd-output pipe)))
+     (and (zero? (close-pipe pipe))
+          (lset= file=?
+                 (pk 'truth ground-truth)
+                 (pk 'needed needed)))))
result: SKIP

test-name: expand-origin
location: /home/phf/src/guix/tests/gremlin.scm:119
source:
+ (test-equal
+   "expand-origin"
+   '("OOO/../lib"
+     "OOO"
+     "../OOO/bar/OOO/baz"
+     "ORIGIN/foo")
+   (map (cut expand-origin <> "OOO")
+        '("$ORIGIN/../lib"
+          "${ORIGIN}"
+          "../${ORIGIN}/bar/$ORIGIN/baz"
+          "ORIGIN/foo")))
expected-value: ("OOO/../lib" "OOO" "../OOO/bar/OOO/baz" "ORIGIN/foo")
actual-value: ("OOO/../lib" "OOO" "../OOO/bar/OOO/baz" "ORIGIN/foo")
result: PASS

t.c: In function 'main':
t.c:1:15: warning: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
    1 | int main () { puts("hello"); }
      |               ^~~~
t.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts'
  +++ |+#include <stdio.h>
    1 | int main () { puts("hello"); }
test-name: strip-runpath
location: /home/phf/src/guix/tests/gremlin.scm:132
source:
+ (test-equal
+   "strip-runpath"
+   "hello\n"
+   (call-with-temporary-directory
+     (lambda (directory)
+       (with-directory-excursion
+         directory
+         (call-with-output-file
+           "t.c"
+           (lambda (port)
+             (display "int main () { puts(\"hello\"); }" port)))
+         (invoke
+           c-compiler
+           "t.c"
+           "-Wl,--enable-new-dtags"
+           "-Wl,-rpath=/foo"
+           "-Wl,-rpath=/bar")
+         (let* ((dyninfo
+                  (elf-dynamic-info
+                    (parse-elf
+                      (call-with-input-file "a.out" get-bytevector-all))))
+                (old (elf-dynamic-info-runpath dyninfo))
+                (new (strip-runpath "a.out"))
+                (new* (strip-runpath "a.out")))
+           (validate-needed-in-runpath "a.out")
+           (and (member "/foo" old)
+                (member "/bar" old)
+                (not (member "/foo" new))
+                (not (member "/bar" new))
+                (equal? new* new)
+                (let* ((pipe (open-input-pipe "./a.out"))
+                       (str (get-string-all pipe)))
+                  (close-pipe pipe)
+                  str)))))))
expected-value: "hello\n"
actual-value: "hello\n"
result: PASS

t.c: In function 'main':
t.c:1:15: warning: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
    1 | int main () { puts("hello"); }
      |               ^~~~
t.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts'
  +++ |+#include <stdio.h>
    1 | int main () { puts("hello"); }
test-name: set-file-runpath + file-runpath
location: /home/phf/src/guix/tests/gremlin.scm:160
source:
+ (test-equal
+   "set-file-runpath + file-runpath"
+   "hello\n"
+   (call-with-temporary-directory
+     (lambda (directory)
+       (with-directory-excursion
+         directory
+         (call-with-output-file
+           "t.c"
+           (lambda (port)
+             (display "int main () { puts(\"hello\"); }" port)))
+         (invoke
+           c-compiler
+           "t.c"
+           "-Wl,--enable-new-dtags"
+           "-Wl,-rpath=/xxxxxxxxx")
+         (let ((original-runpath (file-runpath "a.out")))
+           (and (member "/xxxxxxxxx" original-runpath)
+                (guard (c ((runpath-too-long-error? c)
+                           (string=?
+                             "a.out"
+                             (runpath-too-long-error-file c))))
+                       (set-file-runpath
+                         "a.out"
+                         (list (make-string 777 #\y))))
+                (let ((runpath (delete "/xxxxxxxxx" original-runpath)))
+                  (set-file-runpath "a.out" runpath)
+                  (equal? runpath (file-runpath "a.out")))
+                (let* ((pipe (open-input-pipe "./a.out"))
+                       (str (get-string-all pipe)))
+                  (close-pipe pipe)
+                  str)))))))
expected-value: "hello\n"
actual-value: "hello\n"
result: PASS

test-name: elf-dynamic-info-soname
location: /home/phf/src/guix/tests/gremlin.scm:187
source:
+ (test-equal
+   "elf-dynamic-info-soname"
+   "libfoo.so.2"
+   (call-with-temporary-directory
+     (lambda (directory)
+       (with-directory-excursion
+         directory
+         (call-with-output-file
+           "t.c"
+           (lambda (port) (display "// empty file" port)))
+         (invoke
+           c-compiler
+           "t.c"
+           "-shared"
+           "-Wl,-soname,libfoo.so.2")
+         (let* ((dyninfo
+                  (elf-dynamic-info
+                    (parse-elf
+                      (call-with-input-file "a.out" get-bytevector-all))))
+                (soname (elf-dynamic-info-soname dyninfo)))
+           soname)))))
expected-value: "libfoo.so.2"
actual-value: "libfoo.so.2"
result: PASS

a.out: stripping RUNPATH to ("/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib" "/gnu/store/vjgf1wq7690zk0rsc301k7rpx3nhvjcm-gcc-12.1.0-lib/lib" "/gnu/store/vjgf1wq7690zk0rsc301k7rpx3nhvjcm-gcc-12.1.0-lib/lib/gcc/x86_64-unknown-linux-gnu/12.1.0/../../.." "/home/phf/.guix-profile/lib") (removed ("/foo" "/bar"))
a.out: warning: RUNPATH contains bogus entries: ("/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib" "/gnu/store/vjgf1wq7690zk0rsc301k7rpx3nhvjcm-gcc-12.1.0-lib/lib" "/gnu/store/vjgf1wq7690zk0rsc301k7rpx3nhvjcm-gcc-12.1.0-lib/lib/gcc/x86_64-unknown-linux-gnu/12.1.0/../../.." "/home/phf/.guix-profile/lib")
a.out: error: depends on 'libgcc_s.so.1', which cannot be found in RUNPATH ()
WARNING: (test-gremlin): imported module (guix build utils) overrides core binding `delete'

SKIP: tests/hackage
===================


Starting download of /tmp/guix-file.sXWahJ
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.sXWahJ
From https://web.archive.org/web/20220807131159/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131159/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.sXWahJ...
could not find its Disarchive specification
failed to download "/tmp/guix-file.sXWahJ" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test 1
location: /home/phf/src/guix/tests/hackage.scm:214
source:
+ (test-assert
+   "hackage->guix-package test 1"
+   (eval-test-with-cabal test-cabal-1 match-ghc-foo))
actual-value: #t
result: PASS


Starting download of /tmp/guix-file.VoV4pw
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.VoV4pw
From https://web.archive.org/web/20220807131202/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131202/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.VoV4pw...
could not find its Disarchive specification
failed to download "/tmp/guix-file.VoV4pw" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test 2
location: /home/phf/src/guix/tests/hackage.scm:217
source:
+ (test-assert
+   "hackage->guix-package test 2"
+   (eval-test-with-cabal test-cabal-2 match-ghc-foo))
actual-value: #t
result: PASS


Starting download of /tmp/guix-file.eFBojv
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.eFBojv
From https://web.archive.org/web/20220807131203/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131203/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.eFBojv...
could not find its Disarchive specification
failed to download "/tmp/guix-file.eFBojv" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test 3
location: /home/phf/src/guix/tests/hackage.scm:220
source:
+ (test-assert
+   "hackage->guix-package test 3"
+   (eval-test-with-cabal
+     test-cabal-3
+     match-ghc-foo
+     #:cabal-environment
+     '(("impl" . "ghc-7.8"))))
actual-value: #t
result: PASS


Starting download of /tmp/guix-file.7vCkQs
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.7vCkQs
From https://web.archive.org/web/20220807131205/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131205/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.7vCkQs...
could not find its Disarchive specification
failed to download "/tmp/guix-file.7vCkQs" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test 4
location: /home/phf/src/guix/tests/hackage.scm:224
source:
+ (test-assert
+   "hackage->guix-package test 4"
+   (eval-test-with-cabal
+     test-cabal-4
+     match-ghc-foo
+     #:cabal-environment
+     '(("impl" . "ghc-7.8"))))
actual-value: #t
result: PASS


Starting download of /tmp/guix-file.5pany8
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.5pany8
From https://web.archive.org/web/20220807131206/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131206/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.5pany8...
could not find its Disarchive specification
failed to download "/tmp/guix-file.5pany8" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test 5
location: /home/phf/src/guix/tests/hackage.scm:228
source:
+ (test-assert
+   "hackage->guix-package test 5"
+   (eval-test-with-cabal
+     test-cabal-5
+     match-ghc-foo
+     #:cabal-environment
+     '(("impl" . "ghc-7.8"))))
actual-value: #t
result: PASS


Starting download of /tmp/guix-file.g2waDb
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.g2waDb
From https://web.archive.org/web/20220807131208/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131208/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.g2waDb...
could not find its Disarchive specification
failed to download "/tmp/guix-file.g2waDb" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test 6
location: /home/phf/src/guix/tests/hackage.scm:251
source:
+ (test-assert
+   "hackage->guix-package test 6"
+   (eval-test-with-cabal
+     test-cabal-6
+     match-ghc-foo-6))
actual-value: #t
result: PASS


Starting download of /tmp/guix-file.Mb7GQV
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.Mb7GQV
From https://web.archive.org/web/20220807131209/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131209/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.Mb7GQV...
could not find its Disarchive specification
failed to download "/tmp/guix-file.Mb7GQV" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test multiline desc (layout)
location: /home/phf/src/guix/tests/hackage.scm:269
source:
+ (test-assert
+   "hackage->guix-package test multiline desc (layout)"
+   (eval-test-with-cabal
+     test-cabal-multiline-layout
+     match-ghc-foo))
actual-value: #t
result: PASS


Starting download of /tmp/guix-file.4lfIdY
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.4lfIdY
From https://web.archive.org/web/20220807131211/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131211/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.4lfIdY...
could not find its Disarchive specification
failed to download "/tmp/guix-file.4lfIdY" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test multiline desc (braced)
location: /home/phf/src/guix/tests/hackage.scm:289
source:
+ (test-assert
+   "hackage->guix-package test multiline desc (braced)"
+   (eval-test-with-cabal
+     test-cabal-multiline-braced
+     match-ghc-foo))
actual-value: #t
result: PASS

Syntax error: unexpected token : (ghc-options (-Wall)) (at line 11, column 2)
Syntax error: unexpected end of input

;;; (fail #f #f)
test-name: hackage->guix-package test mixed layout
location: /home/phf/src/guix/tests/hackage.scm:309
source:
+ (test-assert
+   "hackage->guix-package test mixed layout"
+   (eval-test-with-cabal
+     test-cabal-mixed-layout
+     match-ghc-foo))
actual-value: #f
result: XFAIL


Starting download of /tmp/guix-file.umvuDj
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.umvuDj
From https://web.archive.org/web/20220807131212/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131212/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.umvuDj...
could not find its Disarchive specification
failed to download "/tmp/guix-file.umvuDj" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test flag executable
location: /home/phf/src/guix/tests/hackage.scm:334
source:
+ (test-assert
+   "hackage->guix-package test flag executable"
+   (eval-test-with-cabal
+     test-cabal-flag-executable
+     match-ghc-foo))
actual-value: #t
result: PASS


Starting download of /tmp/guix-file.RdAZLu
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.RdAZLu
From https://web.archive.org/web/20220807131214/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131214/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.RdAZLu...
could not find its Disarchive specification
failed to download "/tmp/guix-file.RdAZLu" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test properties without space
location: /home/phf/src/guix/tests/hackage.scm:353
source:
+ (test-assert
+   "hackage->guix-package test properties without space"
+   (eval-test-with-cabal
+     test-cabal-property-no-space
+     match-ghc-foo))
actual-value: #t
result: PASS

Syntax error: unexpected end of input

;;; (fail #f #f)
test-name: hackage->guix-package test without final newline
location: /home/phf/src/guix/tests/hackage.scm:368
source:
+ (test-assert
+   "hackage->guix-package test without final newline"
+   (eval-test-with-cabal
+     test-cabal-no-final-newline
+     match-ghc-foo))
actual-value: #f
result: XFAIL


Starting download of /tmp/guix-file.8bgSvZ
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.8bgSvZ
From https://web.archive.org/web/20220807131215/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131215/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.8bgSvZ...
could not find its Disarchive specification
failed to download "/tmp/guix-file.8bgSvZ" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test internal libraries are ignored
location: /home/phf/src/guix/tests/hackage.scm:388
source:
+ (test-assert
+   "hackage->guix-package test internal libraries are ignored"
+   (eval-test-with-cabal
+     test-cabal-internal-library-ignored
+     match-ghc-foo))
actual-value: #t
result: PASS


Starting download of /tmp/guix-file.e4MI2v
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.e4MI2v
From https://web.archive.org/web/20220807131217/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131217/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.e4MI2v...
could not find its Disarchive specification
failed to download "/tmp/guix-file.e4MI2v" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test lonely if statement
location: /home/phf/src/guix/tests/hackage.scm:480
source:
+ (test-assert
+   "hackage->guix-package test lonely if statement"
+   (eval-test-with-cabal
+     test-cabal-else
+     match-ghc-elif
+     #:cabal-environment
+     '(("os" . "guix"))))
actual-value: #t
result: PASS


Starting download of /tmp/guix-file.Aqr3nR
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.Aqr3nR
From https://web.archive.org/web/20220807131219/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131219/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.Aqr3nR...
could not find its Disarchive specification
failed to download "/tmp/guix-file.Aqr3nR" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test else statement
location: /home/phf/src/guix/tests/hackage.scm:484
source:
+ (test-assert
+   "hackage->guix-package test else statement"
+   (eval-test-with-cabal
+     test-cabal-else
+     match-ghc-elif
+     #:cabal-environment
+     '(("os" . "guix"))))
actual-value: #t
result: PASS


Starting download of /tmp/guix-file.uWU4AV
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.uWU4AV
From https://web.archive.org/web/20220807131220/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131220/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.uWU4AV...
could not find its Disarchive specification
failed to download "/tmp/guix-file.uWU4AV" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test elif statement
location: /home/phf/src/guix/tests/hackage.scm:488
source:
+ (test-assert
+   "hackage->guix-package test elif statement"
+   (eval-test-with-cabal
+     test-cabal-elif
+     match-ghc-elif
+     #:cabal-environment
+     '(("os" . "guix"))))
actual-value: #t
result: PASS


Starting download of /tmp/guix-file.aEEvau
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.aEEvau
From https://web.archive.org/web/20220807131221/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131221/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.aEEvau...
could not find its Disarchive specification
failed to download "/tmp/guix-file.aEEvau" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test elif statement with brackets
location: /home/phf/src/guix/tests/hackage.scm:492
source:
+ (test-assert
+   "hackage->guix-package test elif statement with brackets"
+   (eval-test-with-cabal
+     test-cabal-elif-brackets
+     match-ghc-elif
+     #:cabal-environment
+     '(("os" . "guix"))))
actual-value: #t
result: PASS


Starting download of /tmp/guix-file.QhC4pO
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.QhC4pO
From https://web.archive.org/web/20220807131223/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131223/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.QhC4pO...
could not find its Disarchive specification
failed to download "/tmp/guix-file.QhC4pO" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test cabal revision
location: /home/phf/src/guix/tests/hackage.scm:533
source:
+ (test-assert
+   "hackage->guix-package test cabal revision"
+   (eval-test-with-cabal
+     test-cabal-revision
+     match-ghc-foo-revision))
actual-value: #t
result: PASS

test-name: read-cabal test 1
location: /home/phf/src/guix/tests/hackage.scm:536
source:
+ (test-assert
+   "read-cabal test 1"
+   (match (call-with-input-string
+            test-read-cabal-1
+            read-cabal)
+          ((("name" ("test-me"))
+            ('section
+             'library
+             #f
+             (('if
+               ('flag "base4point8")
+               (("build-depends" ("base >= 4.8 && < 5")))
+               (('if
+                 ('flag "base4")
+                 (("build-depends" ("base >= 4 && < 4.8")))
+                 (('if
+                   ('flag "base3")
+                   (("build-depends" ("base >= 3 && < 4")))
+                   (("build-depends" ("base < 3"))))))))
+              ('if
+               ('or
+                ('flag "base4point8")
+                ('and ('flag "base4") ('flag "base3")))
+               (("build-depends" ("random")))
+               ())
+              ("build-depends" ("containers"))
+              ("exposed-modules" ("Test.QuickCheck.Exception")))))
+           #t)
+          (x (pk 'fail x #f))))
actual-value: #t
result: PASS

test-name: read-cabal test: if brackets on the same line
location: /home/phf/src/guix/tests/hackage.scm:556
source:
+ (test-assert
+   "read-cabal test: if brackets on the same line"
+   (match (call-with-input-string
+            test-read-cabal-2
+            read-cabal)
+          ((("name" ("test-me"))
+            ('section
+             'common
+             "defaults"
+             (('if
+               ('os "foobar")
+               (("cc-options" ("-DBARBAZ ")))
+               ()))))
+           #t)
+          (x (pk 'fail x #f))))
actual-value: #t
result: PASS

Syntax error: unexpected token : { (at line 4, column 4)
Syntax error: unexpected end of input

;;; (fail #f #f)
test-name: read-cabal test: property brackets on new line
location: /home/phf/src/guix/tests/hackage.scm:567
source:
+ (test-assert
+   "read-cabal test: property brackets on new line"
+   (match (call-with-input-string
+            test-read-cabal-brackets-newline
+            read-cabal)
+          ((("name" ("test-me"))
+            ('section
+             'common
+             "defaults"
+             (("build-depends" ("foobar ,  barbaz")))))
+           #t)
+          (x (pk 'fail x #f))))
actual-value: #f
result: XFAIL

test-name: read-cabal test: library name
location: /home/phf/src/guix/tests/hackage.scm:575
source:
+ (test-assert
+   "read-cabal test: library name"
+   (match (call-with-input-string
+            test-read-cabal-library-name
+            read-cabal)
+          ((("name" ("test-me"))
+            ('section
+             'library
+             "foobar"
+             (("build-depends" ("foo, bar"))))
+            ('section
+             'library
+             #f
+             (("build-depends" ("bar, baz")))))
+           #t)
+          (x (pk 'fail x #f))))
actual-value: #t
result: PASS


Starting download of /tmp/guix-file.ThLboG
From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.ThLboG
From https://web.archive.org/web/20220807131225/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz...
download failed "https://web.archive.org/web/20220807131225/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.ThLboG...
could not find its Disarchive specification
failed to download "/tmp/guix-file.ThLboG" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test cabal import
location: /home/phf/src/guix/tests/hackage.scm:619
source:
+ (test-assert
+   "hackage->guix-package test cabal import"
+   (eval-test-with-cabal
+     test-cabal-import
+     match-ghc-foo-import))
actual-value: #t
result: PASS


SKIP: tests/inferior
====================

test-name: open-inferior
location: /home/phf/src/guix/tests/inferior.scm:55
source:
+ (test-equal
+   "open-inferior"
+   '(42 #t)
+   (let ((inferior
+           (open-inferior
+             %top-builddir
+             #:command
+             "scripts/guix")))
+     (and (inferior? inferior)
+          (let ((a (inferior-eval '(apply * '(6 7)) inferior))
+                (b (inferior-eval
+                     '(@ (gnu packages base) coreutils)
+                     inferior)))
+            (close-inferior inferior)
+            (list a (inferior-object? b))))))
expected-value: (42 #t)
actual-value: (42 #t)
result: PASS

test-name: close-inferior
location: /home/phf/src/guix/tests/inferior.scm:66
source:
+ (test-equal
+   "close-inferior"
+   '((hello) (world))
+   (let* ((inferior1
+            (open-inferior
+              %top-builddir
+              #:command
+              "scripts/guix"))
+          (lst1 (inferior-eval '(list 'hello) inferior1))
+          (inferior2
+            (open-inferior
+              %top-builddir
+              #:command
+              "scripts/guix"))
+          (lst2 (inferior-eval '(list 'world) inferior2)))
+     (close-inferior inferior1)
+     (close-inferior inferior2)
+     (list lst1 lst2)))
expected-value: ((hello) (world))
actual-value: ((hello) (world))
result: PASS

test-name: &inferior-exception
location: /home/phf/src/guix/tests/inferior.scm:80
source:
+ (test-equal
+   "&inferior-exception"
+   '(a b c d)
+   (let ((inferior
+           (open-inferior
+             %top-builddir
+             #:command
+             "scripts/guix")))
+     (guard (c ((inferior-exception? c)
+                (close-inferior inferior)
+                (and (eq? inferior (inferior-exception-inferior c))
+                     (match (inferior-exception-stack c)
+                            (((_ (files lines columns)) ..1)
+                             (member "guix/repl.scm" files)))
+                     (inferior-exception-arguments c))))
+            (inferior-eval '(throw 'a 'b 'c 'd) inferior)
+            'badness)))
expected-value: (a b c d)
actual-value: (a b c d)
result: PASS

test-name: &inferior-exception, legacy mode
location: /home/phf/src/guix/tests/inferior.scm:94
source:
+ (test-equal
+   "&inferior-exception, legacy mode"
+   '(a b c d)
+   (let ((inferior (open-inferior %top-builddir)))
+     (guard (c ((inferior-exception? c)
+                (close-inferior inferior)
+                (and (eq? inferior (inferior-exception-inferior c))
+                     (inferior-exception-arguments c))))
+            (inferior-eval '(throw 'a 'b 'c 'd) inferior)
+            'badness)))
expected-value: (a b c d)
actual-value: (a b c d)
result: PASS

test-name: inferior-packages
location: /home/phf/src/guix/tests/inferior.scm:106
source:
+ (test-equal
+   "inferior-packages"
+   (take (sort (fold-packages
+                 (lambda (package lst)
+                   (cons (list (package-name package)
+                               (package-version package)
+                               (package-home-page package)
+                               (package-location package))
+                         lst))
+                 '())
+               (lambda (x y) (string<? (car x) (car y))))
+         10)
+   (let* ((inferior
+            (open-inferior
+              %top-builddir
+              #:command
+              "scripts/guix"))
+          (packages (inferior-packages inferior)))
+     (and (every string?
+                 (map inferior-package-synopsis packages))
+          (let ()
+            (define result
+              (take (sort (map (lambda (package)
+                                 (list (inferior-package-name package)
+                                       (inferior-package-version package)
+                                       (inferior-package-home-page package)
+                                       (inferior-package-location package)))
+                               packages)
+                          (lambda (x y) (string<? (car x) (car y))))
+                    10))
+            (close-inferior inferior)
+            result))))
expected-value: (("0ad" "0.0.25b-alpha" "https://play0ad.com" #<<location> file: "gnu/packages/games.scm" line: 6704 column: 2>) ("0ad-data" "0.0.25b-alpha" "https://play0ad.com" #<<location> file: "gnu/packages/games.scm" line: 6657 column: 2>) ("0xffff" "0.9" "https://github.com/pali/0xFFFF" #<<location> file: "gnu/packages/flashing-tools.scm" line: 107 column: 2>) ("389-ds-base" "1.4.4.17" "https://directory.fedoraproject.org" #<<location> file: "gnu/packages/openldap.scm" line: 245 column: 2>) ("4dtris" "0.4.3" "https://launchpad.net/4dtris/" #<<location> file: "gnu/packages/games.scm" line: 8726 column: 2>) ("4ti2" "1.6.9" "http://www.4ti2.de/" #<<location> file: "gnu/packages/maths.scm" line: 697 column: 2>) ("7kaa" "2.15.5" "https://7kfans.com/" #<<location> file: "gnu/packages/games.scm" line: 12099 column: 2>) ("a2jmidid" "9" "https://github.com/jackaudio/a2jmidid" #<<location> file: "gnu/packages/music.scm" line: 6616 column: 2>) ("a2ps" "4.14" "https://www.gnu.org/software/a2ps/" #<<location> file: "gnu/packages/pretty-print.scm" line: 52 column: 2>) ("aalib" "1.4rc5" "http://aa-project.sourceforge.net/aalib/" #<<location> file: "gnu/packages/video.scm" line: 720 column: 2>))
actual-value: (("0ad" "0.0.25b-alpha" "https://play0ad.com" #<<location> file: "gnu/packages/games.scm" line: 6704 column: 2>) ("0ad-data" "0.0.25b-alpha" "https://play0ad.com" #<<location> file: "gnu/packages/games.scm" line: 6657 column: 2>) ("0xffff" "0.9" "https://github.com/pali/0xFFFF" #<<location> file: "gnu/packages/flashing-tools.scm" line: 107 column: 2>) ("389-ds-base" "1.4.4.17" "https://directory.fedoraproject.org" #<<location> file: "gnu/packages/openldap.scm" line: 245 column: 2>) ("4dtris" "0.4.3" "https://launchpad.net/4dtris/" #<<location> file: "gnu/packages/games.scm" line: 8726 column: 2>) ("4ti2" "1.6.9" "http://www.4ti2.de/" #<<location> file: "gnu/packages/maths.scm" line: 697 column: 2>) ("7kaa" "2.15.5" "https://7kfans.com/" #<<location> file: "gnu/packages/games.scm" line: 12099 column: 2>) ("a2jmidid" "9" "https://github.com/jackaudio/a2jmidid" #<<location> file: "gnu/packages/music.scm" line: 6616 column: 2>) ("a2ps" "4.14" "https://www.gnu.org/software/a2ps/" #<<location> file: "gnu/packages/pretty-print.scm" line: 52 column: 2>) ("aalib" "1.4rc5" "http://aa-project.sourceforge.net/aalib/" #<<location> file: "gnu/packages/video.scm" line: 720 column: 2>))
result: PASS

test-name: inferior-available-packages
location: /home/phf/src/guix/tests/inferior.scm:135
source:
+ (test-equal
+   "inferior-available-packages"
+   (take (sort (fold-available-packages
+                 (lambda* (name
+                           version
+                           result
+                           #:key
+                           supported?
+                           deprecated?
+                           #:allow-other-keys)
+                   (if (and supported? (not deprecated?))
+                     (alist-cons name version result)
+                     result))
+                 '())
+               (lambda (x y) (string<? (car x) (car y))))
+         10)
+   (let* ((inferior
+            (open-inferior
+              %top-builddir
+              #:command
+              "scripts/guix"))
+          (packages (inferior-available-packages inferior)))
+     (close-inferior inferior)
+     (take (sort packages
+                 (lambda (x y) (string<? (car x) (car y))))
+           10)))
expected-value: (("0ad" . "0.0.25b-alpha") ("0ad-data" . "0.0.25b-alpha") ("0xffff" . "0.9") ("389-ds-base" . "1.4.4.17") ("4dtris" . "0.4.3") ("4ti2" . "1.6.9") ("7kaa" . "2.15.5") ("a2jmidid" . "9") ("a2ps" . "4.14") ("aalib" . "1.4rc5"))
actual-value: (("0ad" . "0.0.25b-alpha") ("0ad-data" . "0.0.25b-alpha") ("0xffff" . "0.9") ("389-ds-base" . "1.4.4.17") ("4dtris" . "0.4.3") ("4ti2" . "1.6.9") ("7kaa" . "2.15.5") ("a2jmidid" . "9") ("a2ps" . "4.14") ("aalib" . "1.4rc5"))
result: PASS

test-name: lookup-inferior-packages
location: /home/phf/src/guix/tests/inferior.scm:155
source:
+ (test-equal
+   "lookup-inferior-packages"
+   (let ((->list
+           (lambda (package)
+             (list (package-name package)
+                   (package-version package)
+                   (package-location package)))))
+     (list (map ->list (find-packages-by-name "guile" #f))
+           (map ->list
+                (find-packages-by-name "guile" "2.2"))))
+   (let* ((inferior
+            (open-inferior
+              %top-builddir
+              #:command
+              "scripts/guix"))
+          (->list
+            (lambda (package)
+              (list (inferior-package-name package)
+                    (inferior-package-version package)
+                    (inferior-package-location package))))
+          (lst1 (map ->list
+                     (lookup-inferior-packages inferior "guile")))
+          (lst2 (map ->list
+                     (lookup-inferior-packages inferior "guile" "2.2"))))
+     (close-inferior inferior)
+     (list lst1 lst2)))
expected-value: ((("guile" "3.0.8" #<<location> file: "gnu/packages/guile.scm" line: 392 column: 2>) ("guile" "3.0.7" #<<location> file: "gnu/packages/guile.scm" line: 310 column: 2>) ("guile" "2.2.7" #<<location> file: "gnu/packages/guile.scm" line: 250 column: 2>) ("guile" "2.2.4" #<<location> file: "gnu/packages/guile.scm" line: 297 column: 2>) ("guile" "2.0.14" #<<location> file: "gnu/packages/guile.scm" line: 147 column: 2>) ("guile" "1.8.8" #<<location> file: "gnu/packages/guile.scm" line: 76 column: 2>)) (("guile" "2.2.7" #<<location> file: "gnu/packages/guile.scm" line: 250 column: 2>) ("guile" "2.2.4" #<<location> file: "gnu/packages/guile.scm" line: 297 column: 2>)))
actual-value: ((("guile" "3.0.8" #<<location> file: "gnu/packages/guile.scm" line: 392 column: 2>) ("guile" "3.0.7" #<<location> file: "gnu/packages/guile.scm" line: 310 column: 2>) ("guile" "2.2.7" #<<location> file: "gnu/packages/guile.scm" line: 250 column: 2>) ("guile" "2.2.4" #<<location> file: "gnu/packages/guile.scm" line: 297 column: 2>) ("guile" "2.0.14" #<<location> file: "gnu/packages/guile.scm" line: 147 column: 2>) ("guile" "1.8.8" #<<location> file: "gnu/packages/guile.scm" line: 76 column: 2>)) (("guile" "2.2.7" #<<location> file: "gnu/packages/guile.scm" line: 250 column: 2>) ("guile" "2.2.4" #<<location> file: "gnu/packages/guile.scm" line: 297 column: 2>)))
result: PASS

test-name: lookup-inferior-packages and eq?-ness
location: /home/phf/src/guix/tests/inferior.scm:176
source:
+ (test-assert
+   "lookup-inferior-packages and eq?-ness"
+   (let* ((inferior
+            (open-inferior
+              %top-builddir
+              #:command
+              "scripts/guix"))
+          (lst1 (lookup-inferior-packages inferior "guile"))
+          (lst2 (lookup-inferior-packages inferior "guile")))
+     (close-inferior inferior)
+     (every eq? lst1 lst2)))
actual-value: #t
result: PASS

test-name: inferior-package-inputs
location: /home/phf/src/guix/tests/inferior.scm:184
source:
+ (test-equal
+   "inferior-package-inputs"
+   (let ((->list
+           (match-lambda
+             ((label (? package? package) . rest)
+              `(,label
+                (package
+                  ,(package-name package)
+                  ,(package-version package)
+                  ,(package-location package))
+                ,@rest)))))
+     (list (map ->list (package-inputs guile-3.0-latest))
+           (map ->list
+                (package-native-inputs guile-3.0-latest))
+           (map ->list
+                (package-propagated-inputs guile-3.0-latest))))
+   (let* ((inferior
+            (open-inferior
+              %top-builddir
+              #:command
+              "scripts/guix"))
+          (guile (first (lookup-inferior-packages inferior "guile")))
+          (->list
+            (match-lambda
+              ((label (? inferior-package? package) . rest)
+               `(,label
+                 (package
+                   ,(inferior-package-name package)
+                   ,(inferior-package-version package)
+                   ,(inferior-package-location package))
+                 ,@rest))))
+          (result
+            (list (map ->list (inferior-package-inputs guile))
+                  (map ->list
+                       (inferior-package-native-inputs guile))
+                  (map ->list
+                       (inferior-package-propagated-inputs guile)))))
+     (close-inferior inferior)
+     result))
expected-value: ((("libffi" (package "libffi" "3.3" #<<location> file: "gnu/packages/libffi.scm" line: 44 column: 2>)) ("bash" (package "bash-minimal" "5.1.8" #<<location> file: "gnu/packages/bash.scm" line: 215 column: 2>))) (("pkgconfig" (package "pkg-config" "0.29.2" #<<location> file: "gnu/packages/pkg-config.scm" line: 36 column: 2>))) (("libunistring" (package "libunistring" "0.9.10" #<<location> file: "gnu/packages/libunistring.scm" line: 35 column: 2>)) ("bdw-gc" (package "libgc" "8.0.4" #<<location> file: "gnu/packages/bdw-gc.scm" line: 33 column: 2>))))
actual-value: ((("libffi" (package "libffi" "3.3" #<<location> file: "gnu/packages/libffi.scm" line: 44 column: 2>)) ("bash" (package "bash-minimal" "5.1.8" #<<location> file: "gnu/packages/bash.scm" line: 215 column: 2>))) (("pkgconfig" (package "pkg-config" "0.29.2" #<<location> file: "gnu/packages/pkg-config.scm" line: 36 column: 2>))) (("libunistring" (package "libunistring" "0.9.10" #<<location> file: "gnu/packages/libunistring.scm" line: 35 column: 2>)) ("bdw-gc" (package "libgc" "8.0.4" #<<location> file: "gnu/packages/bdw-gc.scm" line: 33 column: 2>))))
result: PASS

test-name: inferior-package-search-paths
location: /home/phf/src/guix/tests/inferior.scm:214
source:
+ (test-equal
+   "inferior-package-search-paths"
+   (package-native-search-paths guile-3.0)
+   (let* ((inferior
+            (open-inferior
+              %top-builddir
+              #:command
+              "scripts/guix"))
+          (guile (first (lookup-inferior-packages inferior "guile")))
+          (result
+            (inferior-package-native-search-paths guile)))
+     (close-inferior inferior)
+     result))
expected-value: (#<<search-path-specification> variable: "GUILE_LOAD_PATH" files: ("share/guile/site/3.0") separator: ":" file-type: directory file-pattern: #f> #<<search-path-specification> variable: "GUILE_LOAD_COMPILED_PATH" files: ("lib/guile/3.0/site-ccache" "share/guile/site/3.0") separator: ":" file-type: directory file-pattern: #f>)
actual-value: (#<<search-path-specification> variable: "GUILE_LOAD_PATH" files: ("share/guile/site/3.0") separator: ":" file-type: directory file-pattern: #f> #<<search-path-specification> variable: "GUILE_LOAD_COMPILED_PATH" files: ("lib/guile/3.0/site-ccache" "share/guile/site/3.0") separator: ":" file-type: directory file-pattern: #f>)
result: PASS

test-name: inferior-eval-with-store
location: /home/phf/src/guix/tests/inferior.scm:223
source:
+ (test-equal
+   "inferior-eval-with-store"
+   (add-text-to-store %store "foo" "Hello, world!")
+   (let* ((inferior
+            (open-inferior
+              %top-builddir
+              #:command
+              "scripts/guix")))
+     (inferior-eval-with-store
+       inferior
+       %store
+       '(lambda (store)
+          (add-text-to-store store "foo" "Hello, world!")))))
expected-value: "/home/phf/src/guix/test-tmp/store/vn0qxdn23p51d3lz336vp3l80yw92p4k-foo"
actual-value: "/home/phf/src/guix/test-tmp/store/vn0qxdn23p51d3lz336vp3l80yw92p4k-foo"
result: PASS

test-name: inferior-eval-with-store, &store-protocol-error
location: /home/phf/src/guix/tests/inferior.scm:232
source:
+ (test-assert
+   "inferior-eval-with-store, &store-protocol-error"
+   (let* ((inferior
+            (open-inferior
+              %top-builddir
+              #:command
+              "scripts/guix")))
+     (guard (c ((store-protocol-error? c)
+                (string-contains
+                  (store-protocol-error-message c)
+                  "invalid character")))
+            (inferior-eval-with-store
+              inferior
+              %store
+              '(lambda (store)
+                 (add-text-to-store store "we|rd/?!@" "uh uh")))
+            #f)))
actual-value: 0
result: PASS

test-name: inferior-eval-with-store, exception
location: /home/phf/src/guix/tests/inferior.scm:244
source:
+ (test-equal
+   "inferior-eval-with-store, exception"
+   '(the-answer = 42)
+   (let ((inferior
+           (open-inferior
+             %top-builddir
+             #:command
+             "scripts/guix")))
+     (guard (c ((inferior-exception? c)
+                (close-inferior inferior)
+                (inferior-exception-arguments c)))
+            (inferior-eval-with-store
+              inferior
+              %store
+              '(lambda (store) (throw 'the-answer '= 42))))))
expected-value: (the-answer = 42)
actual-value: (the-answer = 42)
result: PASS

test-name: inferior-eval-with-store, not a procedure
location: /home/phf/src/guix/tests/inferior.scm:255
source:
+ (test-equal
+   "inferior-eval-with-store, not a procedure"
+   'wrong-type-arg
+   (let ((inferior
+           (open-inferior
+             %top-builddir
+             #:command
+             "scripts/guix")))
+     (guard (c ((inferior-exception? c)
+                (close-inferior inferior)
+                (car (inferior-exception-arguments c))))
+            (inferior-eval-with-store
+              inferior
+              %store
+              '(+ 1 2)))))
expected-value: wrong-type-arg
actual-value: wrong-type-arg
result: PASS

test-name: inferior-package-derivation
location: /home/phf/src/guix/tests/inferior.scm:264
source:
+ (test-equal
+   "inferior-package-derivation"
+   (map derivation-file-name
+        (list (package-derivation
+                %store
+                %bootstrap-guile
+                "x86_64-linux")
+              (package-derivation
+                %store
+                %bootstrap-guile
+                "armhf-linux")))
+   (let* ((inferior
+            (open-inferior
+              %top-builddir
+              #:command
+              "scripts/guix"))
+          (packages (inferior-packages inferior))
+          (guile (find (lambda (package)
+                         (string=?
+                           (package-name %bootstrap-guile)
+                           (inferior-package-name package)))
+                       packages)))
+     (map derivation-file-name
+          (list (inferior-package-derivation
+                  %store
+                  guile
+                  "x86_64-linux")
+                (inferior-package-derivation
+                  %store
+                  guile
+                  "armhf-linux")))))
expected-value: ("/home/phf/src/guix/test-tmp/store/c7g35df14wl4rahgndqhw1d6rkayphg2-guile-bootstrap-2.0.drv" "/home/phf/src/guix/test-tmp/store/2p8250szwm8b6mal0mrbkd8wqhpyizsc-guile-bootstrap-2.0.drv")
actual-value: ("/home/phf/src/guix/test-tmp/store/c7g35df14wl4rahgndqhw1d6rkayphg2-guile-bootstrap-2.0.drv" "/home/phf/src/guix/test-tmp/store/2p8250szwm8b6mal0mrbkd8wqhpyizsc-guile-bootstrap-2.0.drv")
result: PASS

test-name: inferior-package-replacement
location: /home/phf/src/guix/tests/inferior.scm:282
source:
+ (test-equal
+   "inferior-package-replacement"
+   (package-derivation
+     %store
+     (package-replacement sqlite)
+     "x86_64-linux")
+   (let* ((inferior
+            (open-inferior
+              %top-builddir
+              #:command
+              "scripts/guix"))
+          (packages (inferior-packages inferior)))
+     (match (lookup-inferior-packages
+              inferior
+              (package-name sqlite)
+              (package-version sqlite))
+            ((inferior-sqlite rest ...)
+             (inferior-package-derivation
+               %store
+               (inferior-package-replacement inferior-sqlite)
+               "x86_64-linux")))))
result: SKIP

test-name: inferior-package->manifest-entry
location: /home/phf/src/guix/tests/inferior.scm:298
source:
+ (test-equal
+   "inferior-package->manifest-entry"
+   (manifest-entry->list
+     (package->manifest-entry
+       (first (find-best-packages-by-name "guile" #f))))
+   (let* ((inferior
+            (open-inferior
+              %top-builddir
+              #:command
+              "scripts/guix"))
+          (guile (first (lookup-inferior-packages inferior "guile")))
+          (entry (inferior-package->manifest-entry guile)))
+     (close-inferior inferior)
+     (manifest-entry->list entry)))
expected-value: ("guile" "3.0.8" "out" (#<<search-path-specification> variable: "GUILE_LOAD_PATH" files: ("share/guile/site/3.0") separator: ":" file-type: directory file-pattern: #f> #<<search-path-specification> variable: "GUILE_LOAD_COMPILED_PATH" files: ("lib/guile/3.0/site-ccache" "share/guile/site/3.0") separator: ":" file-type: directory file-pattern: #f>) (("libunistring" "0.9.10" "out" () ()) ("libgc" "8.0.4" "out" () ())))
actual-value: ("guile" "3.0.8" "out" (#<<search-path-specification> variable: "GUILE_LOAD_PATH" files: ("share/guile/site/3.0") separator: ":" file-type: directory file-pattern: #f> #<<search-path-specification> variable: "GUILE_LOAD_COMPILED_PATH" files: ("lib/guile/3.0/site-ccache" "share/guile/site/3.0") separator: ":" file-type: directory file-pattern: #f>) (("libunistring" "0.9.10" "out" () ()) ("libgc" "8.0.4" "out" () ())))
result: PASS

test-name: packages->manifest
location: /home/phf/src/guix/tests/inferior.scm:308
source:
+ (test-equal
+   "packages->manifest"
+   (map manifest-entry->list
+        (manifest-entries
+          (packages->manifest
+            (find-best-packages-by-name "guile" #f))))
+   (let* ((inferior
+            (open-inferior
+              %top-builddir
+              #:command
+              "scripts/guix"))
+          (guile (first (lookup-inferior-packages inferior "guile")))
+          (manifest (packages->manifest (list guile))))
+     (close-inferior inferior)
+     (map manifest-entry->list
+          (manifest-entries manifest))))
expected-value: (("guile" "3.0.8" "out" (#<<search-path-specification> variable: "GUILE_LOAD_PATH" files: ("share/guile/site/3.0") separator: ":" file-type: directory file-pattern: #f> #<<search-path-specification> variable: "GUILE_LOAD_COMPILED_PATH" files: ("lib/guile/3.0/site-ccache" "share/guile/site/3.0") separator: ":" file-type: directory file-pattern: #f>) (("libunistring" "0.9.10" "out" () ()) ("libgc" "8.0.4" "out" () ()))))
actual-value: (("guile" "3.0.8" "out" (#<<search-path-specification> variable: "GUILE_LOAD_PATH" files: ("share/guile/site/3.0") separator: ":" file-type: directory file-pattern: #f> #<<search-path-specification> variable: "GUILE_LOAD_COMPILED_PATH" files: ("lib/guile/3.0/site-ccache" "share/guile/site/3.0") separator: ":" file-type: directory file-pattern: #f>) (("libunistring" "0.9.10" "out" () ()) ("libgc" "8.0.4" "out" () ()))))
result: PASS

test-name: #:error-port stderr
location: /home/phf/src/guix/tests/inferior.scm:319
source:
+ (test-equal
+   "#:error-port stderr"
+   42
+   (let ((inferior
+           (open-inferior
+             %top-builddir
+             #:command
+             "scripts/guix"
+             #:error-port
+             (current-error-port))))
+     (and (inferior? inferior)
+          (inferior-eval
+            '(display "test" (current-error-port))
+            inferior)
+          (let ((result
+                  (inferior-eval '(apply * '(6 7)) inferior)))
+            (close-inferior inferior)
+            result))))
expected-value: 42
actual-value: 42
result: PASS

test-name: #:error-port pipe
location: /home/phf/src/guix/tests/inferior.scm:333
source:
+ (test-equal
+   "#:error-port pipe"
+   "42"
+   (match (pipe)
+          ((port-to-read-from . port-to-write-to)
+           (setvbuf port-to-read-from 'line)
+           (setvbuf port-to-write-to 'line)
+           (let ((inferior
+                   (open-inferior
+                     %top-builddir
+                     #:command
+                     "scripts/guix"
+                     #:error-port
+                     port-to-write-to)))
+             (and (inferior? inferior)
+                  (begin
+                    (inferior-eval
+                      '(display "42\n" (current-error-port))
+                      inferior)
+                    (let loop ((line (read-line port-to-read-from)))
+                      (if (string=? line "42")
+                        (begin (close-inferior inferior) line)
+                        (loop (read-line port-to-read-from))))))))))
expected-value: "42"
actual-value: "42"
result: PASS


FAIL: tests/pypi
================

test-name: guix-package->pypi-name, old URL style
location: /home/phf/src/guix/tests/pypi.scm:137
source:
+ (test-equal
+   "guix-package->pypi-name, old URL style"
+   "psutil"
+   (guix-package->pypi-name
+     (dummy-package
+       "foo"
+       (source
+         (dummy-origin
+           (uri "https://pypi.org/packages/source/p/psutil/psutil-4.3.0.tar.gz"))))))
expected-value: "psutil"
actual-value: "psutil"
result: PASS

test-name: guix-package->pypi-name, new URL style
location: /home/phf/src/guix/tests/pypi.scm:145
source:
+ (test-equal
+   "guix-package->pypi-name, new URL style"
+   "certbot"
+   (guix-package->pypi-name
+     (dummy-package
+       "foo"
+       (source
+         (dummy-origin
+           (uri "https://pypi.org/packages/a2/3b/4756e6a0ceb14e084042a2a65c615d68d25621c6fd446d0fc10d14c4ce7d/certbot-0.8.1.tar.gz"))))))
expected-value: "certbot"
actual-value: "certbot"
result: PASS

test-name: guix-package->pypi-name, several URLs
location: /home/phf/src/guix/tests/pypi.scm:153
source:
+ (test-equal
+   "guix-package->pypi-name, several URLs"
+   "cram"
+   (guix-package->pypi-name
+     (dummy-package
+       "foo"
+       (source
+         (dummy-origin
+           (uri (list "https://bitheap.org/cram/cram-0.7.tar.gz"
+                      (pypi-uri "cram" "0.7"))))))))
expected-value: "cram"
actual-value: "cram"
result: PASS

test-name: guix-package->pypi-name, honor 'upstream-name'
location: /home/phf/src/guix/tests/pypi.scm:162
source:
+ (test-equal
+   "guix-package->pypi-name, honor 'upstream-name'"
+   "bar-3"
+   (guix-package->pypi-name
+     (dummy-package
+       "foo"
+       (properties '((upstream-name . "bar-3"))))))
expected-value: "bar-3"
actual-value: "bar-3"
result: PASS

test-name: specification->requirement-name
location: /home/phf/src/guix/tests/pypi.scm:169
source:
+ (test-equal
+   "specification->requirement-name"
+   '("Fizzy"
+     "PickyThing"
+     "SomethingWithMarker"
+     "requests"
+     "pip")
+   (map specification->requirement-name
+        test-specifications))
expected-value: ("Fizzy" "PickyThing" "SomethingWithMarker" "requests" "pip")
actual-value: ("Fizzy" "PickyThing" "SomethingWithMarker" "requests" "pip")
result: PASS

test-name: parse-requires.txt
location: /home/phf/src/guix/tests/pypi.scm:173
source:
+ (test-equal
+   "parse-requires.txt"
+   (list '("foo" "bar") '("pytest"))
+   (mock ((ice-9 ports)
+          call-with-input-file
+          call-with-input-string)
+         (parse-requires.txt test-requires.txt)))
expected-value: (("foo" "bar") ("pytest"))
actual-value: (("foo" "bar") ("pytest"))
result: PASS

test-name: parse-requires.txt - Beaker
location: /home/phf/src/guix/tests/pypi.scm:179
source:
+ (test-equal
+   "parse-requires.txt - Beaker"
+   (list '() '("Mock" "coverage"))
+   (mock ((ice-9 ports)
+          call-with-input-file
+          call-with-input-string)
+         (parse-requires.txt test-requires.txt-beaker)))
expected-value: (() ("Mock" "coverage"))
actual-value: (() ("Mock" "coverage"))
result: PASS

test-name: parse-wheel-metadata, with extras
location: /home/phf/src/guix/tests/pypi.scm:185
source:
+ (test-equal
+   "parse-wheel-metadata, with extras"
+   (list '("wrapt" "bar") '("tox" "bumpversion"))
+   (mock ((ice-9 ports)
+          call-with-input-file
+          call-with-input-string)
+         (parse-wheel-metadata test-metadata-with-extras)))
expected-value: (("wrapt" "bar") ("tox" "bumpversion"))
actual-value: (("wrapt" "bar") ("tox" "bumpversion"))
result: PASS

test-name: parse-wheel-metadata, with extras - Jedi
location: /home/phf/src/guix/tests/pypi.scm:191
source:
+ (test-equal
+   "parse-wheel-metadata, with extras - Jedi"
+   (list '("parso") '("pytest"))
+   (mock ((ice-9 ports)
+          call-with-input-file
+          call-with-input-string)
+         (parse-wheel-metadata
+           test-metadata-with-extras-jedi)))
expected-value: (("parso") ("pytest"))
actual-value: (("parso") ("pytest"))
result: PASS

test-name: find-project-url, with numpy
location: /home/phf/src/guix/tests/pypi.scm:197
source:
+ (test-equal
+   "find-project-url, with numpy"
+   "numpy"
+   (find-project-url
+     "numpy"
+     "https://files.pythonhosted.org/packages/0a/c8/a62767a6b374a0dfb02d2a0456e5f56a372cdd1689dbc6ffb6bf1ddedbc0/numpy-1.22.1.zip"))
expected-value: "numpy"
actual-value: "numpy"
result: PASS

test-name: find-project-url, uWSGI
location: /home/phf/src/guix/tests/pypi.scm:203
source:
+ (test-equal
+   "find-project-url, uWSGI"
+   "uwsgi"
+   (find-project-url
+     "uWSGI"
+     "https://files.pythonhosted.org/packages/24/fd/93851e4a076719199868d4c918cc93a52742e68370188c1c570a6e42a54f/uwsgi-2.0.20.tar.gz"))
expected-value: "uwsgi"
actual-value: "uwsgi"
result: PASS

test-name: find-project-url, flake8-array-spacing
location: /home/phf/src/guix/tests/pypi.scm:209
source:
+ (test-equal
+   "find-project-url, flake8-array-spacing"
+   "flake8_array_spacing"
+   (find-project-url
+     "flake8-array-spacing"
+     "https://files.pythonhosted.org/packages/a4/21/ff29b901128b681b7de7a2787b3aeb3e1f3cba4a8c0cffa9712cbff016bc/flake8_array_spacing-0.2.0.tar.gz"))
expected-value: "flake8_array_spacing"
actual-value: "flake8_array_spacing"
result: PASS

test-name: find-project-url, foo/goo
location: /home/phf/src/guix/tests/pypi.scm:215
source:
+ (test-equal
+   "find-project-url, foo/goo"
+   "foo"
+   (find-project-url
+     "foo"
+     "https://files.pythonhosted.org/packages/f0/f00/goo-0.0.0.tar.gz"))
expected-value: "foo"
actual-value: "foo"
result: PASS

test-name: pypi->guix-package, no wheel
location: /home/phf/src/guix/tests/pypi.scm:221
source:
+ (test-assert
+   "pypi->guix-package, no wheel"
+   (mock ((guix import utils)
+          url-fetch
+          (lambda (url file-name)
+            (match url
+                   ("https://example.com/foo-1.0.0.tar.gz"
+                    (begin
+                      (mkdir-p "foo-1.0.0/src/bizarre.egg-info")
+                      (with-output-to-file
+                        "foo-1.0.0/src/bizarre.egg-info/requires.txt"
+                        (lambda () (display test-requires.txt)))
+                      (parameterize
+                        ((current-output-port (%make-void-port "rw+")))
+                        (system* "tar" "czvf" file-name "foo-1.0.0/"))
+                      (delete-file-recursively "foo-1.0.0")
+                      (set! test-source-hash
+                        (call-with-input-file file-name port-sha256))))
+                   ("https://example.com/foo-1.0.0-py2.py3-none-any.whl"
+                    #f)
+                   (_ (error "Unexpected URL: " url)))))
+         (mock ((guix http-client)
+                http-fetch
+                (lambda (url . rest)
+                  (match url
+                         ("https://pypi.org/pypi/foo/json"
+                          (values
+                            (open-input-string test-json-1)
+                            (string-length test-json-1)))
+                         ("https://example.com/foo-1.0.0-py2.py3-none-any.whl"
+                          #f)
+                         (_ (error "Unexpected URL: " url)))))
+               (match (pypi->guix-package "foo")
+                      (('package
+                        ('name "python-foo")
+                        ('version "1.0.0")
+                        ('source
+                         ('origin
+                          ('method 'url-fetch)
+                          ('uri ('pypi-uri "foo" 'version))
+                          ('sha256 ('base32 (? string? hash)))))
+                        ('build-system 'python-build-system)
+                        ('propagated-inputs
+                         ('list 'python-bar 'python-foo))
+                        ('native-inputs ('list 'python-pytest))
+                        ('home-page "http://example.com")
+                        ('synopsis "summary")
+                        ('description "summary")
+                        ('license 'license:lgpl2.0))
+                       (and (string=?
+                              (bytevector->nix-base32-string test-source-hash)
+                              hash)
+                            (equal?
+                              (pypi->guix-package "foo" #:version "1.0.0")
+                              (pypi->guix-package "foo"))
+                            (guard (c ((error? c) #t))
+                                   (pypi->guix-package
+                                     "foo"
+                                     #:version
+                                     "42"))))
+                      (x (pk 'fail x #f))))))
actual-value: #t
result: PASS


;;; (fail (package (name "python-foo") (version "1.0.0") (source (origin (method url-fetch) (uri (pypi-uri "foo" version)) (sha256 (base32 "03ygiww1c9fdgs998x4rqhxa73gq0r30rp0vq50q022wp1d6w0cz")))) (build-system python-build-system) (propagated-inputs (list python-wrong)) (home-page "http://example.com") (synopsis "summary") (description "summary") (license license:lgpl2.0)) #f)
test-name: pypi->guix-package, wheels
location: /home/phf/src/guix/tests/pypi.scm:276
source:
+ (test-assert
+   "pypi->guix-package, wheels"
+   (mock ((guix import utils)
+          url-fetch
+          (lambda (url file-name)
+            (match url
+                   ("https://example.com/foo-1.0.0.tar.gz"
+                    (begin
+                      (mkdir-p "foo-1.0.0/foo.egg-info/")
+                      (with-output-to-file
+                        "foo-1.0.0/foo.egg-info/requires.txt"
+                        (lambda ()
+                          (display
+                            "wrong data to make sure we're testing wheels ")))
+                      (parameterize
+                        ((current-output-port (%make-void-port "rw+")))
+                        (system* "tar" "czvf" file-name "foo-1.0.0/"))
+                      (delete-file-recursively "foo-1.0.0")
+                      (set! test-source-hash
+                        (call-with-input-file file-name port-sha256))))
+                   ("https://example.com/foo-1.0.0-py2.py3-none-any.whl"
+                    (begin
+                      (mkdir "foo-1.0.0.dist-info")
+                      (with-output-to-file
+                        "foo-1.0.0.dist-info/METADATA"
+                        (lambda () (display test-metadata)))
+                      (let ((zip-file (string-append file-name ".zip")))
+                        (system*
+                          "zip"
+                          "-q"
+                          zip-file
+                          "foo-1.0.0.dist-info/METADATA")
+                        (rename-file zip-file file-name))
+                      (delete-file-recursively "foo-1.0.0.dist-info")))
+                   (_ (error "Unexpected URL: " url)))))
+         (mock ((guix http-client)
+                http-fetch
+                (lambda (url . rest)
+                  (match url
+                         ("https://pypi.org/pypi/foo/json"
+                          (values
+                            (open-input-string test-json-1)
+                            (string-length test-json-1)))
+                         ("https://example.com/foo-1.0.0-py2.py3-none-any.whl"
+                          #f)
+                         (_ (error "Unexpected URL: " url)))))
+               (invalidate-memoization! pypi->guix-package)
+               (match (pypi->guix-package "foo")
+                      (('package
+                        ('name "python-foo")
+                        ('version "1.0.0")
+                        ('source
+                         ('origin
+                          ('method 'url-fetch)
+                          ('uri ('pypi-uri "foo" 'version))
+                          ('sha256 ('base32 (? string? hash)))))
+                        ('build-system 'python-build-system)
+                        ('propagated-inputs
+                         ('list 'python-bar 'python-baz))
+                        ('native-inputs ('list 'python-pytest))
+                        ('home-page "http://example.com")
+                        ('synopsis "summary")
+                        ('description "summary")
+                        ('license 'license:lgpl2.0))
+                       (string=?
+                         (bytevector->nix-base32-string test-source-hash)
+                         hash))
+                      (x (pk 'fail x #f))))))
actual-value: #f
result: FAIL

test-name: pypi->guix-package, no usable requirement file.
location: /home/phf/src/guix/tests/pypi.scm:339
source:
+ (test-assert
+   "pypi->guix-package, no usable requirement file."
+   (mock ((guix import utils)
+          url-fetch
+          (lambda (url file-name)
+            (match url
+                   ("https://example.com/foo-1.0.0.tar.gz"
+                    (mkdir-p "foo-1.0.0/foo.egg-info/")
+                    (parameterize
+                      ((current-output-port (%make-void-port "rw+")))
+                      (system* "tar" "czvf" file-name "foo-1.0.0/"))
+                    (delete-file-recursively "foo-1.0.0")
+                    (set! test-source-hash
+                      (call-with-input-file file-name port-sha256)))
+                   ("https://example.com/foo-1.0.0-py2.py3-none-any.whl"
+                    #f)
+                   (_ (error "Unexpected URL: " url)))))
+         (mock ((guix http-client)
+                http-fetch
+                (lambda (url . rest)
+                  (match url
+                         ("https://pypi.org/pypi/foo/json"
+                          (values
+                            (open-input-string test-json-1)
+                            (string-length test-json-1)))
+                         ("https://example.com/foo-1.0.0-py2.py3-none-any.whl"
+                          #f)
+                         (_ (error "Unexpected URL: " url)))))
+               (invalidate-memoization! pypi->guix-package)
+               (match (pypi->guix-package "foo")
+                      (('package
+                        ('name "python-foo")
+                        ('version "1.0.0")
+                        ('source
+                         ('origin
+                          ('method 'url-fetch)
+                          ('uri ('pypi-uri "foo" 'version))
+                          ('sha256 ('base32 (? string? hash)))))
+                        ('build-system 'python-build-system)
+                        ('home-page "http://example.com")
+                        ('synopsis "summary")
+                        ('description "summary")
+                        ('license 'license:lgpl2.0))
+                       (string=?
+                         (bytevector->nix-base32-string test-source-hash)
+                         hash))
+                      (x (pk 'fail x #f))))))
actual-value: #t
result: PASS

test-name: pypi->guix-package, package name contains "-" followed by digits
location: /home/phf/src/guix/tests/pypi.scm:385
source:
+ (test-assert
+   "pypi->guix-package, package name contains \"-\" followed by digits"
+   (mock ((guix import utils)
+          url-fetch
+          (lambda (url file-name)
+            (match url
+                   ("https://example.com/foo-99-1.0.0.tar.gz"
+                    (begin
+                      (mkdir-p "foo-99-1.0.0/src/bizarre.egg-info")
+                      (with-output-to-file
+                        "foo-99-1.0.0/src/bizarre.egg-info/requires.txt"
+                        (lambda () (display test-requires.txt)))
+                      (parameterize
+                        ((current-output-port (%make-void-port "rw+")))
+                        (system* "tar" "czvf" file-name "foo-99-1.0.0/"))
+                      (delete-file-recursively "foo-99-1.0.0")
+                      (set! test-source-hash
+                        (call-with-input-file file-name port-sha256))))
+                   ("https://example.com/foo-99-1.0.0-py2.py3-none-any.whl"
+                    #f)
+                   (_ (error "Unexpected URL: " url)))))
+         (mock ((guix http-client)
+                http-fetch
+                (lambda (url . rest)
+                  (match url
+                         ("https://pypi.org/pypi/foo-99/json"
+                          (values
+                            (open-input-string test-json-2)
+                            (string-length test-json-2)))
+                         ("https://example.com/foo-99-1.0.0-py2.py3-none-any.whl"
+                          #f)
+                         (_ (error "Unexpected URL: " url)))))
+               (match (pypi->guix-package "foo-99")
+                      (('package
+                        ('name "python-foo-99")
+                        ('version "1.0.0")
+                        ('source
+                         ('origin
+                          ('method 'url-fetch)
+                          ('uri ('pypi-uri "foo-99" 'version))
+                          ('sha256 ('base32 (? string? hash)))))
+                        ('properties
+                         ('quote (("upstream-name" . "foo-99"))))
+                        ('build-system 'python-build-system)
+                        ('propagated-inputs
+                         ('list 'python-bar 'python-foo))
+                        ('native-inputs ('list 'python-pytest))
+                        ('home-page "http://example.com")
+                        ('synopsis "summary")
+                        ('description "summary")
+                        ('license 'license:lgpl2.0))
+                       (string=?
+                         (bytevector->nix-base32-string test-source-hash)
+                         hash))
+                      (x (pk 'fail x #f))))))
actual-value: #t
result: PASS

;;; note: source file /home/phf/src/guix/gnu/packages/emacs-xyz.scm
;;;       newer than compiled /home/phf/src/guix/gnu/packages/emacs-xyz.go
warning: project name foo does not appear verbatim in the PyPI URI
hint: The PyPI URI is:
`https://files.pythonhosted.org/packages/f0/f00/goo-0.0.0.tar.gz'.  You
should review the pypi-uri declaration in the generated package.  You may
need to replace "foo" with a substring of the PyPI URI that identifies the
package.

warning: Failed to extract file: foo-1.0.0.dist-info/METADATA from wheel.
warning: Cannot guess requirements from source archive: no requires.txt file found.

RUN: tests/services/configuration
=================================

test-name: default value, no serialization
location: /home/phf/src/guix/tests/services/configuration.scm:44
source:
+ (test-equal
+   "default value, no serialization"
+   80
+   (port-configuration-port (port-configuration)))
expected-value: 80
actual-value: 80
result: PASS

test-name: wrong type for a field
location: /home/phf/src/guix/tests/services/configuration.scm:48
source:
+ (test-equal
+   "wrong type for a field"
+   '("configuration.scm" 57 11)
+   (guard (c ((configuration-error? c)
+              (let ((loc (error-location c)))
+                (list (basename (location-file loc))
+                      (location-line loc)
+                      (location-column loc)))))
+          (port-configuration
+            (port "This is not a number!"))))
expected-value: ("configuration.scm" 57 11)
actual-value: ("configuration.scm" 57 11)
result: PASS

test-name: default value, custom serializer
location: /home/phf/src/guix/tests/services/configuration.scm:62
source:
+ (test-equal
+   "default value, custom serializer"
+   80
+   (port-configuration-cs-port
+     (port-configuration-cs)))
expected-value: 80
actual-value: 80
result: PASS

test-name: no default value, provided
location: /home/phf/src/guix/tests/services/configuration.scm:69
source:
+ (test-equal
+   "no default value, provided"
+   55
+   (port-configuration-ndv-port
+     (port-configuration-ndv (port 55))))
expected-value: 55
actual-value: 55
result: PASS

test-name: no default value, not provided
location: /home/phf/src/guix/tests/services/configuration.scm:74
source:
+ (test-assert
+   "no default value, not provided"
+   (guard (c ((configuration-error? c) #t))
+          (port-configuration-ndv-port
+            (port-configuration-ndv))))
actual-value: #t
result: PASS

test-name: serialize-configuration
location: /home/phf/src/guix/tests/services/configuration.scm:85
source:
+ (test-assert
+   "serialize-configuration"
+   (gexp? (let ((config (serializable-configuration)))
+            (serialize-configuration
+              config
+              serializable-configuration-fields))))
actual-value: #t
result: PASS

test-name: serialize-configuration with no-serialization
location: /home/phf/src/guix/tests/services/configuration.scm:94
source:
+ (test-assert
+   "serialize-configuration with no-serialization"
+   (not (false-if-exception
+          (let ((config (serializable-configuration)))
+            (serialize-configuration
+              config
+              serializable-configuration-fields)))))
actual-value: #t
result: PASS

test-name: serialize-configuration with prefix
location: /home/phf/src/guix/tests/services/configuration.scm:107
source:
+ (test-assert
+   "serialize-configuration with prefix"
+   (gexp? (let ((config (configuration-with-prefix)))
+            (serialize-configuration
+              config
+              configuration-with-prefix-fields))))
actual-value: #t
result: PASS

test-name: maybe value serialization
location: /home/phf/src/guix/tests/services/configuration.scm:122
source:
+ (test-equal
+   "maybe value serialization"
+   "port=80"
+   (serialize-maybe-number "port" 80))
expected-value: "port=80"
actual-value: "port=80"
result: PASS

test-name: maybe value serialization of the instance
location: /home/phf/src/guix/tests/services/configuration.scm:131
source:
+ (test-equal
+   "maybe value serialization of the instance"
+   "port=42count=43"
+   (config-with-maybe-number->string
+     (config-with-maybe-number (port 42) (count 43))))
expected-value: "port=42count=43"
actual-value: "port=42count=43"
result: PASS

test-name: maybe value serialization of the instance, unspecified
location: /home/phf/src/guix/tests/services/configuration.scm:138
source:
+ (test-equal
+   "maybe value serialization of the instance, unspecified"
+   "port=42"
+   (config-with-maybe-number->string
+     (config-with-maybe-number (port 42))))
expected-value: "port=42"
actual-value: "port=42"
result: PASS

test-name: maybe value without serialization no procedure bound
location: /home/phf/src/guix/tests/services/configuration.scm:150
source:
+ (test-assert
+   "maybe value without serialization no procedure bound"
+   (not (defined? 'serialize-maybe-string)))
actual-value: #t
result: PASS

test-name: maybe type, no default
location: /home/phf/src/guix/tests/services/configuration.scm:153
source:
+ (test-assert
+   "maybe type, no default"
+   (eq? 'unset
+        (config-with-maybe-string/no-serialization-name
+          (config-with-maybe-string/no-serialization))))
actual-value: #t
result: PASS

test-name: maybe type, with default
location: /home/phf/src/guix/tests/services/configuration.scm:158
source:
+ (test-assert
+   "maybe type, with default"
+   (equal?
+     "foo"
+     (config-with-maybe-string/no-serialization-name
+       (config-with-maybe-string/no-serialization
+         (name "foo")))))
actual-value: #t
result: PASS


SKIP: tests/syscalls
====================

test-name: mount, ENOENT
location: /home/phf/src/guix/tests/syscalls.scm:43
source:
+ (test-equal
+   "mount, ENOENT"
+   ENOENT
+   (catch 'system-error
+          (lambda ()
+            (mount "/dev/null" "/does-not-exist" "ext2")
+            #f)
+          (compose system-error-errno list)))
expected-value: 2
actual-value: 2
result: PASS

test-name: umount, ENOENT/EPERM
location: /home/phf/src/guix/tests/syscalls.scm:51
source:
+ (test-assert
+   "umount, ENOENT/EPERM"
+   (catch 'system-error
+          (lambda () (umount "/does-not-exist") #f)
+          (lambda args
+            (memv (system-error-errno args)
+                  (list EPERM ENOENT)))))
actual-value: (2)
result: PASS

test-name: mounts
location: /home/phf/src/guix/tests/syscalls.scm:60
source:
+ (test-assert
+   "mounts"
+   (let ((mounts (mounts)))
+     (any (match-lambda
+            ((point . type)
+             (let ((mount (find (lambda (mount)
+                                  (string=? (mount-point mount) point))
+                                mounts)))
+               (and mount (string=? (mount-type mount) type)))))
+          '(("/proc" . "proc")
+            ("/sys" . "sysfs")
+            ("/dev/shm" . "tmpfs")))))
actual-value: #t
result: PASS

test-name: mount-points
location: /home/phf/src/guix/tests/syscalls.scm:74
source:
+ (test-assert
+   "mount-points"
+   (any (cute member <> (mount-points))
+        '("/" "/proc" "/sys" "/dev")))
actual-value: ("/" "/sys/kernel/security" "/dev/shm" "/run/lock" "/sys/fs/cgroup" "/sys/fs/pstore" "/sys/firmware/efi/efivars" "/sys/fs/bpf" "/proc/sys/fs/binfmt_misc" "/dev/mqueue" "/dev/hugepages" "/gnu/store" "/sys/kernel/debug" "/sys/kernel/tracing" "/sys/kernel/config" "/sys/fs/fuse/connections" "/boot" "/boot/efi" "/run/user/1000" "/run/user/1000/gvfs" "/run/user/1000/doc")
result: PASS

test-name: utime with AT_SYMLINK_NOFOLLOW
location: /home/phf/src/guix/tests/syscalls.scm:81
source:
+ (test-equal
+   "utime with AT_SYMLINK_NOFOLLOW"
+   '(0 0)
+   (begin
+     (symlink "/nowhere" temp-file)
+     (utime temp-file 0 0 0 0 AT_SYMLINK_NOFOLLOW)
+     (let ((st (lstat temp-file)))
+       (delete-file temp-file)
+       (list (stat:mtime st) (stat:atime st)))))
expected-value: (0 0)
actual-value: (0 0)
result: PASS

test-name: swapon, ENOSYS/ENOENT/EPERM
location: /home/phf/src/guix/tests/syscalls.scm:93
source:
+ (test-assert
+   "swapon, ENOSYS/ENOENT/EPERM"
+   (catch 'system-error
+          (lambda () (swapon "/does-not-exist") #f)
+          (lambda args
+            (memv (system-error-errno args)
+                  (list EPERM ENOENT ENOSYS)))))
actual-value: (1 2 38)
result: PASS

test-name: swapoff, ENOSYS/ENOENT/EINVAL/EPERM
location: /home/phf/src/guix/tests/syscalls.scm:101
source:
+ (test-assert
+   "swapoff, ENOSYS/ENOENT/EINVAL/EPERM"
+   (catch 'system-error
+          (lambda () (swapoff "/does-not-exist") #f)
+          (lambda args
+            (memv (system-error-errno args)
+                  (list EPERM EINVAL ENOENT ENOSYS)))))
actual-value: (1 22 2 38)
result: PASS

test-name: mkdtemp!
location: /home/phf/src/guix/tests/syscalls.scm:109
source:
+ (test-assert
+   "mkdtemp!"
+   (let* ((tmp (or (getenv "TMPDIR") "/tmp"))
+          (dir (mkdtemp!
+                 (string-append tmp "/guix-test-XXXXXX"))))
+     (and (file-exists? dir) (begin (rmdir dir) #t))))
actual-value: #t
result: PASS

test-name: statfs, ENOENT
location: /home/phf/src/guix/tests/syscalls.scm:117
source:
+ (test-equal
+   "statfs, ENOENT"
+   ENOENT
+   (catch 'system-error
+          (lambda () (statfs "/does-not-exist"))
+          (compose system-error-errno list)))
expected-value: 2
actual-value: 2
result: PASS

test-name: statfs
location: /home/phf/src/guix/tests/syscalls.scm:124
source:
+ (test-assert
+   "statfs"
+   (let ((fs (statfs "/")))
+     (and (file-system? fs)
+          (> (file-system-block-size fs) 0)
+          (>= (file-system-blocks-available fs) 0)
+          (>= (file-system-blocks-free fs)
+              (file-system-blocks-available fs)))))
actual-value: #t
result: PASS

test-name: clone
location: /home/phf/src/guix/tests/syscalls.scm:141
source:
+ (test-assert
+   "clone"
+   (match (clone (logior CLONE_NEWUSER SIGCHLD))
+          (0 (primitive-exit 42))
+          (pid (and (not (equal?
+                           (readlink (user-namespace pid))
+                           (readlink (user-namespace (getpid)))))
+                    (match (waitpid pid)
+                           ((_ . status) (= 42 (status:exit-val status))))))))
actual-value: #t
result: PASS

test-name: setns
location: /home/phf/src/guix/tests/syscalls.scm:154
source:
+ (test-assert
+   "setns"
+   (match (clone (logior CLONE_NEWUSER SIGCHLD))
+          (0 (primitive-exit 0))
+          (clone-pid
+            (match (pipe)
+                   ((in . out)
+                    (match (primitive-fork)
+                           (0
+                            (close in)
+                            (call-with-input-file
+                              (user-namespace clone-pid)
+                              (lambda (port) (setns (port->fdes port) 0)))
+                            (write 'done out)
+                            (close out)
+                            (primitive-exit 0))
+                           (fork-pid
+                             (close out)
+                             (read in)
+                             (let ((result
+                                     (and (equal?
+                                            (readlink
+                                              (user-namespace clone-pid))
+                                            (readlink
+                                              (user-namespace fork-pid))))))
+                               (waitpid clone-pid)
+                               (waitpid fork-pid)
+                               result))))))))
actual-value: #t
result: PASS

test-name: pivot-root
location: /home/phf/src/guix/tests/syscalls.scm:183
source:
+ (test-equal
+   "pivot-root"
+   'success!
+   (match (socketpair AF_UNIX SOCK_STREAM 0)
+          ((parent . child)
+           (match (clone (logior CLONE_NEWUSER CLONE_NEWNS SIGCHLD))
+                  (0
+                   (dynamic-wind
+                     (const #t)
+                     (lambda ()
+                       (close parent)
+                       (call-with-temporary-directory
+                         (lambda (root)
+                           (display "ready\n" child)
+                           (read child)
+                           (let ((put-old (string-append root "/real-root")))
+                             (mount "none" root "tmpfs")
+                             (mkdir put-old)
+                             (call-with-output-file
+                               (string-append root "/test")
+                               (lambda (port) (display "testing\n" port)))
+                             (pivot-root root put-old)
+                             (write (and (file-exists? "/test") 'success!)
+                                    child)
+                             (close child)))))
+                     (lambda () (primitive-exit 0))))
+                  (pid (close child)
+                       (match (read parent)
+                              ('ready
+                               (call-with-output-file
+                                 (format #f "/proc/~d/setgroups" pid)
+                                 (lambda (port) (display "deny" port)))
+                               (call-with-output-file
+                                 (format #f "/proc/~d/uid_map" pid)
+                                 (lambda (port)
+                                   (format port "0 ~d 1" (getuid))))
+                               (call-with-output-file
+                                 (format #f "/proc/~d/gid_map" pid)
+                                 (lambda (port)
+                                   (format port "0 ~d 1" (getgid))))
+                               (display "go!\n" parent)
+                               (let ((result (read parent)))
+                                 (close parent)
+                                 (and (zero? (match (waitpid pid)
+                                                    ((_ . status)
+                                                     (status:exit-val
+                                                       status))))
+                                      result)))))))))
expected-value: success!
actual-value: success!
result: PASS

test-name: scandir*, ENOENT
location: /home/phf/src/guix/tests/syscalls.scm:232
source:
+ (test-equal
+   "scandir*, ENOENT"
+   ENOENT
+   (catch 'system-error
+          (lambda () (scandir* "/does/not/exist"))
+          (lambda args (system-error-errno args))))
expected-value: 2
actual-value: 2
result: PASS

test-name: scandir*, ASCII file names
location: /home/phf/src/guix/tests/syscalls.scm:240
source:
+ (test-equal
+   "scandir*, ASCII file names"
+   (scandir
+     (dirname
+       (search-path %load-path "guix/base32.scm"))
+     (const #t)
+     string<?)
+   (match (scandir*
+            (dirname
+              (search-path %load-path "guix/base32.scm")))
+          (((names . properties) ...) names)))
expected-value: ("." ".." "android-repo-download.go" "android-repo-download.scm" "avahi.go" "avahi.scm" "base16.go" "base16.scm" "base32.go" "base32.scm" "base64.go" "base64.scm" "build" "build-system" "build-system.go" "build-system.scm" "bzr-download.go" "bzr-download.scm" "cache.go" "cache.scm" "channels.go" "channels.scm" "ci.go" "ci.scm" "colors.go" "colors.scm" "combinators.go" "combinators.scm" "config.go" "config.scm" "config.scm.in" "cpio.go" "cpio.scm" "cpu.go" "cpu.scm" "cve.go" "cve.scm" "cvs-download.go" "cvs-download.scm" "d3.v3.js" "deprecation.go" "deprecation.scm" "derivations.go" "derivations.scm" "describe.go" "describe.scm" "diagnostics.go" "diagnostics.scm" "discovery.go" "discovery.scm" "docker.go" "docker.scm" "download.go" "download.scm" "elf.go" "elf.scm" "extracting-download.go" "ftp-client.go" "ftp-client.scm" "gexp.go" "gexp.scm" "git-authenticate.go" "git-authenticate.scm" "git-download.go" "git-download.scm" "git.go" "git.scm" "glob.go" "glob.scm" "gnu-maintenance.go" "gnu-maintenance.scm" "gnupg.go" "gnupg.scm" "grafts.go" "grafts.scm" "graph.go" "graph.js" "graph.scm" "hash.go" "hash.scm" "hg-download.go" "hg-download.scm" "http-client.go" "http-client.scm" "i18n.go" "i18n.scm" "import" "inferior.go" "inferior.scm" "ipfs.go" "ipfs.scm" "least-authority.go" "least-authority.scm" "licenses.go" "licenses.scm" "lint.go" "lint.scm" "man-db.scm" "memoization.go" "memoization.scm" "modules.go" "modules.scm" "monad-repl.go" "monad-repl.scm" "monads.go" "monads.scm" "nar.go" "nar.scm" "narinfo.go" "narinfo.scm" "openpgp.go" "openpgp.scm" "packages.go" "packages.scm" "pki.go" "pki.scm" "platform.go" "platform.scm" "platforms" "profiles.go" "profiles.scm" "profiling.go" "profiling.scm" "progress.go" "progress.scm" "quirks.go" "quirks.scm" "records.go" "records.scm" "remote.go" "remote.scm" "repl.go" "repl.scm" "scripts" "scripts.go" "scripts.scm" "search-paths.go" "search-paths.scm" "self.go" "self.scm" "serialization.go" "serialization.scm" "sets.go" "sets.scm" "ssh.go" "ssh.scm" "status.go" "status.scm" "store" "store.go" "store.scm" "substitutes.go" "substitutes.scm" "svn-download.go" "svn-download.scm" "swh.go" "swh.scm" "tests" "tests.go" "tests.scm" "transformations.go" "transformations.scm" "ui.go" "ui.scm" "upstream.go" "upstream.scm" "utils.go" "utils.scm" "workers.go" "workers.scm")
actual-value: ("." ".." "android-repo-download.go" "android-repo-download.scm" "avahi.go" "avahi.scm" "base16.go" "base16.scm" "base32.go" "base32.scm" "base64.go" "base64.scm" "build" "build-system" "build-system.go" "build-system.scm" "bzr-download.go" "bzr-download.scm" "cache.go" "cache.scm" "channels.go" "channels.scm" "ci.go" "ci.scm" "colors.go" "colors.scm" "combinators.go" "combinators.scm" "config.go" "config.scm" "config.scm.in" "cpio.go" "cpio.scm" "cpu.go" "cpu.scm" "cve.go" "cve.scm" "cvs-download.go" "cvs-download.scm" "d3.v3.js" "deprecation.go" "deprecation.scm" "derivations.go" "derivations.scm" "describe.go" "describe.scm" "diagnostics.go" "diagnostics.scm" "discovery.go" "discovery.scm" "docker.go" "docker.scm" "download.go" "download.scm" "elf.go" "elf.scm" "extracting-download.go" "ftp-client.go" "ftp-client.scm" "gexp.go" "gexp.scm" "git-authenticate.go" "git-authenticate.scm" "git-download.go" "git-download.scm" "git.go" "git.scm" "glob.go" "glob.scm" "gnu-maintenance.go" "gnu-maintenance.scm" "gnupg.go" "gnupg.scm" "grafts.go" "grafts.scm" "graph.go" "graph.js" "graph.scm" "hash.go" "hash.scm" "hg-download.go" "hg-download.scm" "http-client.go" "http-client.scm" "i18n.go" "i18n.scm" "import" "inferior.go" "inferior.scm" "ipfs.go" "ipfs.scm" "least-authority.go" "least-authority.scm" "licenses.go" "licenses.scm" "lint.go" "lint.scm" "man-db.scm" "memoization.go" "memoization.scm" "modules.go" "modules.scm" "monad-repl.go" "monad-repl.scm" "monads.go" "monads.scm" "nar.go" "nar.scm" "narinfo.go" "narinfo.scm" "openpgp.go" "openpgp.scm" "packages.go" "packages.scm" "pki.go" "pki.scm" "platform.go" "platform.scm" "platforms" "profiles.go" "profiles.scm" "profiling.go" "profiling.scm" "progress.go" "progress.scm" "quirks.go" "quirks.scm" "records.go" "records.scm" "remote.go" "remote.scm" "repl.go" "repl.scm" "scripts" "scripts.go" "scripts.scm" "search-paths.go" "search-paths.scm" "self.go" "self.scm" "serialization.go" "serialization.scm" "sets.go" "sets.scm" "ssh.go" "ssh.scm" "status.go" "status.scm" "store" "store.go" "store.scm" "substitutes.go" "substitutes.scm" "svn-download.go" "svn-download.scm" "swh.go" "swh.scm" "tests" "tests.go" "tests.scm" "transformations.go" "transformations.scm" "ui.go" "ui.scm" "upstream.go" "upstream.scm" "utils.go" "utils.scm" "workers.go" "workers.scm")
result: PASS

test-name: scandir*, UTF-8 file names
location: /home/phf/src/guix/tests/syscalls.scm:247
source:
+ (test-equal
+   "scandir*, UTF-8 file names"
+   '("." ".." "?" "?")
+   (call-with-temporary-directory
+     (lambda (directory)
+       (let ((creat (pointer->procedure
+                      int
+                      (dynamic-func "creat" (dynamic-link))
+                      (list '* int))))
+         (creat (string->pointer
+                  (string-append directory "/?")
+                  "UTF-8")
+                420)
+         (creat (string->pointer
+                  (string-append directory "/?")
+                  "UTF-8")
+                420)
+         (let ((locale (setlocale LC_ALL)))
+           (dynamic-wind
+             (lambda () (setlocale LC_ALL "C"))
+             (lambda ()
+               (match (scandir* directory)
+                      (((names . properties) ...) names)))
+             (lambda () (setlocale LC_ALL locale))))))))
expected-value: ("." ".." "?" "?")
actual-value: ("." ".." "?" "?")
result: PASS

test-name: scandir*, properties
location: /home/phf/src/guix/tests/syscalls.scm:274
source:
+ (test-assert
+   "scandir*, properties"
+   (let ((directory
+           (dirname
+             (search-path %load-path "guix/base32.scm"))))
+     (every (lambda (entry name)
+              (match entry
+                     ((name2 . properties)
+                      (and (string=? name2 name)
+                           (let* ((full (string-append directory "/" name))
+                                  (stat (lstat full))
+                                  (inode (assoc-ref properties 'inode))
+                                  (type (assoc-ref properties 'type)))
+                             (and (= inode (stat:ino stat))
+                                  (or (eq? type 'unknown)
+                                      (eq? type (stat:type stat)))))))))
+            (scandir* directory)
+            (scandir directory (const #t) string<?))))
actual-value: #t
result: PASS

test-name: getxattr, setxattr
location: /home/phf/src/guix/tests/syscalls.scm:291
source:
+ (test-assert
+   "getxattr, setxattr"
+   (let ((key "user.translator")
+         (value "/hurd/pfinet\x00")
+         (file (open-file temp-file "w0")))
+     (catch 'system-error
+            (lambda ()
+              (setxattr temp-file key value)
+              (string=? (getxattr temp-file key) value))
+            (lambda args
+              (memv (system-error-errno args) (list ENOTSUP))))))
actual-value: #t
result: PASS

warning: failed to delete /tmp/guix-directory.IJK6gL/??: No such file or directory
warning: failed to delete /tmp/guix-directory.IJK6gL/??: No such file or directory
warning: failed to delete /tmp/guix-directory.IJK6gL: Directory not empty
test-name: fcntl-flock wait
location: /home/phf/src/guix/tests/syscalls.scm:305
source:
+ (test-equal
+   "fcntl-flock wait"
+   42
+   (let ((file (open-file temp-file "w0b")))
+     (fcntl-flock file 'write-lock)
+     (match (primitive-fork)
+            (0
+             (dynamic-wind
+               (const #t)
+               (lambda ()
+                 (let ((file (open-file temp-file "r0b")))
+                   (fcntl-flock file 'read-lock)
+                   (primitive-exit (read file)))
+                 (primitive-exit 1))
+               (lambda () (primitive-exit 2))))
+            (pid (display "hello, world!" file)
+                 (force-output file)
+                 (sleep 1)
+                 (seek file 0 SEEK_SET)
+                 (truncate-file file 0)
+                 (write 42 file)
+                 (force-output file)
+                 (fcntl-flock file 'unlock)
+                 (match (waitpid pid)
+                        ((_ . status)
+                         (let ((result (status:exit-val status)))
+                           (close-port file)
+                           result)))))))
expected-value: 42
actual-value: 42
result: PASS


;;; (errno 11)
warning: failed to delete /tmp/guix-directory.IJK6gL/??: No such file or directory
warning: failed to delete /tmp/guix-directory.IJK6gL/??: No such file or directory
warning: failed to delete /tmp/guix-directory.IJK6gL: Directory not empty
test-name: fcntl-flock non-blocking
location: /home/phf/src/guix/tests/syscalls.scm:344
source:
+ (test-equal
+   "fcntl-flock non-blocking"
+   EAGAIN
+   (match (pipe)
+          ((input . output)
+           (match (primitive-fork)
+                  (0
+                   (dynamic-wind
+                     (const #t)
+                     (lambda ()
+                       (close-port output)
+                       (read-char input)
+                       (let ((file (open-file temp-file "w0")))
+                         (catch 'flock-error
+                                (lambda ()
+                                  (fcntl-flock file 'write-lock #:wait? #f))
+                                (lambda (key errno)
+                                  (primitive-exit (pk 'errno errno)))))
+                       (primitive-exit -1))
+                     (lambda () (primitive-exit -2))))
+                  (pid (close-port input)
+                       (let ((file (open-file temp-file "w0")))
+                         (fcntl-flock file 'write-lock)
+                         (write 'green-light output)
+                         (force-output output)
+                         (match (waitpid pid)
+                                ((_ . status)
+                                 (let ((result (status:exit-val status)))
+                                   (fcntl-flock file 'unlock)
+                                   (close-port file)
+                                   result)))))))))
expected-value: 11
actual-value: 11
result: PASS

test-name: set-thread-name
location: /home/phf/src/guix/tests/syscalls.scm:386
source:
+ (test-equal
+   "set-thread-name"
+   "Syscall Test"
+   (let ((name (thread-name)))
+     (set-thread-name "Syscall Test")
+     (let ((new-name (thread-name)))
+       (set-thread-name name)
+       new-name)))
expected-value: "Syscall Test"
actual-value: "Syscall Test"
result: PASS

test-name: all-network-interface-names
location: /home/phf/src/guix/tests/syscalls.scm:394
source:
+ (test-assert
+   "all-network-interface-names"
+   (match (all-network-interface-names)
+          (((? string? names) ..1) (member "lo" names))))
actual-value: ("lo" "enp0s31f6" "wlp4s0" "docker0")
result: PASS

test-name: network-interface-names
location: /home/phf/src/guix/tests/syscalls.scm:399
source:
+ (test-assert
+   "network-interface-names"
+   (match (remove
+            (lambda (interface)
+              (string-contains interface ":"))
+            (network-interface-names))
+          (((? string? names) ..1)
+           (lset<=
+             string=?
+             names
+             (all-network-interface-names)))))
actual-value: #t
result: PASS

test-name: network-interface-flags
location: /home/phf/src/guix/tests/syscalls.scm:408
source:
+ (test-assert
+   "network-interface-flags"
+   (let* ((sock (socket AF_INET SOCK_STREAM 0))
+          (flags (network-interface-flags sock "lo")))
+     (close-port sock)
+     (and (not (zero? (logand flags IFF_LOOPBACK)))
+          (not (zero? (logand flags IFF_UP))))))
actual-value: #t
result: PASS

test-name: loopback-network-interface?
location: /home/phf/src/guix/tests/syscalls.scm:415
source:
+ (test-equal
+   "loopback-network-interface?"
+   ENODEV
+   (and (loopback-network-interface? "lo")
+        (catch 'system-error
+               (lambda ()
+                 (loopback-network-interface? "nonexistent")
+                 #f)
+               (lambda args (system-error-errno args)))))
expected-value: 19
actual-value: 19
result: PASS

test-name: loopback-network-interface-running?
location: /home/phf/src/guix/tests/syscalls.scm:425
source:
+ (test-equal
+   "loopback-network-interface-running?"
+   ENODEV
+   (and (network-interface-running? "lo")
+        (catch 'system-error
+               (lambda ()
+                 (network-interface-running? "nonexistent")
+                 #f)
+               (lambda args (system-error-errno args)))))
expected-value: 19
actual-value: 19
result: PASS

test-name: set-network-interface-flags
location: /home/phf/src/guix/tests/syscalls.scm:436
source:
+ (test-assert
+   "set-network-interface-flags"
+   (let ((sock (socket AF_INET SOCK_STREAM 0)))
+     (catch 'system-error
+            (lambda ()
+              (set-network-interface-flags sock "lo" IFF_UP))
+            (lambda args
+              (close-port sock)
+              (memv (system-error-errno args)
+                    (list EPERM EACCES))))))
actual-value: (1 13)
result: PASS

test-name: network-interface-address lo
location: /home/phf/src/guix/tests/syscalls.scm:446
source:
+ (test-equal
+   "network-interface-address lo"
+   (make-socket-address
+     AF_INET
+     (inet-pton AF_INET "127.0.0.1")
+     0)
+   (let* ((sock (socket AF_INET SOCK_STREAM 0))
+          (addr (network-interface-address sock "lo")))
+     (close-port sock)
+     addr))
expected-value: #(2 2130706433 0)
actual-value: #(2 2130706433 0)
result: PASS

test-name: set-network-interface-address
location: /home/phf/src/guix/tests/syscalls.scm:454
source:
+ (test-assert
+   "set-network-interface-address"
+   (let ((sock (socket AF_INET SOCK_STREAM 0)))
+     (catch 'system-error
+            (lambda ()
+              (set-network-interface-address
+                sock
+                "nonexistent"
+                (make-socket-address
+                  AF_INET
+                  (inet-pton AF_INET "127.12.14.15")
+                  0)))
+            (lambda args
+              (close-port sock)
+              (memv (system-error-errno args)
+                    (list EPERM EACCES))))))
actual-value: (1 13)
result: PASS

test-name: network-interface-netmask lo
location: /home/phf/src/guix/tests/syscalls.scm:468
source:
+ (test-equal
+   "network-interface-netmask lo"
+   (make-socket-address
+     AF_INET
+     (inet-pton AF_INET "255.0.0.0")
+     0)
+   (let* ((sock (socket AF_INET SOCK_STREAM 0))
+          (addr (network-interface-netmask sock "lo")))
+     (close-port sock)
+     addr))
expected-value: #(2 4278190080 0)
actual-value: #(2 4278190080 0)
result: PASS

test-name: set-network-interface-netmask
location: /home/phf/src/guix/tests/syscalls.scm:476
source:
+ (test-assert
+   "set-network-interface-netmask"
+   (let ((sock (socket AF_INET SOCK_STREAM 0)))
+     (catch 'system-error
+            (lambda ()
+              (set-network-interface-netmask
+                sock
+                "nonexistent"
+                (make-socket-address
+                  AF_INET
+                  (inet-pton AF_INET "255.0.0.0")
+                  0)))
+            (lambda args
+              (close-port sock)
+              (memv (system-error-errno args)
+                    (list EPERM EACCES))))))
actual-value: (1 13)
result: PASS

test-name: network-interfaces returns one or more interfaces
location: /home/phf/src/guix/tests/syscalls.scm:489
source:
+ (test-equal
+   "network-interfaces returns one or more interfaces"
+   '(#t #t #t)
+   (match (network-interfaces)
+          ((interfaces ..1)
+           (list (every interface? interfaces)
+                 (every string? (map interface-name interfaces))
+                 (every (lambda (sockaddr)
+                          (or (vector? sockaddr) (not sockaddr)))
+                        (map interface-address interfaces))))))
expected-value: (#t #t #t)
actual-value: (#t #t #t)
result: PASS

test-name: network-interfaces returns "lo"
location: /home/phf/src/guix/tests/syscalls.scm:501
source:
+ (test-equal
+   "network-interfaces returns \"lo\""
+   (list #t
+         (make-socket-address
+           AF_INET
+           (inet-pton AF_INET "127.0.0.1")
+           0))
+   (match (filter
+            (lambda (interface)
+              (string=? "lo" (interface-name interface)))
+            (network-interfaces))
+          ((loopbacks ..1)
+           (list (every (lambda (lo)
+                          (not (zero? (logand
+                                        IFF_LOOPBACK
+                                        (interface-flags lo)))))
+                        loopbacks)
+                 (match (find (lambda (lo)
+                                (= AF_INET
+                                   (sockaddr:fam (interface-address lo))))
+                              loopbacks)
+                        (#f #f)
+                        (lo (interface-address lo)))))))
expected-value: (#t #(2 2130706433 0))
actual-value: (#t #(2 2130706433 0))
result: PASS

test-name: add-network-route/gateway
location: /home/phf/src/guix/tests/syscalls.scm:517
source:
+ (test-assert
+   "add-network-route/gateway"
+   (let ((sock (socket AF_INET SOCK_STREAM 0))
+         (gateway
+           (make-socket-address
+             AF_INET
+             (inet-pton AF_INET "192.168.0.1")
+             0)))
+     (catch 'system-error
+            (lambda ()
+              (add-network-route/gateway sock gateway))
+            (lambda args
+              (close-port sock)
+              (memv (system-error-errno args)
+                    (list EPERM EACCES))))))
actual-value: (1 13)
result: PASS

test-name: delete-network-route
location: /home/phf/src/guix/tests/syscalls.scm:530
source:
+ (test-assert
+   "delete-network-route"
+   (let ((sock (socket AF_INET SOCK_STREAM 0))
+         (destination
+           (make-socket-address AF_INET INADDR_ANY 0)))
+     (catch 'system-error
+            (lambda ()
+              (delete-network-route sock destination))
+            (lambda args
+              (close-port sock)
+              (memv (system-error-errno args)
+                    (list EPERM EACCES))))))
actual-value: (1 13)
result: PASS

test-name: tcgetattr ENOTTY
location: /home/phf/src/guix/tests/syscalls.scm:540
source:
+ (test-equal
+   "tcgetattr ENOTTY"
+   ENOTTY
+   (catch 'system-error
+          (lambda ()
+            (call-with-input-file
+              "/dev/null"
+              (lambda (port) (tcgetattr (fileno port)))))
+          (compose system-error-errno list)))
expected-value: 25
actual-value: 25
result: PASS

test-name: tcgetattr
location: /home/phf/src/guix/tests/syscalls.scm:554
source:
+ (test-assert
+   "tcgetattr"
+   (let ((termios (tcgetattr 0)))
+     (and (termios? termios)
+          (> (termios-input-speed termios) 0)
+          (> (termios-output-speed termios) 0))))
actual-value: #t
result: PASS

test-name: tcsetattr
location: /home/phf/src/guix/tests/syscalls.scm:560
source:
+ (test-assert
+   "tcsetattr"
+   (let ((first (tcgetattr 0)))
+     (tcsetattr 0 (tcsetattr-action TCSANOW) first)
+     (equal? first (tcgetattr 0))))
actual-value: #t
result: PASS

test-name: terminal-window-size ENOTTY
location: /home/phf/src/guix/tests/syscalls.scm:565
source:
+ (test-assert
+   "terminal-window-size ENOTTY"
+   (call-with-input-file
+     "/dev/null"
+     (lambda (port)
+       (catch 'system-error
+              (lambda () (terminal-window-size port))
+              (lambda args
+                (memv (system-error-errno args)
+                      (list ENOTTY EINVAL)))))))
actual-value: (25 22)
result: PASS

test-name: terminal-columns
location: /home/phf/src/guix/tests/syscalls.scm:576
source:
+ (test-assert
+   "terminal-columns"
+   (> (terminal-columns) 0))
actual-value: #t
result: PASS

test-name: terminal-columns non-file port
location: /home/phf/src/guix/tests/syscalls.scm:579
source:
+ (test-assert
+   "terminal-columns non-file port"
+   (> (terminal-columns
+        (open-input-string
+          "Join us now, share the software!"))
+      0))
actual-value: #t
result: PASS

test-name: terminal-rows
location: /home/phf/src/guix/tests/syscalls.scm:583
source:
+ (test-assert
+   "terminal-rows"
+   (> (terminal-rows) 0))
actual-value: #t
result: PASS

test-name: openpty
location: /home/phf/src/guix/tests/syscalls.scm:586
source:
+ (test-assert
+   "openpty"
+   (let ((head inferior (openpty)))
+     (and (integer? head)
+          (integer? inferior)
+          (let ((port (fdopen inferior "r+0")))
+            (and (isatty? port)
+                 (begin (close-port port) (close-fdes head) #t))))))
actual-value: #t
result: PASS

test-name: openpty + login-tty
location: /home/phf/src/guix/tests/syscalls.scm:596
source:
+ (test-equal
+   "openpty + login-tty"
+   '(hello world)
+   (let ((head inferior (openpty)))
+     (match (primitive-fork)
+            (0
+             (dynamic-wind
+               (const #t)
+               (lambda ()
+                 (setvbuf (current-input-port) 'none)
+                 (close-fdes head)
+                 (login-tty inferior)
+                 (write (read))
+                 (read))
+               (lambda () (primitive-_exit 42))))
+            (pid (close-fdes inferior)
+                 (let ((head (fdopen head "r+0")))
+                   (write '(hello world) head)
+                   (let ((result (read head)))
+                     (close-port head)
+                     (waitpid pid)
+                     result))))))
expected-value: (hello world)
actual-value: (hello world)
result: PASS

test-name: utmpx-entries
location: /home/phf/src/guix/tests/syscalls.scm:620
source:
+ (test-assert
+   "utmpx-entries"
+   (match (utmpx-entries)
+          (((? utmpx? entries) ...)
+           (every (lambda (entry)
+                    (match (utmpx-user entry)
+                           ((? string?)
+                            (or (not (memv (utmpx-login-type entry)
+                                           (list (login-type INIT_PROCESS)
+                                                 (login-type LOGIN_PROCESS)
+                                                 (login-type USER_PROCESS))))
+                                (> (utmpx-pid entry) 0)))
+                           (#f #t)))
+                  entries))))
actual-value: #t
result: PASS

test-name: read-utmpx, EOF
location: /home/phf/src/guix/tests/syscalls.scm:637
source:
+ (test-assert
+   "read-utmpx, EOF"
+   (eof-object? (read-utmpx (%make-void-port "r"))))
actual-value: #t
result: PASS

test-name: read-utmpx
location: /home/phf/src/guix/tests/syscalls.scm:642
source:
+ (test-assert
+   "read-utmpx"
+   (let ((result
+           (call-with-input-file
+             "/var/run/utmpx"
+             read-utmpx)))
+     (or (utmpx? result) (eof-object? result))))
result: SKIP

test-name: add-to-entropy-count
location: /home/phf/src/guix/tests/syscalls.scm:648
source:
+ (test-equal
+   "add-to-entropy-count"
+   EPERM
+   (call-with-output-file
+     "/dev/urandom"
+     (lambda (port)
+       (catch 'system-error
+              (lambda () (add-to-entropy-count port 77) #f)
+              (lambda args (system-error-errno args))))))
expected-value: 1
actual-value: 1
result: PASS

warning: failed to delete /tmp/guix-directory.IJK6gL/??: No such file or directory
warning: failed to delete /tmp/guix-directory.IJK6gL/??: No such file or directory
warning: failed to delete /tmp/guix-directory.IJK6gL: Directory not empty

SKIP: tests/upstream
====================

test-name: coalesce-sources same version
location: /home/phf/src/guix/tests/upstream.scm:38
source:
+ (test-equal
+   "coalesce-sources same version"
+   (list (upstream-source
+           (package "foo")
+           (version "1")
+           (urls '("ftp://example.org/foo-1.tar.xz"
+                   "ftp://example.org/foo-1.tar.gz"))
+           (signature-urls
+             '("ftp://example.org/foo-1.tar.xz.sig"
+               "ftp://example.org/foo-1.tar.gz.sig"))))
+   (coalesce-sources
+     (list (upstream-source
+             (package "foo")
+             (version "1")
+             (urls '("ftp://example.org/foo-1.tar.gz"))
+             (signature-urls
+               '("ftp://example.org/foo-1.tar.gz.sig")))
+           (upstream-source
+             (package "foo")
+             (version "1")
+             (urls '("ftp://example.org/foo-1.tar.xz"))
+             (signature-urls
+               '("ftp://example.org/foo-1.tar.xz.sig"))))))
result: SKIP

test-name: changed-inputs returns no changes
location: /home/phf/src/guix/tests/upstream.scm:105
source:
+ (test-equal
+   "changed-inputs returns no changes"
+   '()
+   (changed-inputs test-package test-package-sexp))
expected-value: ()
actual-value: ()
result: PASS

test-name: changed-inputs returns changes to labelled input list
location: /home/phf/src/guix/tests/upstream.scm:109
source:
+ (test-assert
+   "changed-inputs returns changes to labelled input list"
+   (let ((changes
+           (changed-inputs
+             (package
+               (inherit test-package)
+               (inputs `(("hello" ,hello) ("sed" ,sed))))
+             test-package-sexp)))
+     (match changes
+            (((? upstream-input-change? item))
+             (and (equal?
+                    (upstream-input-change-type item)
+                    'regular)
+                  (equal?
+                    (upstream-input-change-action item)
+                    'remove)
+                  (string=?
+                    (upstream-input-change-name item)
+                    "sed")))
+            (else (pk else #f)))))
actual-value: #t
result: PASS

test-name: changed-inputs returns changes to all labelled input lists
location: /home/phf/src/guix/tests/upstream.scm:127
source:
+ (test-assert
+   "changed-inputs returns changes to all labelled input lists"
+   (let ((changes
+           (changed-inputs
+             (package
+               (inherit test-package)
+               (inputs '())
+               (native-inputs '())
+               (propagated-inputs '()))
+             test-package-sexp)))
+     (match changes
+            (((? upstream-input-change? items) ...)
+             (and (equal?
+                    (map upstream-input-change-type items)
+                    '(regular native native propagated))
+                  (equal?
+                    (map upstream-input-change-action items)
+                    '(add add add add))
+                  (equal?
+                    (map upstream-input-change-name items)
+                    '("hello" "sed" "tar" "grep"))))
+            (else (pk else #f)))))
actual-value: #t
result: PASS

test-name: changed-inputs returns changes to plain input list
location: /home/phf/src/guix/tests/upstream.scm:178
source:
+ (test-assert
+   "changed-inputs returns changes to plain input list"
+   (let ((changes
+           (changed-inputs
+             (package
+               (inherit test-new-package)
+               (inputs (list hello sed)))
+             test-new-package-sexp)))
+     (match changes
+            (((? upstream-input-change? item))
+             (and (equal?
+                    (upstream-input-change-type item)
+                    'regular)
+                  (equal?
+                    (upstream-input-change-action item)
+                    'remove)
+                  (string=?
+                    (upstream-input-change-name item)
+                    "sed")))
+            (else (pk else #f)))))
actual-value: #t
result: PASS

test-name: changed-inputs returns changes to all plain input lists
location: /home/phf/src/guix/tests/upstream.scm:195
source:
+ (test-assert
+   "changed-inputs returns changes to all plain input lists"
+   (let ((changes
+           (changed-inputs
+             (package
+               (inherit test-new-package)
+               (inputs '())
+               (native-inputs '())
+               (propagated-inputs '()))
+             test-new-package-sexp)))
+     (match changes
+            (((? upstream-input-change? items) ...)
+             (and (equal?
+                    (map upstream-input-change-type items)
+                    '(regular native native propagated))
+                  (equal?
+                    (map upstream-input-change-action items)
+                    '(add add add add))
+                  (equal?
+                    (map upstream-input-change-name items)
+                    '("hello" "sed" "tar" "grep"))))
+            (else (pk else #f)))))
actual-value: #t
result: PASS

;;; note: source file /home/phf/src/guix/gnu/packages/emacs-xyz.scm
;;;       newer than compiled /home/phf/src/guix/gnu/packages/emacs-xyz.go

RUN: tests/offload
==================

test-name: #f
location: /home/phf/src/guix/tests/offload.scm:55
source:
+ (test-assert
+   (machine-matches?
+     (deprecated-build-machine "i686-linux")
+     (build-requirements (system "i686-linux"))))
actual-value: #t
result: PASS

test-name: #f
location: /home/phf/src/guix/tests/offload.scm:60
source:
+ (test-assert
+   (machine-matches?
+     (new-build-machine '("i686-linux"))
+     (build-requirements (system "i686-linux"))))
actual-value: #t
result: PASS

test-name: #f
location: /home/phf/src/guix/tests/offload.scm:66
source:
+ (test-assert
+   (machine-matches?
+     (new-build-machine
+       '("armhf-linux"
+         "aarch64-linux"
+         "i686-linux"
+         "x86_64-linux"))
+     (build-requirements (system "armhf-linux"))))
actual-value: #t
result: PASS

/home/phf/src/guix/tests/offload.scm:41:2: warning: The 'system' field is deprecated, please use 'systems' instead.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#57039: `make check' yields two failed tests.
  2022-08-07 14:13 bug#57039: `make check' yields two failed tests Pierre-Henry Fröhring
@ 2022-08-09 13:50 ` Ludovic Courtès
  2022-08-09 14:44   ` Maxime Devos
  2022-08-09 14:50   ` Maxime Devos
  0 siblings, 2 replies; 5+ messages in thread
From: Ludovic Courtès @ 2022-08-09 13:50 UTC (permalink / raw)
  To: Pierre-Henry Fröhring; +Cc: 57039

Hi,

Pierre-Henry Fröhring <contact@phfrohring.com> skribis:

> test-name: channel-news, one entry
> location: /home/phf/src/guix/tests/channels.scm:323
> source:
> + (test-assert
> +   "channel-news, one entry"

[...]

> +                      (entry (tag "tag-for-first-news-entry")
> +                             (title (en "Old news.") (eo "Malnova?oj."))

The question mark here suggests you’re not running the tests with a
UTF-8 locale.

Could you add, say, ‘glibc-locales’ to your environment, ensure
GUIX_LOCPATH points to it, and set LC_ALL=en_US.UTF-8 (or similar)?

> ;;; (fail (package (name "python-foo") (version "1.0.0") (source (origin (method url-fetch) (uri (pypi-uri "foo" version)) (sha256 (base32 "03ygiww1c9fdgs998x4rqhxa73gq0r30rp0vq50q022wp1d6w0cz")))) (build-system python-build-system) (propagated-inputs (list python-wrong)) (home-page "http://example.com") (synopsis "summary") (description "summary") (license license:lgpl2.0)) #f)
> test-name: pypi->guix-package, wheels
> location: /home/phf/src/guix/tests/pypi.scm:276
> source:
> + (test-assert
> +   "pypi->guix-package, wheels"
> +   (mock ((guix import utils)
> +          url-fetch
> +          (lambda (url file-name)
> +            (match url
> +                   ("https://example.com/foo-1.0.0.tar.gz"
> +                    (begin
> +                      (mkdir-p "foo-1.0.0/foo.egg-info/")
> +                      (with-output-to-file
> +                        "foo-1.0.0/foo.egg-info/requires.txt"
> +                        (lambda ()
> +                          (display
> +                            "wrong data to make sure we're testing wheels ")))
> +                      (parameterize
> +                        ((current-output-port (%make-void-port "rw+")))
> +                        (system* "tar" "czvf" file-name "foo-1.0.0/"))
> +                      (delete-file-recursively "foo-1.0.0")
> +                      (set! test-source-hash
> +                        (call-with-input-file file-name port-sha256))))
> +                   ("https://example.com/foo-1.0.0-py2.py3-none-any.whl"
> +                    (begin
> +                      (mkdir "foo-1.0.0.dist-info")
> +                      (with-output-to-file
> +                        "foo-1.0.0.dist-info/METADATA"
> +                        (lambda () (display test-metadata)))
> +                      (let ((zip-file (string-append file-name ".zip")))
> +                        (system*
> +                          "zip"
> +                          "-q"
> +                          zip-file
> +                          "foo-1.0.0.dist-info/METADATA")
> +                        (rename-file zip-file file-name))
> +                      (delete-file-recursively "foo-1.0.0.dist-info")))
> +                   (_ (error "Unexpected URL: " url)))))
> +         (mock ((guix http-client)
> +                http-fetch
> +                (lambda (url . rest)
> +                  (match url
> +                         ("https://pypi.org/pypi/foo/json"
> +                          (values
> +                            (open-input-string test-json-1)
> +                            (string-length test-json-1)))
> +                         ("https://example.com/foo-1.0.0-py2.py3-none-any.whl"
> +                          #f)
> +                         (_ (error "Unexpected URL: " url)))))
> +               (invalidate-memoization! pypi->guix-package)
> +               (match (pypi->guix-package "foo")
> +                      (('package
> +                        ('name "python-foo")
> +                        ('version "1.0.0")
> +                        ('source
> +                         ('origin
> +                          ('method 'url-fetch)
> +                          ('uri ('pypi-uri "foo" 'version))
> +                          ('sha256 ('base32 (? string? hash)))))
> +                        ('build-system 'python-build-system)
> +                        ('propagated-inputs
> +                         ('list 'python-bar 'python-baz))
> +                        ('native-inputs ('list 'python-pytest))
> +                        ('home-page "http://example.com")
> +                        ('synopsis "summary")
> +                        ('description "summary")
> +                        ('license 'license:lgpl2.0))
> +                       (string=?
> +                         (bytevector->nix-base32-string test-source-hash)
> +                         hash))
> +                      (x (pk 'fail x #f))))))
> actual-value: #f
> result: FAIL

Not sure about that one.  Does it still occur on current ‘master’?

See
<https://guix.gnu.org/manual/devel/en/html_node/Running-the-Test-Suite.html>
on how to run only tests from ‘tests/pypi.scm’.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#57039: `make check' yields two failed tests.
  2022-08-09 13:50 ` Ludovic Courtès
@ 2022-08-09 14:44   ` Maxime Devos
  2022-08-09 16:01     ` Ludovic Courtès
  2022-08-09 14:50   ` Maxime Devos
  1 sibling, 1 reply; 5+ messages in thread
From: Maxime Devos @ 2022-08-09 14:44 UTC (permalink / raw)
  To: Ludovic Courtès, Pierre-Henry Fröhring; +Cc: 57039


[-- Attachment #1.1.1.1: Type: text/plain, Size: 997 bytes --]


On 09-08-2022 15:50, Ludovic Courtès wrote:
>> +                      (entry (tag "tag-for-first-news-entry")
>> +                             (title (en "Old news.") (eo "Malnova?oj."))
> The question mark here suggests you’re not running the tests with a
> UTF-8 locale.
>
> Could you add, say, ‘glibc-locales’ to your environment, ensure
> GUIX_LOCPATH points to it, and set LC_ALL=en_US.UTF-8 (or similar)?
>
Two comments:

If tests require an UTF-8 locale, I think the tests (maybe in 
build-aux/test-driver.scm?) should check that an UTF-8 that an UTF-8 
locale is actually in use and otherwise bail out properly.

It's not a file-name but rather the contents of the news file, so I 
would think we are just forgetting to pass some arguments like 
#:encoding "UTF-8" -- making the interpretation of the news file depend 
on the current locale doesn't seem good to me (it's encoding on stdout 
with "guix pull --news" is another matter).

Greetings,
Maxime.


[-- Attachment #1.1.1.2: Type: text/html, Size: 1536 bytes --]

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#57039: `make check' yields two failed tests.
  2022-08-09 13:50 ` Ludovic Courtès
  2022-08-09 14:44   ` Maxime Devos
@ 2022-08-09 14:50   ` Maxime Devos
  1 sibling, 0 replies; 5+ messages in thread
From: Maxime Devos @ 2022-08-09 14:50 UTC (permalink / raw)
  To: Ludovic Courtès, Pierre-Henry Fröhring; +Cc: 57039


[-- Attachment #1.1.1: Type: text/plain, Size: 1028 bytes --]

On 09-08-2022 15:50, Ludovic Courtès wrote:

> ;;; (fail (package (name "python-foo") (version "1.0.0") (source (origin (method url-fetch) (uri (pypi-uri "foo" version)) (sha256 (base32 "03ygiww1c9fdgs998x4rqhxa73gq0r30rp0vq50q022wp1d6w0cz")))) (build-system python-build-system) (propagated-inputs (list python-wrong)) (home-page"http://example.com") (synopsis "summary") (description "summary") (license license:lgpl2.0)) #f)
> test-name: pypi->guix-package, wheels
> location: /home/phf/src/guix/tests/pypi.scm:276
> source:
> + (test-assert

I think I've seen this one fail before in the past, but 
non-deterministically, IIRC

> Not sure about that one.  Does it still occur on current ‘master’?

It's a recent bug number and the submitter wrote they did "git checkout 
..." and "git pull", so it looks like this happened on a current 
master.  Looking at git.savannah.gnu.org there haven't been changes in 
this area, so I would think it's still effectively current master.

Greetings,
Maxime.


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#57039: `make check' yields two failed tests.
  2022-08-09 14:44   ` Maxime Devos
@ 2022-08-09 16:01     ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2022-08-09 16:01 UTC (permalink / raw)
  To: Maxime Devos; +Cc: Pierre-Henry Fröhring, 57039

Maxime Devos <maximedevos@telenet.be> skribis:

> On 09-08-2022 15:50, Ludovic Courtès wrote:
>>> +                      (entry (tag "tag-for-first-news-entry")
>>> +                             (title (en "Old news.") (eo "Malnova?oj."))
>> The question mark here suggests you’re not running the tests with a
>> UTF-8 locale.
>>
>> Could you add, say, ‘glibc-locales’ to your environment, ensure
>> GUIX_LOCPATH points to it, and set LC_ALL=en_US.UTF-8 (or similar)?
>>
> Two comments:
>
> If tests require an UTF-8 locale, I think the tests (maybe in
> build-aux/test-driver.scm?) should check that an UTF-8 that an UTF-8
> locale is actually in use and otherwise bail out properly.
>
> It's not a file-name but rather the contents of the news file, so I
> would think we are just forgetting to pass some arguments like
> #:encoding "UTF-8" -- making the interpretation of the news file
> depend on the current locale doesn't seem good to me (it's encoding on
> stdout with "guix pull --news" is another matter).

Agreed, I came to the same conclusion:

  60e0aae89c channels: Consider news files as UTF-8-encoded by default.
  e1b8bace8c tests: git: Write files as UTF-8.

Should have done that long ago!

Ludo’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-09 16:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-07 14:13 bug#57039: `make check' yields two failed tests Pierre-Henry Fröhring
2022-08-09 13:50 ` Ludovic Courtès
2022-08-09 14:44   ` Maxime Devos
2022-08-09 16:01     ` Ludovic Courtès
2022-08-09 14:50   ` Maxime Devos

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).