Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Issue 15008004: Add device port unmapping support to forwarder2. (Closed)

Created:
7 years, 7 months ago by Philippe
Modified:
7 years, 7 months ago
Reviewers:
bulach, felipeg, digit1
CC:
chromium-reviews, craigdh+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy-cc_chromium.org, klundberg+watch_chromium.org, frankf+watch_chromium.org, Peter Beverloo
Visibility:
Public.

Description

Add device port unmapping support to forwarder2. There used not to be any way to unmap a previously forwarded port. Since the host and device forwarder processes are kept alive during a whole test suite, both the host and device ended up with an unnecessarily high amount of unused open sockets. That is source of flakiness (e.g. too many opened file descriptors). This adds an UnmapDevicePort() method to the Python Forwarder wrapper class and modifies the native forwarder2 to accept a negative port on the command line. When a negative port is provided, the host forwarder tries to unmap that port (that was mapped previously). BUG=229685, 239014 R=bulach@chromium.org, digit@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=200257

Patch Set 1 : #

Patch Set 2 : Fix typo #

Total comments: 2

Patch Set 3 : Simplify changes in Socket #

Total comments: 4

Patch Set 4 : Address David's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -80 lines) Patch
M build/android/pylib/chrome_test_server_spawner.py View 1 chunk +1 line, -1 line 0 comments Download
M build/android/pylib/forwarder.py View 2 chunks +13 lines, -4 lines 0 comments Download
M tools/android/forwarder2/daemon.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M tools/android/forwarder2/device_controller.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M tools/android/forwarder2/device_forwarder_main.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/android/forwarder2/device_listener.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M tools/android/forwarder2/forwarder.cc View 1 chunk +1 line, -8 lines 0 comments Download
M tools/android/forwarder2/host_controller.h View 2 chunks +10 lines, -2 lines 0 comments Download
M tools/android/forwarder2/host_controller.cc View 1 2 3 4 chunks +28 lines, -9 lines 0 comments Download
M tools/android/forwarder2/host_forwarder_main.cc View 1 2 3 5 chunks +53 lines, -15 lines 0 comments Download
M tools/android/forwarder2/socket.h View 1 2 5 chunks +20 lines, -20 lines 0 comments Download
M tools/android/forwarder2/socket.cc View 1 2 3 5 chunks +39 lines, -12 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Philippe
FYI, another CL will follow to make the Python Chrome test server spawner use a ...
7 years, 7 months ago (2013-05-14 16:45:38 UTC) #1
bulach
lgtm, but I'm not too familiar here.. go ahead once david is happy :)
7 years, 7 months ago (2013-05-14 18:07:38 UTC) #2
digit1
lgtm, thanks :) https://codereview.chromium.org/15008004/diff/6001/tools/android/forwarder2/host_forwarder_main.cc File tools/android/forwarder2/host_forwarder_main.cc (right): https://codereview.chromium.org/15008004/diff/6001/tools/android/forwarder2/host_forwarder_main.cc#newcode152 tools/android/forwarder2/host_forwarder_main.cc:152: adb_port, std::abs(device_port)); I believe -device_port might ...
7 years, 7 months ago (2013-05-15 10:13:46 UTC) #3
Philippe
Thanks David! https://codereview.chromium.org/15008004/diff/6001/tools/android/forwarder2/host_forwarder_main.cc File tools/android/forwarder2/host_forwarder_main.cc (right): https://codereview.chromium.org/15008004/diff/6001/tools/android/forwarder2/host_forwarder_main.cc#newcode152 tools/android/forwarder2/host_forwarder_main.cc:152: adb_port, std::abs(device_port)); On 2013/05/15 10:13:46, digit1 wrote: ...
7 years, 7 months ago (2013-05-15 11:40:50 UTC) #4
Philippe
+Peter in case he would like to use this new feature in Blink.
7 years, 7 months ago (2013-05-15 11:42:39 UTC) #5
Philippe
7 years, 7 months ago (2013-05-15 13:55:14 UTC) #6
Message was sent while issue was closed.
Committed patchset #4 manually as r200257 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698