unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39834: make check fails
@ 2020-02-29 14:59 Damien Cassou
  2020-03-02  9:57 ` zimoun
  0 siblings, 1 reply; 8+ messages in thread
From: Damien Cassou @ 2020-02-29 14:59 UTC (permalink / raw)
  To: 39834

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


OS: Fedora 31

$ guix describe
Generation 13   Feb 29 2020 15:00:51    (current)
  guix f76c16d
    repository URL: file:///home/cassou/Documents/projects/guix/guix
    branch: master
    commit: f76c16d220e6c349441c08bf25a5197037490fa5

$ cd /home/cassou/Documents/projects/guix/guix

$ guix environment --pure guix -- ./bootstrap

$ guix environment --pure guix -- ./configure --localstatedir=/var

$ guix environment --pure guix -- make check -j4
[…]
FAIL: tests/lint.scm
FAIL: tests/pack.scm
make[4]: *** [Makefile:5100: tests/store.log] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/home/cassou/Documents/projects/guix/guix'
make[3]: *** [Makefile:5082: check-TESTS] Error 2
make[3]: Leaving directory '/home/cassou/Documents/projects/guix/guix'
make[2]: *** [Makefile:5325: check-am] Error 2
make[2]: Leaving directory '/home/cassou/Documents/projects/guix/guix'
make[1]: *** [Makefile:4859: check-recursive] Error 1
make[1]: Leaving directory '/home/cassou/Documents/projects/guix/guix'
make: *** [Makefile:5327: check] Error 2


-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill

[-- Attachment #2: make-check.log --]
[-- Type: text/plain, Size: 3183 bytes --]

make  check-recursive
make[1]: Entering directory '/home/cassou/Documents/projects/guix/guix'
Making check in po/guix
make[2]: Entering directory '/home/cassou/Documents/projects/guix/guix/po/guix'
make[2]: Leaving directory '/home/cassou/Documents/projects/guix/guix/po/guix'
Making check in po/packages
make[2]: Entering directory '/home/cassou/Documents/projects/guix/guix/po/packages'
make[2]: Leaving directory '/home/cassou/Documents/projects/guix/guix/po/packages'
make[2]: Entering directory '/home/cassou/Documents/projects/guix/guix'
Compiling Scheme modules...
make  check-TESTS check-local
make[3]: Entering directory '/home/cassou/Documents/projects/guix/guix'
make[3]: Nothing to be done for 'check-local'.
make[4]: Entering directory '/home/cassou/Documents/projects/guix/guix'
PASS: tests/base16.scm
PASS: tests/base64.scm
SKIP: tests/base32.scm
PASS: tests/bournish.scm
PASS: tests/accounts.scm
PASS: tests/cache.scm
PASS: tests/builders.scm
PASS: tests/build-utils.scm
PASS: tests/combinators.scm
PASS: tests/cpan.scm
PASS: tests/containers.scm
SKIP: tests/channels.scm
SKIP: tests/cpio.scm
PASS: tests/cve.scm
PASS: tests/cran.scm
PASS: tests/debug-link.scm
PASS: tests/discovery.scm
PASS: tests/crate.scm
PASS: tests/file-systems.scm
PASS: tests/elpa.scm
PASS: tests/gem.scm
SKIP: tests/git.scm
PASS: tests/glob.scm
PASS: tests/gnu-maintenance.scm
PASS: tests/grafts.scm
SKIP: tests/gexp.scm
PASS: tests/gremlin.scm
SKIP: tests/hackage.scm
PASS: tests/graph.scm
PASS: tests/import-utils.scm
PASS: tests/derivations.scm
FAIL: tests/lint.scm
PASS: tests/modules.scm
PASS: tests/monads.scm
PASS: tests/challenge.scm
PASS: tests/networking.scm
PASS: tests/opam.scm
PASS: tests/nar.scm
FAIL: tests/pack.scm
PASS: tests/pki.scm
PASS: tests/print.scm
PASS: tests/processes.scm
PASS: tests/profiles.scm
PASS: tests/lzlib.scm
SKIP: tests/pypi.scm
PASS: tests/records.scm
PASS: tests/scripts.scm
PASS: tests/publish.scm
PASS: tests/search-paths.scm
PASS: tests/scripts-build.scm
PASS: tests/services/linux.scm
PASS: tests/sets.scm
PASS: tests/services.scm
SKIP: tests/snix.scm
PASS: tests/status.scm
PASS: tests/size.scm
PASS: tests/store-deduplication.scm
PASS: tests/store-roots.scm
PASS: tests/store-database.scm
PASS: tests/substitute.scm
PASS: tests/swh.scm
PASS: tests/inferior.scm
SKIP: tests/syscalls.scm
PASS: tests/system.scm
PASS: tests/texlive.scm
PASS: tests/union.scm
PASS: tests/ui.scm
SKIP: tests/upstream.scm
PASS: tests/uuid.scm
PASS: tests/utils.scm
PASS: tests/zlib.scm
PASS: tests/workers.scm
make[4]: *** [Makefile:5100: tests/store.log] Error 1
make[4]: *** Waiting for unfinished jobs....
PASS: tests/guix-build-branch.sh
PASS: tests/packages.scm
PASS: tests/guix-build.sh
make[4]: Leaving directory '/home/cassou/Documents/projects/guix/guix'
make[3]: *** [Makefile:5082: check-TESTS] Error 2
make[3]: Leaving directory '/home/cassou/Documents/projects/guix/guix'
make[2]: *** [Makefile:5325: check-am] Error 2
make[2]: Leaving directory '/home/cassou/Documents/projects/guix/guix'
make[1]: *** [Makefile:4859: check-recursive] Error 1
make[1]: Leaving directory '/home/cassou/Documents/projects/guix/guix'
make: *** [Makefile:5327: check] Error 2

[-- Attachment #3: pack.log --]
[-- Type: text/plain, Size: 16103 bytes --]

test-name: self-contained-tarball
location: /home/cassou/Documents/projects/guix/guix/tests/pack.scm:58
source:
+ (test-assert
+   "self-contained-tarball"
+   (let ((guile (package-derivation %store %bootstrap-guile)))
+     (run-with-store
+       %store
+       (mlet* %store-monad
+              ((profile
+                 (profile-derivation
+                   (packages->manifest (list %bootstrap-guile))
+                   #:hooks
+                   '()
+                   #:locales?
+                   #f))
+               (tarball
+                 (self-contained-tarball
+                   "pack"
+                   profile
+                   #:symlinks
+                   '(("/bin/Guile" -> "bin/guile"))
+                   #:compressor
+                   %gzip-compressor
+                   #:archiver
+                   %tar-bootstrap))
+               (check (gexp->derivation
+                        "check-tarball"
+                        (with-imported-modules
+                          '((guix build utils))
+                          (gexp (begin
+                                  (use-modules
+                                    (guix build utils)
+                                    (srfi srfi-1))
+                                  (define store
+                                    (string-append
+                                      "."
+                                      (%store-directory)
+                                      "/"))
+                                  (define (canonical? file)
+                                    (let ((st (lstat file)))
+                                      (or (not (string-prefix? store file))
+                                          (eq? 'symlink (stat:type st))
+                                          (and (= 1 (stat:mtime st))
+                                               (zero? (logand
+                                                        146
+                                                        (stat:mode st)))))))
+                                  (define bin
+                                    (string-append
+                                      "."
+                                      (ungexp profile)
+                                      "/bin"))
+                                  (setenv
+                                    "PATH"
+                                    (string-append
+                                      (ungexp %tar-bootstrap)
+                                      "/bin"))
+                                  (system* "tar" "xvf" (ungexp tarball))
+                                  (mkdir (ungexp output))
+                                  (exit (and (file-exists?
+                                               (string-append bin "/guile"))
+                                             (file-exists? store)
+                                             (every canonical?
+                                                    (find-files
+                                                      "."
+                                                      (const #t)
+                                                      #:directories?
+                                                      #t))
+                                             (string=?
+                                               (string-append
+                                                 (ungexp %bootstrap-guile)
+                                                 "/bin")
+                                               (readlink bin))
+                                             (string=?
+                                               (string-append
+                                                 ".."
+                                                 (ungexp profile)
+                                                 "/bin/guile")
+                                               (readlink "bin/Guile"))))))))))
+              (built-derivations (list check)))
+       #:guile-for-build
+       guile)))
actual-value: #t
result: PASS

test-name: self-contained-tarball + localstatedir
location: /home/cassou/Documents/projects/guix/guix/tests/pack.scm:117
source:
+ (test-assert
+   "self-contained-tarball + localstatedir"
+   (let ((guile (package-derivation store %bootstrap-guile)))
+     (run-with-store
+       store
+       (mlet* %store-monad
+              ((guile (set-guile-for-build (default-guile)))
+               (profile
+                 (profile-derivation
+                   (packages->manifest (list %bootstrap-guile))
+                   #:hooks
+                   '()
+                   #:locales?
+                   #f))
+               (tarball
+                 (self-contained-tarball
+                   "tar-pack"
+                   profile
+                   #:localstatedir?
+                   #t))
+               (check (gexp->derivation
+                        "check-tarball"
+                        (gexp (let ((bin (string-append
+                                           "."
+                                           (ungexp profile)
+                                           "/bin")))
+                                (setenv
+                                  "PATH"
+                                  (string-append
+                                    (ungexp %tar-bootstrap)
+                                    "/bin"))
+                                (system* "tar" "xvf" (ungexp tarball))
+                                (mkdir (ungexp output))
+                                (exit (and (file-exists?
+                                             "var/guix/db/db.sqlite")
+                                           (string=?
+                                             (string-append
+                                               (ungexp %bootstrap-guile)
+                                               "/bin")
+                                             (readlink bin)))))))))
+              (built-derivations (list check)))
+       #:guile-for-build
+       guile)))
actual-value: #t
result: PASS

test-name: docker-image + localstatedir
location: /home/cassou/Documents/projects/guix/guix/tests/pack.scm:140
source:
+ (test-assert
+   "docker-image + localstatedir"
+   (let ((guile (package-derivation store %bootstrap-guile)))
+     (run-with-store
+       store
+       (mlet* %store-monad
+              ((guile (set-guile-for-build (default-guile)))
+               (profile
+                 (profile-derivation
+                   (packages->manifest (list %bootstrap-guile))
+                   #:hooks
+                   '()
+                   #:locales?
+                   #f))
+               (tarball
+                 (docker-image
+                   "docker-pack"
+                   profile
+                   #:symlinks
+                   '(("/bin/Guile" -> "bin/guile"))
+                   #:localstatedir?
+                   #t))
+               (check (gexp->derivation
+                        "check-tarball"
+                        (with-imported-modules
+                          '((guix build utils))
+                          (gexp (begin
+                                  (use-modules
+                                    (guix build utils)
+                                    (ice-9 match))
+                                  (define bin
+                                    (string-append
+                                      "."
+                                      (ungexp profile)
+                                      "/bin"))
+                                  (setenv
+                                    "PATH"
+                                    (string-append
+                                      (ungexp %tar-bootstrap)
+                                      "/bin"))
+                                  (mkdir "base")
+                                  (with-directory-excursion
+                                    "base"
+                                    (invoke "tar" "xvf" (ungexp tarball)))
+                                  (match (find-files "base" "layer.tar")
+                                         ((layer) (invoke "tar" "xvf" layer)))
+                                  (when (and (file-exists?
+                                               (string-append bin "/guile"))
+                                             (file-exists?
+                                               "var/guix/db/db.sqlite")
+                                             (file-is-directory? "tmp")
+                                             (string=?
+                                               (string-append
+                                                 (ungexp %bootstrap-guile)
+                                                 "/bin")
+                                               (pk 'binlink (readlink bin)))
+                                             (string=?
+                                               (string-append
+                                                 (ungexp profile)
+                                                 "/bin/guile")
+                                               (pk 'guilelink
+                                                   (readlink "bin/Guile"))))
+                                        (mkdir (ungexp output)))))))))
+              (built-derivations (list check)))
+       #:guile-for-build
+       guile)))
actual-value: #t
result: PASS

test-name: squashfs-image + localstatedir
location: /home/cassou/Documents/projects/guix/guix/tests/pack.scm:181
source:
+ (test-assert
+   "squashfs-image + localstatedir"
+   (let ((guile (package-derivation store %bootstrap-guile)))
+     (run-with-store
+       store
+       (mlet* %store-monad
+              ((guile (set-guile-for-build (default-guile)))
+               (profile
+                 (profile-derivation
+                   (packages->manifest (list %bootstrap-guile))
+                   #:hooks
+                   '()
+                   #:locales?
+                   #f))
+               (image (squashfs-image
+                        "squashfs-pack"
+                        profile
+                        #:symlinks
+                        '(("/bin" -> "bin"))
+                        #:localstatedir?
+                        #t))
+               (check (gexp->derivation
+                        "check-tarball"
+                        (with-imported-modules
+                          '((guix build utils))
+                          (gexp (begin
+                                  (use-modules
+                                    (guix build utils)
+                                    (ice-9 match))
+                                  (define bin
+                                    (string-append
+                                      "."
+                                      (ungexp profile)
+                                      "/bin"))
+                                  (setenv
+                                    "PATH"
+                                    (string-append
+                                      (ungexp squashfs-tools)
+                                      "/bin"))
+                                  (invoke "unsquashfs" (ungexp image))
+                                  (with-directory-excursion
+                                    "squashfs-root"
+                                    (when (and (file-exists?
+                                                 (string-append bin "/guile"))
+                                               (file-exists?
+                                                 "var/guix/db/db.sqlite")
+                                               (string=?
+                                                 (string-append
+                                                   (ungexp %bootstrap-guile)
+                                                   "/bin")
+                                                 (pk 'binlink (readlink bin)))
+                                               (string=?
+                                                 (string-drop
+                                                   (string-append
+                                                 random seed for tests: 1582998248
building path(s) `/gnu/store/ncj3mfzqdjji32nsgd8k54zp916rm90n-squashfs-pack.gz.squashfs'
Parallel mksquashfs: Using 4 processors
Creating 4.0 filesystem on /gnu/store/ncj3mfzqdjji32nsgd8k54zp916rm90n-squashfs-pack.gz.squashfs, block size 131072.
\r[===============================================================|] 580/580 100%

Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
	compressed data, compressed metadata, compressed fragments,
	compressed xattrs, compressed ids
	duplicates are not removed
