| Index: telemetry/telemetry/internal/platform/profiler/tcpdump_profiler.py
|
| diff --git a/telemetry/telemetry/internal/platform/profiler/tcpdump_profiler.py b/telemetry/telemetry/internal/platform/profiler/tcpdump_profiler.py
|
| index 40c19445f47da914bc8640996a00e6765b273e64..a8527cb0417d593fa50c4d4e436f2f19f9f8091c 100644
|
| --- a/telemetry/telemetry/internal/platform/profiler/tcpdump_profiler.py
|
| +++ b/telemetry/telemetry/internal/platform/profiler/tcpdump_profiler.py
|
| @@ -26,8 +26,9 @@ class _TCPDumpProfilerAndroid(object):
|
| def __init__(self, device, output_path):
|
| self._device = device
|
| self._output_path = output_path
|
| - self._device.RunShellCommand('mkdir -p ' +
|
| - os.path.dirname(self._DEVICE_DUMP_FILE))
|
| + self._device.RunShellCommand(
|
| + ['mkdir', '-p', os.path.dirname(self._DEVICE_DUMP_FILE)],
|
| + check_return=True)
|
| self._proc = subprocess.Popen(
|
| [self._device.adb.GetAdbPath(),
|
| '-s', self._device.adb.GetDeviceSerial(),
|
| @@ -46,7 +47,8 @@ class _TCPDumpProfilerAndroid(object):
|
| 'At most one instance of process tcpdump expected but found pids: '
|
| '%s' % tcpdump_pid)
|
| tcpdump_pid = int(tcpdump_pid['tcpdump'][0])
|
| - self._device.RunShellCommand('kill -term ' + tcpdump_pid)
|
| + self._device.RunShellCommand(
|
| + ['kill', '-term', str(tcpdump_pid)], check_return=True)
|
| self._proc.terminate()
|
| host_dump = os.path.join(self._output_path,
|
| os.path.basename(self._DEVICE_DUMP_FILE))
|
|
|