trent nelson ktctpxaonresolvecom disclaimer thought dump email signal noise ratio may subpar sounds like youre least making steps forward right direction despite activity probably quite disheartening based youve said rest conversation thoughts approach 1 given python_dexe always use test directory hash entire python process path unique given python instance 2 make sure every time test wants temp file gets unique one directory sounds like testfn modification would take care tests using testfn testfn preferred approach tests using tempfile hardcoding file names would changed use instead 3 order address tests either call test_support methods removing filesdirectories call osunlinkremove ever needs done make noops windows error occurs 4 end regrtestpy run create suspended arbitrary process ie explorerexe hijack main thread context process inject routine ie overwrite thread contexts instruction pointers takes care removing temporary directory used testing patiently retrying failures occur rogue processes also accessing files stop resume thread exiting python heh sounds crazy well came across httpwwwcatch22nettutsselfdelasp documents approach particularly necessary case could simply spawn another python process end regrtestpy patiently attempts remove test directory used python process executing regrtestpy exits could modify regrtestpy use approach hashed test directory already exists start run cant remove via osunlink still run issues buildbots say regrtestpy blocks helper process life cant remove someall test files itd interesting write something groks open handles processes attempts figure keeps files open ie thing procexpexe search handle keeping simple rather separate process hashed test directory based python process path common directory ie temppythonregrtest use incrementing sequence number test runs test directory ie directories 001 002 003 temp dir regrtestpy starts itll try delete cant wed want another test already running adds 1 highest numbered directory couldnt delete guess depends much effort want put cleaning test directory really ensuring tests get clean area unique file names run easy part trent ________________________________________ lnmudhrdtmzckqvwlnmudhrdtmzckqvwlnmpythonorg lnmudhrdtmzckqvwlnmudhrdtmzckqvwlnmpythonorg behalf tim golden cggctimgoldenmeuk sent 03 april 2008 0939 pythondev subject pythondev fixing tests windows tests fail somethings holding file open share_delete well ive tried best cant come solution guarantees overcome obstacle set fairly aggressive directory watcher sees test file created takes share_delete handle releases immediately guessing apps running test suite head generates manner accessdenied type errors per original output used tempfile generate random testfn current directory rather static test implemented renameshim discussed previously renaming different random name courtesy mktemp place tests run without error im still getting errors sort areas steven b originally reported one error cant see way round access denied manifests permission error documented result attempting open file pending delete ie delete succeeded hasnt completed yet additional complication hundreds instances throughout tests test simply calls osunlinkosremove undo test file robust central deletion go update 68 tests ill keep trying current state im convinced situations improved enough bother uploading patch tjg _______________________________________________ pythondev mailing list zvlllneumpythonorg httpmailpythonorgmailmanlistinfopythondev unsubscribe httpmailpythonorgmailmanoptionspythondevtnelson40onresolvecom _______________________________________________ pythondev mailing list zvlllneumpythonorg httpmailpythonorgmailmanlistinfopythondev unsubscribe httpmailpythonorgmailmanoptionspythondevpythondev40tangomucom wed 06 aug 2008 235618 0700 pythondev fixing tests windows