Skip to content

Commit

Permalink
GHI #32 Skip test when running under ubsan
Browse files Browse the repository at this point in the history
  • Loading branch information
doodspav committed Jul 13, 2024
1 parent 6d8efeb commit f3f9253
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/kind/bt/api/feature_check_leaf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ TYPED_TEST(BtApiFeatureCheckLeafT, check_leaf_ignores_invalid_opkind_bits)
/// apply to the domain does not unset any opkind bits.
TYPED_TEST(BtApiFeatureCheckLeafT, check_leaf_unused_opcat_ignores_all_opkind_bits)
{
// skip this test when running with ubsan because it invokes UB
// we cast a value to patomic_opcat_t which has no corresponding label
#if PATOMIC_HAS_UBSAN
GTEST_SKIP() << "Cannot run this test case under ubsan because "
"it invokes UB as part of the test setup";
#endif

// setup
const auto ops = test::make_ops_all_nonnull<TestFixture::domain>();
const auto opcat_vec = test::make_opcats_all_solo();
Expand Down

0 comments on commit f3f9253

Please sign in to comment.