From http://docs.python.org/2/library/tempfile.html
tempfile.mkdtemp() - "Creates a temporary directory in the most secure manner possible. There are no race conditions in the directory’s creation. The directory is readable, writable, and searchable only by the creating user ID."
Trac: Username: Abhishek Kumar Singh Status: new to needs_review
Hi Abhishek. mkdtemp() is to make a temporary directory so the usage in test/integ/process.py is correct, but CONTROL_SOCKET_PATH is a file so that'll cause problems. If you run "run_tests.py --integ --target RUN_SOCKET" then I suspect that you'll encounter an issue.
For test/integ/process.py it would also be nice if we cleaned up the temporary resource after those tests have completed, otherwise each test run will make a new temporary directory.
Hi Abhishek. Python conventions say that global constants are in all capital letters (like DATA_DIRECTORY), and instance variables are lowercase. Please swap it over to self.data_directory.
Have you tested this with 'run_tests.py --integ --target RUN_SOCKET'?
Have you tested this with 'run_tests.py --integ --target RUN_SOCKET'?
Yes I have, it passed well except for tests I reported yesterday in ticket https://trac.torproject.org/projects/tor/ticket/8157 but that's not related with it so the changes works fine.