<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guix/tests/utils.scm, branch v0.6</title>
<subtitle>Transactional package manager, declarative GNU/Linux distribution, reproducible deployment tool, and more! https://guix.gnu.org</subtitle>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/'/>
<entry>
<title>tests: Avoid buffering in 'fcntl-flock' tests.</title>
<updated>2014-04-07T16:16:58+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2014-04-07T16:08:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=68ec0450d1c3f125d7d290958dda6e89b6a0c37e'/>
<id>68ec0450d1c3f125d7d290958dda6e89b6a0c37e</id>
<content type='text'>
Partially fixes &lt;http://bugs.gnu.org/17212&gt;.

* tests/utils.scm ("fcntl-flock wait", "fcntl-flock non-blocking"): Open
  files in binary mode, with no buffering.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Partially fixes &lt;http://bugs.gnu.org/17212&gt;.

* tests/utils.scm ("fcntl-flock wait", "fcntl-flock non-blocking"): Open
  files in binary mode, with no buffering.
</pre>
</div>
</content>
</entry>
<entry>
<title>utils: Add 'call-with-decompressed-port' and 'call-with-compressed-output-port'.</title>
<updated>2014-03-24T21:15:29+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2014-03-24T21:15:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=01ac19dca4318d577cf3bef53cfe6af590f0e5f8'/>
<id>01ac19dca4318d577cf3bef53cfe6af590f0e5f8</id>
<content type='text'>
* guix/utils.scm (call-with-decompressed-port,
  call-with-compressed-output-port): New procedures.
* tests/utils.scm ("compressed-output-port + decompressed-port"):
  Rewrite to use them.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/utils.scm (call-with-decompressed-port,
  call-with-compressed-output-port): New procedures.
* tests/utils.scm ("compressed-output-port + decompressed-port"):
  Rewrite to use them.
</pre>
</div>
</content>
</entry>
<entry>
<title>utils: Add 'filtered-output-port' and 'compressed-output-port'.</title>
<updated>2014-03-24T20:09:15+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2014-03-24T20:09:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=80dea563a3dad98bda60385188509ca79a3651f8'/>
<id>80dea563a3dad98bda60385188509ca79a3651f8</id>
<content type='text'>
* guix/utils.scm (filtered-output-port, compressed-output-port): New
  procedures.
* tests/utils.scm ("compressed-output-port + decompressed-port"): New
  test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/utils.scm (filtered-output-port, compressed-output-port): New
  procedures.
* tests/utils.scm ("compressed-output-port + decompressed-port"): New
  test.
</pre>
</div>
</content>
</entry>
<entry>
<title>utils: Add 'decompressed-port' and 'compressed-port'.</title>
<updated>2014-03-22T21:57:09+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2014-03-22T20:58:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=7a8024a33ad862fdbc8ae741f0a6f5338cb5b82b'/>
<id>7a8024a33ad862fdbc8ae741f0a6f5338cb5b82b</id>
<content type='text'>
* guix/utils.scm (decompressed-port, compressed-port): New procedures.
* guix/scripts/substitute-binary.scm (decompressed-port): Remove.
  (guix-substitute-binary): Pass a symbol or #f as the first argument to
  'decompress-port'.
* tests/utils.scm ("compressed-port, decompressed-port, non-file"): New
  test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/utils.scm (decompressed-port, compressed-port): New procedures.
* guix/scripts/substitute-binary.scm (decompressed-port): Remove.
  (guix-substitute-binary): Pass a symbol or #f as the first argument to
  'decompress-port'.
* tests/utils.scm ("compressed-port, decompressed-port, non-file"): New
  test.
</pre>
</div>
</content>
</entry>
<entry>
<title>utils: 'filtered-port' doesn't leave dangling processes behind.</title>
<updated>2014-03-22T21:57:09+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2014-03-22T20:50:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=443eb4e9506026094f5e0dadc3e11d3cf7a86a24'/>
<id>443eb4e9506026094f5e0dadc3e11d3cf7a86a24</id>
<content type='text'>
* guix/utils.scm (filtered-port): Make sure the 'execl' child process
  always exits, and does (primitive-_exit 1) upon execution failure.
  Use 'primitive-_exit' in the 'dump-port' child process.
* tests/utils.scm ("filtered-port, does not exist"): New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/utils.scm (filtered-port): Make sure the 'execl' child process
  always exits, and does (primitive-_exit 1) upon execution failure.
  Use 'primitive-_exit' in the 'dump-port' child process.