Filesystem size 4835.09 Kbytes (4.72 Mbytes)
	35.34% of uncompressed filesystem size (13679.85 Kbytes)
Inode table size 6922 bytes (6.76 Kbytes)
	20.71% of uncompressed inode table size (33425 bytes)
Directory table size 6178 bytes (6.03 Kbytes)
	49.40% of uncompressed directory table size (12506 bytes)
Xattr table size 49 bytes (0.05 Kbytes)
	100.00% of uncompressed xattr table size (49 bytes)
No duplicate files removed
Number of inodes 613
Number of files 531
Number of fragments 64
Number of symbolic links  3
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 79
Number of ids (unique uids + gids) 3
Number of uids 2
	unknown (0)
	nixbld (972)
Number of gids 2
	unknown (0)
	nixbld (964)
Failed to read existing filesystem - will not overwrite - ABORTING!
To force Mksquashfs to write to this block device or file use -noappend
Found a valid exportable SQUASHFS superblock on /gnu/store/ncj3mfzqdjji32nsgd8k54zp916rm90n-squashfs-pack.gz.squashfs.
	Compression used gzip
	Inodes are compressed
	Data is compressed
	Fragments are compressed
	Xattrs are compressed
	Fragments are present in the filesystem
	Always-use-fragments option is not specified
	Duplicates are not removed
	Xattrs are stored
	Filesystem size 4835.09 Kbytes (4.72 Mbytes)
	Block size 131072
	Number of fragments 64
	Number of inodes 613
	Number of ids 3

Parallel mksquashfs: Using 4 processors
Scanning existing filesystem...
Backtrace:
           3 (primitive-load "/gnu/store/1wn2rh73paxdchdjyha0010467n?")
In ice-9/eval.scm:
    619:8  2 (_ #f)
In srfi/srfi-1.scm:
    640:9  1 (for-each #<procedure 7ffff4d93060 at ice-9/eval.scm:3?> ?)
In guix/build/utils.scm:
    652:6  0 (invoke _ . _)

guix/build/utils.scm:652:6: In procedure invoke:
Throw to key `srfi-34' with args `(#<condition &invoke-error [program: "mksquashfs" arguments: (".empty" "/gnu/store/ncj3mfzqdjji32nsgd8k54zp916rm90n-squashfs-pack.gz.squashfs" "-root-becomes" "store") exit-status: 1 term-signal: #f stop-signal: #f] 7ffff4da8fc0>)'.
builder for `/gnu/store/ziq7rj7dq8d6azmzvabrlnps6kxv76mb-squashfs-pack.gz.squashfs.drv' failed with exit code 1
cannot build derivation `/gnu/store/dhxqv3z0axpvsgf5fwv6wm9c2rnfw0x5-check-tarball.drv': 1 dependencies couldn't be built
    (ungexp profile)
+                                                     "/bin")
+                                                   1)
+                                                 (pk 'guilelink
+                                                     (readlink "bin"))))
+                                          (mkdir (ungexp output))))))))))
+              (built-derivations (list check)))
+       #:guile-for-build
+       guile)))
actual-value: #f
actual-error:
+ (srfi-34
+   #<condition &store-protocol-error [message: "build of `/gnu/store/dhxqv3z0axpvsgf5fwv6wm9c2rnfw0x5-check-tarball.drv' failed" status: 100] 7f9d24b2dae0>)
result: FAIL


[-- Attachment #4: lint.log --]
[-- Type: text/plain, Size: 54079 bytes --]

test-name: description: not a string
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:88
source:
+ (test-equal
+   "description: not a string"
+   "invalid description: foobar"
+   (single-lint-warning-message
+     (check-description-style
+       (dummy-package "x" (description 'foobar)))))
expected-value: "invalid description: foobar"
actual-value: "invalid description: foobar"
result: PASS

test-name: description: not empty
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:94
source:
+ (test-equal
+   "description: not empty"
+   "description should not be empty"
+   (single-lint-warning-message
+     (check-description-style
+       (dummy-package "x" (description "")))))
expected-value: "description should not be empty"
actual-value: "description should not be empty"
result: PASS

test-name: description: invalid Texinfo markup
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:100
source:
+ (test-equal
+   "description: invalid Texinfo markup"
+   "Texinfo markup in description is invalid"
+   (single-lint-warning-message
+     (check-description-style
+       (dummy-package "x" (description "f{oo}b@r")))))
expected-value: "Texinfo markup in description is invalid"
actual-value: "Texinfo markup in description is invalid"
result: PASS

test-name: description: does not start with an upper-case letter
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:106
source:
+ (test-equal
+   "description: does not start with an upper-case letter"
+   "description should start with an upper-case letter or digit"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package
+                  "x"
+                  (description "bad description."))))
+       (check-description-style pkg))))
expected-value: "description should start with an upper-case letter or digit"
actual-value: "description should start with an upper-case letter or digit"
result: PASS

test-name: description: may start with a digit
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:113
source:
+ (test-equal
+   "description: may start with a digit"
+   '()
+   (let ((pkg (dummy-package
+                "x"
+                (description "2-component library."))))
+     (check-description-style pkg)))
expected-value: ()
actual-value: ()
result: PASS

test-name: description: may start with lower-case package name
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:119
source:
+ (test-equal
+   "description: may start with lower-case package name"
+   '()
+   (let ((pkg (dummy-package
+                "x"
+                (description "x is a dummy package."))))
+     (check-description-style pkg)))
expected-value: ()
actual-value: ()
result: PASS

test-name: description: two spaces after end of sentence
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:125
source:
+ (test-equal
+   "description: two spaces after end of sentence"
+   "sentences in description should be followed by two spaces; possible infraction at 3"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package
+                  "x"
+                  (description "Bad. Quite bad."))))
+       (check-description-style pkg))))
expected-value: "sentences in description should be followed by two spaces; possible infraction at 3"
actual-value: "sentences in description should be followed by two spaces; possible infraction at 3"
result: PASS

test-name: description: end-of-sentence detection with abbreviations
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:132
source:
+ (test-equal
+   "description: end-of-sentence detection with abbreviations"
+   '()
+   (let ((pkg (dummy-package
+                "x"
+                (description
+                  "E.g. Foo, i.e. Bar resp. Baz (a.k.a. DVD)."))))
+     (check-description-style pkg)))
expected-value: ()
actual-value: ()
result: PASS

test-name: description: may not contain trademark signs: ?
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:139
source:
+ (test-equal
+   "description: may not contain trademark signs: ?"
+   "description should not contain trademark sign '?' at 20"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package
+                  "x"
+                  (description "Does The Right Thing?"))))
+       (check-description-style pkg))))
expected-value: "description should not contain trademark sign '?' at 20"
actual-value: "description should not contain trademark sign '?' at 20"
result: PASS

test-name: description: may not contain trademark signs: ?
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:146
source:
+ (test-equal
+   "description: may not contain trademark signs: ?"
+   "description should not contain trademark sign '?' at 17"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package
+                  "x"
+                  (description "Works with Format?"))))
+       (check-description-style pkg))))
expected-value: "description should not contain trademark sign '?' at 17"
actual-value: "description should not contain trademark sign '?' at 17"
result: PASS

test-name: description: suggest ornament instead of quotes
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:153
source:
+ (test-equal
+   "description: suggest ornament instead of quotes"
+   "use @code or similar ornament instead of quotes"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package
+                  "x"
+                  (description "This is a 'quoted' thing."))))
+       (check-description-style pkg))))
expected-value: "use @code or similar ornament instead of quotes"
actual-value: "use @code or similar ornament instead of quotes"
result: PASS

test-name: synopsis: not a string
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:160
source:
+ (test-equal
+   "synopsis: not a string"
+   "invalid synopsis: #f"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package "x" (synopsis #f))))
+       (check-synopsis-style pkg))))
expected-value: "invalid synopsis: #f"
actual-value: "invalid synopsis: #f"
result: PASS

test-name: synopsis: not empty
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:167
source:
+ (test-equal
+   "synopsis: not empty"
+   "synopsis should not be empty"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package "x" (synopsis ""))))
+       (check-synopsis-style pkg))))
expected-value: "synopsis should not be empty"
actual-value: "synopsis should not be empty"
result: PASS

test-name: synopsis: valid Texinfo markup
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:174
source:
+ (test-equal
+   "synopsis: valid Texinfo markup"
+   "Texinfo markup in synopsis is invalid"
+   (single-lint-warning-message
+     (check-synopsis-style
+       (dummy-package "x" (synopsis "Bad $@ texinfo")))))
expected-value: "Texinfo markup in synopsis is invalid"
actual-value: "Texinfo markup in synopsis is invalid"
result: PASS

test-name: synopsis: does not start with an upper-case letter
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:180
source:
+ (test-equal
+   "synopsis: does not start with an upper-case letter"
+   "synopsis should start with an upper-case letter or digit"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package "x" (synopsis "bad synopsis"))))
+       (check-synopsis-style pkg))))
expected-value: "synopsis should start with an upper-case letter or digit"
actual-value: "synopsis should start with an upper-case letter or digit"
result: PASS

