Skip to content

Commit

Permalink
bazel: Run sanitizers with googletest config too
Browse files Browse the repository at this point in the history
Add appropriate tags to all pre-existing violations so that we can start
enforcing this elsewhere.

Bug: 393655143
Change-Id: I652a20ecb361a585352e715652ac6b536637b8e2
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/266914
Lint: Lint 🤖 <[email protected]>
Reviewed-by: Faraaz Sareshwala <[email protected]>
Commit-Queue: Ted Pudlik <[email protected]>
Docs-Not-Needed: Ted Pudlik <[email protected]>
  • Loading branch information
tpudlik authored and CQ Bot Account committed Feb 10, 2025
1 parent f8ca28d commit e5ae6ad
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pigweed.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,33 @@
"--config=asan",
"//..."
],
[
"test",
"--config=asan",
"--config=googletest",
"//..."
],
[
"test",
"--config=tsan",
"//..."
],
[
"test",
"--config=tsan",
"--config=googletest",
"//..."
],
[
"test",
"--config=ubsan",
"//..."
],
[
"test",
"--config=ubsan",
"--config=googletest",
"//..."
]
]
}
Expand Down
4 changes: 4 additions & 0 deletions pw_bluetooth_sapphire/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ cc_library(
pw_cc_test(
name = "central_test",
srcs = ["central_test.cc"],
# TODO: https://pwbug.dev/393957973 - Fix this test.
tags = ["noubsan"],
test_main = "//pw_bluetooth_sapphire/host/testing:gtest_main",
deps = [
":central",
Expand All @@ -80,6 +82,8 @@ cc_library(
pw_cc_test(
name = "peripheral_test",
srcs = ["peripheral_test.cc"],
# TODO: https://pwbug.dev/393957973 - Fix this test.
tags = ["noubsan"],
test_main = "//pw_bluetooth_sapphire/host/testing:gtest_main",
deps = [
":peripheral",
Expand Down
2 changes: 2 additions & 0 deletions pw_bluetooth_sapphire/host/common/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ pw_cc_test(
"weak_self_test.cc",
"windowed_inspect_numeric_property_test.cc",
],
# TODO: https://pwbug.dev/393957973 - Fix this test.
tags = ["noubsan"],
test_main = "//pw_bluetooth_sapphire/host/testing:gtest_main",
deps = [
":common",
Expand Down
5 changes: 5 additions & 0 deletions pw_bluetooth_sapphire/host/gap/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ pw_cc_test(
"secure_simple_pairing_state_test.cc",
"types_test.cc",
],
# TODO: https://pwbug.dev/393957973 - Fix this test.
tags = [
"noasan",
"noubsan",
],
test_main = "//pw_bluetooth_sapphire/host/testing:gtest_main",
deps = [
":gap",
Expand Down
2 changes: 2 additions & 0 deletions pw_bluetooth_sapphire/host/gatt/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ pw_cc_test(
"remote_service_manager_test.cc",
"server_test.cc",
],
# TODO: https://pwbug.dev/393957973 - Fix this test.
tags = ["noubsan"],
test_main = "//pw_bluetooth_sapphire/host/testing:gtest_main",
deps = [
":gatt",
Expand Down
2 changes: 2 additions & 0 deletions pw_bluetooth_sapphire/host/hci/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ pw_cc_test(
"low_energy_scanner_test.cc",
"sequential_command_runner_test.cc",
],
# TODO: https://pwbug.dev/393957973 - Fix this test.
tags = ["noubsan"],
test_main = "//pw_bluetooth_sapphire/host/testing:gtest_main",
deps = [
":hci",
Expand Down
5 changes: 5 additions & 0 deletions pw_bluetooth_sapphire/host/iso/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ pw_cc_test(
"iso_stream_manager_test.cc",
"iso_stream_test.cc",
],
# TODO: https://pwbug.dev/393957973 - Fix this test.
tags = [
"noasan",
"notsan",
],
test_main = "//pw_bluetooth_sapphire/host/testing:gtest_main",
deps = [
":iso",
Expand Down
4 changes: 4 additions & 0 deletions pw_bluetooth_sapphire/host/l2cap/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ pw_cc_fuzz_test(
pw_cc_fuzz_test(
name = "channel_configuration_fuzzer",
srcs = ["channel_configuration_fuzztest.cc"],
# TODO: https://pwbug.dev/393957973 - Fix this test.
tags = ["noubsan"],
deps = [
":l2cap",
":testing",
Expand All @@ -267,6 +269,8 @@ pw_cc_fuzz_test(
pw_cc_fuzz_test(
name = "common_handler_fuzzer",
srcs = ["common_handler_fuzztest.cc"],
# TODO: https://pwbug.dev/393957973 - Fix this test.
tags = ["noubsan"],
deps = [
":l2cap",
":testing",
Expand Down
2 changes: 2 additions & 0 deletions pw_bluetooth_sapphire/host/sm/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ pw_cc_test(
"types_test.cc",
"util_test.cc",
],
# TODO: https://pwbug.dev/393957973 - Fix this test.
tags = ["noubsan"],
test_main = "//pw_bluetooth_sapphire/host/testing:gtest_main",
deps = [
":sm",
Expand Down

0 comments on commit e5ae6ad

Please sign in to comment.