Commit 957e2f9d authored by Maksym Onufriienko's avatar Maksym Onufriienko Committed by Commit Bot

[test_runner] Fixed usage of Popen.name

Example of error:
https://chrome-swarming.appspot.com/task?id=47e61333eed2f710

Bug: 1011851
Change-Id: I598615ac07cac20294e7171f81c6fb1ec07ed2fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1862245Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
Commit-Queue: Maksym Onufriienko <monufriienko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706792}
parent 7dbf6f8c
...@@ -217,7 +217,7 @@ def terminate_process(proc, proc_name): ...@@ -217,7 +217,7 @@ def terminate_process(proc, proc_name):
if ps.is_running(): if ps.is_running():
LOGGER.info( LOGGER.info(
'Process %s is still alive! %s process might block it.', 'Process %s is still alive! %s process might block it.',
proc.name, proc_name) psutil.Process(proc.pid).name(), proc_name)
running_processes = [ running_processes = [
p for p in psutil.process_iter() p for p in psutil.process_iter()
# Use as_dict() to avoid API changes across versions of psutil. # Use as_dict() to avoid API changes across versions of psutil.
...@@ -253,7 +253,7 @@ def print_process_output(proc, ...@@ -253,7 +253,7 @@ def print_process_output(proc,
if no output occurs in specified timeout. Sometimes proc generates if no output occurs in specified timeout. Sometimes proc generates
child process that may block its parent and for such cases child process that may block its parent and for such cases
proc_name refers to the name of child process. proc_name refers to the name of child process.
If proc_name is not specified, proc.name will be used to kill process. If proc_name is not specified, process name will be used to kill process.
Parser: A parser. Parser: A parser.
timeout: A timeout(in seconds) to subprocess.stdout.readline method. timeout: A timeout(in seconds) to subprocess.stdout.readline method.
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment