[all-commits] [llvm/llvm-project] f2a172: [gwp_asan] Employ EXPECT_DEATH for zxtest compatib...

Caslyn Tonelli via All-commits all-commits at lists.llvm.org
Tue Apr 18 14:58:04 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f2a1726d2199150918430a84f29cf8835bfe8e5a
      https://github.com/llvm/llvm-project/commit/f2a1726d2199150918430a84f29cf8835bfe8e5a
  Author: Caslyn Tonelli <caslyn at google.com>
  Date:   2023-04-18 (Tue, 18 Apr 2023)

  Changed paths:
    M compiler-rt/lib/gwp_asan/tests/harness.h
    M compiler-rt/lib/gwp_asan/tests/never_allocated.cpp

  Log Message:
  -----------
  [gwp_asan] Employ EXPECT_DEATH for zxtest compatibility

Employ a similar tactic introduced by https://reviews.llvm.org/D94362
for gwp_asan tests. zxtest `ASSERT_DEATH` syntax differs from gtest in
that it expects a lambda.

zxtest does not have `EXPECT_DEATH`, so it introduced for Fuchsia builds
and wraps the expression with a lambda to create a compatible syntax
between zxtest and gtest for death tests.

An example of where this compatiblity is needed is in
`never_allocated.cpp`.

Differential Revision: https://reviews.llvm.org/D147189




More information about the All-commits mailing list