unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Alberto EFG <albertoefg@posteo.mx>
To: 50512@debbugs.gnu.org
Subject: bug#50512: Update on errors
Date: Fri, 10 Sep 2021 22:19:39 +0000	[thread overview]
Message-ID: <87czpg842t.fsf@posteo.mx> (raw)
In-Reply-To: <87sfycjr79.fsf@posteo.mx>

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

I did a Guix pull and 1 Failure was solved 

I attach the test-suite.log


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

==================================================
   GNU Guix 1.3.0.5558-63cc4d: ./test-suite.log
==================================================

# TOTAL: 1963
# PASS:  1941
# SKIP:  18
# XFAIL: 2
# 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/alberto/user/documents/guix/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/alberto/user/documents/guix/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/alberto/user/documents/guix/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/alberto/user/documents/guix/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/alberto/user/documents/guix/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/alberto/user/documents/guix/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/alberto/user/documents/guix/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/alberto/user/documents/guix/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: ((line . 261) (column . 19) (filename . "guix/channels.scm"))> commit: "abcde1234" checkout: "/home/alberto/user/documents/guix/guix/test-tmp/store/wqwfldy7mikn9wax7gs52vljw3gqz0zg-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.oP04aw/.git/
[master (root-commit) 6ea73bd] first commit
 1 file changed, 1 insertion(+)
 create mode 100644 a.txt
[master 1d5ed14] second commit
 1 file changed, 1 insertion(+)
 create mode 100644 b.scm
test-name: latest-channel-instances #:validate-pull
location: /home/alberto/user/documents/guix/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/alberto/user/documents/guix/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.5D96mt/.git/
[master (root-commit) ccbe324] the commit
 1 file changed, 1 insertion(+)
 create mode 100644 a.txt
test-name: channel-news, no news
location: /home/alberto/user/documents/guix/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.yFWc8v/.git/
[master (root-commit) 93ea0ed] first commit
 1 file changed, 1 insertion(+)
 create mode 100644 .guix-channel
[master 640c567] second commit
 1 file changed, 1 insertion(+)
 create mode 100644 src/a.txt
[master 576015c] third commit
 1 file changed, 1 insertion(+)
 create mode 100644 news.scm
[master 6bcaf34] fourth commit
 1 file changed, 1 insertion(+)
 create mode 100644 src/b.txt
[master 8ba89e6] fifth commit
 1 file changed, 1 insertion(+), 1 deletion(-)
test-name: channel-news, one entry
location: /home/alberto/user/documents/guix/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.a1CVNu/.git/
[master (root-commit) fe3aee6] first commit
 1 file changed, 1 insertion(+)
 create mode 100644 a.txt
[master 69ad081] second commit
 1 file changed, 1 insertion(+)
 create mode 100644 b.scm
test-name: latest-channel-instances, missing introduction for 'guix'
location: /home/alberto/user/documents/guix/guix/tests/channels.scm:411
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

test-name: authenticate-channel, wrong first commit signer
location: /home/alberto/user/documents/guix/guix/tests/channels.scm:432
source:
+ (test-equal
+   "authenticate-channel, wrong first commit signer"
+   #t
+   (with-fresh-gnupg-setup
+     (list %ed25519-public-key-file
+           %ed25519-secret-key-file
+           %ed25519bis-public-key-file
+           %ed25519bis-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
+                             %ed25519bis-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
+                                     %ed25519bis-public-key-file))))))
+                  (authenticate-channel
+                    channel
+                    directory
+                    (commit-id-string commit2)
+                    #:keyring-reference-prefix
+                    "")
+                  'failed))))))
result: SKIP

test-name: authenticate-channel, .guix-authorizations
location: /home/alberto/user/documents/guix/guix/tests/channels.scm:482
source:
+ (test-equal
+   "authenticate-channel, .guix-authorizations"
+   #t
+   (with-fresh-gnupg-setup
+     (list %ed25519-public-key-file
+           %ed25519-secret-key-file
+           %ed25519bis-public-key-file
+           %ed25519bis-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 %ed25519bis-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
+                 %ed25519bis-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
+                                      %ed25519bis-public-key-file))))))
+                       (authenticate-channel
+                         channel
+                         directory
+                         (commit-id-string commit3)
+                         #:keyring-reference-prefix
+                         "")
+                       'failed)))))))
result: SKIP

test-name: latest-channel-instances, authenticate dependency
location: /home/alberto/user/documents/guix/guix/tests/channels.scm:551
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)))))))))
result: SKIP

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.oP04aw'...
Updating channel 'guix' from Git repository at 'file:///tmp/guix-directory.a1CVNu'...

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

test-name: file->cpio-header + write-cpio-header + read-cpio-header
location: /home/alberto/user/documents/guix/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/alberto/user/documents/guix/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/alberto/user/documents/guix/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/alberto/user/documents/guix/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/alberto/user/documents/guix/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/alberto/user/documents/guix/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/alberto/user/documents/guix/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/alberto/user/documents/guix/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/alberto/user/documents/guix/guix/tests/crate.scm:574
source:
+ (test-equal
+   "licenses: MIT/Apache-2.0 AND BSD-2-Clause"
+   '(license:expat license:asl2.0 unknown-license!)
+   (string->license
+     "MIT/Apache-2.0 AND BSD-2-Clause"))
expected-value: (license:expat license:asl2.0 unknown-license!)
actual-value: (license:expat license:asl2.0 unknown-license!)
result: PASS

test-name: licenses: MIT/Apache-2.0
location: /home/alberto/user/documents/guix/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/alberto/user/documents/guix/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/alberto/user/documents/guix/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/gexp
================

test-name: no references
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:93
source:
+ (test-equal
+   "no references"
+   '(display "hello gexp->approximate-sexp!")
+   (gexp->approximate-sexp
+     (gexp (display "hello gexp->approximate-sexp!"))))
expected-value: (display "hello gexp->approximate-sexp!")
actual-value: (display "hello gexp->approximate-sexp!")
result: PASS

test-name: unquoted gexp
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:97
source:
+ (test-equal
+   "unquoted gexp"
+   '(display "hello")
+   (let ((inside (gexp "hello")))
+     (gexp->approximate-sexp
+       (gexp (display (ungexp inside))))))
expected-value: (display "hello")
actual-value: (display "hello")
result: PASS

test-name: unquoted gexp (native)
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:102
source:
+ (test-equal
+   "unquoted gexp (native)"
+   '(display "hello")
+   (let ((inside (gexp "hello")))
+     (gexp->approximate-sexp
+       (gexp (display (ungexp-native inside))))))
expected-value: (display "hello")
actual-value: (display "hello")
result: PASS

