summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2011-03-02 06:02:58 -0500
committerMark H Weaver <mhw@netris.org>2011-03-02 14:12:53 -0500
commitbd79ebf3188ad0dc9f45290112f603f33af86f88 (patch)
tree872669bc6f948c64828d60194bfef63f29bb0e9b
parent58b1db5f2437327e0d44cfe799ca8e21e27d5b5e (diff)
downloadguile-bd79ebf3188ad0dc9f45290112f603f33af86f88.tar.gz
Portability fixes for popen.test (for when /bin/sh is not bash)
* test-suite/tests/popen.test (open-input-pipe no-duplicate): Pass "read REPLY" command instead of "read" to the subshell, for improved portability. In particular, it is needed when /bin/sh is dash. (open-output-pipe no-duplicate): Pass "exec guile [...]" instead of "guile [...]" to the subshell, to ensure that the subshell will not run guile as a subprocess while holding a duplicate of STDIN, which would cause this test to fail. This is needed when /bin/sh is dash.
-rw-r--r--test-suite/tests/popen.test4
1 files changed, 2 insertions, 2 deletions
diff --git a/test-suite/tests/popen.test b/test-suite/tests/popen.test
index 6300c3b80..bfd7da71c 100644
--- a/test-suite/tests/popen.test
+++ b/test-suite/tests/popen.test
@@ -104,7 +104,7 @@
(with-input-from-port (car p2c)
(lambda ()
(open-input-pipe
- "exec 1>/dev/null; echo closed 1>&2; exec 2>/dev/null; read")))))))
+ "exec 1>/dev/null; echo closed 1>&2; exec 2>/dev/null; read REPLY")))))))
(close-port (cdr c2p)) ;; write side
(let ((result (eof-object? (read-char port))))
(display "hello!\n" (cdr p2c))
@@ -168,7 +168,7 @@
(port (with-error-to-port (cdr c2p)
(lambda ()
(open-output-pipe
- (string-append "guile --no-auto-compile -s \""
+ (string-append "exec guile --no-auto-compile -s \""
(getenv "TEST_SUITE_DIR")
"/tests/popen-child.scm\""))))))
(close-port (cdr c2p)) ;; write side