Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add symbol uploader tests #114

Merged
merged 2 commits into from
Mar 19, 2025
Merged

Conversation

nsavoire
Copy link
Collaborator

@nsavoire nsavoire commented Mar 19, 2025

What does this PR do?

Add various test cases for symbol uploader.
Fix wrong symbol source when uploading Go binary with an error during pclntab extraction.

@nsavoire nsavoire force-pushed the nsavoire/add_symbol_uploader_tests branch from a8d252e to d5d9906 Compare March 19, 2025 09:41
@nsavoire nsavoire marked this pull request as ready for review March 19, 2025 09:42
@nsavoire nsavoire requested a review from a team as a code owner March 19, 2025 09:42
Copy link
Member

@Gandem Gandem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, thanks a lot for adding tests 🙇

@@ -586,7 +587,7 @@ func findGoPCLnTab(ef *pfelf.File, additionalChecks bool) (goPCLnTabInfo *GoPCLn
// gopclntab parsing code might panic if the data is corrupt.
defer func() {
if r := recover(); r != nil {
err = fmt.Errorf("panic while searching pclntab: %v", r)
err = fmt.Errorf("panic while searching pclntab: %v, stack:\n%s", r, debug.Stack())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since failing to extract gopclntab is an info log, and not a debug log, I'd recommend against printing the stack here. I think customers would be confused seeing a fully printed stack in their info logs

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed stack printing

@nsavoire nsavoire merged commit 8d2be33 into main Mar 19, 2025
9 checks passed
@nsavoire nsavoire deleted the nsavoire/add_symbol_uploader_tests branch March 19, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants