From 51a1a3d4e4f174066958f40983c14abfb7116216 Mon Sep 17 00:00:00 2001 From: Juho Snellman Date: Wed, 15 Mar 2006 14:25:29 +0000 Subject: [PATCH] 0.9.10.36: Fix occasional test failures reported by Cyrus Harmon. RUN-PROGRAM sets up a signal handler which interferes with the test framework, so it needs to be run as an impure test. --- tests/run-program.impure.lisp | 31 +++++++++++++++++++++++++++++++ tests/run-program.pure.lisp | 25 ------------------------- version.lisp-expr | 2 +- 3 files changed, 32 insertions(+), 26 deletions(-) create mode 100644 tests/run-program.impure.lisp delete mode 100644 tests/run-program.pure.lisp diff --git a/tests/run-program.impure.lisp b/tests/run-program.impure.lisp new file mode 100644 index 0000000..b30ade5 --- /dev/null +++ b/tests/run-program.impure.lisp @@ -0,0 +1,31 @@ +;;;; various RUN-PROGRAM tests with side effects + +;;;; This software is part of the SBCL system. See the README file for +;;;; more information. +;;;; +;;;; While most of SBCL is derived from the CMU CL system, the test +;;;; files (like this one) were written from scratch after the fork +;;;; from CMU CL. +;;;; +;;;; This software is in the public domain and is provided with +;;;; absolutely no warranty. See the COPYING and CREDITS files for +;;;; more information. + +(cl:in-package :cl-user) + +;; Actually there's no real side-effect here. The impurity we're +;; avoiding is the sigchld handler that RUN-PROGRAM sets up, which +;; interfers with the manual unix process control done by the test +;; framework (sometimes the handler will manage to WAIT3 a process +;; before run-tests WAITPIDs it). + +(let* ((process (sb-ext:run-program "/bin/cat" '() :wait nil + :output :stream :input :stream)) + (out (process-input process)) + (in (process-output process))) + (unwind-protect + (loop for i from 0 to 255 do + (write-byte i out) + (force-output out) + (assert (= (read-byte in) i))) + (process-close process))) diff --git a/tests/run-program.pure.lisp b/tests/run-program.pure.lisp deleted file mode 100644 index e67a1cf..0000000 --- a/tests/run-program.pure.lisp +++ /dev/null @@ -1,25 +0,0 @@ -;;;; various run-program tests without side effects - -;;;; This software is part of the SBCL system. See the README file for -;;;; more information. -;;;; -;;;; While most of SBCL is derived from the CMU CL system, the test -;;;; files (like this one) were written from scratch after the fork -;;;; from CMU CL. -;;;; -;;;; This software is in the public domain and is provided with -;;;; absolutely no warranty. See the COPYING and CREDITS files for -;;;; more information. - -(cl:in-package :cl-user) - -(let* ((process (sb-ext:run-program "/bin/cat" '() :wait nil - :output :stream :input :stream)) - (out (process-input process)) - (in (process-output process))) - (unwind-protect - (loop for i from 0 to 255 do - (write-byte i out) - (force-output out) - (assert (= (read-byte in) i))) - (process-close process))) diff --git a/version.lisp-expr b/version.lisp-expr index d407abd..36dcbc3 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.9.10.35" +"0.9.10.36" -- 1.7.10.4