aboutsummaryrefslogtreecommitdiff
path: root/tests/zlib.scm
blob: 5455240a719324fa3a1eebf0d89a625537b63dfd (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (test-zlib)
  #:use-module (guix zlib)
  #:use-module (guix tests)
  #:use-module (srfi srfi-64)
  #:use-module (rnrs bytevectors)
  #:use-module (rnrs io ports)
  #:use-module (ice-9 match))

;; Test the (guix zlib) module.

(unless (zlib-available?)
  (exit 77))

(test-begin "zlib")

(test-assert "compression/decompression pipe"
  (let ((data (random-bytevector (+ (random 10000)
                                    (* 20 1024)))))
    (match (pipe)
      ((parent . child)
       (match (primitive-fork)
         (0                                       ;compress
          (dynamic-wind
            (const #t)
            (lambda ()
              (close-port parent)
              (call-with-gzip-output-port child
                (lambda (port)
                  (put-bytevector port data))))
            (lambda ()
              (primitive-exit 0))))
         (pid                                     ;decompress
          (begin
            (close-port child)
            (let ((received (call-with-gzip-input-port parent
                              (lambda (port)
                                (get-bytevector-all port))
                              #:buffer-size (* 64 1024))))
              (match (waitpid pid)
                ((_ . status)
                 (and (zero? status)
                      (port-closed? parent)
                      (bytevector=? received data))))))))))))

(test-end)
/td> 2018-04-15gnu: htop: Update to 2.2.0....* gnu/packages/patches/htop-fix-process-tree.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/admin.scm (htop): Update to 2.2.0. [source](patches): Remove. Marius Bakke 2018-04-12gnu: Add fasd....* gnu/packages/admin.scm (fasd): New variable. Eric Bavier 2018-03-22gnu: nmap: Update to 7.70....* gnu/packages/admin.scm (nmap): Update to 7.70. [source](snippet): End on #t. [inputs]: Add ZLIB. Marius Bakke 2018-03-22gnu: shepherd: Update to 0.4.0....* gnu/packages/admin.scm (shepherd): Update to 0.4.0. Remove patches. * gnu/packages/patches/shepherd-close-fds.patch, gnu/packages/patches/shepherd-herd-status-sorted.patch: Remove. * gnu/local.mk (dist_patch_DATA): Remove them. * gnu/services/admin.scm (%default-rotations): Remove /var/log/shepherd.log. Ludovic Courtès 2018-03-20Correct name and Email for ng0....* .mailmap: Correct name and Email for ng0. * Makefile.am, doc/guix.texi, etc/completion/fish/guix.fish gnu/packages/accessibility.scm, gnu/packages/admin.scm, gnu/packages/audio.scm, gnu/packages/autotools.scm, gnu/packages/cdrom.scm, gnu/packages/check.scm, gnu/packages/cinnamon.scm, gnu/packages/compression.scm, gnu/packages/crypto.scm, gnu/packages/databases.scm, gnu/packages/django.scm, gnu/packages/dns.scm, gnu/packages/emacs.scm, gnu/packages/enlightenment.scm, gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/forth.scm, gnu/packages/fvwm.scm, gnu/packages/games.scm, gnu/packages/gl.scm, gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm, gnu/packages/gnuzilla.scm, gnu/packages/gtk.scm, gnu/packages/guile-wm.scm, gnu/packages/guile.scm, gnu/packages/haskell-check.scm, gnu/packages/haskell-crypto.scm, gnu/packages/haskell.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/irc.scm, gnu/packages/language.scm, gnu/packages/libcanberra.scm, gnu/packages/linux.scm, gnu/packages/lisp.scm, gnu/packages/lolcode.scm, gnu/packages/lxde.scm, gnu/packages/lxqt.scm, gnu/packages/mail.scm, gnu/packages/markup.scm, gnu/packages/mate.scm, gnu/packages/maths.scm, gnu/packages/mc.scm, gnu/packages/messaging.scm, gnu/packages/music.scm, gnu/packages/ncurses.scm, gnu/packages/networking.scm, gnu/packages/nickle.scm, gnu/packages/openbox.scm, gnu/packages/pdf.scm, gnu/packages/perl-check.scm, gnu/packages/perl.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/ruby.scm, gnu/packages/rust.scm, gnu/packages/scheme.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/ssh.scm, gnu/packages/suckless.scm, gnu/packages/tbb.scm, gnu/packages/telephony.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/web.scm, gnu/packages/wm.scm, gnu/packages/xdisorg.scm, gnu/packages/xfce.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, gnu/services/certbot.scm, gnu/services/desktop.scm, gnu/services/version-control.scm, gnu/services/web.scm, guix/import/hackage.scm, guix/licenses.scm: Likewise. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> ng0 2018-03-17gnu: intel-gpu-tools: Supported only on x86_64-linux and i686-linux....* gnu/packages/admin.scm (intel-gpu-tools)[supported-systems]: New field. Mark H Weaver 2018-03-15gnu: intel-gpu-tools: Update to 1.22....* gnu/packages/admin.scm (intel-gpu-tools): Update to 1.22. [inputs]: Add eudev. Tobias Geerinckx-Rice 2018-03-15gnu: acpica: Update to 20180313....* gnu/packages/admin.scm (acpica): Update to 20180313. Tobias Geerinckx-Rice 2018-03-15gnu: shadow: Fix CVE-2018-7169....* gnu/packages/patches/shadow-CVE-2018-7169.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/admin.scm (shadow)[source]: Use it. Leo Famulari 2018-03-14gnu: masscan: Update to 1.0.5....* gnu/packages/admin.scm (masscan): Update to 1.0.5. [arguments]: Set CC to a real compiler instead of the default clang. Tobias Geerinckx-Rice 2018-03-08gnu: sunxi-tools: Add cross-libc's "static" output....* gnu/packages/admin.scm (sunxi-tools)[native-inputs]: Add cross-libc's "static" output. Danny Milosavljevic 2018-03-08gnu: sunxi-tools: Improve build error reporting....* gnu/packages/admin.scm (sunxi-tools)[arguments]<#:phases>[set-environment-up]: Improve build error reporting. Danny Milosavljevic 2018-03-07gnu: pam-krb5: Mark up description....* gnu/packages/admin.scm (pam-krb5)[description]: Use @code. Tobias Geerinckx-Rice 2018-03-07gnu: pam-krb5: Update to 4.8....* gnu/packages/admin.scm (pam-krb5): Update to 4.8. Tobias Geerinckx-Rice 2018-03-06gnu: thefuck: Update to 3.25....* gnu/packages/admin.scm (thefuck): Update to 3.25 [inputs]: Add python-pyte. [native-inputs]: Remove python-setuptools. * gnu/packages/patches/thefuck-test-environ.patch: Adjust to latest source. Eric Bavier 2018-03-06gnu: isc-dhcp: Update to 4.3.6-P1 [fixes CVE-2018-{5732,5733}]....* gnu/packages/admin.scm (isc-dhcp): Update to 4.3.6-P1. Leo Famulari 2018-03-04gnu: masscan: Declare a source file-name....* gnu/packages/admin.scm (masscan)[source]: Declare a source file-name. Efraim Flashner 2018-02-27gnu: thermald: Update to 1.7.1....* gnu/packages/admin.scm (thermald): Update to 1.7.1. [arguments]: Substitute INVOKE for SYSTEM* and end phase with #t. Tobias Geerinckx-Rice 2018-02-21gnu: htop: Fix tree view....* gnu/packages/patches/htop-fix-process-tree.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/admin.scm (htop)[source]: Use it. Tobias Geerinckx-Rice 2018-02-18gnu: shepherd: Add dependency on guile-readline....* gnu/packages/admin.scm (shepherd)[inputs]: Add GUILE-READLINE. Ludovic Courtès 2018-02-16Merge branch 'master' into core-updatesMark H Weaver 2018-02-16gnu: Use HTTPS for supported nongnu.org home pages....* gnu/packages/acl.scm (acl)[home-page]: Use HTTPS. * gnu/packages/admin.scm (dmidecode)[home-page]: Likewise. * gnu/packages/attr.scm (attr)[home-page]: Likewise. * gnu/packages/audio.scm (lash)[home-page]: Likewise. * gnu/packages/avr.scm (avr-libc)[home-page]: Likewise. * gnu/packages/backup.scm (rdiff-backup, libchop)[home-page]: Likewise. * gnu/packages/compression.scm (fastjar, lzip, lziprecover, atool) (lunzip, clzip, lzlib, plzip)[home-page]: Likewise. * gnu/packages/emacs.scm (geiser, bbdb, m17n-lib, m17n-lib)[home-page]: Likewise. * gnu/packages/flashing-tools.scm (avrdude)[home-page]: Likewise. * gnu/packages/fontutils.scm (libotf)[home-page]: Likewise. * gnu/packages/game-development.scm (gzochi)[home-page]: Likewise. * gnu/packages/games.scm (enigma)[home-page]: Likewise. * gnu/packages/gsasl.scm (libntlm)[home-page]: Likewise. * gnu/packages/gtk.scm (guile-cairo)[home-page]: Likewise. * gnu/packages/guile.scm (guile-reader, guile-lib, guile-json) (guile-redis, g-wrap)[home-page]: Likewise. * gnu/packages/libunwind.scm (libunwind)[home-page]: Likewise. * gnu/packages/lout.scm (lout)[home-page]: Likewise. * gnu/packages/mpd.scm (sonata)[home-page]: Likewise. * gnu/packages/networking.scm (quagga)[home-page]: Likewise. * gnu/packages/ratpoison.scm (ratpoison)[home-page]: Likewise. * gnu/packages/skribilo.scm (skribilo)[home-page]: Likewise. * gnu/packages/telephony.scm (exosip)[home-page]: Likewise. * gnu/packages/texinfo.scm (texi2html)[home-page]: Likewise. * gnu/packages/xdisorg.scm (xbindkeys)[home-page]: Likewise. Tobias Geerinckx-Rice 2018-02-14gnu: shepherd: 'herd status' now sorts the result....Add a patch by Ludovic Courtès <ludo@gnu.org> from the upstream shepherd repository to partially fix <https://bugs.gnu.org/30299>. * gnu/packages/patches/shepherd-herd-status-sorted.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/admin.scm (shepherd)[source]: Add patch. Mark H Weaver 2018-02-11gnu: acpica: Update to 20180209....* gnu/packages/admin.scm (acpica): Update to 20180209. Tobias Geerinckx-Rice 2018-02-09gnu: Add sipcalc....* gnu/packages/admin.scm (sipcalc): New public variable. Oleg Pykhalov 2018-02-08gnu: libcap-ng: Remove unused python input....Outputs so identical you wish they were intensional. * gnu/packages/admin.scm (libcap-ng)[inputs]: Remove python. [arguments]: Add ‘--without-python’ to #:configure-flags to suppress a bogus error. Tobias Geerinckx-Rice 2018-02-08gnu: libcap-ng: Update to 0.7.9....gnu/packages/admin.scm (libcap-ng): Update to 0.7.9. Tobias Geerinckx-Rice 2018-02-05gnu: htop: Update to 2.1.0....* gnu/packages/admin.scm (htop): Update to 2.1.0. [native-inputs]: Add python-minimal-wrapper. [home-page]: Update URI. Arun Isaac 2018-01-30gnu: Add daemontools....* gnu/packages/admin.scm (daemontools): New variable. Christopher Baines 2018-01-21gnu: intel-gpu-tools: Use INVOKE....* gnu/packages/admin.scm (intel-gpu-tools)[arguments]: Substitute INVOKE for SYSTEM*. Tobias Geerinckx-Rice 2018-01-21gnu: intel-gpu-tools: Update to 1.21....* gnu/packages/admin.scm (intel-gpu-tools): Update to 1.21. Tobias Geerinckx-Rice 2018-01-19gnu: testdisk: Use HTTPS for home page....* gnu/packages/admin.scm (testdisk)[home-page]: Use HTTPS. Tobias Geerinckx-Rice 2018-01-19gnu: stress: Update to 1.0.4....* gnu/packages/admin.scm (stress): Update to 1.0.4. Tobias Geerinckx-Rice 2018-01-19gnu: stress: Use newer and HTTPS home page....* gnu/packages/admin.scm (stress)[home-page]: Use HTTPS and ‘sid’ code name, which is more up to date and will remain so. Tobias Geerinckx-Rice 2018-01-18gnu: sudo: Update to 1.8.22....* gnu/packages/admin.scm (sudo): 1.8.22. Tobias Geerinckx-Rice 2018-01-16gnu: isc-dhcp: Update to 4.3.6....* gnu/packages/admin.scm (isc-dhcp): Update to 4.3.6. Leo Famulari 2018-01-16gnu: isc-dhcp: Update bundled bind to 9.9.11-P1 [fixes CVE-2017-3145]....* gnu/packages/admin.scm (isc-dhcp): Update to 9.9.11-P1. Leo Famulari 2018-01-13gnu: libcap-ng: Use HTTPS for home page....* gnu/packages/admin.scm (libcap-ng)[home-page]: Use HTTPS. Tobias Geerinckx-Rice