summaryrefslogtreecommitdiffstats
path: root/guile-repltest.patch
diff options
context:
space:
mode:
Diffstat (limited to 'guile-repltest.patch')
-rw-r--r--guile-repltest.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/guile-repltest.patch b/guile-repltest.patch
new file mode 100644
index 0000000..73dadb0
--- /dev/null
+++ b/guile-repltest.patch
@@ -0,0 +1,33 @@
+commit 2fbde7f02adb8c6585e9baf6e293ee49cd23d4c4
+Author: Ludovic Courtès <ludo@gnu.org>
+Date: Fri Nov 4 22:45:51 2016 +0100
+
+ tests: Avoid race condition in REPL server test.
+
+ Fixes <http://bugs.gnu.org/24769>.
+ Reported by Rob Browning <rlb@defaultvalue.org>.
+
+ * test-suite/tests/00-repl-server.test ("simple expression"): Add call
+ to 'select' before 'display'.
+
+diff --git a/test-suite/tests/00-repl-server.test b/test-suite/tests/00-repl-server.test
+index 1f570a9..4b5ec0c 100644
+--- a/test-suite/tests/00-repl-server.test
++++ b/test-suite/tests/00-repl-server.test
+@@ -105,8 +105,14 @@ reached."
+ "scheme@(repl-server)> $1 = 42\n"
+ (with-repl-server socket
+ (read-until-prompt socket %last-line-before-prompt)
+- (display "(+ 40 2)\n(quit)\n" socket)
+- (read-string socket)))
++
++ ;; Wait until 'repl-reader' in boot-9 has written the prompt.
++ ;; Otherwise, if we write too quickly, 'repl-reader' checks for
++ ;; 'char-ready?' and doesn't print the prompt.
++ (match (select (list socket) '() (list socket) 3)
++ (((_) () ())
++ (display "(+ 40 2)\n(quit)\n" socket)
++ (read-string socket)))))
+
+ (pass-if "HTTP inter-protocol attack" ;CVE-2016-8606
+ (with-repl-server socket