Skip to content

Commit

Permalink
pythongh-128473: Skip segfaulting test_embed tests when BOLT instru…
Browse files Browse the repository at this point in the history
…mented (pythongh-128474)

* Skip segfaulting `test_embed` tests when BOLT instrumented

Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>

* NEWS

---------

Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>
  • Loading branch information
zanieb and indygreg authored Jan 15, 2025
1 parent bd3baa8 commit 6e4f641
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,7 @@ def check_all_configs(self, testname, expected_config=None,
self.check_global_config(configs)
return configs

@unittest.skipIf(support.check_bolt_optimized, "segfaults on BOLT instrumented binaries")
def test_init_default_config(self):
self.check_all_configs("test_init_initialize_config", api=API_COMPAT)

Expand Down Expand Up @@ -1039,6 +1040,7 @@ def test_init_from_config(self):
self.check_all_configs("test_init_from_config", config, preconfig,
api=API_COMPAT)

@unittest.skipIf(support.check_bolt_optimized, "segfaults on BOLT instrumented binaries")
def test_init_compat_env(self):
preconfig = {
'allocator': ALLOCATOR_FOR_CONFIG,
Expand Down Expand Up @@ -1074,6 +1076,7 @@ def test_init_compat_env(self):
self.check_all_configs("test_init_compat_env", config, preconfig,
api=API_COMPAT)

@unittest.skipIf(support.check_bolt_optimized, "segfaults on BOLT instrumented binaries")
def test_init_python_env(self):
preconfig = {
'allocator': ALLOCATOR_FOR_CONFIG,
Expand Down Expand Up @@ -1772,6 +1775,7 @@ def test_init_set_config(self):
self.check_all_configs("test_init_set_config", config,
api=API_ISOLATED)

@unittest.skipIf(support.check_bolt_optimized, "segfaults on BOLT instrumented binaries")
def test_initconfig_api(self):
preconfig = {
'configure_locale': True,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Disable ``test_embed`` test cases that segfault on BOLT instrument binaries.
The tests are only disabled when BOLT is enabled.

0 comments on commit 6e4f641

Please sign in to comment.