[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/16: hash: Close or flush sha256 output ports before calling their 'ge
From: |
Ludovic Courtès |
Subject: |
06/16: hash: Close or flush sha256 output ports before calling their 'get' procedure. |
Date: |
Wed, 8 Mar 2017 17:44:33 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 6f38960055e496193a49d690d7f1b5516b2b8625
Author: Ludovic Courtès <address@hidden>
Date: Wed Mar 8 15:04:18 2017 +0100
hash: Close or flush sha256 output ports before calling their 'get'
procedure.
Slightly different buffering of custom binary output ports in Guile 2.1.7
would lead tests missing 'close-port' or 'force-output' to fail.
* tests/hash.scm ("open-sha256-port, hello"): Add call to 'force-output'
before call to 'get'.
* tests/nar.scm ("write-file puts file in C locale collation order"):
Call 'close-port' before calling 'get-hash'.
---
tests/hash.scm | 3 ++-
tests/nar.scm | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/hash.scm b/tests/hash.scm
index 8039549..86501dc 100644
--- a/tests/hash.scm
+++ b/tests/hash.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Ludovic Courtès <address@hidden>
+;;; Copyright © 2013, 2014, 2017 Ludovic Courtès <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -67,6 +67,7 @@ In Guile <= 2.0.9, CBIPs were always fully buffered, so the
(let-values (((port get)
(open-sha256-port)))
(put-bytevector port (string->utf8 "hello world"))
+ (force-output port)
(get)))
(test-assert "port-sha256"
diff --git a/tests/nar.scm b/tests/nar.scm
index 4f4b304..28ead8b 100644
--- a/tests/nar.scm
+++ b/tests/nar.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <address@hidden>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès
<address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -186,6 +186,7 @@
(lambda ()
(let-values (((port get-hash) (open-sha256-port)))
(write-file input port)
+ (close-port port)
(get-hash)))
(lambda ()
(rm-rf input)))))
- branch master updated (6f5d28f -> 7447aa3), Ludovic Courtès, 2017/03/08
- 03/16: services: prosody: Make sure 'id' is available at expansion time., Ludovic Courtès, 2017/03/08
- 02/16: gnu: Remove unneeded imports., Ludovic Courtès, 2017/03/08
- 04/16: services: prosody: Use 'id' to introduce unhygienic top-level identifiers., Ludovic Courtès, 2017/03/08
- 05/16: build: Unset 'NIX_BUILD_HOOK' when offloading support is missing., Ludovic Courtès, 2017/03/08
- 09/16: gnu: Add guile2.2-reader., Ludovic Courtès, 2017/03/08
- 01/16: guix archive: Allow compilation with Guile 2.2., Ludovic Courtès, 2017/03/08
- 06/16: hash: Close or flush sha256 output ports before calling their 'get' procedure.,
Ludovic Courtès <=
- 11/16: download: Update the Savannah mirror list., Ludovic Courtès, 2017/03/08
- 12/16: ui: Avoid '_' as a pattern variable in 'match'., Ludovic Courtès, 2017/03/08
- 15/16: packages: Use address@hidden syntax when reporting ambiguities., Ludovic Courtès, 2017/03/08
- 13/16: ui: Don't use '%default-port-encoding' to set the encoding of string ports., Ludovic Courtès, 2017/03/08
- 16/16: utils: Make sure to use the right 'bytevector->string'., Ludovic Courtès, 2017/03/08
- 14/16: list-runtime-roots: Bufferize the lsof pipe., Ludovic Courtès, 2017/03/08
- 07/16: tests: Avoid zero-expression 'begin' form., Ludovic Courtès, 2017/03/08
- 08/16: gnu: guile-reader: Update to 0.6.2., Ludovic Courtès, 2017/03/08
- 10/16: gnu: Add guile2.2-haunt., Ludovic Courtès, 2017/03/08