WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
164338
Add TCP server to webkitpy for on device testing
https://bugs.webkit.org/show_bug.cgi?id=164338
Summary
Add TCP server to webkitpy for on device testing
Jonathan Bedard
Reported
2016-11-02 13:51:05 PDT
In order to test on device, a TCP connection will be opened between device and host. This adds the TCP server which will run on the host into webkitpy.
Attachments
Patch
(31.59 KB, patch)
2016-11-02 13:53 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Patch
(31.48 KB, patch)
2016-11-04 12:04 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Patch
(27.78 KB, patch)
2016-11-16 08:55 PST
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Jonathan Bedard
Comment 1
2016-11-02 13:53:06 PDT
Created
attachment 293692
[details]
Patch
Jonathan Bedard
Comment 2
2016-11-02 15:33:51 PDT
https://bugs.webkit.org/show_bug.cgi?id=164344
contains the client-side of this server. Note that this patch does not use the TCP server, it simply implements it.
Dean Johnson
Comment 3
2016-11-04 11:13:43 PDT
Comment on
attachment 293692
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=293692&action=review
Gave some feedback where possible - I'm probably not the best candidate for reviewing such low level interactions. Great work on this!
> Tools/Scripts/webkitpy/common/relayserver.py:58 > + bound = False
The loop here could be rewritten for conciseness as follows: upper_bound = PORT_RANGE[1] - PORT_RANGE[0] for port in range(self._port, self._port + upper_bound): try: self._socket.bind((self._host, port)) self._port = port break except socket.error as msg: pass else: # This condition gets hit if you never break from a for loop raise Exception('Ran out of ports to try to bind to for the TCP server.) I would also recommend 'return'ing after the binding the port in `if port`. Then you can remove the else statement too.
> Tools/Scripts/webkitpy/common/relayserver.py:177 > + return str()
Generally speaking you should return '' over str().
Jonathan Bedard
Comment 4
2016-11-04 12:04:31 PDT
Created
attachment 293905
[details]
Patch
Radar WebKit Bug Importer
Comment 5
2016-11-10 10:07:43 PST
<
rdar://problem/29201285
>
Jonathan Bedard
Comment 6
2016-11-16 08:55:46 PST
Created
attachment 294942
[details]
Patch
Jonathan Bedard
Comment 7
2016-12-15 13:43:06 PST
Using a different approach.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug