diff --git a/tests/gold_tests/thread_config/check_threads.py b/tests/gold_tests/thread_config/check_threads.py index 7cc46c9dd65..975e95f8791 100755 --- a/tests/gold_tests/thread_config/check_threads.py +++ b/tests/gold_tests/thread_config/check_threads.py @@ -21,7 +21,7 @@ import sys -def count_threads(ts_path, etnet_threads, accept_threads): +def count_threads(ts_path, etnet_threads, accept_threads, task_threads, aio_threads): for pid in psutil.pids(): @@ -33,6 +33,8 @@ def count_threads(ts_path, etnet_threads, accept_threads): etnet_check = set() accept_check = set() + task_check = set() + aio_check = set() for t in p.threads(): @@ -48,7 +50,7 @@ def count_threads(ts_path, etnet_threads, accept_threads): return 2 elif etnet_id in etnet_check: sys.stderr.write('ET_NET thread with duplicate thread id created.\n') - return 4 + return 3 else: etnet_check.add(etnet_id) @@ -57,18 +59,47 @@ def count_threads(ts_path, etnet_threads, accept_threads): # Get the id of this thread and check if it's in range. accept_id = int(thread_name.split(' ')[1].split(':')[0]) if accept_id >= accept_threads: - sys.stderr.write('Too many accept threads created.\n') - return 3 + sys.stderr.write('Too many ACCEPT threads created.\n') + return 5 else: accept_check.add(accept_id) + elif thread_name.startswith('[ET_TASK'): + + # Get the id of this thread and check if it's in range. + task_id = int(thread_name.split(' ')[1][:-1]) + if task_id >= task_threads: + sys.stderr.write('Too many ET_TASK threads created.\n') + return 7 + elif task_id in task_check: + sys.stderr.write('ET_TASK thread with duplicate thread id created.\n') + return 8 + else: + task_check.add(task_id) + + elif thread_name.startswith('[ET_AIO'): + + # Get the id of this thread and check if it's in range. + aio_id = int(thread_name.split(' ')[1].split(':')[0]) + if aio_id >= aio_threads: + sys.stderr.write('Too many ET_AIO threads created.\n') + return 10 + else: + aio_check.add(aio_id) + # Check the size of the sets, must be equal to the expected size. if len(etnet_check) != etnet_threads: sys.stderr.write('Expected ET_NET threads: {0}, found: {1}.\n'.format(etnet_threads, len(etnet_check))) - return 6 + return 4 elif len(accept_check) != accept_threads: - sys.stderr.write('Expected accept threads: {0}, found: {1}.\n'.format(accept_threads, len(accept_check))) - return 5 + sys.stderr.write('Expected ACCEPT threads: {0}, found: {1}.\n'.format(accept_threads, len(accept_check))) + return 6 + elif len(task_check) != task_threads: + sys.stderr.write('Expected ET_TASK threads: {0}, found: {1}.\n'.format(task_threads, len(task_check))) + return 9 + elif len(aio_check) != aio_threads: + sys.stderr.write('Expected ET_AIO threads: {0}, found: {1}.\n'.format(aio_threads, len(aio_check))) + return 11 else: return 0 @@ -78,13 +109,17 @@ def count_threads(ts_path, etnet_threads, accept_threads): def main(): parser = argparse.ArgumentParser() - parser.add_argument('-t', '--ts-path', type=str, dest='ts_path', help='path to traffic_server binary', required=True) + parser.add_argument('-p', '--ts-path', type=str, dest='ts_path', help='path to traffic_server binary', required=True) parser.add_argument('-e', '--etnet-threads', type=int, dest='etnet_threads', help='expected number of ET_NET threads', required=True) parser.add_argument('-a', '--accept-threads', type=int, dest='accept_threads', - help='expected number of accept threads', required=True) + help='expected number of ACCEPT threads', required=True) + parser.add_argument('-t', '--task-threads', type=int, dest='task_threads', + help='expected number of TASK threads', required=True) + parser.add_argument('-c', '--aio-threads', type=int, dest='aio_threads', + help='expected number of AIO threads', required=True) args = parser.parse_args() - exit(count_threads(args.ts_path, args.etnet_threads, args.accept_threads)) + exit(count_threads(args.ts_path, args.etnet_threads, args.accept_threads, args.task_threads, args.aio_threads)) if __name__ == '__main__': diff --git a/tests/gold_tests/thread_config/gold/http_200.gold b/tests/gold_tests/thread_config/gold/http_200.gold deleted file mode 100644 index f3752f16420..00000000000 --- a/tests/gold_tests/thread_config/gold/http_200.gold +++ /dev/null @@ -1,9 +0,0 @@ -`` -< HTTP/1.1 200 OK -< Date: `` -< Age: `` -< Transfer-Encoding: chunked -< Proxy-Connection: keep-alive -< Server: ATS/`` -< -`` diff --git a/tests/gold_tests/thread_config/thread_100_0.test.py b/tests/gold_tests/thread_config/thread_100_0.test.py deleted file mode 100644 index c4eb395e464..00000000000 --- a/tests/gold_tests/thread_config/thread_100_0.test.py +++ /dev/null @@ -1,65 +0,0 @@ -''' -''' -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -Test.Summary = 'Test that Trafficserver starts with different thread configurations.' -Test.ContinueOnFail = True - -ts = Test.MakeATSProcess('ts') -server = Test.MakeOriginServer('server') - -Test.testName = '' -request_header = { - 'headers': 'GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -response_header = { - 'headers': 'HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -server.addResponse("sessionfile.log", request_header, response_header) - -ts.Disk.records_config.update({ - 'proxy.config.exec_thread.autoconfig': 0, - 'proxy.config.exec_thread.autoconfig.scale': 1.5, - 'proxy.config.exec_thread.limit': 100, - 'proxy.config.accept_threads': 0, - 'proxy.config.diags.debug.enabled': 1, - 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) - -ts.Disk.remap_config.AddLine( - 'map http://www.example.com http://127.0.0.1:{0}'.format(server.Variables.Port) -) - -ts.Setup.CopyAs('check_threads.py', Test.RunDirectory) - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'curl --proxy http://127.0.0.1:{0} http://www.example.com -H "Proxy-Connection: Keep-Alive" --verbose'.format( - ts.Variables.port) -tr.Processes.Default.ReturnCode = 0 -tr.Processes.Default.StartBefore(ts) -tr.Processes.Default.StartBefore(server) -tr.Processes.Default.Streams.stderr = 'gold/http_200.gold' -tr.StillRunningAfter = server -tr.StillRunningAfter = ts - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'python3 check_threads.py -t {0} -e {1} -a {2}'.format(ts.Env['TS_ROOT'], 100, 0) -tr.Processes.Default.ReturnCode = 0 diff --git a/tests/gold_tests/thread_config/thread_100_1.test.py b/tests/gold_tests/thread_config/thread_100_1.test.py deleted file mode 100644 index d3c94ae1404..00000000000 --- a/tests/gold_tests/thread_config/thread_100_1.test.py +++ /dev/null @@ -1,65 +0,0 @@ -''' -''' -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -Test.Summary = 'Test that Trafficserver starts with different thread configurations.' -Test.ContinueOnFail = True - -ts = Test.MakeATSProcess('ts') -server = Test.MakeOriginServer('server') - -Test.testName = '' -request_header = { - 'headers': 'GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -response_header = { - 'headers': 'HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -server.addResponse("sessionfile.log", request_header, response_header) - -ts.Disk.records_config.update({ - 'proxy.config.exec_thread.autoconfig': 0, - 'proxy.config.exec_thread.autoconfig.scale': 1.5, - 'proxy.config.exec_thread.limit': 100, - 'proxy.config.accept_threads': 1, - 'proxy.config.diags.debug.enabled': 1, - 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) - -ts.Disk.remap_config.AddLine( - 'map http://www.example.com http://127.0.0.1:{0}'.format(server.Variables.Port) -) - -ts.Setup.CopyAs('check_threads.py', Test.RunDirectory) - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'curl --proxy http://127.0.0.1:{0} http://www.example.com -H "Proxy-Connection: Keep-Alive" --verbose'.format( - ts.Variables.port) -tr.Processes.Default.ReturnCode = 0 -tr.Processes.Default.StartBefore(ts) -tr.Processes.Default.StartBefore(server) -tr.Processes.Default.Streams.stderr = 'gold/http_200.gold' -tr.StillRunningAfter = server -tr.StillRunningAfter = ts - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'python3 check_threads.py -t {0} -e {1} -a {2}'.format(ts.Env['TS_ROOT'], 100, 1) -tr.Processes.Default.ReturnCode = 0 diff --git a/tests/gold_tests/thread_config/thread_100_10.test.py b/tests/gold_tests/thread_config/thread_100_10.test.py deleted file mode 100644 index 1551c178c1f..00000000000 --- a/tests/gold_tests/thread_config/thread_100_10.test.py +++ /dev/null @@ -1,65 +0,0 @@ -''' -''' -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -Test.Summary = 'Test that Trafficserver starts with different thread configurations.' -Test.ContinueOnFail = True - -ts = Test.MakeATSProcess('ts') -server = Test.MakeOriginServer('server') - -Test.testName = '' -request_header = { - 'headers': 'GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -response_header = { - 'headers': 'HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -server.addResponse("sessionfile.log", request_header, response_header) - -ts.Disk.records_config.update({ - 'proxy.config.exec_thread.autoconfig': 0, - 'proxy.config.exec_thread.autoconfig.scale': 1.5, - 'proxy.config.exec_thread.limit': 100, - 'proxy.config.accept_threads': 10, - 'proxy.config.diags.debug.enabled': 1, - 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) - -ts.Disk.remap_config.AddLine( - 'map http://www.example.com http://127.0.0.1:{0}'.format(server.Variables.Port) -) - -ts.Setup.CopyAs('check_threads.py', Test.RunDirectory) - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'curl --proxy http://127.0.0.1:{0} http://www.example.com -H "Proxy-Connection: Keep-Alive" --verbose'.format( - ts.Variables.port) -tr.Processes.Default.ReturnCode = 0 -tr.Processes.Default.StartBefore(ts) -tr.Processes.Default.StartBefore(server) -tr.Processes.Default.Streams.stderr = 'gold/http_200.gold' -tr.StillRunningAfter = server -tr.StillRunningAfter = ts - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'python3 check_threads.py -t {0} -e {1} -a {2}'.format(ts.Env['TS_ROOT'], 100, 10) -tr.Processes.Default.ReturnCode = 0 diff --git a/tests/gold_tests/thread_config/thread_1_0.test.py b/tests/gold_tests/thread_config/thread_1_0.test.py deleted file mode 100644 index af542e34e17..00000000000 --- a/tests/gold_tests/thread_config/thread_1_0.test.py +++ /dev/null @@ -1,65 +0,0 @@ -''' -''' -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -Test.Summary = 'Test that Trafficserver starts with different thread configurations.' -Test.ContinueOnFail = True - -ts = Test.MakeATSProcess('ts') -server = Test.MakeOriginServer('server') - -Test.testName = '' -request_header = { - 'headers': 'GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -response_header = { - 'headers': 'HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -server.addResponse("sessionfile.log", request_header, response_header) - -ts.Disk.records_config.update({ - 'proxy.config.exec_thread.autoconfig': 0, - 'proxy.config.exec_thread.autoconfig.scale': 1.5, - 'proxy.config.exec_thread.limit': 1, - 'proxy.config.accept_threads': 0, - 'proxy.config.diags.debug.enabled': 1, - 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) - -ts.Disk.remap_config.AddLine( - 'map http://www.example.com http://127.0.0.1:{0}'.format(server.Variables.Port) -) - -ts.Setup.CopyAs('check_threads.py', Test.RunDirectory) - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'curl --proxy http://127.0.0.1:{0} http://www.example.com -H "Proxy-Connection: Keep-Alive" --verbose'.format( - ts.Variables.port) -tr.Processes.Default.ReturnCode = 0 -tr.Processes.Default.StartBefore(ts) -tr.Processes.Default.StartBefore(server) -tr.Processes.Default.Streams.stderr = 'gold/http_200.gold' -tr.StillRunningAfter = server -tr.StillRunningAfter = ts - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'python3 check_threads.py -t {0} -e {1} -a {2}'.format(ts.Env['TS_ROOT'], 1, 0) -tr.Processes.Default.ReturnCode = 0 diff --git a/tests/gold_tests/thread_config/thread_1_1.test.py b/tests/gold_tests/thread_config/thread_1_1.test.py deleted file mode 100644 index e11ee263673..00000000000 --- a/tests/gold_tests/thread_config/thread_1_1.test.py +++ /dev/null @@ -1,65 +0,0 @@ -''' -''' -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -Test.Summary = 'Test that Trafficserver starts with different thread configurations.' -Test.ContinueOnFail = True - -ts = Test.MakeATSProcess('ts') -server = Test.MakeOriginServer('server') - -Test.testName = '' -request_header = { - 'headers': 'GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -response_header = { - 'headers': 'HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -server.addResponse("sessionfile.log", request_header, response_header) - -ts.Disk.records_config.update({ - 'proxy.config.exec_thread.autoconfig': 0, - 'proxy.config.exec_thread.autoconfig.scale': 1.5, - 'proxy.config.exec_thread.limit': 1, - 'proxy.config.accept_threads': 1, - 'proxy.config.diags.debug.enabled': 1, - 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) - -ts.Disk.remap_config.AddLine( - 'map http://www.example.com http://127.0.0.1:{0}'.format(server.Variables.Port) -) - -ts.Setup.CopyAs('check_threads.py', Test.RunDirectory) - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'curl --proxy http://127.0.0.1:{0} http://www.example.com -H "Proxy-Connection: Keep-Alive" --verbose'.format( - ts.Variables.port) -tr.Processes.Default.ReturnCode = 0 -tr.Processes.Default.StartBefore(ts) -tr.Processes.Default.StartBefore(server) -tr.Processes.Default.Streams.stderr = 'gold/http_200.gold' -tr.StillRunningAfter = server -tr.StillRunningAfter = ts - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'python3 check_threads.py -t {0} -e {1} -a {2}'.format(ts.Env['TS_ROOT'], 1, 1) -tr.Processes.Default.ReturnCode = 0 diff --git a/tests/gold_tests/thread_config/thread_1_10.test.py b/tests/gold_tests/thread_config/thread_1_10.test.py deleted file mode 100644 index ed2d0668a66..00000000000 --- a/tests/gold_tests/thread_config/thread_1_10.test.py +++ /dev/null @@ -1,65 +0,0 @@ -''' -''' -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -Test.Summary = 'Test that Trafficserver starts with different thread configurations.' -Test.ContinueOnFail = True - -ts = Test.MakeATSProcess('ts') -server = Test.MakeOriginServer('server') - -Test.testName = '' -request_header = { - 'headers': 'GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -response_header = { - 'headers': 'HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -server.addResponse("sessionfile.log", request_header, response_header) - -ts.Disk.records_config.update({ - 'proxy.config.exec_thread.autoconfig': 0, - 'proxy.config.exec_thread.autoconfig.scale': 1.5, - 'proxy.config.exec_thread.limit': 1, - 'proxy.config.accept_threads': 10, - 'proxy.config.diags.debug.enabled': 1, - 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) - -ts.Disk.remap_config.AddLine( - 'map http://www.example.com http://127.0.0.1:{0}'.format(server.Variables.Port) -) - -ts.Setup.CopyAs('check_threads.py', Test.RunDirectory) - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'curl --proxy http://127.0.0.1:{0} http://www.example.com -H "Proxy-Connection: Keep-Alive" --verbose'.format( - ts.Variables.port) -tr.Processes.Default.ReturnCode = 0 -tr.Processes.Default.StartBefore(ts) -tr.Processes.Default.StartBefore(server) -tr.Processes.Default.Streams.stderr = 'gold/http_200.gold' -tr.StillRunningAfter = server -tr.StillRunningAfter = ts - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'python3 check_threads.py -t {0} -e {1} -a {2}'.format(ts.Env['TS_ROOT'], 1, 10) -tr.Processes.Default.ReturnCode = 0 diff --git a/tests/gold_tests/thread_config/thread_2_0.test.py b/tests/gold_tests/thread_config/thread_2_0.test.py deleted file mode 100644 index b8891436fa8..00000000000 --- a/tests/gold_tests/thread_config/thread_2_0.test.py +++ /dev/null @@ -1,65 +0,0 @@ -''' -''' -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -Test.Summary = 'Test that Trafficserver starts with different thread configurations.' -Test.ContinueOnFail = True - -ts = Test.MakeATSProcess('ts') -server = Test.MakeOriginServer('server') - -Test.testName = '' -request_header = { - 'headers': 'GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -response_header = { - 'headers': 'HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -server.addResponse("sessionfile.log", request_header, response_header) - -ts.Disk.records_config.update({ - 'proxy.config.exec_thread.autoconfig': 0, - 'proxy.config.exec_thread.autoconfig.scale': 1.5, - 'proxy.config.exec_thread.limit': 2, - 'proxy.config.accept_threads': 0, - 'proxy.config.diags.debug.enabled': 1, - 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) - -ts.Disk.remap_config.AddLine( - 'map http://www.example.com http://127.0.0.1:{0}'.format(server.Variables.Port) -) - -ts.Setup.CopyAs('check_threads.py', Test.RunDirectory) - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'curl --proxy http://127.0.0.1:{0} http://www.example.com -H "Proxy-Connection: Keep-Alive" --verbose'.format( - ts.Variables.port) -tr.Processes.Default.ReturnCode = 0 -tr.Processes.Default.StartBefore(ts) -tr.Processes.Default.StartBefore(server) -tr.Processes.Default.Streams.stderr = 'gold/http_200.gold' -tr.StillRunningAfter = server -tr.StillRunningAfter = ts - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'python3 check_threads.py -t {0} -e {1} -a {2}'.format(ts.Env['TS_ROOT'], 2, 0) -tr.Processes.Default.ReturnCode = 0 diff --git a/tests/gold_tests/thread_config/thread_2_1.test.py b/tests/gold_tests/thread_config/thread_2_1.test.py deleted file mode 100644 index 701975c4468..00000000000 --- a/tests/gold_tests/thread_config/thread_2_1.test.py +++ /dev/null @@ -1,65 +0,0 @@ -''' -''' -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -Test.Summary = 'Test that Trafficserver starts with different thread configurations.' -Test.ContinueOnFail = True - -ts = Test.MakeATSProcess('ts') -server = Test.MakeOriginServer('server') - -Test.testName = '' -request_header = { - 'headers': 'GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -response_header = { - 'headers': 'HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -server.addResponse("sessionfile.log", request_header, response_header) - -ts.Disk.records_config.update({ - 'proxy.config.exec_thread.autoconfig': 0, - 'proxy.config.exec_thread.autoconfig.scale': 1.5, - 'proxy.config.exec_thread.limit': 2, - 'proxy.config.accept_threads': 1, - 'proxy.config.diags.debug.enabled': 1, - 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) - -ts.Disk.remap_config.AddLine( - 'map http://www.example.com http://127.0.0.1:{0}'.format(server.Variables.Port) -) - -ts.Setup.CopyAs('check_threads.py', Test.RunDirectory) - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'curl --proxy http://127.0.0.1:{0} http://www.example.com -H "Proxy-Connection: Keep-Alive" --verbose'.format( - ts.Variables.port) -tr.Processes.Default.ReturnCode = 0 -tr.Processes.Default.StartBefore(ts) -tr.Processes.Default.StartBefore(server) -tr.Processes.Default.Streams.stderr = 'gold/http_200.gold' -tr.StillRunningAfter = server -tr.StillRunningAfter = ts - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'python3 check_threads.py -t {0} -e {1} -a {2}'.format(ts.Env['TS_ROOT'], 2, 1) -tr.Processes.Default.ReturnCode = 0 diff --git a/tests/gold_tests/thread_config/thread_2_10.test.py b/tests/gold_tests/thread_config/thread_2_10.test.py deleted file mode 100644 index 9d1799b37c2..00000000000 --- a/tests/gold_tests/thread_config/thread_2_10.test.py +++ /dev/null @@ -1,65 +0,0 @@ -''' -''' -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -Test.Summary = 'Test that Trafficserver starts with different thread configurations.' -Test.ContinueOnFail = True - -ts = Test.MakeATSProcess('ts') -server = Test.MakeOriginServer('server') - -Test.testName = '' -request_header = { - 'headers': 'GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -response_header = { - 'headers': 'HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -server.addResponse("sessionfile.log", request_header, response_header) - -ts.Disk.records_config.update({ - 'proxy.config.exec_thread.autoconfig': 0, - 'proxy.config.exec_thread.autoconfig.scale': 1.5, - 'proxy.config.exec_thread.limit': 2, - 'proxy.config.accept_threads': 10, - 'proxy.config.diags.debug.enabled': 1, - 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) - -ts.Disk.remap_config.AddLine( - 'map http://www.example.com http://127.0.0.1:{0}'.format(server.Variables.Port) -) - -ts.Setup.CopyAs('check_threads.py', Test.RunDirectory) - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'curl --proxy http://127.0.0.1:{0} http://www.example.com -H "Proxy-Connection: Keep-Alive" --verbose'.format( - ts.Variables.port) -tr.Processes.Default.ReturnCode = 0 -tr.Processes.Default.StartBefore(ts) -tr.Processes.Default.StartBefore(server) -tr.Processes.Default.Streams.stderr = 'gold/http_200.gold' -tr.StillRunningAfter = server -tr.StillRunningAfter = ts - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'python3 check_threads.py -t {0} -e {1} -a {2}'.format(ts.Env['TS_ROOT'], 2, 10) -tr.Processes.Default.ReturnCode = 0 diff --git a/tests/gold_tests/thread_config/thread_32_0.test.py b/tests/gold_tests/thread_config/thread_32_0.test.py deleted file mode 100644 index eb42be40c8e..00000000000 --- a/tests/gold_tests/thread_config/thread_32_0.test.py +++ /dev/null @@ -1,65 +0,0 @@ -''' -''' -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -Test.Summary = 'Test that Trafficserver starts with different thread configurations.' -Test.ContinueOnFail = True - -ts = Test.MakeATSProcess('ts') -server = Test.MakeOriginServer('server') - -Test.testName = '' -request_header = { - 'headers': 'GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -response_header = { - 'headers': 'HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -server.addResponse("sessionfile.log", request_header, response_header) - -ts.Disk.records_config.update({ - 'proxy.config.exec_thread.autoconfig': 0, - 'proxy.config.exec_thread.autoconfig.scale': 1.5, - 'proxy.config.exec_thread.limit': 32, - 'proxy.config.accept_threads': 0, - 'proxy.config.diags.debug.enabled': 1, - 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) - -ts.Disk.remap_config.AddLine( - 'map http://www.example.com http://127.0.0.1:{0}'.format(server.Variables.Port) -) - -ts.Setup.CopyAs('check_threads.py', Test.RunDirectory) - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'curl --proxy http://127.0.0.1:{0} http://www.example.com -H "Proxy-Connection: Keep-Alive" --verbose'.format( - ts.Variables.port) -tr.Processes.Default.ReturnCode = 0 -tr.Processes.Default.StartBefore(ts) -tr.Processes.Default.StartBefore(server) -tr.Processes.Default.Streams.stderr = 'gold/http_200.gold' -tr.StillRunningAfter = server -tr.StillRunningAfter = ts - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'python3 check_threads.py -t {0} -e {1} -a {2}'.format(ts.Env['TS_ROOT'], 32, 0) -tr.Processes.Default.ReturnCode = 0 diff --git a/tests/gold_tests/thread_config/thread_32_1.test.py b/tests/gold_tests/thread_config/thread_32_1.test.py deleted file mode 100644 index 666fa155180..00000000000 --- a/tests/gold_tests/thread_config/thread_32_1.test.py +++ /dev/null @@ -1,65 +0,0 @@ -''' -''' -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -Test.Summary = 'Test that Trafficserver starts with different thread configurations.' -Test.ContinueOnFail = True - -ts = Test.MakeATSProcess('ts') -server = Test.MakeOriginServer('server') - -Test.testName = '' -request_header = { - 'headers': 'GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -response_header = { - 'headers': 'HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -server.addResponse("sessionfile.log", request_header, response_header) - -ts.Disk.records_config.update({ - 'proxy.config.exec_thread.autoconfig': 0, - 'proxy.config.exec_thread.autoconfig.scale': 1.5, - 'proxy.config.exec_thread.limit': 32, - 'proxy.config.accept_threads': 1, - 'proxy.config.diags.debug.enabled': 1, - 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) - -ts.Disk.remap_config.AddLine( - 'map http://www.example.com http://127.0.0.1:{0}'.format(server.Variables.Port) -) - -ts.Setup.CopyAs('check_threads.py', Test.RunDirectory) - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'curl --proxy http://127.0.0.1:{0} http://www.example.com -H "Proxy-Connection: Keep-Alive" --verbose'.format( - ts.Variables.port) -tr.Processes.Default.ReturnCode = 0 -tr.Processes.Default.StartBefore(ts) -tr.Processes.Default.StartBefore(server) -tr.Processes.Default.Streams.stderr = 'gold/http_200.gold' -tr.StillRunningAfter = server -tr.StillRunningAfter = ts - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'python3 check_threads.py -t {0} -e {1} -a {2}'.format(ts.Env['TS_ROOT'], 32, 1) -tr.Processes.Default.ReturnCode = 0 diff --git a/tests/gold_tests/thread_config/thread_32_10.test.py b/tests/gold_tests/thread_config/thread_32_10.test.py deleted file mode 100644 index 29c9f5eb41b..00000000000 --- a/tests/gold_tests/thread_config/thread_32_10.test.py +++ /dev/null @@ -1,65 +0,0 @@ -''' -''' -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -Test.Summary = 'Test that Trafficserver starts with different thread configurations.' -Test.ContinueOnFail = True - -ts = Test.MakeATSProcess('ts') -server = Test.MakeOriginServer('server') - -Test.testName = '' -request_header = { - 'headers': 'GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -response_header = { - 'headers': 'HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n', - 'timestamp': '1469733493.993', - 'body': '' -} -server.addResponse("sessionfile.log", request_header, response_header) - -ts.Disk.records_config.update({ - 'proxy.config.exec_thread.autoconfig': 0, - 'proxy.config.exec_thread.autoconfig.scale': 1.5, - 'proxy.config.exec_thread.limit': 32, - 'proxy.config.accept_threads': 10, - 'proxy.config.diags.debug.enabled': 1, - 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) - -ts.Disk.remap_config.AddLine( - 'map http://www.example.com http://127.0.0.1:{0}'.format(server.Variables.Port) -) - -ts.Setup.CopyAs('check_threads.py', Test.RunDirectory) - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'curl --proxy http://127.0.0.1:{0} http://www.example.com -H "Proxy-Connection: Keep-Alive" --verbose'.format( - ts.Variables.port) -tr.Processes.Default.ReturnCode = 0 -tr.Processes.Default.StartBefore(ts) -tr.Processes.Default.StartBefore(server) -tr.Processes.Default.Streams.stderr = 'gold/http_200.gold' -tr.StillRunningAfter = server -tr.StillRunningAfter = ts - -tr = Test.AddTestRun() -tr.Processes.Default.Command = 'python3 check_threads.py -t {0} -e {1} -a {2}'.format(ts.Env['TS_ROOT'], 32, 10) -tr.Processes.Default.ReturnCode = 0 diff --git a/tests/gold_tests/thread_config/thread_config.test.py b/tests/gold_tests/thread_config/thread_config.test.py new file mode 100644 index 00000000000..a1e6324251a --- /dev/null +++ b/tests/gold_tests/thread_config/thread_config.test.py @@ -0,0 +1,218 @@ +''' +''' +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +Test.Summary = 'Test that Trafficserver starts with different thread configurations.' +Test.ContinueOnFail = True + +ts = Test.MakeATSProcess('ts-1_exec-0_accept-1_task-1_aio') +ts.Disk.records_config.update({ + 'proxy.config.exec_thread.autoconfig': 0, + 'proxy.config.exec_thread.autoconfig.scale': 1.5, + 'proxy.config.exec_thread.limit': 1, + 'proxy.config.accept_threads': 0, + 'proxy.config.task_threads': 1, + 'proxy.config.cache.threads_per_disk': 1, + 'proxy.config.diags.debug.enabled': 1, + 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) +ts.Setup.CopyAs('check_threads.py', Test.RunDirectory) + +tr = Test.AddTestRun() +tr.Processes.Default.Command = 'python3 check_threads.py -p {0} -e {1} -a {2} -t {3} -c {4}'.format(ts.Env['TS_ROOT'], 1, 0, 1, 1) +tr.Processes.Default.ReturnCode = 0 +tr.Processes.Default.StartBefore(ts) + +ts = Test.MakeATSProcess('ts-1_exec-1_accept-2_task-8_aio') +ts.Disk.records_config.update({ + 'proxy.config.exec_thread.autoconfig': 0, + 'proxy.config.exec_thread.autoconfig.scale': 1.5, + 'proxy.config.exec_thread.limit': 1, + 'proxy.config.accept_threads': 1, + 'proxy.config.task_threads': 2, + 'proxy.config.cache.threads_per_disk': 8, + 'proxy.config.diags.debug.enabled': 1, + 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) + +tr = Test.AddTestRun() +tr.Processes.Default.Command = 'python3 check_threads.py -p {0} -e {1} -a {2} -t {3} -c {4}'.format(ts.Env['TS_ROOT'], 1, 1, 2, 8) +tr.Processes.Default.ReturnCode = 0 +tr.Processes.Default.StartBefore(ts) + +ts = Test.MakeATSProcess('ts-1_exec-10_accept-10_task-32_aio') +ts.Disk.records_config.update({ + 'proxy.config.exec_thread.autoconfig': 0, + 'proxy.config.exec_thread.autoconfig.scale': 1.5, + 'proxy.config.exec_thread.limit': 1, + 'proxy.config.accept_threads': 10, + 'proxy.config.task_threads': 10, + 'proxy.config.cache.threads_per_disk': 32, + 'proxy.config.diags.debug.enabled': 1, + 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) + +tr = Test.AddTestRun() +tr.Processes.Default.Command = 'python3 check_threads.py -p {0} -e {1} -a {2} -t {3} -c {4}'.format( + ts.Env['TS_ROOT'], 1, 10, 10, 32) +tr.Processes.Default.ReturnCode = 0 +tr.Processes.Default.StartBefore(ts) + +ts = Test.MakeATSProcess('ts-2_exec-0_accept-1_task-1_aio') +ts.Disk.records_config.update({ + 'proxy.config.exec_thread.autoconfig': 0, + 'proxy.config.exec_thread.autoconfig.scale': 1.5, + 'proxy.config.exec_thread.limit': 2, + 'proxy.config.accept_threads': 0, + 'proxy.config.task_threads': 1, + 'proxy.config.cache.threads_per_disk': 1, + 'proxy.config.diags.debug.enabled': 1, + 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) + +tr = Test.AddTestRun() +tr.Processes.Default.Command = 'python3 check_threads.py -p {0} -e {1} -a {2} -t {3} -c {4}'.format(ts.Env['TS_ROOT'], 2, 0, 1, 1) +tr.Processes.Default.ReturnCode = 0 +tr.Processes.Default.StartBefore(ts) + +ts = Test.MakeATSProcess('ts-2_exec-1_accept-2_task-8_aio') +ts.Disk.records_config.update({ + 'proxy.config.exec_thread.autoconfig': 0, + 'proxy.config.exec_thread.autoconfig.scale': 1.5, + 'proxy.config.exec_thread.limit': 2, + 'proxy.config.accept_threads': 1, + 'proxy.config.task_threads': 2, + 'proxy.config.cache.threads_per_disk': 8, + 'proxy.config.diags.debug.enabled': 1, + 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) + +tr = Test.AddTestRun() +tr.Processes.Default.Command = 'python3 check_threads.py -p {0} -e {1} -a {2} -t {3} -c {4}'.format(ts.Env['TS_ROOT'], 2, 1, 2, 8) +tr.Processes.Default.ReturnCode = 0 +tr.Processes.Default.StartBefore(ts) + +ts = Test.MakeATSProcess('ts-2_exec-10_accept-10_task-32_aio') +ts.Disk.records_config.update({ + 'proxy.config.exec_thread.autoconfig': 0, + 'proxy.config.exec_thread.autoconfig.scale': 1.5, + 'proxy.config.exec_thread.limit': 2, + 'proxy.config.accept_threads': 10, + 'proxy.config.task_threads': 10, + 'proxy.config.cache.threads_per_disk': 32, + 'proxy.config.diags.debug.enabled': 1, + 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) + +tr = Test.AddTestRun() +tr.Processes.Default.Command = 'python3 check_threads.py -p {0} -e {1} -a {2} -t {3} -c {4}'.format( + ts.Env['TS_ROOT'], 2, 10, 10, 32) +tr.Processes.Default.ReturnCode = 0 +tr.Processes.Default.StartBefore(ts) + +ts = Test.MakeATSProcess('ts-32_exec-0_accept-1_task-1_aio') +ts.Disk.records_config.update({ + 'proxy.config.exec_thread.autoconfig': 0, + 'proxy.config.exec_thread.autoconfig.scale': 1.5, + 'proxy.config.exec_thread.limit': 32, + 'proxy.config.accept_threads': 0, + 'proxy.config.task_threads': 1, + 'proxy.config.cache.threads_per_disk': 1, + 'proxy.config.diags.debug.enabled': 1, + 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) + +tr = Test.AddTestRun() +tr.Processes.Default.Command = 'python3 check_threads.py -p {0} -e {1} -a {2} -t {3} -c {4}'.format(ts.Env['TS_ROOT'], 32, 0, 1, 1) +tr.Processes.Default.ReturnCode = 0 +tr.Processes.Default.StartBefore(ts) + +ts = Test.MakeATSProcess('ts-32_exec-1_accept-2_task-8_aio') +ts.Disk.records_config.update({ + 'proxy.config.exec_thread.autoconfig': 0, + 'proxy.config.exec_thread.autoconfig.scale': 1.5, + 'proxy.config.exec_thread.limit': 32, + 'proxy.config.accept_threads': 1, + 'proxy.config.task_threads': 2, + 'proxy.config.cache.threads_per_disk': 8, + 'proxy.config.diags.debug.enabled': 1, + 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) + +tr = Test.AddTestRun() +tr.Processes.Default.Command = 'python3 check_threads.py -p {0} -e {1} -a {2} -t {3} -c {4}'.format(ts.Env['TS_ROOT'], 32, 1, 2, 8) +tr.Processes.Default.ReturnCode = 0 +tr.Processes.Default.StartBefore(ts) + +ts = Test.MakeATSProcess('ts-32_exec-10_accept-10_task-32_aio') +ts.Disk.records_config.update({ + 'proxy.config.exec_thread.autoconfig': 0, + 'proxy.config.exec_thread.autoconfig.scale': 1.5, + 'proxy.config.exec_thread.limit': 32, + 'proxy.config.accept_threads': 10, + 'proxy.config.task_threads': 10, + 'proxy.config.cache.threads_per_disk': 32, + 'proxy.config.diags.debug.enabled': 1, + 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) + +tr = Test.AddTestRun() +tr.Processes.Default.Command = 'python3 check_threads.py -p {0} -e {1} -a {2} -t {3} -c {4}'.format( + ts.Env['TS_ROOT'], 32, 10, 10, 32) +tr.Processes.Default.ReturnCode = 0 +tr.Processes.Default.StartBefore(ts) + +ts = Test.MakeATSProcess('ts-100_exec-0_accept-1_task-1_aio') +ts.Disk.records_config.update({ + 'proxy.config.exec_thread.autoconfig': 0, + 'proxy.config.exec_thread.autoconfig.scale': 1.5, + 'proxy.config.exec_thread.limit': 100, + 'proxy.config.accept_threads': 0, + 'proxy.config.task_threads': 1, + 'proxy.config.cache.threads_per_disk': 1, + 'proxy.config.diags.debug.enabled': 1, + 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) + +tr = Test.AddTestRun() +tr.Processes.Default.Command = 'python3 check_threads.py -p {0} -e {1} -a {2} -t {3} -c {4}'.format(ts.Env['TS_ROOT'], 100, 0, 1, 1) +tr.Processes.Default.ReturnCode = 0 +tr.Processes.Default.StartBefore(ts) + +ts = Test.MakeATSProcess('ts-100_exec-1_accept-2_task-8_aio') +ts.Disk.records_config.update({ + 'proxy.config.exec_thread.autoconfig': 0, + 'proxy.config.exec_thread.autoconfig.scale': 1.5, + 'proxy.config.exec_thread.limit': 100, + 'proxy.config.accept_threads': 1, + 'proxy.config.task_threads': 2, + 'proxy.config.cache.threads_per_disk': 8, + 'proxy.config.diags.debug.enabled': 1, + 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) + +tr = Test.AddTestRun() +tr.Processes.Default.Command = 'python3 check_threads.py -p {0} -e {1} -a {2} -t {3} -c {4}'.format(ts.Env['TS_ROOT'], 100, 1, 2, 8) +tr.Processes.Default.ReturnCode = 0 +tr.Processes.Default.StartBefore(ts) + +ts = Test.MakeATSProcess('ts-100_exec-10_accept-10_task-32_aio') +ts.Disk.records_config.update({ + 'proxy.config.exec_thread.autoconfig': 0, + 'proxy.config.exec_thread.autoconfig.scale': 1.5, + 'proxy.config.exec_thread.limit': 100, + 'proxy.config.accept_threads': 10, + 'proxy.config.task_threads': 10, + 'proxy.config.cache.threads_per_disk': 32, + 'proxy.config.diags.debug.enabled': 1, + 'proxy.config.diags.debug.tags': 'iocore_thread_start|iocore_net_accept_start'}) + +tr = Test.AddTestRun() +tr.Processes.Default.Command = 'python3 check_threads.py -p {0} -e {1} -a {2} -t {3} -c {4}'.format( + ts.Env['TS_ROOT'], 100, 10, 10, 32) +tr.Processes.Default.ReturnCode = 0 +tr.Processes.Default.StartBefore(ts)