mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
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'.
This commit is contained in:
parent
8d6209ea56
commit
2fbde7f02a
1 changed files with 8 additions and 2 deletions
|
@ -105,8 +105,14 @@ reached."
|
|||
"scheme@(repl-server)> $1 = 42\n"
|
||||
(with-repl-server socket
|
||||
(read-until-prompt socket %last-line-before-prompt)
|
||||
|
||||
;; 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)))
|
||||
(read-string socket)))))
|
||||
|
||||
(pass-if "HTTP inter-protocol attack" ;CVE-2016-8606
|
||||
(with-repl-server socket
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue