summaryrefslogtreecommitdiff
path: root/tests/zlib.scm
Commit message (Collapse)AuthorAge
* tests: Gracefully skip zlib test when zlib is missing.Ludovic Courtès2019-04-16
| | | | | * tests/zlib.scm: Use 'test-skip' instead of (exit 77) when (zlib-available?) returns false.
* zlib: Fix memory leak due to revealed ports not being GC'd.Ludovic Courtès2017-10-11
| | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/28784>. This mostly reverts 81a0f1cdf12e7bcc34c1203f034a323fa8f52cf5, which introduced a regression: revealed ports are *never* GC'd (contrary to what Guile's manual suggests). In addition to the revert, 'close-procedure' now explicitly swallows EBADF errors when 'close-port' is called. * guix/zlib.scm (close-procedure): New procedure. (make-gzip-input-port)[gzfile]: Use 'fileno' instead of 'port->fdes'. Use 'close-procedure' instead of 'gzclose'. (make-gzip-output-port): Likewise. * tests/zlib.scm ("compression/decompression pipe"): Use 'port-closed?' to determine whether PARENT has been closed.
* zlib: Don't rely on EBADF being ignored by 'fport_close'.Ludovic Courtès2017-03-15
| | | | | | | | | | | | | In 2.2, 'fport_close' no longer swallows EBADF and instead raises a 'system-error' for this. This commit adjusts for 2.2. * guix/zlib.scm (close-procedure): Remove. (make-gzip-input-port): Use 'port->fdes' instead of 'fileno'. Use 'gzclose' instead of 'close-procedure'. (make-gzip-output-port): Likewise. * tests/zlib.scm ("compression/decompression pipe"): Don't check whether PARENT is closed using 'port-closed?'. Instead, use 'seek' on the underlying FD and check for EBADF.
* Add (guix zlib).Ludovic Courtès2016-07-19
* guix/zlib.scm, tests/zlib.scm: New files. * Makefile.am (MODULES): Add guix/zlib.scm. (SCM_TESTS): Add tests/zlib.scm. * m4/guix.m4 (GUIX_LIBGCRYPT_LIBDIR): New macro. * configure.ac (LIBGCRYPT_LIBDIR): Use it. Define and substitute 'LIBZ'. * guix/config.scm.in (%libz): New variable.