+ echo LOAD/COMPILE test failed, unexpected Lisp return code=$?
+ exit 1
+fi
+# We don't need the test directory any more.
+rm -r $testdir
+
+# In the flaky1 branch, Dan Barlow pointed out that
+# ENSURE-DIRECTORIES-EXIST failed for these relative pathname
+# operations when the mysterious special case handling of "" pathnames
+# was removed from UNIX-STAT. Let's make sure that it works now.
+#
+# Set up an empty directory to work with.
+testdir=${TMPDIR:-/tmp}/sbcl-mkdir-test-$$
+if ! rm -rf $testdir ; then
+ echo "$testdir already exists and could not be deleted"
+ exit 1;
+fi
+mkdir $testdir
+cd $testdir
+#
+# Provoke failure.
+$SBCL <<EOF
+(let ((rel-name #p"foo/bar/")
+ (abs-name (merge-pathnames #p"baz/quux/" (truename "."))))
+ (and
+ (equalp (ensure-directories-exist abs-name) abs-name)
+ (equalp (ensure-directories-exist rel-name) rel-name)
+ (sb-ext:quit :unix-status 52)))
+EOF
+if [ $? != 52 ]; then
+ echo ENSURE-DIRECTORIES-EXIST test failed, unexpected SBCL return code=$?
+ find $testdir -print