Fix issues with Hpack EXPECT_DEATH test on Android + ChromeOS Certain build configurations of Chrome discard messages streamed to CHECK, so using EXPECT_DEATH with a regex won't always work. To account for this, this CL adds a new `EXPECT_QUICHE_DEATH` macro similar to the existing `EXPECT_QUCHE_DEBUG_DEATH` macro that we will override the implementation of in Chrome to use `EXPECT_CHECK_DEATH`. Also, adds my name to allowed_authors in copy.bara.sky so this will be associated with me on Github. :) PiperOrigin-RevId: 610533493
diff --git a/quiche/common/platform/api/quiche_test.h b/quiche/common/platform/api/quiche_test.h index e013ba6..247bfec 100644 --- a/quiche/common/platform/api/quiche_test.h +++ b/quiche/common/platform/api/quiche_test.h
@@ -36,6 +36,9 @@ #define EXPECT_QUICHE_DEBUG_DEATH(condition, message) \ EXPECT_QUICHE_DEBUG_DEATH_IMPL(condition, message) +#define EXPECT_QUICHE_DEATH(condition, message) \ + EXPECT_QUICHE_DEATH_IMPL(condition, message) + #define QUICHE_TEST_DISABLED_IN_CHROME(name) \ QUICHE_TEST_DISABLED_IN_CHROME_IMPL(name)
diff --git a/quiche/common/platform/default/quiche_platform_impl/quiche_test_impl.h b/quiche/common/platform/default/quiche_platform_impl/quiche_test_impl.h index 4dccfac..43d245b 100644 --- a/quiche/common/platform/default/quiche_platform_impl/quiche_test_impl.h +++ b/quiche/common/platform/default/quiche_platform_impl/quiche_test_impl.h
@@ -12,6 +12,9 @@ #define EXPECT_QUICHE_DEBUG_DEATH_IMPL(condition, message) \ EXPECT_DEBUG_DEATH(condition, message) +#define EXPECT_QUICHE_DEATH_IMPL(condition, message) \ + EXPECT_DEATH(condition, message) + #define QUICHE_TEST_DISABLED_IN_CHROME_IMPL(name) name #define QUICHE_SLOW_TEST_IMPL(test) test
diff --git a/quiche/http2/test_tools/hpack_example_test.cc b/quiche/http2/test_tools/hpack_example_test.cc index abc7395..a445a78 100644 --- a/quiche/http2/test_tools/hpack_example_test.cc +++ b/quiche/http2/test_tools/hpack_example_test.cc
@@ -36,9 +36,9 @@ #ifdef GTEST_HAS_DEATH_TEST TEST(HpackExampleToStringOrDie, InvalidInput) { - EXPECT_DEATH(HpackExampleToStringOrDie("4"), "Truncated"); - EXPECT_DEATH(HpackExampleToStringOrDie("4x"), "half"); - EXPECT_DEATH(HpackExampleToStringOrDie(""), "empty"); + EXPECT_QUICHE_DEATH(HpackExampleToStringOrDie("4"), "Truncated"); + EXPECT_QUICHE_DEATH(HpackExampleToStringOrDie("4x"), "half"); + EXPECT_QUICHE_DEATH(HpackExampleToStringOrDie(""), "empty"); } #endif