From 45f8db626721db40e197461d912acdb2fc2f1a49 Mon Sep 17 00:00:00 2001 From: Christian Loehle Date: Mon, 25 Sep 2023 10:16:25 +0100 Subject: [PATCH] Squashed 'external/devlib/' changes from 9b15807c..9199d888 9199d888 ftrace: Do not read-verify buffer_size_kb value 14bb86ef collector/perfetto: Use busybox cat 1c022355 utils/ssh: Fix SSHTransferHandle when using SCP git-subtree-dir: external/devlib git-subtree-split: 9199d8884e7257155b57a8ab2baca21f78923916 --- devlib/collector/ftrace.py | 2 +- devlib/collector/perfetto.py | 5 ++--- devlib/utils/ssh.py | 4 +++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/devlib/collector/ftrace.py b/devlib/collector/ftrace.py index 9c1795924..057d7322e 100644 --- a/devlib/collector/ftrace.py +++ b/devlib/collector/ftrace.py @@ -251,7 +251,7 @@ class FtraceCollector(CollectorBase): if top_buffer_size: self.target.write_value( self.target.path.join(self.tracing_path, 'buffer_size_kb'), - top_buffer_size, + top_buffer_size, verify=False ) if self.functions: diff --git a/devlib/collector/perfetto.py b/devlib/collector/perfetto.py index 7383d093d..c5070e03a 100644 --- a/devlib/collector/perfetto.py +++ b/devlib/collector/perfetto.py @@ -86,8 +86,8 @@ class PerfettoCollector(CollectorBase): self.target_output_file = target.path.join(target_output_path, OUTPUT_PERFETTO_TRACE) def start(self): - cmd = "cat {} | {} --txt -c - -o {}".format( - quote(self.config), quote(self.target_binary), quote(self.target_output_file) + cmd = "{} cat {} | {} --txt -c - -o {}".format( + quote(self.target.busybox), quote(self.config), quote(self.target_binary), quote(self.target_output_file) ) # start tracing if self.bg_cmd is None: @@ -117,4 +117,3 @@ class PerfettoCollector(CollectorBase): else: output.append(CollectorOutputEntry(self.output_path, 'file')) return output - diff --git a/devlib/utils/ssh.py b/devlib/utils/ssh.py index 23b0a6e3c..0feceaf66 100644 --- a/devlib/utils/ssh.py +++ b/devlib/utils/ssh.py @@ -525,7 +525,9 @@ class SshConnection(SshConnectionBase): # No timeout elif self.use_scp: - scp = self._get_scp(timeout, callback=handle.progress_cb) + def progress_cb(*args, **kwargs): + return handle.progress_cb(*args, **kwargs) + scp = self._get_scp(timeout, callback=progress_cb) handle, cm = make_handle(scp) scp_cmd = getattr(scp, 'put' if action == 'push' else 'get') -- GitLab