test-name: synopsis: may start with a digit
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:187
source:
+ (test-equal
+   "synopsis: may start with a digit"
+   '()
+   (let ((pkg (dummy-package
+                "x"
+                (synopsis "5-dimensional frobnicator"))))
+     (check-synopsis-style pkg)))
expected-value: ()
actual-value: ()
result: PASS

test-name: synopsis: ends with a period
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:193
source:
+ (test-equal
+   "synopsis: ends with a period"
+   "no period allowed at the end of the synopsis"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package "x" (synopsis "Bad synopsis."))))
+       (check-synopsis-style pkg))))
expected-value: "no period allowed at the end of the synopsis"
actual-value: "no period allowed at the end of the synopsis"
result: PASS

test-name: synopsis: ends with 'etc.'
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:200
source:
+ (test-equal
+   "synopsis: ends with 'etc.'"
+   '()
+   (let ((pkg (dummy-package "x" (synopsis "Foo, bar, etc."))))
+     (check-synopsis-style pkg)))
expected-value: ()
actual-value: ()
result: PASS

test-name: synopsis: starts with 'A'
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:206
source:
+ (test-equal
+   "synopsis: starts with 'A'"
+   "no article allowed at the beginning of the synopsis"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package "x" (synopsis "A bad synop?is"))))
+       (check-synopsis-style pkg))))
expected-value: "no article allowed at the beginning of the synopsis"
actual-value: "no article allowed at the beginning of the synopsis"
result: PASS

test-name: synopsis: starts with 'An'
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:213
source:
+ (test-equal
+   "synopsis: starts with 'An'"
+   "no article allowed at the beginning of the synopsis"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package
+                  "x"
+                  (synopsis "An awful synopsis"))))
+       (check-synopsis-style pkg))))
expected-value: "no article allowed at the beginning of the synopsis"
actual-value: "no article allowed at the beginning of the synopsis"
result: PASS

test-name: synopsis: starts with 'a'
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:220
source:
+ (test-equal
+   "synopsis: starts with 'a'"
+   '("no article allowed at the beginning of the synopsis"
+     "synopsis should start with an upper-case letter or digit")
+   (sort (map lint-warning-message
+              (let ((pkg (dummy-package "x" (synopsis "a bad synopsis"))))
+                (check-synopsis-style pkg)))
+         string<?))
expected-value: ("no article allowed at the beginning of the synopsis" "synopsis should start with an upper-case letter or digit")
actual-value: ("no article allowed at the beginning of the synopsis" "synopsis should start with an upper-case letter or digit")
result: PASS

test-name: synopsis: starts with 'an'
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:231
source:
+ (test-equal
+   "synopsis: starts with 'an'"
+   '("no article allowed at the beginning of the synopsis"
+     "synopsis should start with an upper-case letter or digit")
+   (sort (map lint-warning-message
+              (let ((pkg (dummy-package
+                           "x"
+                           (synopsis "an awful synopsis"))))
+                (check-synopsis-style pkg)))
+         string<?))
expected-value: ("no article allowed at the beginning of the synopsis" "synopsis should start with an upper-case letter or digit")
actual-value: ("no article allowed at the beginning of the synopsis" "synopsis should start with an upper-case letter or digit")
result: PASS

test-name: synopsis: too long
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:242
source:
+ (test-equal
+   "synopsis: too long"
+   "synopsis should be less than 80 characters long"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package
+                  "x"
+                  (synopsis (make-string 80 #\X)))))
+       (check-synopsis-style pkg))))
expected-value: "synopsis should be less than 80 characters long"
actual-value: "synopsis should be less than 80 characters long"
result: PASS

test-name: synopsis: start with package name
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:249
source:
+ (test-equal
+   "synopsis: start with package name"
+   "synopsis should not start with the package name"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package
+                  "x"
+                  (name "Foo")
+                  (synopsis "Foo, a nice package"))))
+       (check-synopsis-style pkg))))
expected-value: "synopsis should not start with the package name"
actual-value: "synopsis should not start with the package name"
result: PASS

test-name: synopsis: start with package name prefix
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:257
source:
+ (test-equal
+   "synopsis: start with package name prefix"
+   '()
+   (let ((pkg (dummy-package
+                "arb"
+                (synopsis "Arbitrary precision"))))
+     (check-synopsis-style pkg)))
expected-value: ()
actual-value: ()
result: PASS

test-name: synopsis: start with abbreviation
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:263
source:
+ (test-equal
+   "synopsis: start with abbreviation"
+   '()
+   (let ((pkg (dummy-package
+                "uucp"
+                (synopsis "UUCP implementation")
+                (description "Imagine this is Taylor UUCP."))))
+     (check-synopsis-style pkg)))
expected-value: ()
actual-value: ()
result: PASS

test-name: inputs: pkg-config is probably a native input
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:271
source:
+ (test-equal
+   "inputs: pkg-config is probably a native input"
+   "'pkg-config' should probably be a native input"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package
+                  "x"
+                  (inputs `(("pkg-config" ,pkg-config))))))
+       (check-inputs-should-be-native pkg))))
expected-value: "'pkg-config' should probably be a native input"
actual-value: "'pkg-config' should probably be a native input"
result: PASS

test-name: inputs: glib:bin is probably a native input
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:278
source:
+ (test-equal
+   "inputs: glib:bin is probably a native input"
+   "'glib:bin' should probably be a native input"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package
+                  "x"
+                  (inputs `(("glib" ,glib "bin"))))))
+       (check-inputs-should-be-native pkg))))
expected-value: "'glib:bin' should probably be a native input"
actual-value: "'glib:bin' should probably be a native input"
result: PASS

test-name: inputs: python-setuptools should not be an input at all (input)
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:285
source:
+ (test-equal
+   "inputs: python-setuptools should not be an input at all (input)"
+   "'python-setuptools' should probably not be an input at all"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package
+                  "x"
+                  (inputs
+                    `(("python-setuptools" ,python-setuptools))))))
+       (check-inputs-should-not-be-an-input-at-all pkg))))
expected-value: "'python-setuptools' should probably not be an input at all"
actual-value: "'python-setuptools' should probably not be an input at all"
result: PASS

test-name: inputs: python-setuptools should not be an input at all (native-input)
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:294
source:
+ (test-equal
+   "inputs: python-setuptools should not be an input at all (native-input)"
+   "'python-setuptools' should probably not be an input at all"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package
+                  "x"
+                  (native-inputs
+                    `(("python-setuptools" ,python-setuptools))))))
+       (check-inputs-should-not-be-an-input-at-all pkg))))
expected-value: "'python-setuptools' should probably not be an input at all"
actual-value: "'python-setuptools' should probably not be an input at all"
result: PASS

