#9739: Handle duplicate file basenames when testing multiple files in parallel
-------------------------------+--------------------------------------------
   Reporter:  mpatel           |          Owner:  mvngu          
       Type:  defect           |         Status:  needs_work     
   Priority:  critical         |      Milestone:  sage-4.7.1     
  Component:  doctest          |       Keywords:  doctest scripts
Work_issues:                   |       Upstream:  N/A            
   Reviewer:  Robert Bradshaw  |         Author:  Mitesh Patel   
     Merged:                   |   Dependencies:                 
-------------------------------+--------------------------------------------

Comment(by leif):

 Replying to [comment:47 jhpalmieri]:
 > Can we just use Python's tempfile module, for example
 [http://docs.python.org/library/tempfile.html#tempfile.mkstemp mkstemp]?
 This should produce a temporary file safely, avoiding race conditions.  We
 can have the name end with the file being tested, including its path.

 I see no reason for doing so. We don't need even more cryptic filenames,
 and I don't think it will work across NFS filesystems.

 The only "race condition" that can occur in what I suggested above is in
 the creation of `SAGE_TESTDIR` itself (if it doesn't already exist), and
 that can easily be catched.

 > (I think we should do the same thing for `SAGE_TMP` in `misc.py`, but
 that's for another ticket.)

 I wouldn't do that either. If we create temporary files from shell
 scripts, we can use the same mechanism.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9739#comment:48>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to