DescriptionRemove 'shell=True' in Popen and directly execute testserver.py
In chrome_test_server_spawner.py, testserver process is created by
'subprocess.Popen(command, shell=True)', it will create 2 processes(http://goo.gl/oDYsn):
(1) /bin/sh -c testserver.py ...
(2) python testserver.py ...
but subprocess.Popen only returns the 1st process(pid), so when kill testserver with
Popen.kill(), only the 1st process is killed, the 2nd process(testserver) still
remains there.
This leads to two problems:
(1) testserver failed to be killed for each case with the log:
'"GET /kill HTTP/1.1" 500'
(2) many teserver processes are there after each run, and the port is used,
when starting a new run, will get the following error:
'socket.error: [Errno 98] Address already in use'
Remove the 'shell=True' and fix this issue.
BUG=
TEST=net_unittests_apk --gtest_filter=URLRequestTestHTTP.*
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=158267
Patch Set 1 #Patch Set 2 : remove shell=True #
Total comments: 1
Patch Set 3 : update the patch #
Total comments: 1
Patch Set 4 : #Messages
Total messages: 11 (0 generated)
|