This is an automated email from the ASF dual-hosted git repository. cmcfarlen pushed a commit to branch 10.2.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 3a79320919ad331802e31befb849b72ca87be426 Author: Brian Neradt <[email protected]> AuthorDate: Sat May 23 17:11:13 2026 -0500 Stabilize parallel AuTest helpers (#13182) Parallel AuTest runs can execute redirect and redirect_actions at the same time. Both tests wrote request files into the same generated data directory, so one test could overwrite the other's inputs and make redirect fail with unrelated redirect_actions requests. This gives each redirect test its own generated-data directory and keeps those directories ignored. This also makes the SIGUSR2 helper tolerate processes whose psutil cmdline is unavailable, so process scanning does not crash before signaling Traffic Server. Co-authored-by: bneradt <[email protected]> (cherry picked from commit 4e4be01a6b3c378386edfa72d94f6ca468fa1acb) --- tests/gold_tests/logging/ts_process_handler.py | 5 ++++- tests/gold_tests/redirect/.gitignore | 3 ++- tests/gold_tests/redirect/redirect.test.py | 2 +- tests/gold_tests/redirect/redirect_actions.test.py | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/gold_tests/logging/ts_process_handler.py b/tests/gold_tests/logging/ts_process_handler.py index ec1bcd469f..40640e3922 100644 --- a/tests/gold_tests/logging/ts_process_handler.py +++ b/tests/gold_tests/logging/ts_process_handler.py @@ -36,7 +36,10 @@ class GetPidError(Exception): def get_ts_process_pid(ts_identifier): processes = [] for proc in psutil.process_iter(['cmdline']): - commandline = ' '.join(proc.info['cmdline']) + cmdline = proc.info.get('cmdline', []) + if not cmdline: + continue + commandline = ' '.join(cmdline) if '/traffic_server' in commandline and ts_identifier in commandline: return proc raise GetPidError("Could not find a traffic_server process") diff --git a/tests/gold_tests/redirect/.gitignore b/tests/gold_tests/redirect/.gitignore index 90b27be080..664b6818dc 100644 --- a/tests/gold_tests/redirect/.gitignore +++ b/tests/gold_tests/redirect/.gitignore @@ -1 +1,2 @@ -generated_test_data/ +redirect_actions_generated_test_data/ +redirect_generated_test_data/ diff --git a/tests/gold_tests/redirect/redirect.test.py b/tests/gold_tests/redirect/redirect.test.py index 6e9d92aaf3..1a14ed1d97 100644 --- a/tests/gold_tests/redirect/redirect.test.py +++ b/tests/gold_tests/redirect/redirect.test.py @@ -69,7 +69,7 @@ dest_serv.addResponse("sessionfile.log", dest_request_header, dest_response_head dns.addRecords(records={"iwillredirect.test": ["127.0.0.1"]}) -data_dirname = 'generated_test_data' +data_dirname = 'redirect_generated_test_data' data_path = os.path.join(Test.TestDirectory, data_dirname) os.makedirs(data_path, exist_ok=True) diff --git a/tests/gold_tests/redirect/redirect_actions.test.py b/tests/gold_tests/redirect/redirect_actions.test.py index 52a036bd61..beaeae1beb 100644 --- a/tests/gold_tests/redirect/redirect_actions.test.py +++ b/tests/gold_tests/redirect/redirect_actions.test.py @@ -92,7 +92,7 @@ origin.addResponse('sessionfile.log', request_header, response_header) # Map scenarios to trafficserver processes. trafficservers = {} -data_dirname = 'generated_test_data' +data_dirname = 'redirect_actions_generated_test_data' data_path = os.path.join(Test.TestDirectory, data_dirname) os.makedirs(data_path, exist_ok=True)
