-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
gh-141612: Tests: Add missing assertions to test_trampoline_works_with_forks #141613
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
base: main
Are you sure you want to change the base?
Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Hi @picnixz Sir ! , could you please review this when you get a moment? |
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
Add assertions for child performance file contents.
Ensure that the child performance file does not contain parent symbols.
|
@pareshjoshij You can see, what form of result I suspect: |
|
So sorry @efimov-mikhail sir about that! :( I tried to apply the fix via the GitHub web UI because I am currently out of town and away from my development setup. Unfortunately, it looks like the web editor mishandled the indentation. I will fix this properly as soon as I get back to my computer. That said, if you'd prefer not to wait, please feel free to commit the edit directly—I have 'Allow edits from maintainers' enabled. |
|
Don't worry, it's not a problem and there's no hurry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Could you please take a look, @picnixz ?
Closes #141612.
This PR makes the
test_trampoline_works_with_forkstest inLib/test/test_perf_profiler.pymore robust by adding missing assertions.The original test only verified the presence of symbols in their respective perf maps (parent symbols in parent map, child symbols in child map). It did not verify the absence of those symbols in the other process's map.
This change adds six
self.assertNotIncalls to complete the test logic. It now verifies:py::foo) are not in the child's perf map.py::foo_fork) are not in the parent's perf map.This closes the gap in the test logic and prevents potential false positives. The
test_perf_profilertest suite passes successfully with these changes.