* bug#29612: tests/graph.scm fails on core-updates
@ 2017-12-08 4:07 Chris Marusich
2017-12-17 21:30 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Chris Marusich @ 2017-12-08 4:07 UTC (permalink / raw)
To: 29612
[-- Attachment #1.1: Type: text/plain, Size: 323 bytes --]
Hi,
Starting with commit 6dff905e51202bbdebbad8811b6509584d12a796 (on
core-updates), tests/graph.scm fails consistently. It still fails on
9e111db4535b3cd5729e37294ae51d95240334b4, which is the current tip of
core-updates.
I've attached the test-suite.log for a test run performed at this
commit.
--
Chris
[-- Attachment #1.2: test-suite.log --]
[-- Type: application/octet-stream, Size: 15615 bytes --]
==================================================
GNU Guix 0.13.0.2631-6dff9: ./test-suite.log
==================================================
# TOTAL: 12
# PASS: 11
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: tests/graph
=================
test-name: package DAG
location: /home/marusich/guix/tests/graph.scm:79
source:
+ (test-assert
+ "package DAG"
+ (let-values
+ (((backend nodes+edges) (make-recording-backend)))
+ (let* ((p1 (dummy-package "p1"))
+ (p2 (dummy-package "p2" (inputs `(("p1" ,p1)))))
+ (p3 (dummy-package
+ "p3"
+ (inputs `(("p2" ,p2) ("p1" ,p1))))))
+ (run-with-store
+ %store
+ (export-graph
+ (list p3)
+ 'port
+ #:node-type
+ %package-node-type
+ #:backend
+ backend))
+ (let-values
+ (((nodes edges) (nodes+edges)))
+ (and (equal?
+ nodes
+ (map package->tuple (list p3 p2 p1)))
+ (equal?
+ edges
+ (map edge->tuple (list p3 p3 p2) (list p2 p1 p1))))))))
actual-value: #t
result: PASS
test-name: reverse package DAG
location: /home/marusich/guix/tests/graph.scm:96
source:
+ (test-assert
+ "reverse package DAG"
+ (let-values
+ (((backend nodes+edges) (make-recording-backend)))
+ (run-with-store
+ %store
+ (export-graph
+ (list libunistring)
+ 'port
+ #:node-type
+ %reverse-package-node-type
+ #:backend
+ backend))
+ (let-values
+ (((nodes edges) (nodes+edges)))
+ (and (member (package->tuple guile-2.0) nodes)
+ (->bool
+ (member
+ (edge->tuple libunistring guile-2.0)
+ edges))))))
actual-value: #t
result: PASS
test-name: bag-emerged DAG
location: /home/marusich/guix/tests/graph.scm:107
source:
+ (test-assert
+ "bag-emerged DAG"
+ (let-values
+ (((backend nodes+edges) (make-recording-backend)))
+ (let* ((o (dummy-origin
+ (method (lambda _ (text-file "foo" "bar")))))
+ (p (dummy-package "p" (source o)))
+ (implicit
+ (map (match-lambda ((label package) package))
+ (standard-packages))))
+ (run-with-store
+ %store
+ (export-graph
+ (list p)
+ 'port
+ #:node-type
+ %bag-emerged-node-type
+ #:backend
+ backend))
+ (let-values
+ (((nodes edges) (nodes+edges)))
+ (and (equal?
+ (match nodes (((labels names) ...) names))
+ (map package-full-name (cons p implicit)))
+ (equal?
+ (match edges
+ (((sources destinations) ...)
+ (zip (map store-path-package-name sources)
+ (map store-path-package-name destinations))))
+ (map (lambda (destination)
+ (list "p-0.drv"
+ (string-append
+ (package-full-name destination)
+ ".drv")))
+ implicit)))))))
actual-value: #f
actual-error:
+ (match-error
+ "match"
+ "no matching pattern"
+ ("libc:static"
+ #<package glibc@2.25 gnu/packages/commencement.scm:647 30b2780>
+ "static"))
result: FAIL
test-name: bag DAG
location: /home/marusich/guix/tests/graph.scm:137
source:
+ (test-assert
+ "bag DAG"
+ (let-values
+ (((backend nodes+edges) (make-recording-backend)))
+ (let ((p (dummy-package "p")))
+ (run-with-store
+ %store
+ (export-graph
+ (list p)
+ 'port
+ #:node-type
+ %bag-node-type
+ #:backend
+ backend))
+ (let-values
+ (((nodes edges) (nodes+edges)))
+ (every (lambda (name)
+ (find (cut string=? name <>)
+ (match nodes (((labels names) ...) names))))
+ (match %bootstrap-inputs
+ (((labels packages) ...)
+ (map package-full-name packages))))))))
actual-value: "bootstrap-binaries-0"
result: PASS
test-name: bag DAG, including origins
location: /home/marusich/guix/tests/graph.scm:156
source:
+ (test-assert
+ "bag DAG, including origins"
+ (let-values
+ (((backend nodes+edges) (make-recording-backend)))
+ (let* ((m (lambda* (uri hash-type hash name #:key system)
+ (text-file "foo-1.2.3.tar.gz" "This is a fake!")))
+ (o (origin
+ (method m)
+ (uri "the-uri")
+ (sha256 #vu8(0 1 2))))
+ (p (dummy-package "p" (source o))))
+ (run-with-store
+ %store
+ (export-graph
+ (list p)
+ 'port
+ #:node-type
+ %bag-with-origins-node-type
+ #:backend
+ backend))
+ (let-values
+ (((nodes edges) (nodes+edges)))
+ (run-with-store
+ %store
+ (mlet %store-monad
+ ((o* (lower-object o))
+ (p* (lower-object p))
+ (g (lower-object (default-guile))))
+ (return
+ (and (find (match-lambda ((file "the-uri") #t) (_ #f))
+ nodes)
+ (find (match-lambda
+ ((source target)
+ (and (string=?
+ source
+ (derivation-file-name p*))
+ (string=? target o*))))
+ edges)
+ (find (match-lambda
+ ((source target)
+ (and (string=? source o*)
+ (string=?
+ target
+ (derivation-file-name g)))))
+ edges)))))))))
actual-value: ("/home/marusich/guix/test-tmp/store/hl3hjgnvz1hc5l85y69mnx00qm2m99ak-foo-1.2.3.tar.gz" "/home/marusich/guix/test-tmp/store/1zrhqhfxgcx6n5d7vr2qvax1r5ny7n9j-guile-2.2.2.drv")
result: PASS
test-name: derivation DAG
location: /home/marusich/guix/tests/graph.scm:190
source:
+ (test-assert
+ "derivation DAG"
+ (let-values
+ (((backend nodes+edges) (make-recording-backend)))
+ (run-with-store
+ %store
+ (mlet* %store-monad
+ ((txt (text-file "text-file" "Hello!"))
+ (guile (package->derivation %bootstrap-guile))
+ (drv (gexp->derivation
+ "output"
+ (gexp (symlink (ungexp txt) (ungexp output)))
+ #:guile-for-build
+ guile)))
+ (mbegin
+ %store-monad
+ (export-graph
+ (list drv)
+ 'port
+ #:node-type
+ %derivation-node-type
+ #:backend
+ backend)
+ (let-values
+ (((nodes edges) (nodes+edges)))
+ (return
+ (and (match nodes
+ (((ids labels) ...)
+ (let ((ids (map basename ids)))
+ (every (lambda (item)
+ (member (basename item) ids))
+ (list txt
+ (derivation-file-name drv)
+ (derivation-file-name
+ guile))))))
+ (every (cut member
+ <>
+ (map (lambda (edge) (map basename edge))
+ edges))
+ (list (map (compose
+ basename
+ derivation-file-name)
+ (list drv guile))
+ (list (basename
+ (derivation-file-name drv))
+ (basename txt))))))))))))
actual-value: (("3j375zh0fb9iv29f1arq0zn43viy82f4-output.drv" "p5i546s89r2fxxrq1js8y1082v7bx954-text-file") ("6fjmb4kg5pwlb8qyf1nvh1avk63dx66h-guile-bootstrap-2.0.drv" "f0z1lmz2ripamxyg0pg8sikvzgbkx9d0-guile-2.0.9.tar.xz.drv") ("6fjmb4kg5pwlb8qyf1nvh1avk63dx66h-guile-bootstrap-2.0.drv" "8xg7m62g5qpjgaczsnlwjwa6s5z6sbff-build-bootstrap-guile.sh") ("6fjmb4kg5pwlb8qyf1nvh1avk63dx66h-guile-bootstrap-2.0.drv" "k5hfp0b0v8h8fzll3pyhvbwgx8dsl68c-bash") ("f0z1lmz2ripamxyg0pg8sikvzgbkx9d0-guile-2.0.9.tar.xz.drv" "pmnbglfz72f4j823rimla31kddwqk0gq-mirrors") ("f0z1lmz2ripamxyg0pg8sikvzgbkx9d0-guile-2.0.9.tar.xz.drv" "vf8w37m14mn4s30yyikgqd369y5n7szh-content-addressed-mirrors"))
result: PASS
test-name: reference DAG
location: /home/marusich/guix/tests/graph.scm:223
source:
+ (test-assert
+ "reference DAG"
+ (let-values
+ (((backend nodes+edges) (make-recording-backend)))
+ (run-with-store
+ %store
+ (mlet* %store-monad
+ ((txt (text-file "text-file" "Hello!"))
+ (guile (package->derivation %bootstrap-guile))
+ (drv (gexp->derivation
+ "output"
+ (gexp (symlink (ungexp txt) (ungexp output)))
+ #:guile-for-build
+ guile))
+ (out -> (derivation->output-path drv)))
+ (mbegin
+ %store-monad
+ (built-derivations (list drv))
+ (export-graph
+ (list (derivation->output-path drv))
+ 'port
+ #:node-type
+ %reference-node-type
+ #:backend
+ backend)
+ (let-values
+ (((nodes edges) (nodes+edges)))
+ (return
+ (and (equal?
+ (match nodes (((ids labels) ...) ids))
+ (list out txt))
+ (equal? edges `((,out ,txt)))))))))))
actual-value: #t
result: PASS
test-name: referrer DAG
location: /home/marusich/guix/tests/graph.scm:248
source:
+ (test-assert
+ "referrer DAG"
+ (let-values
+ (((backend nodes+edges) (make-recording-backend)))
+ (run-with-store
+ %store
+ (mlet* %store-monad
+ ((txt (text-file "referrer-node" (random-text)))
+ (drv (gexp->derivation
+ "referrer"
+ (gexp (symlink (ungexp txt) (ungexp output)))))
+ (out -> (derivation->output-path drv)))
+ (mbegin
+ %store-monad
+ (built-derivations (list drv))
+ (export-graph
+ (list txt)
+ 'port
+ #:node-type
+ %referrer-node-type
+ #:backend
+ backend)
+ (let-values
+ (((nodes edges) (nodes+edges)))
+ (return
+ (and (equal?
+ (match nodes (((ids labels) ...) ids))
+ (list txt out))
+ (equal? edges `((,txt ,out)))))))))))
random seed for tests: 1512689338
@ build-started /home/marusich/guix/test-tmp/store/szliw9rvg0al4r18x34risza1vf46cbl-referrer.drv - x86_64-linux /home/marusich/guix/test-tmp/var/log/guix/drvs/sz//liw9rvg0al4r18x34risza1vf46cbl-referrer.drv.bz2
@ build-succeeded /home/marusich/guix/test-tmp/store/szliw9rvg0al4r18x34risza1vf46cbl-referrer.drv -
actual-value: #t
result: PASS
test-name: node-edges
location: /home/marusich/guix/tests/graph.scm:270
source:
+ (test-assert
+ "node-edges"
+ (run-with-store
+ %store
+ (let ((packages (fold-packages cons '())))
+ (mlet %store-monad
+ ((edges (node-edges %package-node-type packages)))
+ (return
+ (and (null? (edges sed))
+ (lset= eq?
+ (edges guile-2.0)
+ (match (package-direct-inputs guile-2.0)
+ (((labels packages _ ...) ...)
+ packages)))))))))
actual-value: #t
result: PASS
test-name: node-transitive-edges + node-back-edges
location: /home/marusich/guix/tests/graph.scm:281
source:
+ (test-assert
+ "node-transitive-edges + node-back-edges"
+ (run-with-store
+ %store
+ (let ((packages (fold-packages cons '()))
+ (bootstrap?
+ (lambda (package)
+ (string-contains
+ (location-file (package-location package))
+ "bootstrap.scm")))
+ (trivial?
+ (lambda (package)
+ (eq? (package-build-system package)
+ trivial-build-system))))
+ (mlet %store-monad
+ ((edges (node-back-edges %bag-node-type packages)))
+ (let* ((glibc (canonical-package glibc))
+ (dependents
+ (node-transitive-edges (list glibc) edges))
+ (diff (lset-difference eq? packages dependents)))
+ (return
+ (null? (remove
+ (lambda (package)
+ (or (trivial? package) (bootstrap? package)))
+ diff))))))))
actual-value: #t
result: PASS
test-name: node-transitive-edges, no duplicates
location: /home/marusich/guix/tests/graph.scm:302
source:
+ (test-assert
+ "node-transitive-edges, no duplicates"
+ (run-with-store
+ %store
+ (let* ((p0 (dummy-package "p0"))
+ (p1a (dummy-package "p1a" (inputs `(("p0" ,p0)))))
+ (p1b (dummy-package "p1b" (inputs `(("p0" ,p0)))))
+ (p2 (dummy-package
+ "p2"
+ (inputs `(("p1a" ,p1a) ("p1b" ,p1b))))))
+ (mlet %store-monad
+ ((edges (node-edges
+ %package-node-type
+ (list p2 p1a p1b p0))))
+ (return
+ (lset= eq?
+ (node-transitive-edges (list p2) edges)
+ (list p1a p1b p0)))))))
actual-value: #t
result: PASS
test-name: node-reachable-count
location: /home/marusich/guix/tests/graph.scm:313
source:
+ (test-equal
+ "node-reachable-count"
+ '(3 3)
+ (run-with-store
+ %store
+ (let* ((p0 (dummy-package "p0"))
+ (p1a (dummy-package "p1a" (inputs `(("p0" ,p0)))))
+ (p1b (dummy-package "p1b" (inputs `(("p0" ,p0)))))
+ (p2 (dummy-package
+ "p2"
+ (inputs `(("p1a" ,p1a) ("p1b" ,p1b))))))
+ (mlet* %store-monad
+ ((all -> (list p2 p1a p1b p0))
+ (edges (node-edges %package-node-type all))
+ (back (node-back-edges %package-node-type all)))
+ (return
+ (list (node-reachable-count (list p2) edges)
+ (node-reachable-count (list p0) back)))))))
expected-value: (3 3)
actual-value: (3 3)
result: PASS
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#29612: tests/graph.scm fails on core-updates
2017-12-08 4:07 bug#29612: tests/graph.scm fails on core-updates Chris Marusich
@ 2017-12-17 21:30 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2017-12-17 21:30 UTC (permalink / raw)
To: Chris Marusich; +Cc: 29612-done
Hi Chris,
Chris Marusich <cmmarusich@gmail.com> skribis:
> test-name: bag-emerged DAG
> location: /home/marusich/guix/tests/graph.scm:107
> source:
> + (test-assert
> + "bag-emerged DAG"
> + (let-values
> + (((backend nodes+edges) (make-recording-backend)))
> + (let* ((o (dummy-origin
> + (method (lambda _ (text-file "foo" "bar")))))
> + (p (dummy-package "p" (source o)))
> + (implicit
> + (map (match-lambda ((label package) package))
> + (standard-packages))))
> + (run-with-store
> + %store
> + (export-graph
> + (list p)
> + 'port
> + #:node-type
> + %bag-emerged-node-type
> + #:backend
> + backend))
> + (let-values
> + (((nodes edges) (nodes+edges)))
> + (and (equal?
> + (match nodes (((labels names) ...) names))
> + (map package-full-name (cons p implicit)))
> + (equal?
> + (match edges
> + (((sources destinations) ...)
> + (zip (map store-path-package-name sources)
> + (map store-path-package-name destinations))))
> + (map (lambda (destination)
> + (list "p-0.drv"
> + (string-append
> + (package-full-name destination)
> + ".drv")))
> + implicit)))))))
> actual-value: #f
> actual-error:
> + (match-error
> + "match"
> + "no matching pattern"
> + ("libc:static"
> + #<package glibc@2.25 gnu/packages/commencement.scm:647 30b2780>
> + "static"))
> result: FAIL
Fixed in cafc97e2f37f18e106c9a9cb9110a1862e9d0526, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-17 21:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-08 4:07 bug#29612: tests/graph.scm fails on core-updates Chris Marusich
2017-12-17 21:30 ` Ludovic Courtès
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).