Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Implement unit test for uprobes #9

Open
tzstoyanov opened this issue Jul 1, 2022 · 0 comments
Open

Implement unit test for uprobes #9

tzstoyanov opened this issue Jul 1, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@tzstoyanov
Copy link
Contributor

tzstoyanov commented Jul 1, 2022

Is your feature request related to a problem? Please describe.

Support for user probes (uprobes) was recently introduced in trace-cruncher. Uprobe is ftrace functionality for tracing user space functions. Trace-cruncher can attach uprobes to any function from given elf binary. The only limitation is that the binary must not be stripped, as trace-cruncher uses the elf symbol table to get the offset within the binary file of the traced functions. There is examples/user_trace.py which demonstrates how to use these APIs. However, this functionality is not covered by the unit tests.

Describe the solution you'd like

  1. Implement a simple, hello world type of program in C/C++/Golang/Java or whatever language you choose, that will be compiled to an executable elf binary. The source code of that program should be in the tests directory and should be compiled before the tests are executed.
  2. Implement a uprobes unit test, that will trace the execution of that simple program. Compare if the traces match to the execution flow of the actual functions from the program.

Describe alternatives you've considered

No response

Additional context

No response

@tzstoyanov tzstoyanov added enhancement New feature or request good first issue Good for newcomers labels Jul 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant