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

runtime/pprof: make TestConvertCPUProfile more resilient #56311

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

derekparker
Copy link
Contributor

Updates the test to be more forgiving when it comes to how a processes memory maps are laid out.

I (at Red Hat) maintain a fork of Go which adds the ability to use OpenSSL for cryptography, mostly for FIPS compliance. Due to differences in our fork with out changes applied the information in /proc/self/maps ends up being different than what the current runtime/pprof.TestConvert{CPU,Mem}Profile expects. This patch makes the test more resilient to different address space layouts.

This test is not failing with the current Go builds, only with our changes applied, but this fix makes the test more resilient overall and does not break with the existing implementation, so rather than carry yet another downstream patch I think it makes the most sense to submit this fix upstream.

Fixes golang-fips/go#50

Updates the test to be more forgiving when it comes to how a
processes memory maps are laid out.
@gopherbot
Copy link
Contributor

This PR (HEAD: ef238ae) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/443835 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Michael Pratt:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/443835.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Derek Parker:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/443835.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Pratt:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/443835.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Derek Parker:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/443835.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Derek Parker:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/443835.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Pratt:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/443835.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Derek Parker:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/443835.
After addressing review feedback, remember to publish your drafts!

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.

runtime/pprof TestConvert*Profile fails when dynamically linked
2 participants