test-name: inputs: python-setuptools should not be an input at all (propagated-input)
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:304
source:
+ (test-equal
+   "inputs: python-setuptools should not be an input at all (propagated-input)"
+   "'python-setuptools' should probably not be an input at all"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package
+                  "x"
+                  (propagated-inputs
+                    `(("python-setuptools" ,python-setuptools))))))
+       (check-inputs-should-not-be-an-input-at-all pkg))))
expected-value: "'python-setuptools' should probably not be an input at all"
actual-value: "'python-setuptools' should probably not be an input at all"
result: PASS

test-name: patches: file names
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:313
source:
+ (test-equal
+   "patches: file names"
+   "file names of patches should start with the package name"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package
+                  "x"
+                  (source
+                    (dummy-origin
+                      (patches (list "/path/to/y.patch")))))))
+       (check-patch-file-names pkg))))
expected-value: "file names of patches should start with the package name"
actual-value: "file names of patches should start with the package name"
result: PASS

test-name: patches: file name too long
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:322
source:
+ (test-equal
+   "patches: file name too long"
+   (string-append
+     "x-"
+     (make-string 100 #\a)
+     ".patch: file name is too long")
+   (single-lint-warning-message
+     (let ((pkg (dummy-package
+                  "x"
+                  (source
+                    (dummy-origin
+                      (patches
+                        (list (string-append
+                                "x-"
+                                (make-string 100 #\a)
+                                ".patch"))))))))
+       (check-patch-file-names pkg))))
expected-value: "x-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.patch: file name is too long"
actual-value: "x-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.patch: file name is too long"
result: PASS

test-name: patches: not found
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:336
source:
+ (test-equal
+   "patches: not found"
+   "this-patch-does-not-exist!: patch not found"
+   (single-lint-warning-message
+     (let ((pkg (dummy-package
+                  "x"
+                  (source
+                    (dummy-origin
+                      (patches
+                        (list (search-patch
+                                "this-patch-does-not-exist!"))))))))
+       (check-patch-file-names pkg))))
expected-value: "this-patch-does-not-exist!: patch not found"
actual-value: "this-patch-does-not-exist!: patch not found"
result: PASS

test-name: derivation: invalid arguments
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:347
source:
+ (test-equal
+   "derivation: invalid arguments"
+   "failed to create x86_64-linux derivation: (wrong-type-arg \"map\" \"Wrong type argument: ~S\" (invalid-module) ())"
+   (match (let ((pkg (dummy-package
+                       "x"
+                       (arguments
+                         '(#:imported-modules (invalid-module))))))
+            (check-derivation pkg))
+          (((and (? lint-warning?) first-warning)
+            others
+            ...)
+           (lint-warning-message first-warning))))
expected-value: "failed to create x86_64-linux derivation: (wrong-type-arg \"map\" \"Wrong type argument: ~S\" (invalid-module) ())"
actual-value: "failed to create x86_64-linux derivation: (wrong-type-arg \"map\" \"Wrong type argument: ~S\" (invalid-module) ())"
result: PASS

test-name: license: invalid license
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:356
source:
+ (test-equal
+   "license: invalid license"
+   "invalid license field"
+   (single-lint-warning-message
+     (check-license (dummy-package "x" (license #f)))))
expected-value: "invalid license field"
actual-value: "invalid license field"
result: PASS

test-name: home-page: wrong home-page
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:361
source:
+ (test-equal
+   "home-page: wrong home-page"
+   "invalid value for home page"
+   (let ((pkg (package
+                (inherit (dummy-package "x"))
+                (home-page #f))))
+     (single-lint-warning-message
+       (check-home-page pkg))))
expected-value: "invalid value for home page"
actual-value: "invalid value for home page"
result: PASS

test-name: home-page: invalid URI
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:369
source:
+ (test-equal
+   "home-page: invalid URI"
+   "invalid home page URL: \"foobar\""
+   (let ((pkg (package
+                (inherit (dummy-package "x"))
+                (home-page "foobar"))))
+     (single-lint-warning-message
+       (check-home-page pkg))))
expected-value: "invalid home page URL: \"foobar\""
actual-value: "invalid home page URL: \"foobar\""
result: PASS

test-name: home-page: host not found
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:377
source:
+ (test-assert
+   "home-page: host not found"
+   (let ((pkg (package
+                (inherit (dummy-package "x"))
+                (home-page "http://does-not-exist"))))
+     (warning-contains?
+       "domain not found"
+       (check-home-page pkg))))
actual-value: #f
result: FAIL

test-name: home-page: Connection refused
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:384
source:
+ (test-equal
+   "home-page: Connection refused"
+   "URI http://localhost:9999/foo/bar unreachable: Connection refused"
+   (let ((pkg (package
+                (inherit (dummy-package "x"))
+                (home-page (%local-url)))))
+     (single-lint-warning-message
+       (check-home-page pkg))))
expected-value: "URI http://localhost:9999/foo/bar unreachable: Connection refused"
actual-value: "URI http://localhost:9999/foo/bar unreachable: Connection refused"
result: PASS

test-name: home-page: 200
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:393
source:
+ (test-equal
+   "home-page: 200"
+   '()
+   (with-http-server
+     `((200 ,%long-string))
+     (let ((pkg (package
+                  (inherit (dummy-package "x"))
+                  (home-page (%local-url)))))
+       (check-home-page pkg))))
expected-value: ()
actual-value: ()
result: PASS

test-name: home-page: 200 but short length
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:402
source:
+ (test-equal
+   "home-page: 200 but short length"
+   "URI http://localhost:9999/foo/bar returned suspiciously small file (18 bytes)"
+   (with-http-server
+     `((200 "This is too small."))
+     (let ((pkg (package
+                  (inherit (dummy-package "x"))
+                  (home-page (%local-url)))))
+       (single-lint-warning-message
+         (check-home-page pkg)))))
expected-value: "URI http://localhost:9999/foo/bar returned suspiciously small file (18 bytes)"
actual-value: "URI http://localhost:9999/foo/bar returned suspiciously small file (18 bytes)"
result: PASS

test-name: home-page: 404
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:413
source:
+ (test-equal
+   "home-page: 404"
+   "URI http://localhost:9999/foo/bar not reachable: 404 (\"Such is life\")"
+   (with-http-server
+     `((404 ,%long-string))
+     (let ((pkg (package
+                  (inherit (dummy-package "x"))
+                  (home-page (%local-url)))))
+       (single-lint-warning-message
+         (check-home-page pkg)))))
expected-value: "URI http://localhost:9999/foo/bar not reachable: 404 (\"Such is life\")"
actual-value: "URI http://localhost:9999/foo/bar not reachable: 404 (\"Such is life\")"
result: PASS

