[tor-bugs] #8622 [Stem]: Test failing to clean up /tmp resources

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri May 10 10:19:12 UTC 2013


#8622: Test failing to clean up /tmp resources
--------------------------+-------------------------------------------------
 Reporter:  atagar        |          Owner:  atagar      
     Type:  defect        |         Status:  needs_review
 Priority:  trivial       |      Milestone:              
Component:  Stem          |        Version:              
 Keywords:  testing easy  |         Parent:              
   Points:                |   Actualpoints:              
--------------------------+-------------------------------------------------
Changes (by ashishnitinpatil):

  * status:  new => needs_review


Comment:

 Finally, got what was creating the temporary folder. Apparently, the files
 were automatically getting deleted but since we used mkdtemp() in
 runner.py (after import in run_tests.py) we have to manually delete the
 temp folder.
 The following does the work successfully (tested on Windows & Linux) -
 (I coded this into run_tests.py at about the end of main())

 {{{
 #!python
 TEMP_DIR = os.path.dirname(test.runner.CONTROL_SOCKET_PATH)
 try:
   os.rmdir(TEMP_DIR)
   println("SUCCESSFULLY CLEANED TEMP RESOURCE AT - %s"%TEMP_DIR)
 except:
   println("FAILED TO CLEAN TEMP RESOURCE AT - %s"%TEMP_DIR)

 }}}

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8622#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list