[Python-Dev] Re: test_mmap failing?

Fred L. Drake, Jr. fdrake@acm.org
Thu, 10 May 2001 10:57:59 -0400 (EDT)


Tim Peters writes:
 > But having suffered too many "impossible problems" the last 36 hours, my
 > confidence is shot <0.93 wink>.  Is test_mmap failing for anyone else under
 > current CVS?  Fred, are you *sure* it fails for you -- if so, does the
 > problem actually go away if you revert mmapmodule.c?

  It was indeed showing the behavior I described!  I figured out what
it was this morning and closed the patch again.
  The problem, of course(!), had nothing to do with mmap, before or
after any of the recent changes to mmap.  Or any old changes.  It had
a lot to do with the change I made to the socket module.  ;-)
  While figuring out the reported bug in the socket module, I created
named pipes, including one named "foo".  The mmap test opens a file
"foo" with mode "w+" in the directory in which I just happened to
create the named pipe, so it ended up with a file object opened on a
pipe -- things just don't work the same for these beasts!  Needless to
say test_mmap failed with a cryptic error message.
  This begs the question, though -- should tests that create temp
files check that the files don't already exist, and fail with a more
descriptive error if they do?


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Digital Creations