test-name: home-page: 301, invalid
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:423
source:
+ (test-equal
+   "home-page: 301, invalid"
+   "invalid permanent redirect from http://localhost:9999/foo/bar"
+   (with-http-server
+     `((301 ,%long-string))
+     (let ((pkg (package
+                  (inherit (dummy-package "x"))
+                  (home-page (%local-url)))))
+       (single-lint-warning-message
+         (check-home-page pkg)))))
expected-value: "invalid permanent redirect from http://localhost:9999/foo/bar"
actual-value: "invalid permanent redirect from http://localhost:9999/foo/bar"
result: PASS

test-name: home-page: 301 -> 200
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:433
source:
+ (test-equal
+   "home-page: 301 -> 200"
+   "permanent redirect from http://localhost:10000/foo/bar to http://localhost:9999/foo/bar"
+   (with-http-server
+     `((200 ,%long-string))
+     (let* ((initial-url (%local-url))
+            (redirect
+              (build-response
+                #:code
+                301
+                #:headers
+                `((location unquote (string->uri initial-url))))))
+       (parameterize
+         ((%http-server-port (+ 1 (%http-server-port))))
+         (with-http-server
+           `((,redirect ""))
+           (let ((pkg (package
+                        (inherit (dummy-package "x"))
+                        (home-page (%local-url)))))
+             (single-lint-warning-message
+               (check-home-page pkg))))))))
expected-value: "permanent redirect from http://localhost:10000/foo/bar to http://localhost:9999/foo/bar"
actual-value: "permanent redirect from http://localhost:10000/foo/bar to http://localhost:9999/foo/bar"
result: PASS

test-name: home-page: 301 -> 404
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:450
source:
+ (test-equal
+   "home-page: 301 -> 404"
+   "URI http://localhost:10000/foo/bar not reachable: 404 (\"Such is life\")"
+   (with-http-server
+     '((404 "booh!"))
+     (let* ((initial-url (%local-url))
+            (redirect
+              (build-response
+                #:code
+                301
+                #:headers
+                `((location unquote (string->uri initial-url))))))
+       (parameterize
+         ((%http-server-port (+ 1 (%http-server-port))))
+         (with-http-server
+           `((,redirect ""))
+           (let ((pkg (package
+                        (inherit (dummy-package "x"))
+                        (home-page (%local-url)))))
+             (single-lint-warning-message
+               (check-home-page pkg))))))))
expected-value: "URI http://localhost:10000/foo/bar not reachable: 404 (\"Such is life\")"
actual-value: "URI http://localhost:10000/foo/bar not reachable: 404 (\"Such is life\")"
result: PASS

test-name: source-file-name
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:467
source:
+ (test-equal
+   "source-file-name"
+   "the source file name should contain the package name"
+   (let ((pkg (dummy-package
+                "x"
+                (version "3.2.1")
+                (source
+                  (origin
+                    (method url-fetch)
+                    (uri "http://www.example.com/3.2.1.tar.gz")
+                    (sha256 %null-sha256))))))
+     (single-lint-warning-message
+       (check-source-file-name pkg))))
expected-value: "the source file name should contain the package name"
actual-value: "the source file name should contain the package name"
result: PASS

test-name: source-file-name: v prefix
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:479
source:
+ (test-equal
+   "source-file-name: v prefix"
+   "the source file name should contain the package name"
+   (let ((pkg (dummy-package
+                "x"
+                (version "3.2.1")
+                (source
+                  (origin
+                    (method url-fetch)
+                    (uri "http://www.example.com/v3.2.1.tar.gz")
+                    (sha256 %null-sha256))))))
+     (single-lint-warning-message
+       (check-source-file-name pkg))))
expected-value: "the source file name should contain the package name"
actual-value: "the source file name should contain the package name"
result: PASS

test-name: source-file-name: bad checkout
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:491
source:
+ (test-equal
+   "source-file-name: bad checkout"
+   "the source file name should contain the package name"
+   (let ((pkg (dummy-package
+                "x"
+                (version "3.2.1")
+                (source
+                  (origin
+                    (method git-fetch)
+                    (uri (git-reference
+                           (url "http://www.example.com/x.git")
+                           (commit "0")))
+                    (sha256 %null-sha256))))))
+     (single-lint-warning-message
+       (check-source-file-name pkg))))
expected-value: "the source file name should contain the package name"
actual-value: "the source file name should contain the package name"
result: PASS

test-name: source-file-name: good checkout
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:505
source:
+ (test-equal
+   "source-file-name: good checkout"
+   '()
+   (let ((pkg (dummy-package
+                "x"
+                (version "3.2.1")
+                (source
+                  (origin
+                    (method git-fetch)
+                    (uri (git-reference
+                           (url "http://git.example.com/x.git")
+                           (commit "0")))
+                    (file-name (string-append "x-" version))
+                    (sha256 %null-sha256))))))
+     (check-source-file-name pkg)))
expected-value: ()
actual-value: ()
result: PASS

test-name: source-file-name: valid
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:519
source:
+ (test-equal
+   "source-file-name: valid"
+   '()
+   (let ((pkg (dummy-package
+                "x"
+                (version "3.2.1")
+                (source
+                  (origin
+                    (method url-fetch)
+                    (uri "http://www.example.com/x-3.2.1.tar.gz")
+                    (sha256 %null-sha256))))))
+     (check-source-file-name pkg)))
expected-value: ()
actual-value: ()
result: PASS

test-name: source-unstable-tarball
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:530
source:
+ (test-equal
+   "source-unstable-tarball"
+   "the source URI should not be an autogenerated tarball"
+   (let ((pkg (dummy-package
+                "x"
+                (source
+                  (origin
+                    (method url-fetch)
+                    (uri "https://github.com/example/example/archive/v0.0.tar.gz")
+                    (sha256 %null-sha256))))))
+     (single-lint-warning-message
+       (check-source-unstable-tarball pkg))))
expected-value: "the source URI should not be an autogenerated tarball"
actual-value: "the source URI should not be an autogenerated tarball"
result: PASS

test-name: source-unstable-tarball: source #f
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:541
source:
+ (test-equal
+   "source-unstable-tarball: source #f"
+   '()
+   (let ((pkg (dummy-package "x" (source #f))))
+     (check-source-unstable-tarball pkg)))
expected-value: ()
actual-value: ()
result: PASS

test-name: source-unstable-tarball: valid
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:547
source:
+ (test-equal
+   "source-unstable-tarball: valid"
+   '()
+   (let ((pkg (dummy-package
+                "x"
+                (source
+                  (origin
+                    (method url-fetch)
+                    (uri "https://github.com/example/example/releases/download/x-0.0/x-0.0.tar.gz")
+                    (sha256 %null-sha256))))))
+     (check-source-unstable-tarball pkg)))
expected-value: ()
actual-value: ()
result: PASS

test-name: source-unstable-tarball: package named archive
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:557
source:
+ (test-equal
+   "source-unstable-tarball: package named archive"
+   '()
+   (let ((pkg (dummy-package
+                "x"
+                (source
+                  (origin
+                    (method url-fetch)
+                    (uri "https://github.com/example/archive/releases/download/x-0.0/x-0.0.tar.gz")
+                    (sha256 %null-sha256))))))
+     (check-source-unstable-tarball pkg)))
expected-value: ()
actual-value: ()
result: PASS

test-name: source-unstable-tarball: not-github
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:567
source:
+ (test-equal
+   "source-unstable-tarball: not-github"
+   '()
+   (let ((pkg (dummy-package
+                "x"
+                (source
+                  (origin
+                    (method url-fetch)
+                    (uri "https://bitbucket.org/archive/example/download/x-0.0.tar.gz")
+                    (sha256 %null-sha256))))))
+     (check-source-unstable-tarball pkg)))
expected-value: ()
actual-value: ()
result: PASS

test-name: source-unstable-tarball: git-fetch
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:577
source:
+ (test-equal
+   "source-unstable-tarball: git-fetch"
+   '()
+   (let ((pkg (dummy-package
+                "x"
+                (source
+                  (origin
+                    (method git-fetch)
+                    (uri (git-reference
+                           (url "https://github.com/archive/example.git")
+                           (commit "0")))
+                    (sha256 %null-sha256))))))
+     (check-source-unstable-tarball pkg)))
expected-value: ()
actual-value: ()
result: PASS

test-name: source: 200
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:590
source:
+ (test-equal
+   "source: 200"
+   '()
+   (with-http-server
+     `((200 ,%long-string))
+     (let ((pkg (package
+                  (inherit (dummy-package "x"))
+                  (source
+                    (origin
+                      (method url-fetch)
+                      (uri (%local-url))
+                      (sha256 %null-sha256))))))
+       (check-source pkg))))
expected-value: ()
actual-value: ()
result: PASS

test-name: source: 200 but short length
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:602
source:
+ (test-equal
+   "source: 200 but short length"
+   "URI http://localhost:9999/foo/bar returned suspiciously small file (18 bytes)"
+   (with-http-server
+     '((200 "This is too small."))
+     (let ((pkg (package
+                  (inherit (dummy-package "x"))
+                  (source
+                    (origin
+                      (method url-fetch)
+                      (uri (%local-url))
+                      (sha256 %null-sha256))))))
+       (match (check-source pkg)
+              ((first-warning
+                 (and (? lint-warning?) second-warning))
+               (lint-warning-message second-warning))))))
result: SKIP

test-name: source: 404
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:617
source:
+ (test-equal
+   "source: 404"
+   "URI http://localhost:9999/foo/bar not reachable: 404 (\"Such is life\")"
+   (with-http-server
+     `((404 ,%long-string))
+     (let ((pkg (package
+                  (inherit (dummy-package "x"))
+                  (source
+                    (origin
+                      (method url-fetch)
+                      (uri (%local-url))
+                      (sha256 %null-sha256))))))
+       (match (check-source pkg)
+              ((first-warning
+                 (and (? lint-warning?) second-warning))
+               (lint-warning-message second-warning))))))
expected-value: "URI http://localhost:9999/foo/bar not reachable: 404 (\"Such is life\")"
actual-value: "URI http://localhost:9999/foo/bar not reachable: 404 (\"Such is life\")"
result: PASS

test-name: source: 404 and 200
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:632
source:
+ (test-equal
+   "source: 404 and 200"
+   '()
+   (with-http-server
+     `((404 ,%long-string))
+     (let ((bad-url (%local-url)))
+       (parameterize
+         ((%http-server-port (+ 1 (%http-server-port))))
+         (with-http-server
+           `((200 ,%long-string))
+           (let ((pkg (package
+                        (inherit (dummy-package "x"))
+                        (source
+                          (origin
+                            (method url-fetch)
+                            (uri (list bad-url (%local-url)))
+                            (sha256 %null-sha256))))))
+             (check-source pkg)))))))
expected-value: ()
actual-value: ()
result: PASS

test-name: source: 301 -> 200
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:649
source:
+ (test-equal
+   "source: 301 -> 200"
+   "permanent redirect from http://localhost:10000/foo/bar to http://localhost:9999/foo/bar"
+   (with-http-server
+     `((200 ,%long-string))
+     (let* ((initial-url (%local-url))
+            (redirect
+              (build-response
+                #:code
+                301
+                #:headers
+                `((location unquote (string->uri initial-url))))))
+       (parameterize
+         ((%http-server-port (+ 1 (%http-server-port))))
+         (with-http-server
+           `((,redirect ""))
+           (let ((pkg (package
+                        (inherit (dummy-package "x"))
+                        (source
+                          (origin
+                            (method url-fetch)
+                            (uri (%local-url))
+                            (sha256 %null-sha256))))))
+             (match (check-source pkg)
+                    ((first-warning
+                       (and (? lint-warning?) second-warning))
+                     (lint-warning-message second-warning)))))))))
expected-value: "permanent redirect from http://localhost:10000/foo/bar to http://localhost:9999/foo/bar"
actual-value: "permanent redirect from http://localhost:10000/foo/bar to http://localhost:9999/foo/bar"
result: PASS

test-name: source: 301 -> 404
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:671
source:
+ (test-equal
+   "source: 301 -> 404"
+   "URI http://localhost:10000/foo/bar not reachable: 404 (\"Such is life\")"
+   (with-http-server
+     '((404 "booh!"))
+     (let* ((initial-url (%local-url))
+            (redirect
+              (build-response
+                #:code
+                301
+                #:headers
+                `((location unquote (string->uri initial-url))))))
+       (parameterize
+         ((%http-server-port (+ 1 (%http-server-port))))
+         (with-http-server
+           `((,redirect ""))
+           (let ((pkg (package
+                        (inherit (dummy-package "x"))
+                        (source
+                          (origin
+                            (method url-fetch)
+                            (uri (%local-url))
+                            (sha256 %null-sha256))))))
+             (match (check-source pkg)
+                    ((first-warning
+                       (and (? lint-warning?) second-warning))
+                     (lint-warning-message second-warning)))))))))
expected-value: "URI http://localhost:10000/foo/bar not reachable: 404 (\"Such is life\")"
actual-value: "URI http://localhost:10000/foo/bar not reachable: 404 (\"Such is life\")"
result: PASS

test-name: mirror-url
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:693
source:
+ (test-equal
+   "mirror-url"
+   '()
+   (let ((source
+           (origin
+             (method url-fetch)
+             (uri "http://example.org/foo/bar.tar.gz")
+             (sha256 %null-sha256))))
+     (check-mirror-url
+       (dummy-package "x" (source source)))))
expected-value: ()
actual-value: ()
result: PASS

test-name: mirror-url: one suggestion
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:701
source:
+ (test-equal
+   "mirror-url: one suggestion"
+   "URL should be 'mirror://gnu/foo/foo.tar.gz'"
+   (let ((source
+           (origin
+             (method url-fetch)
+             (uri "http://ftp.gnu.org/pub/gnu/foo/foo.tar.gz")
+             (sha256 %null-sha256))))
+     (single-lint-warning-message
+       (check-mirror-url
+         (dummy-package "x" (source source))))))
expected-value: "URL should be 'mirror://gnu/foo/foo.tar.gz'"
actual-value: "URL should be 'mirror://gnu/foo/foo.tar.gz'"
result: PASS

test-name: github-url
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:710
source:
+ (test-equal
+   "github-url"
+   '()
+   (with-http-server
+     `((200 ,%long-string))
+     (check-github-url
+       (dummy-package
+         "x"
+         (source
+           (origin
+             (method url-fetch)
+             (uri (%local-url))
+             (sha256 %null-sha256)))))))
expected-value: ()
actual-value: ()
result: PASS

test-name: github-url: one suggestion
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:721
source:
+ (test-equal
+   "github-url: one suggestion"
+   (string-append "URL should be '" github-url "'")
+   (let ((redirect
+           (build-response
+             #:code
+             301
+             #:headers
+             `((location unquote (string->uri github-url))))))
+     (with-http-server
+       `((,redirect ""))
+       (let* ((initial-url (%local-url))
+              (redirect
+                (build-response
+                  #:code
+                  302
+                  #:headers
+                  `((location unquote (string->uri initial-url))))))
+         (parameterize
+           ((%http-server-port (+ 1 (%http-server-port))))
+           (with-http-server
+             `((,redirect ""))
+             (single-lint-warning-message
+               (check-github-url
+                 (dummy-package
+                   "x"
+                   (source
+                     (origin
+                       (method url-fetch)
+                       (uri (%local-url))
+                       (sha256 %null-sha256))))))))))))
expected-value: "URL should be 'https://github.com/foo/bar/bar-1.0.tar.gz'"
actual-value: "URL should be 'https://github.com/foo/bar/bar-1.0.tar.gz'"
result: PASS

test-name: github-url: already the correct github url
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:743
source:
+ (test-equal
+   "github-url: already the correct github url"
+   '()
+   (check-github-url
+     (dummy-package
+       "x"
+       (source
+         (origin
+           (method url-fetch)
+           (uri github-url)
+           (sha256 %null-sha256))))))
expected-value: ()
actual-value: ()
result: PASS

test-name: cve
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:752
source:
+ (test-equal
+   "cve"
+   '()
+   (mock ((guix lint) package-vulnerabilities (const '()))
+         (check-vulnerabilities (dummy-package "x"))))
expected-value: ()
actual-value: ()
result: PASS

test-name: cve: one vulnerability
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:757
source:
+ (test-equal
+   "cve: one vulnerability"
+   "probably vulnerable to CVE-2015-1234"
+   (let ((dummy-vulnerabilities
+           (lambda (package)
+             (list (make-struct/no-tail
+                     (@@ (guix cve) <vulnerability>)
+                     "CVE-2015-1234"
+                     (list (cons (package-name package)
+                                 (package-version package))))))))
+     (single-lint-warning-message
+       (check-vulnerabilities
+         (dummy-package "pi" (version "3.14"))
+         dummy-vulnerabilities))))
expected-value: "probably vulnerable to CVE-2015-1234"
actual-value: "probably vulnerable to CVE-2015-1234"
result: PASS

test-name: cve: one patched vulnerability
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:770
source:
+ (test-equal
+   "cve: one patched vulnerability"
+   '()
+   (mock ((guix lint)
+          package-vulnerabilities
+          (lambda (package)
+            (list (make-struct/no-tail
+                    (@@ (guix cve) <vulnerability>)
+                    "CVE-2015-1234"
+                    (list (cons (package-name package)
+                                (package-version package)))))))
+         (check-vulnerabilities
+           (dummy-package
+             "pi"
+             (version "3.14")
+             (source
+               (dummy-origin
+                 (patches (list "/a/b/pi-CVE-2015-1234.patch"))))))))
expected-value: ()
actual-value: ()
result: PASS

test-name: cve: known safe from vulnerability
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:786
source:
+ (test-equal
+   "cve: known safe from vulnerability"
+   '()
+   (mock ((guix lint)
+          package-vulnerabilities
+          (lambda (package)
+            (list (make-struct/no-tail
+                    (@@ (guix cve) <vulnerability>)
+                    "CVE-2015-1234"
+                    (list (cons (package-name package)
+                                (package-version package)))))))
+         (check-vulnerabilities
+           (dummy-package
+             "pi"
+             (version "3.14")
+             (properties `((lint-hidden-cve "CVE-2015-1234")))))))
expected-value: ()
actual-value: ()
result: PASS

test-name: cve: vulnerability fixed in replacement version
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:799
source:
+ (test-equal
+   "cve: vulnerability fixed in replacement version"
+   '()
+   (mock ((guix lint)
+          package-vulnerabilities
+          (lambda (package)
+            (match (package-version package)
+                   ("0"
+                    (list (make-struct/no-tail
+                            (@@ (guix cve) <vulnerability>)
+                            "CVE-2015-1234"
+                            (list (cons (package-name package)
+                                        (package-version package))))))
+                   ("1" '()))))
+         (check-vulnerabilities
+           (dummy-package
+             "foo"
+             (version "0")
+             (replacement (dummy-package "foo" (version "1")))))))
expected-value: ()
actual-value: ()
result: PASS

test-name: cve: patched vulnerability in replacement
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:816
source:
+ (test-equal
+   "cve: patched vulnerability in replacement"
+   '()
+   (mock ((guix lint)
+          package-vulnerabilities
+          (lambda (package)
+            (list (make-struct/no-tail
+                    (@@ (guix cve) <vulnerability>)
+                    "CVE-2015-1234"
+                    (list (cons (package-name package)
+                                (package-version package)))))))
+         (check-vulnerabilities
+           (dummy-package
+             "pi"
+             (version "3.14")
+             (source (dummy-origin))
+             (replacement
+               (dummy-package
+                 "pi"
+                 (version "3.14")
+                 (source
+                   (dummy-origin
+                     (patches (list "/a/b/pi-CVE-2015-1234.patch"))))))))))
expected-value: ()
actual-value: ()
result: PASS

test-name: formatting: lonely parentheses
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:834
source:
+ (test-equal
+   "formatting: lonely parentheses"
+   "parentheses feel lonely, move to the previous or next line"
+   (single-lint-warning-message
+     (check-formatting
+       (dummy-package "ugly as hell!"))))
expected-value: "parentheses feel lonely, move to the previous or next line"
actual-value: "parentheses feel lonely, move to the previous or next line"
result: PASS

test-name: formatting: tabulation
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:842
source:
+ (test-assert
+   "formatting: tabulation"
+   (string-match-or-error
+     "tabulation on line [0-9]+, column [0-9]+"
+     (single-lint-warning-message
+       (check-formatting
+         (dummy-package "leave the tab here:\t")))))
actual-value: #("tabulation on line 846, column 57" (0 . 33))
result: PASS

test-name: formatting: trailing white space
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:848
source:
+ (test-assert
+   "formatting: trailing white space"
+   (string-match-or-error
+     "trailing white space .*"
+     (single-lint-warning-message
+       (check-formatting (dummy-package "x")))))
actual-value: #("trailing white space on line 853" (0 . 32))
result: PASS

test-name: formatting: long line
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:855
source:
+ (test-assert
+   "formatting: long line"
+   (string-match-or-error
+     "line [0-9]+ is way too long \\([0-9]+ characters\\)"
+     (single-lint-warning-message
+       (check-formatting (dummy-package "x")))))
actual-value: #("line 859 is way too long (118 characters)" (0 . 41))
result: PASS

test-name: formatting: alright
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:862
source:
+ (test-equal
+   "formatting: alright"
+   '()
+   (check-formatting (dummy-package "x")))
expected-value: ()
actual-value: ()
result: PASS

test-name: archival: missing content
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:866
source:
+ (test-assert
+   "archival: missing content"
+   (let* ((origin
+            (origin
+              (method url-fetch)
+              (uri "http://example.org/foo.tgz")
+              (sha256 (make-bytevector 32))))
+          (warnings
+            (with-http-server
+              '((404 "Not archived."))
+              (parameterize
+                ((%swh-base-url (%local-url)))
+                (check-archival
+                  (dummy-package "x" (source origin)))))))
+     (warning-contains? "not archived" warnings)))
actual-value: 7
result: PASS

test-name: archival: content available
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:877
source:
+ (test-equal
+   "archival: content available"
+   '()
+   (let* ((origin
+            (origin
+              (method url-fetch)
+              (uri "http://example.org/foo.tgz")
+              (sha256 (make-bytevector 32))))
+          (content
+            "{ \"checksums\": {}, \"data_url\": \"xyz\",\n                      \"length\": 42 }"))
+     (with-http-server
+       `((200 ,content))
+       (parameterize
+         ((%swh-base-url (%local-url)))
+         (check-archival
+           (dummy-package "x" (source origin)))))))
expected-value: ()
actual-value: ()
result: PASS

test-name: archival: missing revision
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:890
source:
+ (test-assert
+   "archival: missing revision"
+   (let* ((origin
+            (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "http://example.org/foo.git")
+                     (commit
+                       "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")))
+              (sha256 (make-bytevector 32))))
+          (save "{ \"origin_url\": \"http://example.org/foo.git\",\n                      \"save_request_date\": \"2014-11-17T22:09:38+01:00\",\n                      \"save_request_status\": \"accepted\",\n                      \"save_task_status\": \"scheduled\" }")
+          (warnings
+            (with-http-server
+              `((404 "No revision.")
+                (404 "No origin.")
+                (200 ,save))
+              (parameterize
+                ((%swh-base-url (%local-url)))
+                (check-archival
+                  (dummy-package "x" (source origin)))))))
+     (warning-contains? "scheduled" warnings)))
actual-value: 0
result: PASS

test-name: archival: revision available
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:909
source:
+ (test-equal
+   "archival: revision available"
+   '()
+   (let* ((origin
+            (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "http://example.org/foo.git")
+                     (commit
+                       "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")))
+              (sha256 (make-bytevector 32))))
+          (revision
+            "{ \"author\": {}, \"parents\": [],\n                      \"date\": \"2014-11-17T22:09:38+01:00\" }"))
+     (with-http-server
+       `((200 ,revision))
+       (parameterize
+         ((%swh-base-url (%local-url)))
+         (check-archival
+           (dummy-package "x" (source origin)))))))
expected-value: ()
actual-value: ()
result: PASS

test-name: archival: rate limit reached
location: /home/cassou/Documents/projects/guix/guix/tests/lint.scm:924
source:
+ (test-assert
+   "archival: rate limit reached"
+   (let* ((origin
+            (origin
+ random seed for tests: 1583000719
warning: cannot run Web server for tests: Address already in use
             (method url-fetch)
+              (uri "http://example.org/foo.tgz")
+              (sha256 (make-bytevector 32))))
+          (too-many
+            (build-response
+              #:code
+              429
+              #:reason-phrase
+              "Too many requests"
+              #:headers
+              '((x-ratelimit-remaining . "0")
+                (x-ratelimit-reset . "3000000000"))))
+          (warnings
+            (with-http-server
+              `((,too-many "Rate limit reached."))
+              (parameterize
+                ((%swh-base-url (%local-url)))
+                (append-map
+                  (lambda (name)
+                    (check-archival
+                      (dummy-package name (source origin))))
+                  '("x" "y" "z"))))))
+     (string-contains
+       (single-lint-warning-message warnings)
+       "rate limit reached")))
actual-value: 18
result: PASS


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

end of thread, other threads:[~2020-10-07 20:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-29 14:59 bug#39834: make check fails Damien Cassou
2020-03-02  9:57 ` zimoun
2020-03-02 13:20   ` Damien Cassou
2020-03-02 16:54     ` zimoun
2020-03-04 14:32       ` Damien Cassou
2020-10-07 15:40         ` zimoun
2020-10-07 15:47           ` Damien Cassou
2020-10-07 15:55             ` zimoun

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).