test-name: spliced gexp
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:107
source:
+ (test-equal
+   "spliced gexp"
+   '(display '(fresh vegetables))
+   (let ((inside (gexp (fresh vegetables))))
+     (gexp->approximate-sexp
+       (gexp (display '((ungexp-splicing inside)))))))
expected-value: (display (quote (fresh vegetables)))
actual-value: (display (quote (fresh vegetables)))
result: PASS

test-name: unspliced gexp, approximated
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:112
source:
+ (test-equal
+   "unspliced gexp, approximated"
+   '(display '(*approximate*))
+   (let ((inside (file-append coreutils "/bin/hello")))
+     (gexp->approximate-sexp
+       (gexp (display '((ungexp-splicing inside)))))))
expected-value: (display (quote (*approximate*)))
actual-value: (display (quote (*approximate*)))
result: PASS

test-name: unquoted gexp, approximated
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:118
source:
+ (test-equal
+   "unquoted gexp, approximated"
+   '(display '(*approximate*))
+   (let ((inside (file-append coreutils "/bin/hello")))
+     (gexp->approximate-sexp
+       (gexp (display '(ungexp inside))))))
expected-value: (display (quote (*approximate*)))
actual-value: (display (quote (*approximate*)))
result: PASS

test-name: no refs
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:123
source:
+ (test-equal
+   "no refs"
+   '(display "hello!")
+   (let ((exp (gexp (display "hello!"))))
+     (and (gexp? exp)
+          (null? (gexp-inputs exp))
+          (gexp->sexp* exp))))
expected-value: (display "hello!")
actual-value: (display "hello!")
result: PASS

test-name: unquote
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:130
source:
+ (test-equal
+   "unquote"
+   '(display `(foo ,(+ 2 3)))
+   (let ((exp (gexp (display `(foo ,(+ 2 3))))))
+     (and (gexp? exp)
+          (null? (gexp-inputs exp))
+          (gexp->sexp* exp))))
expected-value: (display (quasiquote (foo (unquote (+ 2 3)))))
actual-value: (display (quasiquote (foo (unquote (+ 2 3)))))
result: PASS

test-name: one input package
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:137
source:
+ (test-assert
+   "one input package"
+   (let ((exp (gexp (display (ungexp coreutils)))))
+     (and (gexp? exp)
+          (match (gexp-inputs exp)
+                 ((input)
+                  (eq? (gexp-input-thing input) coreutils)))
+          (equal?
+            `(display
+               ,(derivation->output-path
+                  (package-derivation %store coreutils)))
+            (gexp->sexp* exp)))))
actual-value: #t
result: PASS

test-name: one input package, dotted list
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:147
source:
+ (test-assert
+   "one input package, dotted list"
+   (let ((exp (gexp (coreutils ungexp coreutils))))
+     (and (gexp? exp)
+          (match (gexp-inputs exp)
+                 ((input)
+                  (eq? (gexp-input-thing input) coreutils)))
+          (equal?
+            `(coreutils
+               unquote
+               (derivation->output-path
+                 (package-derivation %store coreutils)))
+            (gexp->sexp* exp)))))
actual-value: #t
result: PASS

test-name: one input origin
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:157
source:
+ (test-assert
+   "one input origin"
+   (let ((exp (gexp (display (ungexp (package-source coreutils))))))
+     (and (gexp? exp)
+          (match (gexp-inputs exp)
+                 ((input)
+                  (and (eq? (gexp-input-thing input)
+                            (package-source coreutils))
+                       (string=? (gexp-input-output input) "out"))))
+          (equal?
+            `(display
+               ,(derivation->output-path
+                  (package-source-derivation
+                    %store
+                    (package-source coreutils))))
+            (gexp->sexp* exp)))))
actual-value: #t
result: PASS

test-name: one local file
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:169
source:
+ (test-assert
+   "one local file"
+   (let* ((file (search-path %load-path "guix.scm"))
+          (local (local-file file))
+          (exp (gexp (display (ungexp local))))
+          (intd (add-to-store
+                  %store
+                  (basename file)
+                  #f
+                  "sha256"
+                  file)))
+     (and (gexp? exp)
+          (match (gexp-inputs exp)
+                 ((input)
+                  (and (eq? (gexp-input-thing input) local)
+                       (string=? (gexp-input-output input) "out"))))
+          (equal? `(display ,intd) (gexp->sexp* exp)))))
actual-value: #t
result: PASS

test-name: one local file, symlink
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:182
source:
+ (test-assert
+   "one local file, symlink"
+   (let ((file (search-path %load-path "guix.scm"))
+         (link (tmpnam)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (symlink (canonicalize-path file) link)
+         (let* ((local (local-file link "my-file" #:recursive? #f))
+                (exp (gexp (display (ungexp local))))
+                (intd (add-to-store %store "my-file" #f "sha256" file)))
+           (and (gexp? exp)
+                (match (gexp-inputs exp)
+                       ((input)
+                        (and (eq? (gexp-input-thing input) local)
+                             (string=? (gexp-input-output input) "out"))))
+                (equal? `(display ,intd) (gexp->sexp* exp)))))
+       (lambda ()
+         (false-if-exception (delete-file link))))))
actual-value: #t
result: PASS

test-name: local-file, relative file name
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:202
source:
+ (test-equal
+   "local-file, relative file name"
+   (canonicalize-path
+     (search-path %load-path "guix/base32.scm"))
+   (let ((directory
+           (dirname
+             (search-path
+               %load-path
+               "guix/build-system/gnu.scm"))))
+     (with-directory-excursion
+       directory
+       (let ((file (local-file "../guix/base32.scm")))
+         (local-file-absolute-file-name file)))))
expected-value: "/home/alberto/user/documents/guix/guix/guix/base32.scm"
actual-value: "/home/alberto/user/documents/guix/guix/guix/base32.scm"
result: PASS

test-name: local-file, non-literal relative file name
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:210
source:
+ (test-equal
+   "local-file, non-literal relative file name"
+   (canonicalize-path
+     (search-path %load-path "guix/base32.scm"))
+   (let ((directory
+           (dirname
+             (search-path
+               %load-path
+               "guix/build-system/gnu.scm"))))
+     (with-directory-excursion
+       directory
+       (let ((file (local-file (string-copy "../base32.scm"))))
+         (local-file-absolute-file-name file)))))
expected-value: "/home/alberto/user/documents/guix/guix/guix/base32.scm"
actual-value: "/home/alberto/user/documents/guix/guix/guix/base32.scm"
result: PASS

test-name: local-file, #:select?
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:218
source:
+ (test-assert
+   "local-file, #:select?"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((select?
+                     ->
+                     (lambda (file stat)
+                       (member
+                         (basename file)
+                         '("guix.scm" "tests" "gexp.scm"))))
+                   (file ->
+                         (local-file
+                           ".."
+                           "directory"
+                           #:recursive?
+                           #t
+                           #:select?
+                           select?))
+                   (dir (lower-object file)))
+                  (return
+                    (and (store-path? dir)
+                         (equal?
+                           (scandir dir)
+                           '("." ".." "guix.scm" "tests"))
+                         (equal?
+                           (scandir (string-append dir "/tests"))
+                           '("." ".." "gexp.scm")))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: one plain file
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:233
source:
+ (test-assert
+   "one plain file"
+   (let* ((file (plain-file "hi" "Hello, world!"))
+          (exp (gexp (display (ungexp file))))
+          (expected
+            (add-text-to-store %store "hi" "Hello, world!")))
+     (and (gexp? exp)
+          (match (gexp-inputs exp)
+                 ((input)
+                  (and (eq? (gexp-input-thing input) file)
+                       (string=? (gexp-input-output input) "out"))))
+          (equal? `(display ,expected) (gexp->sexp* exp)))))
actual-value: #t
result: PASS

test-name: same input twice
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:244
source:
+ (test-assert
+   "same input twice"
+   (let ((exp (gexp (begin
+                      (display (ungexp coreutils))
+                      (display (ungexp coreutils))))))
+     (and (gexp? exp)
+          (match (gexp-inputs exp)
+                 ((input)
+                  (and (eq? (gexp-input-thing input) coreutils)
+                       (string=? (gexp-input-output input) "out"))))
+          (let ((e `(display
+                      ,(derivation->output-path
+                         (package-derivation %store coreutils)))))
+            (equal? `(begin ,e ,e) (gexp->sexp* exp))))))
actual-value: #t
result: PASS

test-name: two input packages, one derivation, one file
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:257
source:
+ (test-assert
+   "two input packages, one derivation, one file"
+   (let* ((drv (build-expression->derivation
+                 %store
+                 "foo"
+                 'bar
+                 #:guile-for-build
+                 (package-derivation %store %bootstrap-guile)))
+          (txt (add-text-to-store %store "foo" "Hello, world!"))
+          (exp (gexp (begin
+                       (display (ungexp coreutils))
+                       (display (ungexp %bootstrap-guile))
+                       (display (ungexp drv))
+                       (display (ungexp txt))))))
+     (define (match-input thing)
+       (lambda (input)
+         (eq? (gexp-input-thing input) thing)))
+     (and (gexp? exp)
+          (= 4 (length (gexp-inputs exp)))
+          (every (lambda (input)
+                   (find (match-input input) (gexp-inputs exp)))
+                 (list drv coreutils %bootstrap-guile txt))
+          (let ((e0 `(display
+                       ,(derivation->output-path
+                          (package-derivation %store coreutils))))
+                (e1 `(display
+                       ,(derivation->output-path
+                          (package-derivation %store %bootstrap-guile))))
+                (e2 `(display ,(derivation->output-path drv)))
+                (e3 `(display ,txt)))
+            (equal?
+              `(begin ,e0 ,e1 ,e2 ,e3)
+              (gexp->sexp* exp))))))
actual-value: #t
result: PASS

test-name: file-append
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:284
source:
+ (test-assert
+   "file-append"
+   (let* ((drv (package-derivation %store %bootstrap-guile))
+          (fa (file-append %bootstrap-guile "/bin/guile"))
+          (exp (gexp (here we go (ungexp fa)))))
+     (and (match (gexp->sexp* exp)
+                 (('here 'we 'go (? string? result))
+                  (string=?
+                    result
+                    (string-append
+                      (derivation->output-path drv)
+                      "/bin/guile"))))
+          (match (gexp-inputs exp)
+                 ((input)
+                  (and (eq? (gexp-input-thing input) fa)
+                       (string=? (gexp-input-output input) "out")))))))
actual-value: #t
result: PASS

test-name: file-append, output
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:298
source:
+ (test-assert
+   "file-append, output"
+   (let* ((drv (package-derivation %store glibc))
+          (fa (file-append glibc "/lib" "/debug"))
+          (exp (gexp (foo (ungexp fa "debug")))))
+     (and (match (gexp->sexp* exp)
+                 (('foo (? string? result))
+                  (string=?
+                    result
+                    (string-append
+                      (derivation->output-path drv "debug")
+                      "/lib/debug"))))
+          (match (gexp-inputs exp)
+                 ((input)
+                  (and (eq? (gexp-input-thing input) fa)
+                       (string=? (gexp-input-output input) "debug")))))))
actual-value: #t
result: PASS

test-name: file-append, nested
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:312
source:
+ (test-assert
+   "file-append, nested"
+   (let* ((drv (package-derivation %store glibc))
+          (dir (file-append glibc "/bin"))
+          (slash (file-append dir "/"))
+          (file (file-append slash "getent"))
+          (exp (gexp (foo (ungexp file)))))
+     (and (match (gexp->sexp* exp)
+                 (('foo (? string? result))
+                  (string=?
+                    result
+                    (string-append
+                      (derivation->output-path drv)
+                      "/bin/getent"))))
+          (match (gexp-inputs exp)
+                 ((input) (eq? (gexp-input-thing input) file))))))
actual-value: #t
result: PASS

test-name: file-append, raw store item
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:327
source:
+ (test-assert
+   "file-append, raw store item"
+   (let* ((obj (plain-file "example.txt" "Hello!"))
+          (a (file-append obj "/a"))
+          (b (file-append a "/b"))
+          (c (file-append b "/c"))
+          (exp (gexp (list (ungexp c))))
+          (item (run-with-store %store (lower-object obj)))
+          (lexp (run-with-store %store (lower-gexp exp))))
+     (and (equal?
+            (lowered-gexp-sexp lexp)
+            `(list ,(string-append item "/a/b/c")))
+          (equal? (lowered-gexp-sources lexp) (list item))
+          (null? (lowered-gexp-inputs lexp)))))
actual-value: #t
result: PASS

test-name: with-parameters for %current-system
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:341
source:
+ (test-assert
+   "with-parameters for %current-system"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((system
+                     ->
+                     (match (%current-system)
+                            ("aarch64-linux" "x86_64-linux")
+                            (_ "aarch64-linux")))
+                   (drv (package->derivation coreutils system))
+                   (obj ->
+                        (with-parameters
+                          ((%current-system system))
+                          coreutils))
+                   (result (lower-object obj)))
+                  (return
+                    (string=?
+                      (derivation-file-name drv)
+                      (derivation-file-name result))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: with-parameters for %current-target-system
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:352
source:
+ (test-assert
+   "with-parameters for %current-target-system"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((target -> "riscv64-linux-gnu")
+                   (drv (package->cross-derivation coreutils target))
+                   (obj ->
+                        (with-parameters
+                          ((%current-target-system target))
+                          coreutils))
+                   (result (lower-object obj)))
+                  (return
+                    (string=?
+                      (derivation-file-name drv)
+                      (derivation-file-name result))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: with-parameters + file-append
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:362
source:
+ (test-assert
+   "with-parameters + file-append"
+   (let* ((system
+            (match (%current-system)
+                   ("aarch64-linux" "x86_64-linux")
+                   (_ "aarch64-linux")))
+          (drv (package-derivation %store coreutils system))
+          (param (make-parameter 7))
+          (exp (gexp (here we
+                           go
+                           (ungexp
+                             (with-parameters
+                               ((%current-system system) (param 42))
+                               (if (= (param) 42)
+                                 (file-append coreutils "/bin/touch")
+                                 %bootstrap-guile)))))))
+     (match (gexp->sexp* exp)
+            (('here 'we 'go (? string? result))
+             (string=?
+               result
+               (string-append
+                 (derivation->output-path drv)
+                 "/bin/touch"))))))
actual-value: #t
result: PASS

test-name: let-system
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:378
source:
+ (test-equal
+   "let-system"
+   (list `(begin ,(%current-system) #t)
+         '(system-binding)
+         'low
+         '()
+         '())
+   (let* ((exp (gexp (begin (ungexp (let-system system system)) #t)))
+          (low (run-with-store %store (lower-gexp exp))))
+     (list (lowered-gexp-sexp low)
+           (match (gexp-inputs exp)
+                  ((input)
+                   (and (eq? (struct-vtable (gexp-input-thing input))
+                             (@@ (guix gexp) <system-binding>))
+                        (string=? (gexp-input-output input) "out")
+                        '(system-binding)))
+                  (x x))
+           'low
+           (lowered-gexp-inputs low)
+           (lowered-gexp-sources low))))
expected-value: ((begin "x86_64-linux" #t) (system-binding) low () ())
actual-value: ((begin "x86_64-linux" #t) (system-binding) low () ())
result: PASS

test-name: let-system, target
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:397
source:
+ (test-equal
+   "let-system, target"
+   (list `(list ,(%current-system) #f)
+         `(list ,(%current-system) "aarch64-linux-gnu"))
+   (let ((exp (gexp (list (ungexp-splicing
+                            (let-system
+                              (system target)
+                              (list system target)))))))
+     (list (gexp->sexp* exp)
+           (gexp->sexp* exp "aarch64-linux-gnu"))))
expected-value: ((list "x86_64-linux" #f) (list "x86_64-linux" "aarch64-linux-gnu"))
actual-value: ((list "x86_64-linux" #f) (list "x86_64-linux" "aarch64-linux-gnu"))
result: PASS

test-name: let-system, ungexp-native, target
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:405
source:
+ (test-equal
+   "let-system, ungexp-native, target"
+   `(here it is: ,(%current-system) #f)
+   (let ((exp (gexp (here it
+                          is:
+                          (ungexp-native-splicing
+                            (let-system
+                              (system target)
+                              (list system target)))))))
+     (gexp->sexp* exp "aarch64-linux-gnu")))
expected-value: (here it is: "x86_64-linux" #f)
actual-value: (here it is: "x86_64-linux" #f)
result: PASS

test-name: let-system, nested
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:411
source:
+ (test-equal
+   "let-system, nested"
+   (list `(system*
+            ,(string-append "qemu-system-" (%current-system))
+            "-m"
+            "256")
+         '(system-binding))
+   (let ((exp (gexp (system*
+                      (ungexp-native
+                        (let-system
+                          (system target)
+                          (file-append
+                            (@@ (gnu packages virtualization) qemu)
+                            "/bin/qemu-system-"
+                            system)))
+                      "-m"
+                      "256"))))
+     (list (match (gexp->sexp* exp)
+                  (('system* command rest ...)
+                   `(system*
+                      ,(and (string-prefix? (%store-prefix) command)
+                            (basename command))
+                      ,@rest))
+                  (x x))
+           (match (gexp-inputs exp)
+                  ((input)
+                   (and (eq? (struct-vtable (gexp-input-thing input))
+                             (@@ (guix gexp) <system-binding>))
+                        (string=? (gexp-input-output input) "out")
+                        (gexp-input-native? input)
+                        '(system-binding)))
+                  (x x)))))
expected-value: ((system* "qemu-system-x86_64-linux" "-m" "256") (system-binding))
actual-value: ((system* "qemu-system-x86_64-linux" "-m" "256") (system-binding))
result: PASS

test-name: ungexp + ungexp-native
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:437
source:
+ (test-assert
+   "ungexp + ungexp-native"
+   (let* ((exp (gexp (list (ungexp-native %bootstrap-guile)
+                           (ungexp coreutils)
+                           (ungexp-native glibc)
+                           (ungexp binutils))))
+          (target "mips64el-linux")
+          (guile (derivation->output-path
+                   (package-derivation %store %bootstrap-guile)))
+          (cu (derivation->output-path
+                (package-cross-derivation
+                  %store
+                  coreutils
+                  target)))
+          (libc (derivation->output-path
+                  (package-derivation %store glibc)))
+          (bu (derivation->output-path
+                (package-cross-derivation %store binutils target))))
+     (and (lset= equal?
+                 `((,%bootstrap-guile "out" #t)
+                   (,coreutils "out" #f)
+                   (,glibc "out" #t)
+                   (,binutils "out" #f))
+                 (map gexp-input->tuple (gexp-inputs exp)))
+          (equal?
+            `(list ,guile ,cu ,libc ,bu)
+            (gexp->sexp* exp target)))))
actual-value: #t
result: PASS

test-name: ungexp + ungexp-native, nested
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:460
source:
+ (test-equal
+   "ungexp + ungexp-native, nested"
+   `((,%bootstrap-guile "out" #f)
+     (,coreutils "out" #t))
+   (let* ((exp (gexp (list (ungexp-native (gexp (ungexp coreutils)))
+                           (ungexp %bootstrap-guile)))))
+     (map gexp-input->tuple (gexp-inputs exp))))
expected-value: ((#<package guile-bootstrap@2.0 gnu/packages/bootstrap.scm:478 7fc6f7776f00> "out" #f) (#<package coreutils@8.32 gnu/packages/base.scm:328 7fc6ef0c55a0> "out" #t))
actual-value: ((#<package guile-bootstrap@2.0 gnu/packages/bootstrap.scm:478 7fc6f7776f00> "out" #f) (#<package coreutils@8.32 gnu/packages/base.scm:328 7fc6ef0c55a0> "out" #t))
result: PASS

test-name: ungexp + ungexp-native, nested, special mixture
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:466
source:
+ (test-equal
+   "ungexp + ungexp-native, nested, special mixture"
+   `((,coreutils "out" #t))
+   (let* ((foo (gexp (foo (ungexp-native coreutils))))
+          (exp (gexp (bar (ungexp foo)))))
+     (map gexp-input->tuple (gexp-inputs exp))))
expected-value: ((#<package coreutils@8.32 gnu/packages/base.scm:328 7fc6ef0c55a0> "out" #t))
actual-value: ((#<package coreutils@8.32 gnu/packages/base.scm:328 7fc6ef0c55a0> "out" #t))
result: PASS

test-name: input list
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:473
source:
+ (test-assert
+   "input list"
+   (let ((exp (gexp (display
+                      '(ungexp (list %bootstrap-guile coreutils)))))
+         (guile (derivation->output-path
+                  (package-derivation %store %bootstrap-guile)))
+         (cu (derivation->output-path
+               (package-derivation %store coreutils))))
+     (and (lset= equal?
+                 `((,%bootstrap-guile "out" #f)
+                   (,coreutils "out" #f))
+                 (map gexp-input->tuple (gexp-inputs exp)))
+          (equal?
+            `(display '(,guile ,cu))
+            (gexp->sexp* exp)))))
actual-value: #t
result: PASS

test-name: input list + ungexp-native
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:486
source:
+ (test-assert
+   "input list + ungexp-native"
+   (let* ((target "mips64el-linux")
+          (exp (gexp (display
+                       (cons '(ungexp-native
+                                (list %bootstrap-guile coreutils))
+                             '(ungexp (list glibc binutils))))))
+          (guile (derivation->output-path
+                   (package-derivation %store %bootstrap-guile)))
+          (cu (derivation->output-path
+                (package-derivation %store coreutils)))
+          (xlibc (derivation->output-path
+                   (package-cross-derivation %store glibc target)))
+          (xbu (derivation->output-path
+                 (package-cross-derivation %store binutils target))))
+     (and (lset= equal?
+                 `((,%bootstrap-guile "out" #t)
+                   (,coreutils "out" #t)
+                   (,glibc "out" #f)
+                   (,binutils "out" #f))
+                 (map gexp-input->tuple (gexp-inputs exp)))
+          (equal?
+            `(display (cons '(,guile ,cu) '(,xlibc ,xbu)))
+            (gexp->sexp* exp target)))))
actual-value: #t
result: PASS

test-name: input list splicing
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:506
source:
+ (test-assert
+   "input list splicing"
+   (let* ((inputs
+            (list (gexp-input glibc "debug")
+                  %bootstrap-guile))
+          (outputs
+            (list (derivation->output-path
+                    (package-derivation %store glibc)
+                    "debug")
+                  (derivation->output-path
+                    (package-derivation %store %bootstrap-guile))))
+          (exp (gexp (list (ungexp-splicing (cons (+ 2 3) inputs))))))
+     (and (lset= equal?
+                 `((,glibc "debug" #f)
+                   (,%bootstrap-guile "out" #f))
+                 (map gexp-input->tuple (gexp-inputs exp)))
+          (equal?
+            (gexp->sexp* exp)
+            `(list ,@(cons 5 outputs))))))
actual-value: #t
result: PASS

test-name: input list splicing + ungexp-native-splicing
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:520
source:
+ (test-assert
+   "input list splicing + ungexp-native-splicing"
+   (let* ((inputs
+            (list (gexp-input glibc "debug" #:native? #t)
+                  %bootstrap-guile))
+          (exp (gexp (list (ungexp-native-splicing (cons (+ 2 3) inputs))))))
+     (and (lset= equal?
+                 `((,glibc "debug" #t)
+                   (,%bootstrap-guile "out" #t))
+                 (map gexp-input->tuple (gexp-inputs exp)))
+          (equal?
+            (gexp->sexp* exp)
+            (gexp->sexp* exp "mips64el-linux")))))
actual-value: #t
result: PASS

test-name: gexp list splicing + ungexp-splicing
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:530
source:
+ (test-assert
+   "gexp list splicing + ungexp-splicing"
+   (let* ((inner (gexp (ungexp-native glibc)))
+          (exp (gexp (list (ungexp-splicing (list inner))))))
+     (and (equal?
+            `((,glibc "out" #t))
+            (map gexp-input->tuple (gexp-inputs exp)))
+          (equal?
+            (gexp->sexp* exp)
+            (gexp->sexp* exp "mips64el-linux")))))
actual-value: #t
result: PASS

test-name: output list
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:538
source:
+ (test-equal
+   "output list"
+   2
+   (let ((exp (gexp (begin
+                      (mkdir (ungexp output))
+                      (mkdir (ungexp output "bar"))))))
+     (length (gexp-outputs exp))))
expected-value: 2
actual-value: 2
result: PASS

test-name: output list, combined gexps
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:544
source:
+ (test-assert
+   "output list, combined gexps"
+   (let* ((exp0 (gexp (mkdir (ungexp output))))
+          (exp1 (gexp (mkdir (ungexp output "foo"))))
+          (exp2 (gexp (begin
+                        (display "hi!")
+                        (ungexp exp0)
+                        (ungexp exp1)))))
+     (and (lset= equal?
+                 (append (gexp-outputs exp0) (gexp-outputs exp1))
+                 (gexp-outputs exp2))
+          (= 2 (length (gexp-outputs exp2))))))
actual-value: #t
result: PASS

test-name: output list, combined gexps, duplicate output
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:553
source:
+ (test-equal
+   "output list, combined gexps, duplicate output"
+   1
+   (let* ((exp0 (gexp (mkdir (ungexp output))))
+          (exp1 (gexp (begin (mkdir (ungexp output)) (ungexp exp0))))
+          (exp2 (gexp (begin (mkdir (ungexp output)) (ungexp exp1)))))
+     (length (gexp-outputs exp2))))
expected-value: 1
actual-value: 1
result: PASS

test-name: output list + ungexp-splicing list, combined gexps
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:560
source:
+ (test-assert
+   "output list + ungexp-splicing list, combined gexps"
+   (let* ((exp0 (gexp (mkdir (ungexp output))))
+          (exp1 (gexp (mkdir (ungexp output "foo"))))
+          (exp2 (gexp (begin
+                        (display "hi!")
+                        (ungexp-splicing (list exp0 exp1))))))
+     (and (lset= equal?
+                 (append (gexp-outputs exp0) (gexp-outputs exp1))
+                 (gexp-outputs exp2))
+          (= 2 (length (gexp-outputs exp2))))))
actual-value: #t
result: PASS

/home/alberto/user/documents/guix/guix/tests/gexp.scm:215:18: warning: resolving '../base32.scm' relative to current directory
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/98lbv3m0kzqsnjcglm92mx0dkhy2cwxd-foo.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/98//lbv3m0kzqsnjcglm92mx0dkhy2cwxd-foo.drv.bz2 21282
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/98lbv3m0kzqsnjcglm92mx0dkhy2cwxd-foo.drv -
test-name: gexp->file
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:570
source:
+ (test-assert
+   "gexp->file"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((exp ->
+                        (gexp (display (ungexp %bootstrap-guile))))
+                   (guile (package-file %bootstrap-guile))
+                   (sexp (gexp->sexp exp (%current-system) #f))
+                   (drv (gexp->file "foo" exp))
+                   (out -> (derivation->output-path drv))
+                   (done (built-derivations (list drv)))
+                   (refs (references* out)))
+                  (return
+                    (and (equal? sexp (call-with-input-file out read))
+                         (equal? (list guile) refs))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/xzqha0fvqsxnnsqxh8if2f7iiyw3g753-foo.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/xz//qha0fvqsxnnsqxh8if2f7iiyw3g753-foo.drv.bz2 21284
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/xzqha0fvqsxnnsqxh8if2f7iiyw3g753-foo.drv -
test-name: gexp->file + file-append
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:581
source:
+ (test-assert
+   "gexp->file + file-append"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((exp ->
+                        (gexp (ungexp
+                                (file-append %bootstrap-guile "/bin/guile"))))
+                   (guile (package-file %bootstrap-guile))
+                   (drv (gexp->file "foo" exp))
+                   (out -> (derivation->output-path drv))
+                   (done (built-derivations (list drv)))
+                   (refs (references* out)))
+                  (return
+                    (and (equal?
+                           (string-append guile "/bin/guile")
+                           (call-with-input-file out read))
+                         (equal? (list guile) refs))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/fjbpph68mlyhh9mvm97b5h8kgk1pw545-splice.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/fj//bpph68mlyhh9mvm97b5h8kgk1pw545-splice.drv.bz2 21286
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/fjbpph68mlyhh9mvm97b5h8kgk1pw545-splice.drv -

;;; (splice "/home/alberto/user/documents/guix/guix/test-tmp/store/cpaivs0h098q0zq0dgbhgxprvhqs7ydn-splice")
test-name: gexp->file + #:splice?
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:593
source:
+ (test-assert
+   "gexp->file + #:splice?"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((exp ->
+                        (list (gexp (define foo 'bar))
+                              (gexp (define guile
+                                      (ungexp %bootstrap-guile)))))
+                   (guile (package-file %bootstrap-guile))
+                   (drv (gexp->file "splice" exp #:splice? #t))
+                   (out -> (derivation->output-path drv))
+                   (done (built-derivations (list drv)))
+                   (refs (references* out)))
+                  (pk 'splice out)
+                  (return
+                    (and (equal?
+                           `((define foo 'bar)
+                             (define guile ,guile)
+                             ,(call-with-input-string "" read))
+                           (call-with-input-file
+                             out
+                             (lambda (port)
+                               (list (read port) (read port) (read port)))))
+                         (equal? (list guile) refs))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/fwqhiv2pl3dqk666vmlalkrm4pmjxz1a-foo.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/fw//qhiv2pl3dqk666vmlalkrm4pmjxz1a-foo.drv.bz2 21302
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/fwqhiv2pl3dqk666vmlalkrm4pmjxz1a-foo.drv -
test-name: gexp->derivation
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:611
source:
+ (test-assert
+   "gexp->derivation"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((file (text-file "foo" "Hello, world!"))
+                   (exp ->
+                        (gexp (begin
+                                (mkdir (ungexp output))
+                                (chdir (ungexp output))
+                                (symlink
+                                  (string-append
+                                    (ungexp %bootstrap-guile)
+                                    "/bin/guile")
+                                  "foo")
+                                (symlink
+                                  (ungexp file)
+                                  (ungexp output "2nd")))))
+                   (drv (gexp->derivation "foo" exp))
+                   (out -> (derivation->output-path drv))
+                   (out2 -> (derivation->output-path drv "2nd"))
+                   (done (built-derivations (list drv)))
+                   (refs (references* out))
+                   (refs2 (references* out2))
+                   (guile (package-file %bootstrap-guile "bin/guile")))
+                  (return
+                    (and (string=?
+                           (readlink (string-append out "/foo"))
+                           guile)
+                         (string=? (readlink out2) file)
+                         (equal? refs (list (dirname (dirname guile))))
+                         (equal? refs2 (list file))
+                         (null? (derivation-properties drv)))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: gexp->derivation properties
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:636
source:
+ (test-assert
+   "gexp->derivation properties"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet %store-monad
+                 ((drv (gexp->derivation
+                         "foo"
+                         (gexp (mkdir (ungexp output)))
+                         #:properties
+                         '((type . test)))))
+                 (return
+                   (equal?
+                     '((type . test))
+                     (derivation-properties drv))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: gexp->derivation vs. grafts
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:643
source:
+ (test-assert
+   "gexp->derivation vs. grafts"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((graft? (set-grafting #f))
+                   (p0 ->
+                       (dummy-package
+                         "dummy"
+                         (arguments '(#:implicit-inputs? #f))))
+                   (r -> (package (inherit p0) (name "DuMMY")))
+                   (p1 -> (package (inherit p0) (replacement r)))
+                   (exp0 ->
+                         (gexp (frob (ungexp p0) (ungexp output))))
+                   (exp1 ->
+                         (gexp (frob (ungexp p1) (ungexp output))))
+                   (void (set-guile-for-build %bootstrap-guile))
+                   (drv0 (gexp->derivation "t" exp0 #:graft? #t))
+                   (drv1 (gexp->derivation "t" exp1 #:graft? #t))
+                   (drv1* (gexp->derivation "t" exp1 #:graft? #f))
+                   (_ (set-grafting graft?)))
+                  (return
+                    (and (not (string=?
+                                (derivation->output-path drv0)
+                                (derivation->output-path drv1)))
+                         (string=?
+                           (derivation->output-path drv0)
+                           (derivation->output-path drv1*)))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/mg43dyns07jzcpicpm85krlnwxb3x8nw-foo.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/mg//43dyns07jzcpicpm85krlnwxb3x8nw-foo.drv.bz2 21320
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/mg43dyns07jzcpicpm85krlnwxb3x8nw-foo.drv -
test-name: gexp->derivation, composed gexps
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:662
source:
+ (test-assert
+   "gexp->derivation, composed gexps"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((exp0 ->
+                         (gexp (begin
+                                 (mkdir (ungexp output))
+                                 (chdir (ungexp output)))))
+                   (exp1 ->
+                         (gexp (symlink
+                                 (string-append
+                                   (ungexp %bootstrap-guile)
+                                   "/bin/guile")
+                                 "foo")))
+                   (exp ->
+                        (gexp (begin (ungexp exp0) (ungexp exp1))))
+                   (drv (gexp->derivation "foo" exp))
+                   (out -> (derivation->output-path drv))
+                   (done (built-derivations (list drv)))
+                   (guile (package-file %bootstrap-guile "bin/guile")))
+                  (return
+                    (string=?
+                      (readlink (string-append out "/foo"))
+                      guile)))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: gexp->derivation, default system
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:678
source:
+ (test-assert
+   "gexp->derivation, default system"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (let ((system (%current-system))
+                 (mdrv (parameterize
+                         ((%current-system "foobar64-linux"))
+                         (gexp->derivation
+                           "foo"
+                           (gexp (mkdir (ungexp output)))))))
+             (mlet %store-monad
+                   ((drv mdrv))
+                   (return
+                     (string=? system (derivation-system drv)))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/vh8if0154p718d4dlina7bmzyac83l0b-local-file.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/vh//8if0154p718d4dlina7bmzyac83l0b-local-file.drv.bz2 21337
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/vh8if0154p718d4dlina7bmzyac83l0b-local-file.drv -
test-name: gexp->derivation, local-file
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:689
source:
+ (test-assert
+   "gexp->derivation, local-file"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((file -> (search-path %load-path "guix.scm"))
+                   (intd (interned-file file #:recursive? #f))
+                   (local -> (local-file file))
+                   (exp ->
+                        (gexp (begin
+                                (stat (ungexp local))
+                                (symlink (ungexp local) (ungexp output)))))
+                   (drv (gexp->derivation "local-file" exp)))
+                  (mbegin
+                    %store-monad
+                    (built-derivations (list drv))
+                    (return
+                      (string=?
+                        (readlink (derivation->output-path drv))
+                        intd))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: gexp->derivation, cross-compilation
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:703
source:
+ (test-assert
+   "gexp->derivation, cross-compilation"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((target -> "mips64el-linux")
+                   (exp ->
+                        (gexp (list (ungexp coreutils) (ungexp output))))
+                   (xdrv (gexp->derivation "foo" exp #:target target))
+                   (refs (references* (derivation-file-name xdrv)))
+                   (xcu (package->cross-derivation coreutils target))
+                   (cu (package->derivation coreutils)))
+                  (return
+                    (and (member (derivation-file-name xcu) refs)
+                         (not (member (derivation-file-name cu) refs)))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: gexp->derivation, ungexp-native
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:717
source:
+ (test-assert
+   "gexp->derivation, ungexp-native"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((target -> "mips64el-linux")
+                   (exp ->
+                        (gexp (list (ungexp-native coreutils)
+                                    (ungexp output))))
+                   (xdrv (gexp->derivation "foo" exp #:target target))
+                   (drv (gexp->derivation "foo" exp)))
+                  (return
+                    (string=?
+                      (derivation-file-name drv)
+                      (derivation-file-name xdrv))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: gexp->derivation, ungexp + ungexp-native
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:727
source:
+ (test-assert
+   "gexp->derivation, ungexp + ungexp-native"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((target -> "mips64el-linux")
+                   (exp ->
+                        (gexp (list (ungexp-native coreutils)
+                                    (ungexp glibc)
+                                    (ungexp output))))
+                   (xdrv (gexp->derivation "foo" exp #:target target))
+                   (refs (references* (derivation-file-name xdrv)))
+                   (xglibc (package->cross-derivation glibc target))
+                   (cu (package->derivation coreutils)))
+                  (return
+                    (and (member (derivation-file-name cu) refs)
+                         (member (derivation-file-name xglibc) refs))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: ("/home/alberto/user/documents/guix/guix/test-tmp/store/l1fpp69md42ajdnknrav7w3iri9kw4jx-glibc-2.31.drv" "/home/alberto/user/documents/guix/guix/test-tmp/store/rmwv6gn3psra7zd5bi1kd97icc2n7ygv-foo-builder" "/home/alberto/user/documents/guix/guix/test-tmp/store/v058lnv0li4g044fvvv29bwn90g0pghw-guile-bootstrap-2.0.drv")
result: PASS

test-name: gexp->derivation, ungexp-native + composed gexps
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:741
source:
+ (test-assert
+   "gexp->derivation, ungexp-native + composed gexps"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((target -> "mips64el-linux")
+                   (exp0 -> (gexp (list 1 2 (ungexp coreutils))))
+                   (exp -> (gexp (list 0 (ungexp-native exp0))))
+                   (xdrv (gexp->derivation "foo" exp #:target target))
+                   (drv (gexp->derivation "foo" exp)))
+                  (return
+                    (string=?
+                      (derivation-file-name drv)
+                      (derivation-file-name xdrv))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/cfms0bglq7zgmjql91cy1s0d1dgwb49j-module-import-compiled.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/cf//ms0bglq7zgmjql91cy1s0d1dgwb49j-module-import-compiled.drv.bz2 21343
[ 1/10] Loading './guix/build/store-copy.scm'...
[ 2/10] Loading './guix/build/utils.scm'...
[ 3/10] Loading './guix/progress.scm'...
[ 4/10] Loading './guix/records.scm'...
[ 5/10] Loading './guix/sets.scm'...
[ 6/10] Compiling './guix/build/store-copy.scm'...
[ 7/10] Compiling './guix/build/utils.scm'...
[ 8/10] Compiling './guix/progress.scm'...
[ 9/10] Compiling './guix/records.scm'...
[10/10] Compiling './guix/sets.scm'...
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; guix/build/store-copy.scm:260:24: warning: possibly unbound variable `copy-file/deduplicate'
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
;;; Failed to autoload copy-file/deduplicate in (guix store deduplication):
;;; ERROR: missing interface for module (guix store deduplication)
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/cfms0bglq7zgmjql91cy1s0d1dgwb49j-module-import-compiled.drv -
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/9mgngvdc9nsi62n96cd4cib7xbfrh58s-one.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/9m//gngvdc9nsi62n96cd4cib7xbfrh58s-one.drv.bz2 21365
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/9mgngvdc9nsi62n96cd4cib7xbfrh58s-one.drv -
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/mhvw08a85sbpppsspp1p1xfxw2r5iing-two.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/mh//vw08a85sbpppsspp1p1xfxw2r5iing-two.drv.bz2 21366
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/mhvw08a85sbpppsspp1p1xfxw2r5iing-two.drv -
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/x5k29rm8s62xwh4nfgvsfs750071b2cx-store-copy.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/x5//k29rm8s62xwh4nfgvsfs750071b2cx-store-copy.drv.bz2 21367
\r^[[Kcopying 2 store items  [###########################                           ]\r^[[Kcopying 2 store items  [######################################################]\r^[[Kcopying 2 store items
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/x5k29rm8s62xwh4nfgvsfs750071b2cx-store-copy.drv -
test-name: gexp->derivation, store copy
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:752
source:
+ (test-assert
+   "gexp->derivation, store copy"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (let ((build-one
+                   (gexp (call-with-output-file
+                           (ungexp output)
+                           (lambda (port)
+                             (display "This is the one." port)))))
+                 (build-two
+                   (lambda (one)
+                     (gexp (begin
+                             (mkdir (ungexp output))
+                             (symlink
+                               (ungexp one)
+                               (string-append (ungexp output) "/one"))
+                             (call-with-output-file
+                               (string-append (ungexp output) "/two")
+                               (lambda (port)
+                                 (display
+                                   "This is the second one."
+                                   port)))))))
+                 (build-drv
+                   (gexp (begin
+                           (use-modules
+                             (guix build store-copy)
+                             (guix build utils)
+                             (srfi srfi-1))
+                           (define (canonical-file? file)
+                             (let ((st (lstat file)))
+                               (or (not (string-prefix?
+                                          (%store-directory)
+                                          file))
+                                   (eq? 'symlink (stat:type st))
+                                   (and (= 1 (stat:mtime st))
+                                        (zero? (logand
+                                                 146
+                                                 (stat:mode st)))))))
+                           (mkdir (ungexp output))
+                           (populate-store
+                             '("graph")
+                             (ungexp output)
+                             #:deduplicate?
+                             #f)
+                           (unless
+                             (every canonical-file?
+                                    (find-files (ungexp output)))
+                             (error "not canonical!" (ungexp output)))))))
+             (mlet* %store-monad
+                    ((one (gexp->derivation "one" build-one))
+                     (two (gexp->derivation "two" (build-two one)))
+                     (drv (gexp->derivation
+                            "store-copy"
+                            build-drv
+                            #:references-graphs
+                            `(("graph" ,two))
+                            #:modules
+                            '((guix build store-copy)
+                              (guix progress)
+                              (guix records)
+                              (guix sets)
+                              (guix build utils))))
+                     (ok? (built-derivations (list drv)))
+                     (out -> (derivation->output-path drv)))
+                    (let ((one (derivation->output-path one))
+                          (two (derivation->output-path two)))
+                      (return
+                        (and ok?
+                             (file-exists? (string-append out "/" one))
+                             (file-exists? (string-append out "/" two))
+                             (file-exists? (string-append out "/" two "/two"))
+                             (string=?
+                               (readlink (string-append out "/" two "/one"))
+                               one))))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: imported-files
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:806
source:
+ (test-assert
+   "imported-files"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((files ->
+                          `(("x"
+                             unquote
+                             (search-path %load-path "ice-9/q.scm"))
+                            ("a/b/c"
+                             unquote
+                             (search-path %load-path "guix/derivations.scm"))
+                            ("p/q"
+                             unquote
+                             (search-path %load-path "guix.scm"))
+                            ("p/z"
+                             unquote
+                             (search-path %load-path "guix/store.scm"))))
+                   (dir (imported-files files)))
+                  (mbegin
+                    %store-monad
+                    (return
+                      (every (match-lambda
+                               ((path . source)
+                                (equal?
+                                  (call-with-input-file
+                                    (string-append dir "/" path)
+                                    get-bytevector-all)
+                                  (call-with-input-file
+                                    source
+                                    get-bytevector-all))))
+                             files))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS


;;; (drv #<derivation /home/alberto/user/documents/guix/guix/test-tmp/store/1xbccbynpf0f9yzd7wbmf8fhamm9bax1-file-import.drv => /home/alberto/user/documents/guix/guix/test-tmp/store/42b6fpbd94r78aqh5186wcjpz0rpc2p3-file-import 7fc6edbc6d20>)
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/1xbccbynpf0f9yzd7wbmf8fhamm9bax1-file-import.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/1x//bccbynpf0f9yzd7wbmf8fhamm9bax1-file-import.drv.bz2 21370
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/1xbccbynpf0f9yzd7wbmf8fhamm9bax1-file-import.drv -
test-name: imported-files with file-like objects
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:824
source:
+ (test-assert
+   "imported-files with file-like objects"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((plain -> (plain-file "foo" "bar!"))
+                   (q-scm -> (search-path %load-path "ice-9/q.scm"))
+                   (files ->
+                          `(("a/b/c" unquote q-scm) ("p/q" unquote plain)))
+                   (drv (imported-files files)))
+                  (define (file=? file1 file2)
+                    (= (stat:ino (stat file1))
+                       (stat:ino (stat file2))))
+                  (mbegin
+                    %store-monad
+                    (built-derivations (list (pk 'drv drv)))
+                    (mlet %store-monad
+                          ((dir -> (derivation->output-path drv))
+                           (plain* (text-file "foo" "bar!"))
+                           (q-scm* (interned-file q-scm "c")))
+                          (return
+                            (and (file=? (string-append dir "/a/b/c") q-scm*)
+                                 (file=?
+                                   (string-append dir "/p/q")
+                                   plain*))))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: gexp-modules & ungexp
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:844
source:
+ (test-equal
+   "gexp-modules & ungexp"
+   '((bar) (foo))
+   ((@@ (guix gexp) gexp-modules)
+    (gexp (foo (ungexp
+                 (with-imported-modules '((foo)) (gexp +)))
+               (ungexp-native
+                 (with-imported-modules '((bar)) (gexp -)))))))
expected-value: ((bar) (foo))
actual-value: ((bar) (foo))
result: PASS

test-name: gexp-modules & ungexp-splicing
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:850
source:
+ (test-equal
+   "gexp-modules & ungexp-splicing"
+   '((foo) (bar))
+   ((@@ (guix gexp) gexp-modules)
+    (gexp (foo (ungexp-splicing
+                 (list (with-imported-modules '((foo)) (gexp +))
+                       (with-imported-modules '((bar)) (gexp -))))))))
expected-value: ((foo) (bar))
actual-value: ((foo) (bar))
result: PASS

test-name: gexp-modules deletes duplicates
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:856
source:
+ (test-assert
+   "gexp-modules deletes duplicates"
+   (let ((make-file
+           (lambda ()
+             (eval '(scheme-file
+                      "bar.scm"
+                      (gexp (define-module (bar))))
+                   (current-module)))))
+     (define result
+       ((@@ (guix gexp) gexp-modules)
+        (with-imported-modules
+          `(((bar) => ,(make-file))
+            ((bar) => ,(make-file))
+            (foo)
+            (foo))
+          (gexp +))))
+     (match result
+            (((('bar) '=> (? scheme-file?)) ('foo)) #t))))
actual-value: #t
result: PASS

test-name: gexp-modules and literal Scheme object
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:872
source:
+ (test-equal
+   "gexp-modules and literal Scheme object"
+   '()
+   (gexp-modules #t))
expected-value: ()
actual-value: ()
result: PASS

test-name: gexp-modules, warning
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:876
source:
+ (test-assert
+   "gexp-modules, warning"
+   (string-match
+     "tests/gexp.scm:[0-9]+:[0-9]+: warning: importing.* \\(guix config\\) from the host"
+     (call-with-output-string
+       (lambda (port)
+         (parameterize
+           ((guix-warning-port port))
+           (let* ((x (with-imported-modules
+                       '((guix config))
+                       (gexp (+ 1 2 3))))
+                  (y (gexp (+ 39 (ungexp x)))))
+             (gexp-modules y)))))))
actual-value: #("/home/alberto/user/documents/guix/guix/tests/gexp.scm:883:35: warning: importing module (guix config) from the host\n" (39 . 115))
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/3v2f6y96dk068ja99q5jshydhhkgnhhi-test-with-modules.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/3v//2f6y96dk068ja99q5jshydhhkgnhhi-test-with-modules.drv.bz2 21386
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/3v2f6y96dk068ja99q5jshydhhkgnhhi-test-with-modules.drv -
test-name: gexp->derivation #:modules
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:887
source:
+ (test-assert
+   "gexp->derivation #:modules"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((build ->
+                          (gexp (begin
+                                  (use-modules (guix build utils))
+                                  (mkdir-p
+                                    (string-append
+                                      (ungexp output)
+                                      "/guile/guix/nix"))
+                                  #t)))
+                   (drv (gexp->derivation
+                          "test-with-modules"
+                          build
+                          #:modules
+                          '((guix build utils)))))
+                  (mbegin
+                    %store-monad
+                    (built-derivations (list drv))
+                    (let* ((p (derivation->output-path drv))
+                           (s (stat (string-append p "/guile/guix/nix"))))
+                      (return (eq? (stat:type s) 'directory)))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: gexp->derivation & with-imported-modules
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:901
source:
+ (test-assert
+   "gexp->derivation & with-imported-modules"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((build ->
+                          (with-imported-modules
+                            '((guix build utils))
+                            (gexp (begin
+                                    (use-modules (guix build utils))
+                                    (mkdir-p
+                                      (string-append
+                                        (ungexp output)
+                                        "/guile/guix/nix"))
+                                    #t))))
+                   (drv (gexp->derivation "test-with-modules" build)))
+                  (mbegin
+                    %store-monad
+                    (built-derivations (list drv))
+                    (let* ((p (derivation->output-path drv))
+                           (s (stat (string-append p "/guile/guix/nix"))))
+                      (return (eq? (stat:type s) 'directory)))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/cp2bkkhh821g2md4xg5z6zv173sr9bwk-module-import-compiled.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/cp//2bkkhh821g2md4xg5z6zv173sr9bwk-module-import-compiled.drv.bz2 21392
[ 1/ 4] Loading './guix/build/bournish.scm'...
[ 2/ 4] Loading './guix/build/utils.scm'...
[ 3/ 4] Compiling './guix/build/bournish.scm'...
[ 4/ 4] Compiling './guix/build/utils.scm'...
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/cp2bkkhh821g2md4xg5z6zv173sr9bwk-module-import-compiled.drv -
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/252rs02laa40vic1brv4axxhbrx53fr0-test-with-modules.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/25//2rs02laa40vic1brv4axxhbrx53fr0-test-with-modules.drv.bz2 21409
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/252rs02laa40vic1brv4axxhbrx53fr0-test-with-modules.drv -
test-name: gexp->derivation & nested with-imported-modules
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:916
source:
+ (test-assert
+   "gexp->derivation & nested with-imported-modules"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((build1
+                     ->
+                     (with-imported-modules
+                       '((guix build utils))
+                       (gexp (begin
+                               (use-modules (guix build utils))
+                               (mkdir-p
+                                 (string-append
+                                   (ungexp output)
+                                   "/guile/guix/nix"))
+                               #t))))
+                   (build2
+                     ->
+                     (with-imported-modules
+                       '((guix build bournish))
+                       (gexp (begin
+                               (use-modules
+                                 (guix build bournish)
+                                 (system base compile))
+                               (ungexp-native build1)
+                               (call-with-output-file
+                                 (string-append (ungexp output) "/b")
+                                 (lambda (port)
+                                   (write (read-and-compile
+                                            (open-input-string "cd /foo")
+                                            #:from
+                                            %bournish-language
+                                            #:to
+                                            'scheme)
+                                          port)))))))
+                   (drv (gexp->derivation "test-with-modules" build2)))
+                  (mbegin
+                    %store-monad
+                    (built-derivations (list drv))
+                    (let* ((p (derivation->output-path drv))
+                           (s (stat (string-append p "/guile/guix/nix")))
+                           (b (string-append p "/b")))
+                      (return
+                        (and (eq? (stat:type s) 'directory)
+                             (equal?
+                               '(chdir "/foo")
+                               (call-with-input-file b read)))))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/3zca1wx1w4zwbnv58cp1s9ilqz8w1ian-x.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/3z//ca1wx1w4zwbnv58cp1s9ilqz8w1ian-x.drv.bz2 21411
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/3zca1wx1w4zwbnv58cp1s9ilqz8w1ian-x.drv -
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/pq0d1a306d9d29nlr8myx03n7f2cq89y-module-import.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/pq//0d1a306d9d29nlr8myx03n7f2cq89y-module-import.drv.bz2 21412
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/pq0d1a306d9d29nlr8myx03n7f2cq89y-module-import.drv -
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/b0v6kqbyklz9bcdrs56p8spd6szj8kqb-module-import-compiled.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/b0//v6kqbyklz9bcdrs56p8spd6szj8kqb-module-import-compiled.drv.bz2 21413
[ 1/ 4] Loading './foo/bar.scm'...
[ 2/ 4] Loading './guix/build/utils.scm'...
[ 3/ 4] Compiling './foo/bar.scm'...
[ 4/ 4] Compiling './guix/build/utils.scm'...
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/b0v6kqbyklz9bcdrs56p8spd6szj8kqb-module-import-compiled.drv -
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/bd2w99yvf1qpmk3qmxrb5abfhhn28hkb-thing.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/bd//2w99yvf1qpmk3qmxrb5abfhhn28hkb-thing.drv.bz2 21431
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/bd2w99yvf1qpmk3qmxrb5abfhhn28hkb-thing.drv -
test-name: gexp->derivation & with-imported-module & computed module
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:945
source:
+ (test-assert
+   "gexp->derivation & with-imported-module & computed module"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((module
+                     ->
+                     (scheme-file
+                       "x"
+                       (gexp ((define-module (foo bar) #:export (the-answer))
+                              (define the-answer 42)))
+                       #:splice?
+                       #t))
+                   (build ->
+                          (with-imported-modules
+                            `(((foo bar) => ,module) (guix build utils))
+                            (gexp (begin
+                                    (use-modules (guix build utils) (foo bar))
+                                    mkdir-p
+                                    (call-with-output-file
+                                      (ungexp output)
+                                      (lambda (port)
+                                        (write the-answer port)))))))
+                   (drv (gexp->derivation "thing" build))
+                   (out -> (derivation->output-path drv)))
+                  (mbegin
+                    %store-monad
+                    (built-derivations (list drv))
+                    (return (= 42 (call-with-input-file out read)))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: gexp-extensions & ungexp
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:968
source:
+ (test-equal
+   "gexp-extensions & ungexp"
+   (list sed grep)
+   ((@@ (guix gexp) gexp-extensions)
+    (gexp (foo (ungexp (with-extensions (list grep) (gexp +)))
+               (ungexp-native
+                 (with-extensions (list sed) (gexp -)))))))
expected-value: (#<package sed@4.8 gnu/packages/base.scm:140 7fc6ef0c58c0> #<package grep@3.4 gnu/packages/base.scm:99 7fc6ef0c5960>)
actual-value: (#<package sed@4.8 gnu/packages/base.scm:140 7fc6ef0c58c0> #<package grep@3.4 gnu/packages/base.scm:99 7fc6ef0c5960>)
result: PASS

test-name: gexp-extensions & ungexp-splicing
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:974
source:
+ (test-equal
+   "gexp-extensions & ungexp-splicing"
+   (list grep sed)
+   ((@@ (guix gexp) gexp-extensions)
+    (gexp (foo (ungexp-splicing
+                 (list (with-extensions (list grep) (gexp +))
+                       (with-imported-modules
+                         '((foo))
+                         (with-extensions (list sed) (gexp -)))))))))
expected-value: (#<package grep@3.4 gnu/packages/base.scm:99 7fc6ef0c5960> #<package sed@4.8 gnu/packages/base.scm:140 7fc6ef0c58c0>)
actual-value: (#<package grep@3.4 gnu/packages/base.scm:99 7fc6ef0c5960> #<package sed@4.8 gnu/packages/base.scm:140 7fc6ef0c58c0>)
result: PASS

test-name: gexp-extensions and literal Scheme object
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:981
source:
+ (test-equal
+   "gexp-extensions and literal Scheme object"
+   '()
+   ((@@ (guix gexp) gexp-extensions) #t))
expected-value: ()
actual-value: ()
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/v3wp23cq0sgpbbgxznnbmswzbjgl0rcp-extension-0.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/v3//wp23cq0sgpbbgxznnbmswzbjgl0rcp-extension-0.drv.bz2 21447
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/v3wp23cq0sgpbbgxznnbmswzbjgl0rcp-extension-0.drv -
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/fh45h2bp96x5yzil859aa78h1paqbn22-x.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/fh//45h2bp96x5yzil859aa78h1paqbn22-x.drv.bz2 21448
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/fh45h2bp96x5yzil859aa78h1paqbn22-x.drv -
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/b6pckiczjshyfl69clv2pixky65vxbl6-module-import.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/b6//pckiczjshyfl69clv2pixky65vxbl6-module-import.drv.bz2 21449
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/b6pckiczjshyfl69clv2pixky65vxbl6-module-import.drv -
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/l0967k2smakapclzj7s17c8w37pv4mh9-module-import-compiled.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/l0//967k2smakapclzj7s17c8w37pv4mh9-module-import-compiled.drv.bz2 21450
[ 1/ 4] Loading './foo.scm'...
[ 2/ 4] Loading './guix/build/utils.scm'...
[ 3/ 4] Compiling './foo.scm'...
[ 4/ 4] Compiling './guix/build/utils.scm'...
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/l0967k2smakapclzj7s17c8w37pv4mh9-module-import-compiled.drv -
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/fijknyf8282xmfxvniv3fhjmllz70aax-thingie.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/fi//jknyf8282xmfxvniv3fhjmllz70aax-thingie.drv.bz2 21454
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/fijknyf8282xmfxvniv3fhjmllz70aax-thingie.drv -
test-name: gexp->derivation & with-extensions
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:985
source:
+ (test-assert
+   "gexp->derivation & with-extensions"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((extension -> %extension-package)
+                   (module
+                     ->
+                     (scheme-file
+                       "x"
+                       (gexp ((define-module
+                                (foo)
+                                #:use-module
+                                (hg2g)
+                                #:export
+                                (multiply))
+                              (define (multiply x) (* the-answer x))))
+                       #:splice?
+                       #t))
+                   (build ->
+                          (with-extensions
+                            (list extension)
+                            (with-imported-modules
+                              `((guix build utils) ((foo) => ,module))
+                              (gexp (begin
+                                      (use-modules
+                                        (guix build utils)
+                                        (hg2g)
+                                        (foo))
+                                      (call-with-output-file
+                                        (ungexp output)
+                                        (lambda (port)
+                                          (write (list the-answer
+                                                       (multiply 2))
+                                                 port))))))))
+                   (drv (gexp->derivation
+                          "thingie"
+                          build
+                          #:effective-version
+                          "2.0"))
+                   (out -> (derivation->output-path drv)))
+                  (mbegin
+                    %store-monad
+                    (built-derivations (list drv))
+                    (return
+                      (equal? '(42 84) (call-with-input-file out read)))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS


;;; (lexp #<<lowered-gexp> sexp: (begin (use-modules (guix build utils) (hg2g)) "/home/alberto/user/documents/guix/guix/test-tmp/store/s3xw9qd4jqi471gchjp84amx4a9xi23i-coreutils-8.32-debug" mkdir-p the-answer) inputs: (#<<derivation-input> drv: #<derivation /home/alberto/user/documents/guix/guix/test-tmp/store/h7cw4xdy0sxjj8x9w8s7cvnnbmalpr46-module-import-compiled.drv => /home/alberto/user/documents/guix/guix/test-tmp/store/cp6fcgpz7lzcab460wgys2pwivhnpgzl-module-import-compiled 7fc6eda45a00> sub-derivations: ("out")> #<<derivation-input> drv: #<derivation /home/alberto/user/documents/guix/guix/test-tmp/store/v3wp23cq0sgpbbgxznnbmswzbjgl0rcp-extension-0.drv => /home/alberto/user/documents/guix/guix/test-tmp/store/8py6lmvppnhr7v1maqran3wgrnl02a93-extension-0 7fc6edf395a0> sub-derivations: ("out")> #<<derivation-input> drv: #<derivation /home/alberto/user/documents/guix/guix/test-tmp/store/iid71w3b8vvc4ddiqnbq4pqiwhxyhn9a-coreutils-8.32.drv => /home/alberto/user/documents/guix/guix/test-tmp/store/s3xw9qd4jqi471gchjp84amx4a9xi23i-coreutils-8.32-debug /home/alberto/user/documents/guix/guix/test-tmp/store/ifg576lwlv0kr58xrpljs5mf851ci0fj-coreutils-8.32 7fc6f9015af0> sub-derivations: ("debug")>) sources: ("/home/alberto/user/documents/guix/guix/test-tmp/store/9i7qmxmh5k9knk8mjz7s8yg7c41wpb0g-module-import") guile: #<<derivation-input> drv: #<derivation /home/alberto/user/documents/guix/guix/test-tmp/store/v058lnv0li4g044fvvv29bwn90g0pghw-guile-bootstrap-2.0.drv => /home/alberto/user/documents/guix/guix/test-tmp/store/xicbw600d10ngdhb8jlkkjxgimrxqb6a-guile-bootstrap-2.0 7fc6fa203690> sub-derivations: ("out")> load-path: ("/home/alberto/user/documents/guix/guix/test-tmp/store/9i7qmxmh5k9knk8mjz7s8yg7c41wpb0g-module-import" "/home/alberto/user/documents/guix/guix/test-tmp/store/8py6lmvppnhr7v1maqran3wgrnl02a93-extension-0/share/guile/site/2.0") load-compiled-path: ("/home/alberto/user/documents/guix/guix/test-tmp/store/cp6fcgpz7lzcab460wgys2pwivhnpgzl-module-import-compiled" "/home/alberto/user/documents/guix/guix/test-tmp/store/8py6lmvppnhr7v1maqran3wgrnl02a93-extension-0/lib/guile/2.0/site-ccache")>)
test-name: lower-gexp
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1016
source:
+ (test-assert
+   "lower-gexp"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((extension -> %extension-package)
+                   (extension-drv
+                     (package->derivation %extension-package))
+                   (coreutils-drv (package->derivation coreutils))
+                   (exp ->
+                        (with-extensions
+                          (list extension)
+                          (with-imported-modules
+                            `((guix build utils))
+                            (gexp (begin
+                                    (use-modules (guix build utils) (hg2g))
+                                    (ungexp coreutils "debug")
+                                    mkdir-p
+                                    the-answer)))))
+                   (lexp (lower-gexp exp #:effective-version "2.0")))
+                  (define (matching-input drv output)
+                    (lambda (input)
+                      (and (eq? (derivation-input-derivation input) drv)
+                           (equal?
+                             (derivation-input-sub-derivations input)
+                             (list output)))))
+                  (mbegin
+                    %store-monad
+                    (return
+                      (and (find (matching-input extension-drv "out")
+                                 (lowered-gexp-inputs (pk 'lexp lexp)))
+                           (find (matching-input coreutils-drv "debug")
+                                 (lowered-gexp-inputs lexp))
+                           (member
+                             (string-append
+                               (derivation->output-path extension-drv)
+                               "/share/guile/site/2.0")
+                             (lowered-gexp-load-path lexp))
+                           (= 2 (length (lowered-gexp-load-path lexp)))
+                           (member
+                             (string-append
+                               (derivation->output-path extension-drv)
+                               "/lib/guile/2.0/site-ccache")
+                             (lowered-gexp-load-compiled-path lexp))
+                           (= 2
+                              (length (lowered-gexp-load-compiled-path lexp)))
+                           (eq? (derivation-input-derivation
+                                  (lowered-gexp-guile lexp))
+                                (%guile-for-build))))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: lower-gexp, raw-derivation-file
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1055
source:
+ (test-assert
+   "lower-gexp, raw-derivation-file"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((thing ->
+                          (program-file "prog" (gexp (display "hi!"))))
+                   (exp ->
+                        (gexp (list (ungexp (raw-derivation-file thing)))))
+                   (drv (lower-object thing))
+                   (lexp (lower-gexp exp #:effective-version "2.0")))
+                  (return
+                    (and (equal?
+                           `(list ,(derivation-file-name drv))
+                           (lowered-gexp-sexp lexp))
+                         (equal?
+                           (list (derivation-file-name drv))
+                           (lowered-gexp-sources lexp))
+                         (null? (lowered-gexp-inputs lexp)))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: lower-gexp, non-self-quoting input
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1066
source:
+ (test-eq
+   "lower-gexp, non-self-quoting input"
+   +
+   (guard (c ((gexp-input-error? c)
+              (gexp-error-invalid-input c)))
+          (run-with-store
+            %store
+            (lower-gexp (gexp (foo (ungexp +)))))))
expected-value: #<procedure + (#:optional _ _ . _)>
actual-value: #<procedure + (#:optional _ _ . _)>
result: PASS

test-name: lower-gexp, character literal
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1073
source:
+ (test-equal
+   "lower-gexp, character literal"
+   '(#\+)
+   (lowered-gexp-sexp
+     (run-with-store %store (lower-gexp (gexp (#\+))))))
expected-value: (#\+)
actual-value: (#\+)
result: PASS

random seed for tests: 1631321982
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/ich6kv7ljnvjr10v7y59895gf4bwb11s-two.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/ic//h6kv7ljnvjr10v7y59895gf4bwb11s-two.drv.bz2 21472
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/ich6kv7ljnvjr10v7y59895gf4bwb11s-two.drv -
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/xcb19mixdas5ggi8rqrqscvnhk87nw3q-ref-graphs.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/xc//b19mixdas5ggi8rqrqscvnhk87nw3q-ref-graphs.drv.bz2 21473
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/xcb19mixdas5ggi8rqrqscvnhk87nw3q-ref-graphs.drv -
test-name: gexp->derivation #:references-graphs
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1079
source:
+ (test-assert
+   "gexp->derivation #:references-graphs"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((one (text-file "one" (random-text)))
+                   (two (gexp->derivation
+                          "two"
+                          (gexp (symlink
+                                  (ungexp one)
+                                  (ungexp output "chbouib")))))
+                   (build ->
+                          (with-imported-modules
+                            '((guix build store-copy)
+                              (guix progress)
+                              (guix records)
+                              (guix sets)
+                              (guix build utils))
+                            (gexp (begin
+                                    (use-modules (guix build store-copy))
+                                    (with-output-to-file
+                                      (ungexp output)
+                                      (lambda ()
+                                        (write (map store-info-item
+                                                    (call-with-input-file
+                                                      "guile"
+                                                      read-reference-graph)))))
+                                    (with-output-to-file
+                                      (ungexp output "one")
+                                      (lambda ()
+                                        (write (map store-info-item
+                                                    (call-with-input-file
+                                                      "one"
+                                                      read-reference-graph)))))
+                                    (with-output-to-file
+                                      (ungexp output "two")
+                                      (lambda ()
+                                        (write (map store-info-item
+                                                    (call-with-input-file
+                                                      "two"
+                                                      read-reference-graph)))))))))
+                   (drv (gexp->derivation
+                          "ref-graphs"
+                          build
+                          #:references-graphs
+                          `(("one" ,one)
+                            ("two" ,two "chbouib")
+                            ("guile" ,%bootstrap-guile))))
+                   (ok? (built-derivations (list drv)))
+                   (guile-drv
+                     (package->derivation %bootstrap-guile))
+                   (bash (interned-file
+                           (search-bootstrap-binary
+                             "bash"
+                             (%current-system))
+                           "bash"
+                           #:recursive?
+                           #t))
+                   (g-one -> (derivation->output-path drv "one"))
+                   (g-two -> (derivation->output-path drv "two"))
+                   (g-guile -> (derivation->output-path drv)))
+                  (return
+                    (and ok?
+                         (equal?
+                           (call-with-input-file g-one read)
+                           (list one))
+                         (lset= string=?
+                                (call-with-input-file g-two read)
+                                (list one
+                                      (derivation->output-path
+                                        two
+                                        "chbouib")))
+                         (lset= string=?
+                                (call-with-input-file g-guile read)
+                                (list (derivation->output-path guile-drv)
+                                      bash)))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: gexp->derivation #:references-graphs cross-compilation
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1129
source:
+ (test-assert
+   "gexp->derivation #:references-graphs cross-compilation"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((drv1 (lower-object
+                           coreutils
+                           (%current-system)
+                           #:target
+                           "i586-pc-gnu"))
+                   (drv2 (lower-object
+                           coreutils
+                           (%current-system)
+                           #:target
+                           #f))
+                   (drv3 (gexp->derivation
+                           "three"
+                           (gexp (symlink (ungexp coreutils) (ungexp output)))
+                           #:target
+                           "i586-pc-gnu"
+                           #:references-graphs
+                           `(("coreutils" ,coreutils))))
+                   (refs (references* (derivation-file-name drv3))))
+                  (return
+                    (and (member (derivation-file-name drv1) refs)
+                         (not (member (derivation-file-name drv2) refs)))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/hg89rj8kr30ph9v4axjjj1s76xvjjw63-allowed-refs.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/hg//89rj8kr30ph9v4axjjj1s76xvjjw63-allowed-refs.drv.bz2 21490
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/hg89rj8kr30ph9v4axjjj1s76xvjjw63-allowed-refs.drv -
test-name: gexp->derivation #:allowed-references
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1145
source:
+ (test-assert
+   "gexp->derivation #:allowed-references"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet %store-monad
+                 ((drv (gexp->derivation
+                         "allowed-refs"
+                         (gexp (begin
+                                 (mkdir (ungexp output))
+                                 (chdir (ungexp output))
+                                 (symlink (ungexp output) "self")
+                                 (symlink (ungexp %bootstrap-guile) "guile")))
+                         #:allowed-references
+                         (list "out" %bootstrap-guile))))
+                 (built-derivations (list drv)))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/wsr950qp295mckj1cppn1aq3h90lq72k-thing.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/ws//r950qp295mckj1cppn1aq3h90lq72k-thing.drv.bz2 21506
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/wsr950qp295mckj1cppn1aq3h90lq72k-thing.drv -
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/92a8xqbfnwzj14mgi8ck2fhcanj1rxj3-allowed-refs.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/92//a8xqbfnwzj14mgi8ck2fhcanj1rxj3-allowed-refs.drv.bz2 21507

;;; ("/home/alberto/user/documents/guix/guix/test-tmp/store/kkk8d9gy1bbj0awl1nc984slmvrk2qcm-thing-not-ok")
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/92a8xqbfnwzj14mgi8ck2fhcanj1rxj3-allowed-refs.drv -
test-name: gexp->derivation #:allowed-references, specific output
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1157
source:
+ (test-assert
+   "gexp->derivation #:allowed-references, specific output"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((in (gexp->derivation
+                         "thing"
+                         (gexp (begin
+                                 (mkdir (ungexp output "ok"))
+                                 (mkdir (ungexp output "not-ok"))))))
+                   (drv (gexp->derivation
+                          "allowed-refs"
+                          (gexp (begin
+                                  (pk (ungexp in "not-ok"))
+                                  (mkdir (ungexp output))
+                                  (chdir (ungexp output))
+                                  (symlink (ungexp output) "self")
+                                  (symlink (ungexp in "ok") "ok")))
+                          #:allowed-references
+                          (list "out" (gexp-input in "ok")))))
+                  (built-derivations (list drv)))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/k8zz24hsr9vfp6ql3ydqfsc1vc9zcnd5-allowed-refs.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/k8//zz24hsr9vfp6ql3ydqfsc1vc9zcnd5-allowed-refs.drv.bz2 21522
output (`/home/alberto/user/documents/guix/guix/test-tmp/store/8ii88r6fx81ihqb8da59nxiy0sqp2n0l-allowed-refs') is not allowed to refer to path `/home/alberto/user/documents/guix/guix/test-tmp/store/xicbw600d10ngdhb8jlkkjxgimrxqb6a-guile-bootstrap-2.0'
@ build-failed /home/alberto/user/documents/guix/guix/test-tmp/store/k8zz24hsr9vfp6ql3ydqfsc1vc9zcnd5-allowed-refs.drv - 1 output (`/home/alberto/user/documents/guix/guix/test-tmp/store/8ii88r6fx81ihqb8da59nxiy0sqp2n0l-allowed-refs') is not allowed to refer to path `/home/alberto/user/documents/guix/guix/test-tmp/store/xicbw600d10ngdhb8jlkkjxgimrxqb6a-guile-bootstrap-2.0'
test-name: gexp->derivation #:allowed-references, disallowed
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1174
source:
+ (test-assert
+   "gexp->derivation #:allowed-references, disallowed"
+   (let ((drv (run-with-store
+                %store
+                (gexp->derivation
+                  "allowed-refs"
+                  (gexp (begin
+                          (mkdir (ungexp output))
+                          (chdir (ungexp output))
+                          (symlink (ungexp %bootstrap-guile) "guile")))
+                  #:allowed-references
+                  '()))))
+     (guard (c ((store-protocol-error? c) #t))
+            (build-derivations %store (list drv))
+            #f)))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/q6jzd7zvmc4sh372lgj9r2rp533jbk32-disallowed-refs.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/q6//jzd7zvmc4sh372lgj9r2rp533jbk32-disallowed-refs.drv.bz2 21538
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/q6jzd7zvmc4sh372lgj9r2rp533jbk32-disallowed-refs.drv -
test-name: gexp->derivation #:disallowed-references, allowed
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1186
source:
+ (test-assert
+   "gexp->derivation #:disallowed-references, allowed"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet %store-monad
+                 ((drv (gexp->derivation
+                         "disallowed-refs"
+                         (gexp (begin
+                                 (mkdir (ungexp output))
+                                 (chdir (ungexp output))
+                                 (symlink (ungexp output) "self")
+                                 (symlink (ungexp %bootstrap-guile) "guile")))
+                         #:disallowed-references
+                         '())))
+                 (built-derivations (list drv)))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/83mki7li39q8lrsmshp08067azsdzlga-disallowed-refs.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/83//mki7li39q8lrsmshp08067azsdzlga-disallowed-refs.drv.bz2 21553
output (`/home/alberto/user/documents/guix/guix/test-tmp/store/cscy8yrh9657416pb1c5qh8cz68aw24j-disallowed-refs') is not allowed to refer to path `/home/alberto/user/documents/guix/guix/test-tmp/store/xicbw600d10ngdhb8jlkkjxgimrxqb6a-guile-bootstrap-2.0'
@ build-failed /home/alberto/user/documents/guix/guix/test-tmp/store/83mki7li39q8lrsmshp08067azsdzlga-disallowed-refs.drv - 1 output (`/home/alberto/user/documents/guix/guix/test-tmp/store/cscy8yrh9657416pb1c5qh8cz68aw24j-disallowed-refs') is not allowed to refer to path `/home/alberto/user/documents/guix/guix/test-tmp/store/xicbw600d10ngdhb8jlkkjxgimrxqb6a-guile-bootstrap-2.0'
test-name: gexp->derivation #:disallowed-references
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1198
source:
+ (test-assert
+   "gexp->derivation #:disallowed-references"
+   (let ((drv (run-with-store
+                %store
+                (gexp->derivation
+                  "disallowed-refs"
+                  (gexp (begin
+                          (mkdir (ungexp output))
+                          (chdir (ungexp output))
+                          (symlink (ungexp %bootstrap-guile) "guile")))
+                  #:disallowed-references
+                  (list %bootstrap-guile)))))
+     (guard (c ((store-protocol-error? c) #t))
+            (build-derivations %store (list drv))
+            #f)))
actual-value: #t
result: PASS

test-name: gexp->script
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1218
source:
+ (test-assert
+   "gexp->script"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((n -> (random (expt 2 50)))
+                   (exp ->
+                        (gexp (system*
+                                (string-append
+                                  (ungexp %bootstrap-guile)
+                                  "/bin/guile")
+                                "-c"
+                                (object->string
+                                  '(display (expt (ungexp n) 2))))))
+                   (drv (gexp->script
+                          "guile-thing"
+                          exp
+                          #:guile
+                          %bootstrap-guile))
+                   (out -> (derivation->output-path drv))
+                   (done (built-derivations (list drv))))
+                  (let* ((pipe (open-input-pipe out))
+                         (str (get-string-all pipe)))
+                    (return
+                      (and (zero? (close-pipe pipe))
+                           (= (expt n 2) (string->number str))))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
result: SKIP

test-name: gexp->script #:module-path
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1235
source:
+ (test-assert
+   "gexp->script #:module-path"
+   (call-with-temporary-directory
+     (lambda (directory)
+       (define str "Fake (guix base32) module!")
+       (mkdir (string-append directory "/guix"))
+       (call-with-output-file
+         (string-append directory "/guix/base32.scm")
+         (lambda (port)
+           (write `(begin
+                     (define-module (guix base32))
+                     (define-public %fake! ,str))
+                  port)))
+       (run-with-store
+         %store
+         (mlet* %store-monad
+                ((exp ->
+                      (with-imported-modules
+                        '((guix base32))
+                        (gexp (begin
+                                (use-modules (guix base32))
+                                (write (list %load-path %fake!))))))
+                 (drv (gexp->script
+                        "guile-thing"
+                        exp
+                        #:guile
+                        %bootstrap-guile
+                        #:module-path
+                        (list directory)))
+                 (out -> (derivation->output-path drv))
+                 (done (built-derivations (list drv))))
+                (let* ((pipe (open-input-pipe out)) (data (read pipe)))
+                  (return
+                    (and (zero? (close-pipe pipe))
+                         (match data
+                                ((load-path str*)
+                                 (and (string=? str* str)
+                                      (not (member
+                                             directory
+                                             load-path)))))))))))))
result: SKIP

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/0byjw306ghsaydnj0v14zgrgz48lxik4-program.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/0b//yjw306ghsaydnj0v14zgrgz48lxik4-program.drv.bz2 21555
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/0byjw306ghsaydnj0v14zgrgz48lxik4-program.drv -
test-name: program-file
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1267
source:
+ (test-assert
+   "program-file"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (let* ((n (random (expt 2 50)))
+                  (exp (with-imported-modules
+                         '((guix build utils))
+                         (gexp (begin
+                                 (use-modules (guix build utils))
+                                 (display (ungexp n))))))
+                  (file (program-file
+                          "program"
+                          exp
+                          #:guile
+                          %bootstrap-guile)))
+             (mlet* %store-monad
+                    ((drv (lower-object file))
+                     (out -> (derivation->output-path drv)))
+                    (mbegin
+                      %store-monad
+                      (built-derivations (list drv))
+                      (let* ((pipe (open-input-pipe out))
+                             (str (get-string-all pipe)))
+                        (return
+                          (and (zero? (close-pipe pipe))
+                               (= n (string->number str))))))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/kil93clqrqmqpa817dv40x77l0z5ybfl-module-import-compiled.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/ki//l93clqrqmqpa817dv40x77l0z5ybfl-module-import-compiled.drv.bz2 21560
[ 1/ 2] Loading './stupid-module.scm'...
[ 2/ 2] Compiling './stupid-module.scm'...
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/kil93clqrqmqpa817dv40x77l0z5ybfl-module-import-compiled.drv -
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/8l77k2cnh7jky2sx6c6iwkg0p957m21m-program.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/8l//77k2cnh7jky2sx6c6iwkg0p957m21m-program.drv.bz2 21561
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/8l77k2cnh7jky2sx6c6iwkg0p957m21m-program.drv -
test-name: program-file #:module-path
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1284
source:
+ (test-assert
+   "program-file #:module-path"
+   (call-with-temporary-directory
+     (lambda (directory)
+       (define text (random-text))
+       (call-with-output-file
+         (string-append directory "/stupid-module.scm")
+         (lambda (port)
+           (write `(begin
+                     (define-module (stupid-module))
+                     (define-public %stupid-thing ,text))
+                  port)))
+       (let* ((exp (with-imported-modules
+                     '((stupid-module))
+                     (gexp (begin
+                             (use-modules (stupid-module))
+                             (display %stupid-thing)))))
+              (file (program-file
+                      "program"
+                      exp
+                      #:guile
+                      %bootstrap-guile
+                      #:module-path
+                      (list directory))))
+         (run-with-store
+           %store
+           (mlet* %store-monad
+                  ((drv (lower-object file))
+                   (out -> (derivation->output-path drv)))
+                  (mbegin
+                    %store-monad
+                    (built-derivations (list drv))
+                    (let* ((pipe (open-input-pipe out))
+                           (str (get-string-all pipe)))
+                      (return
+                        (and (zero? (close-pipe pipe))
+                             (string=? text str)))))))))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/vxk7j6lsh5h6b733wkg86s8icawg325a-module-import-compiled.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/vx//k7j6lsh5h6b733wkg86s8icawg325a-module-import-compiled.drv.bz2 21564
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/vxk7j6lsh5h6b733wkg86s8icawg325a-module-import-compiled.drv -
@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/1cb51nwvfblgk2w56vpq4a8ywhymmi6v-program.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/1c//b51nwvfblgk2w56vpq4a8ywhymmi6v-program.drv.bz2 21565
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/1cb51nwvfblgk2w56vpq4a8ywhymmi6v-program.drv -
test-name: program-file & with-extensions
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1312
source:
+ (test-assert
+   "program-file & with-extensions"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (let* ((exp (with-extensions
+                         (list %extension-package)
+                         (gexp (begin
+                                 (use-modules (hg2g))
+                                 (display the-answer)))))
+                  (file (program-file
+                          "program"
+                          exp
+                          #:guile
+                          %bootstrap-guile)))
+             (mlet* %store-monad
+                    ((drv (lower-object file))
+                     (out -> (derivation->output-path drv)))
+                    (mbegin
+                      %store-monad
+                      (built-derivations (list drv))
+                      (let* ((pipe (open-input-pipe out))
+                             (str (get-string-all pipe)))
+                        (return
+                          (and (zero? (close-pipe pipe))
+                               (= 42 (string->number str))))))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS


;;; (#<derivation /home/alberto/user/documents/guix/guix/test-tmp/store/sgayxa7f7z71qsvx4jnyf3p84vx10ksb-module-import-compiled.drv => /home/alberto/user/documents/guix/guix/test-tmp/store/r6hmddqnajyd34hsazjrpr1d1p0sq2a4-module-import-compiled 7fc6ed508d70>)
test-name: program-file #:system
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1328
source:
+ (test-assert
+   "program-file #:system"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (let* ((exp (with-imported-modules
+                         '((guix build utils))
+                         (gexp (begin
+                                 (use-modules (guix build utils))
+                                 (display "hi!")))))
+                  (system
+                    (if (string=? (%current-system) "x86_64-linux")
+                      "armhf-linux"
+                      "x86_64-linux"))
+                  (file (program-file "program" exp)))
+             (mlet %store-monad
+                   ((drv (lower-object file system)))
+                   (return
+                     (and (string=? (derivation-system drv) system)
+                          (find (lambda (input)
+                                  (let ((drv (pk (derivation-input-derivation
+                                                   input))))
+                                    (and (string=?
+                                           (derivation-name drv)
+                                           "module-import-compiled")
+                                         (string=?
+                                           (derivation-system drv)
+                                           system))))
+                                (derivation-inputs drv))))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #<<derivation-input> drv: #<derivation /home/alberto/user/documents/guix/guix/test-tmp/store/sgayxa7f7z71qsvx4jnyf3p84vx10ksb-module-import-compiled.drv => /home/alberto/user/documents/guix/guix/test-tmp/store/r6hmddqnajyd34hsazjrpr1d1p0sq2a4-module-import-compiled 7fc6ed508d70> sub-derivations: ("out")>
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/yw1r1glz9639kk23pzmgy5gg481fxaha-bar.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/yw//1r1glz9639kk23pzmgy5gg481fxaha-bar.drv.bz2 21569
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/yw1r1glz9639kk23pzmgy5gg481fxaha-bar.drv -
test-name: scheme-file
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1347
source:
+ (test-assert
+   "scheme-file"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (let* ((text (plain-file "foo" "Hello, world!"))
+                  (scheme
+                    (scheme-file
+                      "bar"
+                      (gexp (list "foo" (ungexp text))))))
+             (mlet* %store-monad
+                    ((drv (lower-object scheme))
+                     (text (lower-object text))
+                     (out -> (derivation->output-path drv)))
+                    (mbegin
+                      %store-monad
+                      (built-derivations (list drv))
+                      (mlet %store-monad
+                            ((refs (references* out)))
+                            (return
+                              (and (equal? refs (list text))
+                                   (equal?
+                                     `(list "foo" ,text)
+                                     (call-with-input-file out read))))))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/ap4vicbwgdcpqfhjwvyzzsnyddj0c8x4-drv-ref.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/ap//4vicbwgdcpqfhjwvyzzsnyddj0c8x4-drv-ref.drv.bz2 21585
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/ap4vicbwgdcpqfhjwvyzzsnyddj0c8x4-drv-ref.drv -
test-name: raw-derivation-file
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1360
source:
+ (test-assert
+   "raw-derivation-file"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (let* ((exp (gexp (let ((drv (ungexp
+                                          (raw-derivation-file coreutils))))
+                               (when (file-exists? drv)
+                                     (symlink drv (ungexp output)))))))
+             (mlet* %store-monad
+                    ((dep (lower-object coreutils))
+                     (drv (gexp->derivation "drv-ref" exp))
+                     (out -> (derivation->output-path drv)))
+                    (mbegin
+                      %store-monad
+                      (built-derivations (list drv))
+                      (mlet %store-monad
+                            ((refs (references* out)))
+                            (return
+                              (and (member
+                                     (derivation-file-name dep)
+                                     (derivation-sources drv))
+                                   (not (member
+                                          (derivation-file-name dep)
+                                          (map derivation-input-path
+                                               (derivation-inputs drv))))
+                                   (equal?
+                                     (readlink out)
+                                     (derivation-file-name dep))
+                                   (equal?
+                                     refs
+                                     (list (derivation-file-name dep)))))))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/mrl83ms5z0x7wwijn505dlzsndy0yh01-foo.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/mr//l83ms5z0x7wwijn505dlzsndy0yh01-foo.drv.bz2 21586
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/mrl83ms5z0x7wwijn505dlzsndy0yh01-foo.drv -
test-name: text-file*
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1378
source:
+ (test-assert
+   "text-file*"
+   (run-with-store
+     %store
+     (mlet* %store-monad
+            ((drv (package->derivation %bootstrap-guile))
+             (guile -> (derivation->output-path drv))
+             (file (text-file "bar" "This is bar."))
+             (text (text-file*
+                     "foo"
+                     %bootstrap-guile
+                     "/bin/guile "
+                     (gexp-input %bootstrap-guile "out")
+                     "/bin/guile "
+                     drv
+                     "/bin/guile "
+                     file))
+             (done (built-derivations (list text)))
+             (out -> (derivation->output-path text))
+             (refs (references* out)))
+            (return
+              (and (lset= string=? refs (list guile file))
+                   (equal?
+                     (call-with-input-file out get-string-all)
+                     (string-append
+                       guile
+                       "/bin/guile "
+                       guile
+                       "/bin/guile "
+                       guile
+                       "/bin/guile "
+                       file)))))
+     #:guile-for-build
+     (package-derivation %store %bootstrap-guile)))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/1k2i3kwlllcfjsdr46haf3shdwaqxj04-mixed.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/1k//2i3kwlllcfjsdr46haf3shdwaqxj04-mixed.drv.bz2 21588
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/1k2i3kwlllcfjsdr46haf3shdwaqxj04-mixed.drv -
test-name: mixed-text-file
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1401
source:
+ (test-assert
+   "mixed-text-file"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((file ->
+                         (mixed-text-file
+                           "mixed"
+                           "export PATH="
+                           %bootstrap-guile
+                           "/bin"))
+                   (drv (lower-object file))
+                   (out -> (derivation->output-path drv))
+                   (guile-drv
+                     (package->derivation %bootstrap-guile))
+                   (guile -> (derivation->output-path guile-drv)))
+                  (mbegin
+                    %store-monad
+                    (built-derivations (list drv))
+                    (mlet %store-monad
+                          ((refs (references* out)))
+                          (return
+                            (and (string=?
+                                   (string-append "export PATH=" guile "/bin")
+                                   (call-with-input-file out get-string-all))
+                                 (equal? refs (list guile)))))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/d4d1li975lanbrd5kkf177nq1j568kz0-union.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/d4//d1li975lanbrd5kkf177nq1j568kz0-union.drv.bz2 21590
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/d4d1li975lanbrd5kkf177nq1j568kz0-union.drv -
test-name: file-union
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1416
source:
+ (test-assert
+   "file-union"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((union ->
+                          (file-union
+                            "union"
+                            `(("a" ,(plain-file "a" "1"))
+                              ("b/c/d" ,(plain-file "d" "2"))
+                              ("e" ,(plain-file "e" "3")))))
+                   (drv (lower-object union))
+                   (out -> (derivation->output-path drv)))
+                  (define (contents=? file str)
+                    (string=?
+                      (call-with-input-file
+                        (string-append out "/" file)
+                        get-string-all)
+                      str))
+                  (mbegin
+                    %store-monad
+                    (built-derivations (list drv))
+                    (return
+                      (and (contents=? "a" "1")
+                           (contents=? "b/c/d" "2")
+                           (contents=? "e" "3")))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: gexp->derivation vs. %current-target-system
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1434
source:
+ (test-assert
+   "gexp->derivation vs. %current-target-system"
+   (let ((mval (gexp->derivation
+                 "foo"
+                 (gexp (begin
+                         (mkdir (ungexp output))
+                         (foo (ungexp-native gnu-make))))
+                 #:target
+                 #f)))
+     (parameterize
+       ((%current-target-system "fooooo"))
+       (derivation? (run-with-store %store mval)))))
actual-value: #t
result: PASS

test-name: lower-object
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1445
source:
+ (test-assert
+   "lower-object"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet %store-monad
+                 ((drv1 (lower-object %bootstrap-guile))
+                  (drv2 (lower-object (package-source coreutils)))
+                  (item (lower-object (plain-file "foo" "Hello!"))))
+                 (return
+                   (and (derivation? drv1)
+                        (derivation? drv2)
+                        (store-path? item))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

@ build-started /home/alberto/user/documents/guix/guix/test-tmp/store/1v6zvk0nxkibmzrdlap53hbd31bh2yyw-computed.drv - x86_64-linux /home/alberto/user/documents/guix/guix/test-tmp/var/log/guix/drvs/1v//6zvk0nxkibmzrdlap53hbd31bh2yyw-computed.drv.bz2 21593
@ build-succeeded /home/alberto/user/documents/guix/guix/test-tmp/store/1v6zvk0nxkibmzrdlap53hbd31bh2yyw-computed.drv -
test-name: lower-object, computed-file
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1452
source:
+ (test-assert
+   "lower-object, computed-file"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (let* ((text (plain-file "foo" "Hello!"))
+                  (exp (gexp (begin
+                               (mkdir (ungexp output))
+                               (symlink
+                                 (ungexp %bootstrap-guile)
+                                 (string-append (ungexp output) "/guile"))
+                               (symlink
+                                 (ungexp text)
+                                 (string-append (ungexp output) "/text")))))
+                  (computed (computed-file "computed" exp)))
+             (mlet* %store-monad
+                    ((text (lower-object text))
+                     (guile-drv (lower-object %bootstrap-guile))
+                     (comp-drv (lower-object computed))
+                     (comp -> (derivation->output-path comp-drv)))
+                    (mbegin
+                      %store-monad
+                      (built-derivations (list comp-drv))
+                      (return
+                        (and (string=?
+                               (readlink (string-append comp "/guile"))
+                               (derivation->output-path guile-drv))
+                             (string=?
+                               (readlink (string-append comp "/text"))
+                               text))))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: lower-object, computed-file, #:system
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1471
source:
+ (test-equal
+   "lower-object, computed-file, #:system"
+   '("mips64el-linux")
+   (run-with-store
+     %store
+     (let* ((exp (gexp (symlink (ungexp coreutils) (ungexp output))))
+            (computed
+              (computed-file
+                "computed"
+                exp
+                #:guile
+                %bootstrap-guile)))
+       (mlet* %store-monad
+              ((drv (lower-object computed "mips64el-linux"))
+               (refs (references* (derivation-file-name drv))))
+              (return
+                (delete-duplicates
+                  (filter-map
+                    (lambda (file)
+                      (and (string-suffix? ".drv" file)
+                           (let ((drv (read-derivation-from-file file)))
+                             (derivation-system drv))))
+                    (cons (derivation-file-name drv) refs))))))))
expected-value: ("mips64el-linux")
actual-value: ("mips64el-linux")
result: PASS

test-name: lower-object & gexp-input-error?
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1489
source:
+ (test-assert
+   "lower-object & gexp-input-error?"
+   (guard (c ((gexp-input-error? c)
+              (gexp-error-invalid-input c)))
+          (run-with-store
+            %store
+            (lower-object (current-module))
+            #:guile-for-build
+            (%guile-for-build))))
actual-value: #<directory (test-gexp) 7fc6fa38c6e0>
result: PASS

test-name: printer
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1496
source:
+ (test-assert
+   "printer"
+   (string-match
+     "^#<gexp \\(string-append .*#<package coreutils.* \"/bin/uname\"\\) [[:graph:]]+tests/gexp\\.scm:[0-9]+:[0-9]+ [[:xdigit:]]+>$"
+     (with-output-to-string
+       (lambda ()
+         (write (gexp (string-append (ungexp coreutils) "/bin/uname")))))))
actual-value: #("#<gexp (string-append #<gexp-input #<package coreutils@8.32 gnu/packages/base.scm:328 7fc6ef0c55a0>:out> \"/bin/uname\") /home/alberto/user/documents/guix/guix/tests/gexp.scm:1502:21 7fc6ecf3a5d0>" (0 . 194))
result: PASS

test-name: printer vs. ungexp-splicing
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1505
source:
+ (test-assert
+   "printer vs. ungexp-splicing"
+   (string-match
+     "^#<gexp .* [[:xdigit:]]+>$"
+     (with-output-to-string
+       (lambda ()
+         (write (gexp (begin (ungexp-splicing (gexp ())))))))))
actual-value: #("#<gexp  /home/alberto/user/documents/guix/guix/tests/gexp.scm:1511:21 7fc6ec8510c0>" (0 . 83))
result: PASS

test-name: sugar
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1513
source:
+ (test-equal
+   "sugar"
+   '(gexp (foo (ungexp bar)
+               (ungexp baz "out")
+               (ungexp (chbouib 42))
+               (ungexp-splicing (list x y z))
+               (ungexp-native foo)
+               (ungexp-native foo "out")
+               (ungexp-native (chbouib 42))
+               (ungexp-native-splicing (list x y z))))
+   '(gexp (foo (ungexp bar)
+               (ungexp baz "out")
+               (ungexp (chbouib 42))
+               (ungexp-splicing (list x y z))
+               (ungexp-native foo)
+               (ungexp-native foo "out")
+               (ungexp-native (chbouib 42))
+               (ungexp-native-splicing (list x y z)))))
expected-value: (gexp (foo (ungexp bar) (ungexp baz "out") (ungexp (chbouib 42)) (ungexp-splicing (list x y z)) (ungexp-native foo) (ungexp-native foo "out") (ungexp-native (chbouib 42)) (ungexp-native-splicing (list x y z))))
actual-value: (gexp (foo (ungexp bar) (ungexp baz "out") (ungexp (chbouib 42)) (ungexp-splicing (list x y z)) (ungexp-native foo) (ungexp-native foo "out") (ungexp-native (chbouib 42)) (ungexp-native-splicing (list x y z))))
result: PASS

test-name: gexp->file, cross-compilation
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1523
source:
+ (test-assert
+   "gexp->file, cross-compilation"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((target -> "aarch64-linux-gnu")
+                   (exp -> (gexp (list (ungexp coreutils))))
+                   (xdrv (gexp->file "foo" exp #:target target))
+                   (refs (references* (derivation-file-name xdrv)))
+                   (xcu (package->cross-derivation coreutils target))
+                   (cu (package->derivation coreutils)))
+                  (return
+                    (and (member (derivation-file-name xcu) refs)
+                         (not (member (derivation-file-name cu) refs)))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: gexp->file, cross-compilation with default target
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1535
source:
+ (test-assert
+   "gexp->file, cross-compilation with default target"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((target -> "aarch64-linux-gnu")
+                   (_ (set-current-target target))
+                   (exp -> (gexp (list (ungexp coreutils))))
+                   (xdrv (gexp->file "foo" exp))
+                   (refs (references* (derivation-file-name xdrv)))
+                   (xcu (package->cross-derivation coreutils target))
+                   (cu (package->derivation coreutils)))
+                  (return
+                    (and (member (derivation-file-name xcu) refs)
+                         (not (member (derivation-file-name cu) refs)))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: gexp->script, cross-compilation
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1548
source:
+ (test-assert
+   "gexp->script, cross-compilation"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((target -> "aarch64-linux-gnu")
+                   (exp -> (gexp (list (ungexp coreutils))))
+                   (xdrv (gexp->script "foo" exp #:target target))
+                   (refs (references* (derivation-file-name xdrv)))
+                   (xcu (package->cross-derivation coreutils target))
+                   (cu (package->derivation coreutils)))
+                  (return
+                    (and (member (derivation-file-name xcu) refs)
+                         (not (member (derivation-file-name cu) refs)))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS

test-name: gexp->script, cross-compilation with default target
location: /home/alberto/user/documents/guix/guix/tests/gexp.scm:1560
source:
+ (test-assert
+   "gexp->script, cross-compilation with default target"
+   (let ((store (open-connection-for-tests)))
+     (dynamic-wind
+       (const #t)
+       (lambda ()
+         (run-with-store
+           store
+           (mlet* %store-monad
+                  ((target -> "aarch64-linux-gnu")
+                   (_ (set-current-target target))
+                   (exp -> (gexp (list (ungexp coreutils))))
+                   (xdrv (gexp->script "foo" exp))
+                   (refs (references* (derivation-file-name xdrv)))
+                   (xcu (package->cross-derivation coreutils target))
+                   (cu (package->derivation coreutils)))
+                  (return
+                    (and (member (derivation-file-name xcu) refs)
+                         (not (member (derivation-file-name cu) refs)))))
+           #:guile-for-build
+           (%guile-for-build)))
+       (lambda () (close-connection store)))))
actual-value: #t
result: PASS


Some deprecated features have been used.  Set the environment
variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
program to get more information.  Set it to "no" to suppress
this message.

SKIP: tests/git-authenticate
============================

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.50JJpQ/.git/
[master (root-commit) 3abf28f] first commit
 1 file changed, 1 insertion(+)
 create mode 100644 a.txt
[master d62d5a4] second commit
 1 file changed, 1 insertion(+)
 create mode 100644 b.txt
test-name: unsigned commits
location: /home/alberto/user/documents/guix/guix/tests/git-authenticate.scm:43
source:
+ (test-assert
+   "unsigned commits"
+   (with-temporary-git-repository
+     directory
+     '((add "a.txt" "A")
+       (commit "first commit")
+       (add "b.txt" "B")
+       (commit "second commit"))
+     (with-repository
+       directory
+       repository
+       (let ((commit1 (find-commit repository "first"))
+             (commit2 (find-commit repository "second")))
+         (guard (c ((unsigned-commit-error? c)
+                    (oid=? (git-authentication-error-commit c)
+                           (commit-id commit1))))
+                (authenticate-commits
+                  repository
+                  (list commit1 commit2)
+                  #:keyring-reference
+                  "master")
+                'failed)))))
actual-value: #t
result: PASS

test-name: signed commits, SHA1 signature
location: /home/alberto/user/documents/guix/guix/tests/git-authenticate.scm:60
source:
+ (test-assert
+   "signed commits, SHA1 signature"
+   (with-fresh-gnupg-setup
+     (list %ed25519-public-key-file
+           %ed25519-secret-key-file)
+     (call-with-output-file
+       (string-append (getenv "GNUPGHOME") "/gpg.conf")
+       (lambda (port) (display "digest-algo sha1" port)))
+     (with-temporary-git-repository
+       directory
+       `((add "a.txt" "A")
+         (add "signer.key"
+              ,(call-with-input-file
+                 %ed25519-public-key-file
+                 get-string-all))
+         (add ".guix-authorizations"
+              ,(object->string
+                 `(authorizations
+                    (version 0)
+                    ((,(key-fingerprint %ed25519-public-key-file)
+                      (name "Charlie"))))))
+         (commit
+           "first commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file))))
+       (with-repository
+         directory
+         repository
+         (let ((commit (find-commit repository "first")))
+           (guard (c ((unsigned-commit-error? c)
+                      (oid=? (git-authentication-error-commit c)
+                             (commit-id commit))))
+                  (authenticate-commits
+                    repository
+                    (list commit)
+                    #:keyring-reference
+                    "master")
+                  'failed))))))
result: SKIP

test-name: signed commits, default authorizations
location: /home/alberto/user/documents/guix/guix/tests/git-authenticate.scm:89
source:
+ (test-assert
+   "signed commits, default authorizations"
+   (with-fresh-gnupg-setup
+     (list %ed25519-public-key-file
+           %ed25519-secret-key-file)
+     (with-temporary-git-repository
+       directory
+       `((add "signer.key"
+              ,(call-with-input-file
+                 %ed25519-public-key-file
+                 get-string-all))
+         (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))))
+       (with-repository
+         directory
+         repository
+         (let ((commit1 (find-commit repository "first"))
+               (commit2 (find-commit repository "second")))
+           (authenticate-commits
+             repository
+             (list commit1 commit2)
+             #:default-authorizations
+             (list (openpgp-public-key-fingerprint
+                     (read-openpgp-packet %ed25519-public-key-file)))
+             #:keyring-reference
+             "master"))))))
result: SKIP

test-name: signed commits, .guix-authorizations
location: /home/alberto/user/documents/guix/guix/tests/git-authenticate.scm:113
source:
+ (test-assert
+   "signed commits, .guix-authorizations"
+   (with-fresh-gnupg-setup
+     (list %ed25519-public-key-file
+           %ed25519-secret-key-file)
+     (with-temporary-git-repository
+       directory
+       `((add "signer.key"
+              ,(call-with-input-file
+                 %ed25519-public-key-file
+                 get-string-all))
+         (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 ".guix-authorizations"
+              ,(object->string `(authorizations (version 0) ())))
+         (commit
+           "second commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file)))
+         (add "b.txt" "B")
+         (commit
+           "third commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file))))
+       (with-repository
+         directory
+         repository
+         (let ((commit1 (find-commit repository "first"))
+               (commit2 (find-commit repository "second"))
+               (commit3 (find-commit repository "third")))
+           (and (authenticate-commits
+                  repository
+                  (list commit1 commit2)
+                  #:keyring-reference
+                  "master")
+                (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-public-key-file))))))
+                       (authenticate-commits
+                         repository
+                         (list commit1 commit2 commit3)
+                         #:keyring-reference
+                         "master")
+                       'failed)))))))
result: SKIP

test-name: signed commits, .guix-authorizations, unauthorized merge
location: /home/alberto/user/documents/guix/guix/tests/git-authenticate.scm:161
source:
+ (test-assert
+   "signed commits, .guix-authorizations, unauthorized merge"
+   (with-fresh-gnupg-setup
+     (list %ed25519-public-key-file
+           %ed25519-secret-key-file
+           %ed25519bis-public-key-file
+           %ed25519bis-secret-key-file)
+     (with-temporary-git-repository
+       directory
+       `((add "signer1.key"
+              ,(call-with-input-file
+                 %ed25519-public-key-file
+                 get-string-all))
+         (add "signer2.key"
+              ,(call-with-input-file
+                 %ed25519bis-public-key-file
+                 get-string-all))
+         (add ".guix-authorizations"
+              ,(object->string
+                 `(authorizations
+                    (version 0)
+                    ((,(key-fingerprint %ed25519-public-key-file)
+                      (name "Alice"))))))
+         (commit "zeroth commit")
+         (add "a.txt" "A")
+         (commit
+           "first commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file)))
+         (branch "devel")
+         (checkout "devel")
+         (add "devel/1.txt" "1")
+         (commit
+           "first devel commit"
+           (signer
+             ,(key-fingerprint %ed25519bis-public-key-file)))
+         (checkout "master")
+         (add "b.txt" "B")
+         (commit
+           "second commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file)))
+         (merge "devel"
+                "merge"
+                (signer
+                  ,(key-fingerprint %ed25519-public-key-file))))
+       (with-repository
+         directory
+         repository
+         (let ((master1 (find-commit repository "first commit"))
+               (master2
+                 (find-commit repository "second commit"))
+               (devel1
+                 (find-commit repository "first devel commit"))
+               (merge (find-commit repository "merge")))
+           (define (correct? c commit)
+             (and (oid=? (git-authentication-error-commit c)
+                         (commit-id commit))
+                  (bytevector=?
+                    (openpgp-public-key-fingerprint
+                      (unauthorized-commit-error-signing-key c))
+                    (openpgp-public-key-fingerprint
+                      (read-openpgp-packet %ed25519bis-public-key-file)))))
+           (and (authenticate-commits
+                  repository
+                  (list master1 master2)
+                  #:keyring-reference
+                  "master")
+                (guard (c ((unauthorized-commit-error? c)
+                           (correct? c devel1)))
+                       (authenticate-commits
+                         repository
+                         (list master1 devel1)
+                         #:keyring-reference
+                         "master")
+                       #f)
+                (guard (c ((unauthorized-commit-error? c)
+                           (correct? c devel1)))
+                       (authenticate-commits
+                         repository
+                         (list master1 master2 devel1 merge)
+                         #:keyring-reference
+                         "master")
+                       #f)))))))
result: SKIP

test-name: signed commits, .guix-authorizations, authorized merge
location: /home/alberto/user/documents/guix/guix/tests/git-authenticate.scm:230
source:
+ (test-assert
+   "signed commits, .guix-authorizations, authorized merge"
+   (with-fresh-gnupg-setup
+     (list %ed25519-public-key-file
+           %ed25519-secret-key-file
+           %ed25519bis-public-key-file
+           %ed25519bis-secret-key-file)
+     (with-temporary-git-repository
+       directory
+       `((add "signer1.key"
+              ,(call-with-input-file
+                 %ed25519-public-key-file
+                 get-string-all))
+         (add "signer2.key"
+              ,(call-with-input-file
+                 %ed25519bis-public-key-file
+                 get-string-all))
+         (add ".guix-authorizations"
+              ,(object->string
+                 `(authorizations
+                    (version 0)
+                    ((,(key-fingerprint %ed25519-public-key-file)
+                      (name "Alice"))))))
+         (commit "zeroth commit")
+         (add "a.txt" "A")
+         (commit
+           "first commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file)))
+         (branch "devel")
+         (checkout "devel")
+         (add ".guix-authorizations"
+              ,(object->string
+                 `(authorizations
+                    (version 0)
+                    ((,(key-fingerprint %ed25519-public-key-file)
+                      (name "Alice"))
+                     (,(key-fingerprint %ed25519bis-public-key-file))))))
+         (commit
+           "first devel commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file)))
+         (add "devel/2.txt" "2")
+         (commit
+           "second devel commit"
+           (signer
+             ,(key-fingerprint %ed25519bis-public-key-file)))
+         (checkout "master")
+         (add "b.txt" "B")
+         (commit
+           "second commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file)))
+         (merge "devel"
+                "merge"
+                (signer
+                  ,(key-fingerprint %ed25519-public-key-file)))
+         (add "c.txt" "C")
+         (commit
+           "third commit"
+           (signer
+             ,(key-fingerprint %ed25519bis-public-key-file))))
+       (with-repository
+         directory
+         repository
+         (let ((master1 (find-commit repository "first commit"))
+               (master2
+                 (find-commit repository "second commit"))
+               (devel1
+                 (find-commit repository "first devel commit"))
+               (devel2
+                 (find-commit repository "second devel commit"))
+               (merge (find-commit repository "merge"))
+               (master3 (find-commit repository "third commit")))
+           (authenticate-commits
+             repository
+             (list master1
+                   master2
+                   devel1
+                   devel2
+                   merge
+                   master3)
+             #:keyring-reference
+             "master"))))))
result: SKIP

test-name: signed commits, .guix-authorizations removed
location: /home/alberto/user/documents/guix/guix/tests/git-authenticate.scm:290
source:
+ (test-assert
+   "signed commits, .guix-authorizations removed"
+   (with-fresh-gnupg-setup
+     (list %ed25519-public-key-file
+           %ed25519-secret-key-file)
+     (with-temporary-git-repository
+       directory
+       `((add "signer.key"
+              ,(call-with-input-file
+                 %ed25519-public-key-file
+                 get-string-all))
+         (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)))
+         (remove ".guix-authorizations")
+         (commit
+           "second commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file)))
+         (add "b.txt" "B")
+         (commit
+           "third commit"
+           (signer
+             ,(key-fingerprint %ed25519-public-key-file))))
+       (with-repository
+         directory
+         repository
+         (let ((commit1 (find-commit repository "first"))
+               (commit2 (find-commit repository "second"))
+               (commit3 (find-commit repository "third")))
+           (and (authenticate-commits
+                  repository
+                  (list commit1 commit2)
+                  #:keyring-reference
+                  "master")
+                (guard (c ((unauthorized-commit-error? c)
+                           (oid=? (git-authentication-error-commit c)
+                                  (commit-id commit2))))
+                       (authenticate-commits
+                         repository
+                         (list commit1 commit2 commit3)
+                         #:keyring-reference
+                         "master")
+                       'failed)))))))
result: SKIP


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


Starting download of /tmp/guix-file.HZHmjP
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"
Trying to use Disarchive to assemble /tmp/guix-file.HZHmjP...
could not find its Disarchive specification
failed to download "/tmp/guix-file.HZHmjP" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test 1
location: /home/alberto/user/documents/guix/guix/tests/hackage.scm:193
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.mPxxCR
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"
Trying to use Disarchive to assemble /tmp/guix-file.mPxxCR...
could not find its Disarchive specification
failed to download "/tmp/guix-file.mPxxCR" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test 2
location: /home/alberto/user/documents/guix/guix/tests/hackage.scm:196
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.2w66sO
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"
Trying to use Disarchive to assemble /tmp/guix-file.2w66sO...
could not find its Disarchive specification
failed to download "/tmp/guix-file.2w66sO" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test 3
location: /home/alberto/user/documents/guix/guix/tests/hackage.scm:199
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.nUJCJN
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"
Trying to use Disarchive to assemble /tmp/guix-file.nUJCJN...
could not find its Disarchive specification
failed to download "/tmp/guix-file.nUJCJN" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test 4
location: /home/alberto/user/documents/guix/guix/tests/hackage.scm:203
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.01AbJP
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"
Trying to use Disarchive to assemble /tmp/guix-file.01AbJP...
could not find its Disarchive specification
failed to download "/tmp/guix-file.01AbJP" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test 5
location: /home/alberto/user/documents/guix/guix/tests/hackage.scm:207
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.MasQ3N
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"
Trying to use Disarchive to assemble /tmp/guix-file.MasQ3N...
could not find its Disarchive specification
failed to download "/tmp/guix-file.MasQ3N" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test 6
location: /home/alberto/user/documents/guix/guix/tests/hackage.scm:238
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.xKjrWO
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"
Trying to use Disarchive to assemble /tmp/guix-file.xKjrWO...
could not find its Disarchive specification
failed to download "/tmp/guix-file.xKjrWO" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test multiline desc (layout)
location: /home/alberto/user/documents/guix/guix/tests/hackage.scm:256
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.XmUBpR
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"
Trying to use Disarchive to assemble /tmp/guix-file.XmUBpR...
could not find its Disarchive specification
failed to download "/tmp/guix-file.XmUBpR" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test multiline desc (braced)
location: /home/alberto/user/documents/guix/guix/tests/hackage.scm:276
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/alberto/user/documents/guix/guix/tests/hackage.scm:296
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

Syntax error: unexpected token : (buildable (False)) (at line 12, column 4)
Syntax error: unexpected end of input

;;; (fail #f #f)
test-name: hackage->guix-package test flag executable
location: /home/alberto/user/documents/guix/guix/tests/hackage.scm:323
source:
+ (test-assert
+   "hackage->guix-package test flag executable"
+   (eval-test-with-cabal
+     test-cabal-flag-executable
+     match-ghc-foo))
actual-value: #f
result: XFAIL


Starting download of /tmp/guix-file.FTrm7P
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"
Trying to use Disarchive to assemble /tmp/guix-file.FTrm7P...
could not find its Disarchive specification
failed to download "/tmp/guix-file.FTrm7P" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test cabal revision
location: /home/alberto/user/documents/guix/guix/tests/hackage.scm:368
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/alberto/user/documents/guix/guix/tests/hackage.scm:371
source:
+ (test-assert
+   "read-cabal test 1"
+   (match (call-with-input-string
+            test-read-cabal-1
+            read-cabal)
+          ((("name" ("test-me"))
+            ('section
+             'library
+             (('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


Starting download of /tmp/guix-file.rOscdR
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"
Trying to use Disarchive to assemble /tmp/guix-file.rOscdR...
could not find its Disarchive specification
failed to download "/tmp/guix-file.rOscdR" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz"
test-name: hackage->guix-package test cabal import
location: /home/alberto/user/documents/guix/guix/tests/hackage.scm:430
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


FAIL: tests/opam
================

test-name: opam->guix-package
location: /home/alberto/user/documents/guix/guix/tests/opam.scm:73
source:
+ (test-assert
+   "opam->guix-package"
+   (mock ((guix import utils)
+          url-fetch
+          (lambda (url file-name)
+            (match url
+                   ("https://example.org/foo-1.0.0.tar.gz"
+                    (begin
+                      (mkdir-p "foo-1.0.0")
+                      (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))))
+                   (_ (error "Unexpected URL: " url)))))
+         (let ((my-package
+                 (string-append
+                   test-repo
+                   "/packages/foo/foo.1.0.0")))
+           (mkdir-p my-package)
+           (with-output-to-file
+             (string-append my-package "/opam")
+             (lambda _ (format #t "~a" test-opam-file))))
+         (match (opam->guix-package
+                  "foo"
+                  #:repo
+                  (list test-repo))
+                (('package
+                  ('name "ocaml-foo")
+                  ('version "1.0.0")
+                  ('source
+                   ('origin
+                    ('method 'url-fetch)
+                    ('uri "https://example.org/foo-1.0.0.tar.gz")
+                    ('sha256 ('base32 (? string? hash)))))
+                  ('build-system 'ocaml-build-system)
+                  ('propagated-inputs
+                   ('quasiquote
+                    (("ocaml-zarith" ('unquote 'ocaml-zarith)))))
+                  ('native-inputs
+                   ('quasiquote
+                    (("ocaml-alcotest" ('unquote 'ocaml-alcotest))
+                     ("ocamlbuild" ('unquote 'ocamlbuild)))))
+                  ('home-page "https://example.org/")
+                  ('synopsis "Some example package")
+                  ('description "This package is just an example.")
+                  ('license 'license:bsd-3))
+                 (string=?
+                   (bytevector->nix-base32-string test-source-hash)
+                   hash))
+                (x (pk 'fail x #f)))))
actual-value: #f
actual-error:
+ (unbound-variable
+   #f
+   "Unbound variable: ~S"
+   (call-with-port)
+   #f)
result: FAIL

( . #f)
("hello" string-pat hello)
("hello world" string-pat hello world)
("The dreaded \"?\"" string-pat The dreaded "?")
("Have some \\\\ :)" string-pat Have some \\ :))
("???" string-pat ???)
test-name: parse-strings
location: /home/alberto/user/documents/guix/guix/tests/opam.scm:123
source:
+ (test-assert
+   name
+   (fold (lambda (test acc)
+           (display test)
+           (newline)
+           (match test
+                  ((str . expected)
+                   (and acc
+                        (let ((result (peg:tree (match-pattern pattern str))))
+                          (if (equal? result expected)
+                            #t
+                            (pk 'fail (list str result expected) #f)))))))
+         #t
+         test-cases))
actual-value: #t
result: PASS

( . #f)
("""hello""" multiline-string hello)
("""hello "world"!""" multiline-string hello "world"!)
("""hello ""world""!""" multiline-string hello ""world""!)
test-name: parse-multiline-strings
location: /home/alberto/user/documents/guix/guix/tests/opam.scm:123
source:
+ (test-assert
+   name
+   (fold (lambda (test acc)
+           (display test)
+           (newline)
+           (match test
+                  ((str . expected)
+                   (and acc
+                        (let ((result (peg:tree (match-pattern pattern str))))
+                          (if (equal? result expected)
+                            #t
+                            (pk 'fail (list str result expected) #f)))))))
+         #t
+         test-cases))
actual-value: #t
result: PASS

( . #f)
([] . list-pat)
([make] list-pat (var make))
(["make"] list-pat (string-pat make))
([
  a
  b
  c] list-pat (var a) (var b) (var c))
([a   b     "c"] list-pat (var a) (var b) (string-pat c))
([(a & b)] list-pat (choice-pat (group-pat (var a) (var b))))
([(a | b & c)] list-pat (choice-pat (var a) (group-pat (var b) (var c))))
([a (b | c) d] list-pat (var a) (choice-pat (var b) (var c)) (var d))
test-name: parse-lists
location: /home/alberto/user/documents/guix/guix/tests/opam.scm:123
source:
+ (test-assert
+   name
+   (fold (lambda (test acc)
+           (display test)
+           (newline)
+           (match test
+                  ((str . expected)
+                   (and acc
+                        (let ((result (peg:tree (match-pattern pattern str))))
+                          (if (equal? result expected)
+                            #t
+                            (pk 'fail (list str result expected) #f)))))))
+         #t
+         test-cases))
actual-value: #t
result: PASS

( . #f)
({} . dict)
({a: "b"} dict (record a (string-pat b)))
({a: "b"
c: "d"} dict (record a (string-pat b)) (record c (string-pat d)))
test-name: parse-dicts
location: /home/alberto/user/documents/guix/guix/tests/opam.scm:123
source:
+ (test-assert
+   name
+   (fold (lambda (test acc)
+           (display test)
+           (newline)
+           (match test
+                  ((str . expected)
+                   (and acc
+                        (let ((result (peg:tree (match-pattern pattern str))))
+                          (if (equal? result expected)
+                            #t
+                            (pk 'fail (list str result expected) #f)))))))
+         #t
+         test-cases))
actual-value: #t
result: PASS

( . #f)
({} . #f)
({build} condition-var build)
({>= "0.2.0"} condition-greater-or-equal (condition-string 0.2.0))
({>= "0.2.0" & test} condition-and (condition-greater-or-equal (condition-string 0.2.0)) (condition-var test))
({>= "0.2.0" | build} condition-or (condition-greater-or-equal (condition-string 0.2.0)) (condition-var build))
({ = "1.0+beta19" } condition-eq (condition-string 1.0+beta19))
test-name: parse-conditions
location: /home/alberto/user/documents/guix/guix/tests/opam.scm:123
source:
+ (test-assert
+   name
+   (fold (lambda (test acc)
+           (display test)
+           (newline)
+           (match test
+                  ((str . expected)
+                   (and acc
+                        (let ((result (peg:tree (match-pattern pattern str))))
+                          (if (equal? result expected)
+                            #t
+                            (pk 'fail (list str result expected) #f)))))))
+         #t
+         test-cases))
actual-value: #t
result: PASS

( . #f)
([#comment
] . list-pat)
test-name: parse-comment
location: /home/alberto/user/documents/guix/guix/tests/opam.scm:123
source:
+ (test-assert
+   name
+   (fold (lambda (test acc)
+           (display test)
+           (newline)
+           (match test
+                  ((str . expected)
+                   (and acc
+                        (let ((result (peg:tree (match-pattern pattern str))))
+                          (if (equal? result expected)
+                            #t
+                            (pk 'fail (list str result expected) #f)))))))
+         #t
+         test-cases))
actual-value: #t
result: PASS


SKIP: tests/pypi
================

test-name: guix-package->pypi-name, old URL style
location: /home/alberto/user/documents/guix/guix/tests/pypi.scm:125
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/alberto/user/documents/guix/guix/tests/pypi.scm:133
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/alberto/user/documents/guix/guix/tests/pypi.scm:141
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: specification->requirement-name
location: /home/alberto/user/documents/guix/guix/tests/pypi.scm:150
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/alberto/user/documents/guix/guix/tests/pypi.scm:154
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/alberto/user/documents/guix/guix/tests/pypi.scm:160
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/alberto/user/documents/guix/guix/tests/pypi.scm:166
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/alberto/user/documents/guix/guix/tests/pypi.scm:172
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: pypi->guix-package, no wheel
location: /home/alberto/user/documents/guix/guix/tests/pypi.scm:178
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)
+                            (string-length test-json)))
+                         ("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
+                         ('quasiquote
+                          (("python-bar" ('unquote 'python-bar))
+                           ("python-foo" ('unquote 'python-foo)))))
+                        ('native-inputs
+                         ('quasiquote
+                          (("python-pytest" ('unquote '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

test-name: pypi->guix-package, wheels
location: /home/alberto/user/documents/guix/guix/tests/pypi.scm:234
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)
+                            (string-length test-json)))
+                         ("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
+                         ('quasiquote
+                          (("python-bar" ('unquote 'python-bar))
+                           ("python-baz" ('unquote 'python-baz)))))
+                        ('native-inputs
+                         ('quasiquote
+                          (("python-pytest" ('unquote '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))))))
result: SKIP

test-name: pypi->guix-package, no usable requirement file.
location: /home/alberto/user/documents/guix/guix/tests/pypi.scm:302
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)
+                            (string-length test-json)))
+                         ("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

warning: Cannot guess requirements from source archive: no requires.txt file found.

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

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

test-name: default value, custom serializer
location: /home/alberto/user/documents/guix/guix/tests/services/configuration.scm:46
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/alberto/user/documents/guix/guix/tests/services/configuration.scm:54
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/alberto/user/documents/guix/guix/tests/services/configuration.scm:59
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/alberto/user/documents/guix/guix/tests/services/configuration.scm:70
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/alberto/user/documents/guix/guix/tests/services/configuration.scm:79
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/alberto/user/documents/guix/guix/tests/services/configuration.scm:92
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/alberto/user/documents/guix/guix/tests/services/configuration.scm:109
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 without serialization no procedure bound
location: /home/alberto/user/documents/guix/guix/tests/services/configuration.scm:119
source:
+ (test-assert
+   "maybe value without serialization no procedure bound"
+   (not (defined? 'serialize-maybe-string)))
actual-value: #t
result: PASS


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

test-name: mount, ENOENT
location: /home/alberto/user/documents/guix/guix/tests/syscalls.scm:42
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/alberto/user/documents/guix/guix/tests/syscalls.scm:50
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/alberto/user/documents/guix/guix/tests/syscalls.scm:59
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/alberto/user/documents/guix/guix/tests/syscalls.scm:73
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/cgroup/unified" "/sys/fs/cgroup/systemd" "/sys/fs/pstore" "/sys/firmware/efi/efivars" "/sys/fs/bpf" "/sys/fs/cgroup/perf_event" "/sys/fs/cgroup/net_cls,net_prio" "/sys/fs/cgroup/blkio" "/sys/fs/cgroup/freezer" "/sys/fs/cgroup/cpu,cpuacct" "/sys/fs/cgroup/hugetlb" "/sys/fs/cgroup/rdma" "/sys/fs/cgroup/devices" "/sys/fs/cgroup/cpuset" "/sys/fs/cgroup/memory" "/sys/fs/cgroup/pids" "/proc/sys/fs/binfmt_misc" "/dev/hugepages" "/dev/mqueue" "/gnu/store" "/sys/kernel/debug" "/sys/kernel/tracing" "/sys/fs/fuse/connections" "/sys/kernel/config" "/snap/core18/2074" "/snap/core/11606" "/snap/gtk2-common-themes/13" "/snap/core18/2128" "/snap/core/11420" "/snap/snap-store/547" "/snap/snapd/12704" "/snap/gtk-common-themes/1506" "/snap/wps-2019-snap/2" "/snap/gnome-3-34-1804/72" "/snap/snap-store/542" "/snap/gtk-common-themes/1515" "/snap/snapd/12883" "/snap/gnome-3-34-1804/66" "/boot" "/boot/efi" "/proc/sys/fs/binfmt_misc" "/run/user/1000" "/run/user/1000/gvfs" "/run/user/1000/doc")
result: PASS

test-name: utime with AT_SYMLINK_NOFOLLOW
location: /home/alberto/user/documents/guix/guix/tests/syscalls.scm:80
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/alberto/user/documents/guix/guix/tests/syscalls.scm:92
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/alberto/user/documents/guix/guix/tests/syscalls.scm:100
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/alberto/user/documents/guix/guix/tests/syscalls.scm:108
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/alberto/user/documents/guix/guix/tests/syscalls.scm:116
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/alberto/user/documents/guix/guix/tests/syscalls.scm:123
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/alberto/user/documents/guix/guix/tests/syscalls.scm:140
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/alberto/user/documents/guix/guix/tests/syscalls.scm:153
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/alberto/user/documents/guix/guix/tests/syscalls.scm:182
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/alberto/user/documents/guix/guix/tests/syscalls.scm:231
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/alberto/user/documents/guix/guix/tests/syscalls.scm:239
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" "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" "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" "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" "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" "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" "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" "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" "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" "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" "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/alberto/user/documents/guix/guix/tests/syscalls.scm:246
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/alberto/user/documents/guix/guix/tests/syscalls.scm:273
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/alberto/user/documents/guix/guix/tests/syscalls.scm:290
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.PnG9i7/??: No such file or directory
warning: failed to delete /tmp/guix-directory.PnG9i7/??: No such file or directory
test-name: fcntl-flock wait
location: /home/alberto/user/documents/guix/guix/tests/syscalls.scm:304
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.PnG9i7/??: No such file or directory
warning: failed to delete /tmp/guix-directory.PnG9i7/??: No such file or directory
test-name: fcntl-flock non-blocking
location: /home/alberto/user/documents/guix/guix/tests/syscalls.scm:343
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/alberto/user/documents/guix/guix/tests/syscalls.scm:385
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/alberto/user/documents/guix/guix/tests/syscalls.scm:393
source:
+ (test-assert
+   "all-network-interface-names"
+   (match (all-network-interface-names)
+          (((? string? names) ..1) (member "lo" names))))
actual-value: ("lo" "eno2" "wlo1" "virbr0" "virbr0-nic" "docker0")
result: PASS

test-name: network-interface-names
location: /home/alberto/user/documents/guix/guix/tests/syscalls.scm:398
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/alberto/user/documents/guix/guix/tests/syscalls.scm:407
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/alberto/user/documents/guix/guix/tests/syscalls.scm:414
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/alberto/user/documents/guix/guix/tests/syscalls.scm:424
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/alberto/user/documents/guix/guix/tests/syscalls.scm:435
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/alberto/user/documents/guix/guix/tests/syscalls.scm:445
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/alberto/user/documents/guix/guix/tests/syscalls.scm:453
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/alberto/user/documents/guix/guix/tests/syscalls.scm:467
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/alberto/user/documents/guix/guix/tests/syscalls.scm:475
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/alberto/user/documents/guix/guix/tests/syscalls.scm:488
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/alberto/user/documents/guix/guix/tests/syscalls.scm:500
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/alberto/user/documents/guix/guix/tests/syscalls.scm:516
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/alberto/user/documents/guix/guix/tests/syscalls.scm:529
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/alberto/user/documents/guix/guix/tests/syscalls.scm:539
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/alberto/user/documents/guix/guix/tests/syscalls.scm:553
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/alberto/user/documents/guix/guix/tests/syscalls.scm:559
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/alberto/user/documents/guix/guix/tests/syscalls.scm:564
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/alberto/user/documents/guix/guix/tests/syscalls.scm:575
source:
+ (test-assert
+   "terminal-columns"
+   (> (terminal-columns) 0))
actual-value: #t
result: PASS

test-name: terminal-columns non-file port
location: /home/alberto/user/documents/guix/guix/tests/syscalls.scm:578
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/alberto/user/documents/guix/guix/tests/syscalls.scm:582
source:
+ (test-assert
+   "terminal-rows"
+   (> (terminal-rows) 0))
actual-value: #t
result: PASS

test-name: utmpx-entries
location: /home/alberto/user/documents/guix/guix/tests/syscalls.scm:585
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/alberto/user/documents/guix/guix/tests/syscalls.scm:602
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/alberto/user/documents/guix/guix/tests/syscalls.scm:607
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/alberto/user/documents/guix/guix/tests/syscalls.scm:613
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.PnG9i7/??: No such file or directory
warning: failed to delete /tmp/guix-directory.PnG9i7/??: No such file or directory

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

test-name: coalesce-sources same version
location: /home/alberto/user/documents/guix/guix/tests/upstream.scm:30
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


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

test-name: #f
location: /home/alberto/user/documents/guix/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/alberto/user/documents/guix/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/alberto/user/documents/guix/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/alberto/user/documents/guix/guix/tests/offload.scm:41:2: warning: The 'system' field is deprecated, please use 'systems' instead.


      reply	other threads:[~2021-09-10 22:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 17:00 bug#50512: Errors reported by make check Alberto EFG
2021-09-10 22:19 ` Alberto EFG [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czpg842t.fsf@posteo.mx \
    --to=albertoefg@posteo.mx \
    --cc=50512@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).