Skip to content

Commit 0ade5a3

Browse files
committed
gh-141612: improve test_trampoline_works_with_forks coverage (#141613)
(cherry picked from commit f15f6d0)
1 parent 5285ccc commit 0ade5a3

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Lib/test/test_perf_profiler.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,17 @@ def baz():
157157
self.assertIn(f"py::bar_fork:{script}", child_perf_file_contents)
158158
self.assertIn(f"py::baz_fork:{script}", child_perf_file_contents)
159159

160+
# The parent's map should not contain the child's symbols.
161+
self.assertNotIn(f"py::foo_fork:{script}", perf_file_contents)
162+
self.assertNotIn(f"py::bar_fork:{script}", perf_file_contents)
163+
self.assertNotIn(f"py::baz_fork:{script}", perf_file_contents)
164+
165+
# The child's map should not contain the parent's symbols.
166+
self.assertNotIn(f"py::foo:{script}", child_perf_file_contents)
167+
self.assertNotIn(f"py::bar:{script}", child_perf_file_contents)
168+
self.assertNotIn(f"py::baz:{script}", child_perf_file_contents)
169+
170+
@unittest.skipIf(support.check_bolt_optimized(), "fails on BOLT instrumented binaries")
160171
def test_sys_api(self):
161172
code = """if 1:
162173
import sys

0 commit comments

Comments
 (0)