[PATCH] D94362: [scudo][standalone] Enable death tests on Fuchsia

Roland McGrath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 11:16:21 PST 2021


mcgrathr added inline comments.


================
Comment at: compiler-rt/lib/scudo/standalone/tests/scudo_unit_test.h:21
+#ifdef ASSERT_DEATH
+#define EXPECT_DEATH(X, Y) ASSERT_DEATH(([&] { X; }), Y)
+#else
----------------
The second argument to zxtest's ASSERT_DEATH is not comparable to the gtest EXPECT_DEATH argument.
In zxtest, it's just a message and printf args like in other ASSERT_* macros.
In gtest, it's a matcher for the error output of the crashing process.
In zxtest, the the test is run in a separate thread and not a separate process, so you need to make sure your death tests' assumptions don't include that fouling the process-wide state is OK.  There is no facility for matching any particular kind of crash, it just checks that the thread got a fatal exception of some kind.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94362/new/

https://reviews.llvm.org/D94362



More information about the llvm-commits mailing list