devlib icon indicating copy to clipboard operation
devlib copied to clipboard

[Draft] Fix BackgroundCommand.send_signal() and add trace-cmd record support

Open douglas-raillard-arm opened this issue 1 year ago • 2 comments

Fixes https://github.com/ARM-software/devlib/issues/645 Supersedes https://github.com/ARM-software/devlib/pull/643

TODO:

  • [ ] Add/update docstrings
  • [x] Figure out if moving some init logic for the various subclasses of BackgroundCommand inside the class would simplify the code and avoid BackgroundCommand.from_factory() layer.

douglas-raillard-arm avatar May 30 '24 14:05 douglas-raillard-arm

Upon deeper inspection, the from_factory() solution is still better than moving the code from <subclass of Target>._background() to their associated BackgroundCommand subclass, as it typically requires using a bunch of private function/method from the connection type.

douglas-raillard-arm avatar May 31 '24 10:05 douglas-raillard-arm

PR rebased

douglas-raillard-arm avatar Jul 01 '24 09:07 douglas-raillard-arm

@marcbonnici Updated with rework of temp folder management, so it works on old versions of android as well.

I can split that in a separate PR if needed but left it on top for now to ease testing of the combination.

douglas-raillard-arm avatar Nov 20 '24 13:11 douglas-raillard-arm

Updated with a fix to AndroidTarget._resolve_path() (removed the async code outside of an async function)

douglas-raillard-arm avatar Nov 20 '24 15:11 douglas-raillard-arm

Hi @douglas-raillard-arm Apologies for the radio silence on this. Could you remind me on the latest state for the PR? IIRC you had fixed the temp directory creation issue, so from your perspective is there any remaining work to do this PR?

marcbonnici avatar Jan 29 '25 17:01 marcbonnici

@marcbonnici The last thing needed was to adjust the doc, but I can't find any documentation for FtraceCollector so we might just handle that separately.

douglas-raillard-arm avatar Jan 29 '25 17:01 douglas-raillard-arm

We havent done any dog-fooding on the commits related to temp file management, unlike on the rest of the PR, so maybe it's worth having a second look at that part

douglas-raillard-arm avatar Jan 29 '25 17:01 douglas-raillard-arm

Added the branch to our vendored version for dogfooding

douglas-raillard-arm avatar Feb 04 '25 17:02 douglas-raillard-arm

PR updated with fixes for comments and an extra commit at the top to replace most Target.tempfile() uses by Target.make_temp() as the latter provides better resource control and reduces the needed boilerplate for API user

douglas-raillard-arm avatar Feb 12 '25 12:02 douglas-raillard-arm

PR updated with removal of keyword-only patch and tmp_directory appended at the end of all parameter lists.

douglas-raillard-arm avatar Feb 13 '25 10:02 douglas-raillard-arm