From f849f46aa175919bd46a32d9305b1162f9d0d2f5 Mon Sep 17 00:00:00 2001 From: jimwise Date: Thu, 3 Mar 2011 20:01:37 +0000 Subject: [PATCH] 1.0.46.23: fix an actual random bug in mkstemp test On some platforms (including Solaris, FWIW), the character "." is one of the characters mkstemp can use when filling in an "XXXXXX" template. When this (randomly) occurs during the running of this test, PATHNAME-NAME, of course breaks on the last such random "." character, and the test fails in a way which will not repeat until the next time such a character is randomly chosen. Since readdir actually returns a string, break the string on the first "." explicitly, instead of making a path from the string and calling pathname-name. This will need to be revisited if we add mkstemp support on win32 in the future. --- contrib/sb-posix/posix-tests.lisp | 7 +++---- version.lisp-expr | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/contrib/sb-posix/posix-tests.lisp b/contrib/sb-posix/posix-tests.lisp index d56cc82..d87102f 100644 --- a/contrib/sb-posix/posix-tests.lisp +++ b/contrib/sb-posix/posix-tests.lisp @@ -824,11 +824,10 @@ :type (format nil "~AXXXXXX" (make-string n :initial-element #\x)) :defaults default)) - (let ((pathname (sb-ext:parse-native-namestring temp))) (unwind-protect - (values (integerp fd) (pathname-name pathname)) - (delete-file temp))))) - t "mkstemp-1") + (values (integerp fd) (subseq temp 0 (position #\. temp))) + (delete-file temp)))) + t "/tmp/mkstemp-1") (deftest envstuff (let ((name1 "ASLIFJLSDKFJKAHGSDKLJH") diff --git a/version.lisp-expr b/version.lisp-expr index 2285ed1..178383f 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -20,4 +20,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".) -"1.0.46.22" +"1.0.46.23" -- 1.7.10.4