Update of /cvsroot/sbcl/sbcl/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv6598/tests
Modified Files:
foreign.test.sh
Log Message:
0.8.5.50:
nikodemus siivola patch from sbcl-devel 2003-11-18: tweaked
lookup order for alien variables to cope with loading
foreign libraries
Index: foreign.test.sh
===================================================================
RCS file: /cvsroot/sbcl/sbcl/tests/foreign.test.sh,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- foreign.test.sh 8 May 2002 19:57:24 -0000 1.10
+++ foreign.test.sh 22 Nov 2003 02:40:12 -0000 1.11
@@ -24,6 +24,8 @@
# Test interaction with the shared object file.
${SBCL:-sbcl} <<EOF
+ (define-alien-variable environ (* c-string))
+ (defvar *environ* environ)
(handler-case
(load-foreign '("$testfilestem.so"))
(sb-int:unsupported-operator ()
@@ -31,6 +33,11 @@
;; on every OS. In that case, there's nothing to test, and we
;; can just fall through to success.
(sb-ext:quit :unix-status 52))) ; success convention for Lisp program
+ ;; Test that loading an object file didn't screw up our records
+ ;; of variables visible in runtime. (This was a bug until
+ ;; Nikodemus Siivola's patch in sbcl-0.8.5.50.)
+ (assert (= (sb-sys:sap-int (alien-sap *environ*))
+ (sb-sys:sap-int (alien-sap environ))))
(define-alien-routine summish int (x int) (y int))
(assert (= (summish 10 20) 31))
(sb-ext:quit :unix-status 52) ; success convention for Lisp program
|