bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stable 2.0 and popen.test on Debian Squeeze


From: Mark H Weaver
Subject: Re: Stable 2.0 and popen.test on Debian Squeeze
Date: Wed, 02 Mar 2011 06:17:40 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

<address@hidden> writes:
> address@hidden:~/src/guile$ ./check-guile popen.test
> Testing /home/dsmith/src/guile/meta/guile ... popen.test
> with GUILE_LOAD_PATH=/home/dsmith/src/guile/test-suite
> Running popen.test
> FAIL: popen.test: open-output-pipe: no duplicate

Does the attached patch fix your problems with popen.test on Squeeze?

   Thanks,
     Mark


>From 11195909b25347ae710d6423165eb123cf0aa996 Mon Sep 17 00:00:00 2001
From: Mark H Weaver <address@hidden>
Date: Wed, 2 Mar 2011 06:02:58 -0500
Subject: [PATCH] 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.
---
 test-suite/tests/popen.test |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test-suite/tests/popen.test b/test-suite/tests/popen.test
index 6300c3b..bfd7da7 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
-- 
1.7.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]