# HG changeset patch # User Aidan Kehoe # Date 1200494581 -3600 # Node ID e5b3c4dbc8a2a2c9c86f8d6e8b606a09033415db # Parent 479443c0f95a6291466173eb0254f61681654c9c Call #'make-temp-file in mule-tests.el, now it's available. 2008-01-16 Aidan Kehoe * automated/mule-tests.el (test-file-name): Call #'make-temp-file now it's available. Remove a long comment saying, essentially, that it should be used, not #'make-temp-name. diff -r 479443c0f95a -r e5b3c4dbc8a2 tests/ChangeLog --- a/tests/ChangeLog Wed Jan 16 15:20:51 2008 +0100 +++ b/tests/ChangeLog Wed Jan 16 15:43:01 2008 +0100 @@ -1,3 +1,10 @@ +2008-01-16 Aidan Kehoe + + * automated/mule-tests.el (test-file-name): + Call #'make-temp-file now it's available. Remove a long comment + saying, essentially, that it should be used, not + #'make-temp-name. + 2008-01-16 Aidan Kehoe * automated/hash-table-tests.el: diff -r 479443c0f95a -r e5b3c4dbc8a2 tests/automated/mule-tests.el --- a/tests/automated/mule-tests.el Wed Jan 16 15:20:51 2008 +0100 +++ b/tests/automated/mule-tests.el Wed Jan 16 15:43:01 2008 +0100 @@ -118,21 +118,8 @@ ;; Fixed 2007-06-22 <18043.2793.611745.734215@parhasard.net>. ;;---------------------------------------------------------------- -(let ((test-file-name - ;; The Gnus people, when they call #'make-temp-name, then loop, - ;; checking if the corresponding file exists. Our #'make-temp-name - ;; already does this loop, and the Gnus approach doesn't bring - ;; anything; there remains a race condition if you can predict the - ;; path name. The path name in question depends on the process ID and - ;; a (weak) PRNG seeded with the seconds to the power of the - ;; milliseconds of some instant close to the startup time of this - ;; XEmacs; without being able to read the address space of this - ;; XEmacs, or monitor what stat() calls it does, it is not predictable. - ;; - ;; The really kosher way to do this is to merge GNU's make-temp-file - ;; and use that. It basically has the functionality of the Unix - ;; mkstemp. - (make-temp-name (expand-file-name "tXfXsKc" (temp-directory)))) +(let ((test-file-name + (make-temp-file (expand-file-name "tXfXsKc" (temp-directory)))) revert-buffer-function kill-buffer-hook) ; paranoia (find-file test-file-name)