* tests/utils.scm ("filtered-port, does not exist"): New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>utils: Add a non-blocking option for 'fcntl-flock'.</title>
<updated>2014-03-07T23:18:22+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2014-03-07T15:46:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=c7445833eb43ec621fb5a56f6bfbbf0a02a675c2'/>
<id>c7445833eb43ec621fb5a56f6bfbbf0a02a675c2</id>
<content type='text'>
* guix/utils.scm (F_SETLK): New variable.
  (fcntl-flock): Add 'wait?' keyword parameter; honor it.
* tests/utils.scm ("fcntl-flock non-blocking"): New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/utils.scm (F_SETLK): New variable.
  (fcntl-flock): Add 'wait?' keyword parameter; honor it.
* tests/utils.scm ("fcntl-flock non-blocking"): New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Rewrite 'fcntl-lock' test.</title>
<updated>2014-03-06T20:42:24+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2014-03-06T17:38:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=827d556311b79d44fd67b4bd24cf17e5f781d502'/>
<id>827d556311b79d44fd67b4bd24cf17e5f781d502</id>
<content type='text'>
* tests/utils.scm (temp-file): New variable.
  ("fcntl-flock"): Rewrite to actually test whether the child process
  waits for the lock to be released.  The previous test was wrong
  because (1) it expected F_SETLK semantics, not F_SETLKW, and (2) it
  got EBADF because of a mismatch between the open mode and the lock
  style.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/utils.scm (temp-file): New variable.
  ("fcntl-flock"): Rewrite to actually test whether the child process
  waits for the lock to be released.  The previous test was wrong
  because (1) it expected F_SETLK semantics, not F_SETLKW, and (2) it
  got EBADF because of a mismatch between the open mode and the lock
  style.
</pre>
</div>
</content>
</entry>
<entry>
<title>utils: Add 'fcntl-flock'.</title>
<updated>2014-01-23T23:01:49+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2014-01-10T22:27:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=2cd5c0380ed36f334114904bacf9562fc98e2090'/>
<id>2cd5c0380ed36f334114904bacf9562fc98e2090</id>
<content type='text'>
* guix/utils.scm (%struct-flock, F_SETLKW, F_xxLCK): New variables.
  (fcntl-flock): New procedure.
* tests/utils.scm ("fcntl-flock"): New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/utils.scm (%struct-flock, F_SETLKW, F_xxLCK): New variables.
  (fcntl-flock): New procedure.
* tests/utils.scm ("fcntl-flock"): New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>utils: Add 'string-replace-substring'.</title>
<updated>2013-11-12T23:29:05+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2013-11-12T21:56:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=56b943de6e61f41d6ebd2dfa65ff886cdfd83759'/>
<id>56b943de6e61f41d6ebd2dfa65ff886cdfd83759</id>
<content type='text'>
* guix/utils.scm (string-replace-substring): New procedure.  Based on
  code by Mark H. Weaver.
* tests/utils.scm ("string-replace-substring"): New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/utils.scm (string-replace-substring): New procedure.  Based on
  code by Mark H. Weaver.
* tests/utils.scm ("string-replace-substring"): New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>utils: Add `guile-version&gt;?', and use it.</title>
<updated>2013-08-23T13:51:36+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2013-08-23T13:51:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=7db3ff4a29415ccc4f781c3e2450deb97d51a26f'/>
<id>7db3ff4a29415ccc4f781c3e2450deb97d51a26f</id>
<content type='text'>
This fixes Guile version comparisons when (version) has a
vendor-specific suffix.

Reported by Andreas Enge &lt;andreas@enge.fr&gt;.

* guix/utils.scm (guile-version&gt;?): New procedure.
* tests/utils.scm ("guile-version&gt;? 1.8", "guile-version&gt;? 10.5"): New
  tests.
* guix/scripts/substitute-binary.scm (fetch, progress-report-port): Use
  `guile-version&gt;?' instead of `version&gt;?'.
* guix/http-client.scm (when-guile&lt;=2.0.5, http-fetch): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes Guile version comparisons when (version) has a
vendor-specific suffix.

Reported by Andreas Enge &lt;andreas@enge.fr&gt;.

* guix/utils.scm (guile-version&gt;?): New procedure.
* tests/utils.scm ("guile-version&gt;? 1.8", "guile-version&gt;? 10.5"): New
  tests.
* guix/scripts/substitute-binary.scm (fetch, progress-report-port): Use
  `guile-version&gt;?' instead of `version&gt;?'.
* guix/http-client.scm (when-guile&lt;=2.0.5, http-fetch): Likewise.
</pre>
</div>
</content>
</entry>
</feed>
