Added a simple unit test for testing process stack trace capture - #28
Open
Fluxie wants to merge 1 commit into
Open
Added a simple unit test for testing process stack trace capture#28Fluxie wants to merge 1 commit into
Fluxie wants to merge 1 commit into
Conversation
In addition to the actual unit test for the rstack library this commit also introduces a dummy child process called "capture-target" as a capture target for the unit tests. The lifecycle of the process is encapsulated with a helper library called "target-launcher" which starts and stops the capture target process when requested. The launcher gives out the process id of the capture target that can be then used to trace the capture target process.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm adding support to proxide proxy for capturing the stack traces of the client process that makes requests through the proxy when the client process and the proxide proxy reside on the same host. I have already implemented a preliminary support here: Rantanen/proxide#36.
However, the current approach is a bit inefficient as it always captures the stack traces of all the threads of the client process even though only the stack trace of the thread associated with the request being proxy-ed is enough. Thus I want to add support for capturing stack traces of individual threads at a time to rstack.
To do this, I wanted to start this by adding support for unit testing as I like to execute code during development time with unit tests. => This merge request.
My current plan for adding the support for capturing individual threads is to create a struct call ProcessAttachment which would have a method for capturing stack traces of individual threads. The ProcessAttachment struct would be created by calling a new method called "attach" which would be added to the TraceOptions struct.
Does this plan/idea sound reasonable to you?