[Lldb-commits] [lldb] r248337 - test runner: remove print from prior commit; fixup listner socket backlog
Todd Fiala via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 22 15:47:34 PDT 2015
Author: tfiala
Date: Tue Sep 22 17:47:34 2015
New Revision: 248337
URL: http://llvm.org/viewvc/llvm-project?rev=248337&view=rev
Log:
test runner: remove print from prior commit; fixup listner socket backlog
When doing test event collation from dotest inferiors to the parallel test
runner, I had a hard-coded small value for the socket backlog. Fix it to
be 2*num workers so we don't fail socket connections from inferiors.
Modified:
lldb/trunk/test/dosep.py
lldb/trunk/test/dotest_channels.py
Modified: lldb/trunk/test/dosep.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dosep.py?rev=248337&r1=248336&r2=248337&view=diff
==============================================================================
--- lldb/trunk/test/dosep.py (original)
+++ lldb/trunk/test/dosep.py Tue Sep 22 17:47:34 2015
@@ -895,7 +895,7 @@ def inprocess_exec_test_runner(test_work
return test_results
def walk_and_invoke(test_directory, test_subdir, dotest_argv,
- test_runner_func):
+ num_workers, test_runner_func):
"""Look for matched files and invoke test driver on each one.
In single-threaded mode, each test driver is invoked directly.
In multi-threaded mode, submit each test driver to a worker
@@ -917,7 +917,8 @@ def walk_and_invoke(test_directory, test
forwarding_func = RESULTS_FORMATTER.handle_event
RESULTS_LISTENER_CHANNEL = (
dotest_channels.UnpicklingForwardingListenerChannel(
- RUNNER_PROCESS_ASYNC_MAP, "localhost", 0, forwarding_func))
+ RUNNER_PROCESS_ASYNC_MAP, "localhost", 0,
+ 2 * num_workers, forwarding_func))
dotest_argv.append("--results-port")
dotest_argv.append(str(RESULTS_LISTENER_CHANNEL.address[1]))
@@ -1158,10 +1159,7 @@ def is_darwin_version_lower_than(target_
return False
system_version = distutils.version.StrictVersion(platform.mac_ver()[0])
- is_lower = cmp(system_version, target_version) < 0
- print "is_darwin_version_lower_than: {} ({}, {})".format(
- is_lower, system_version, target_version)
- return is_lower
+ return cmp(system_version, target_version) < 0
def default_test_runner_name(num_threads):
@@ -1273,7 +1271,8 @@ def main(print_details_on_success, num_t
test_runner_func = runner_strategies_by_name[test_runner_name]
summary_results = walk_and_invoke(
- test_directory, test_subdir, dotest_argv, test_runner_func)
+ test_directory, test_subdir, dotest_argv,
+ num_threads, test_runner_func)
(timed_out, passed, failed, unexpected_successes, pass_count,
fail_count) = summary_results
Modified: lldb/trunk/test/dotest_channels.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest_channels.py?rev=248337&r1=248336&r2=248337&view=diff
==============================================================================
--- lldb/trunk/test/dotest_channels.py (original)
+++ lldb/trunk/test/dotest_channels.py Tue Sep 22 17:47:34 2015
@@ -147,13 +147,13 @@ class UnpicklingForwardingListenerChanne
one of the reasons for implementing with asyncore. This listener shuts
down once a single connection is made to it.
"""
- def __init__(self, async_map, host, port, forwarding_func):
+ def __init__(self, async_map, host, port, backlog_count, forwarding_func):
asyncore.dispatcher.__init__(self, map=async_map)
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
self.set_reuse_addr()
self.bind((host, port))
self.address = self.socket.getsockname()
- self.listen(5)
+ self.listen(backlog_count)
self.handler = None
self.async_map = async_map
self.forwarding_func = forwarding_func
More information about the lldb-commits
mailing list