Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47a85289 authored by Peter Collingbourne's avatar Peter Collingbourne Committed by Automerger Merge Worker
Browse files

Merge "Add stack trace coverage to MTE tests." am: 5d97966e am: 3a52bfc3

Change-Id: Ic204af9387f2ee92c5877fa40d019fbe4bd88c58
parents f72e8691 3a52bfc3
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
@@ -379,7 +379,12 @@ TEST_F(CrasherTest, mte_uaf) {
  ConsumeFd(std::move(output_fd), &result);

  ASSERT_MATCH(result, R"(signal 11 \(SIGSEGV\), code 9 \(SEGV_MTESERR\))");
  ASSERT_MATCH(result, R"(Cause: \[MTE\]: Use After Free, 0 bytes into a 16-byte allocation)");
  ASSERT_MATCH(result, R"(Cause: \[MTE\]: Use After Free, 0 bytes into a 16-byte allocation.*

allocated by thread .*
      #00 pc)");
  ASSERT_MATCH(result, R"(deallocated by thread .*
      #00 pc)");
#else
  GTEST_SKIP() << "Requires aarch64 + ANDROID_EXPERIMENTAL_MTE";
#endif
@@ -410,7 +415,10 @@ TEST_F(CrasherTest, mte_overflow) {
  ConsumeFd(std::move(output_fd), &result);

  ASSERT_MATCH(result, R"(signal 11 \(SIGSEGV\))");
  ASSERT_MATCH(result, R"(Cause: \[MTE\]: Buffer Overflow, 0 bytes right of a 16-byte allocation)");
  ASSERT_MATCH(result, R"(Cause: \[MTE\]: Buffer Overflow, 0 bytes right of a 16-byte allocation.*

allocated by thread .*
      #00 pc)");
#else
  GTEST_SKIP() << "Requires aarch64 + ANDROID_EXPERIMENTAL_MTE";
#endif
@@ -441,7 +449,10 @@ TEST_F(CrasherTest, mte_underflow) {
  ConsumeFd(std::move(output_fd), &result);

  ASSERT_MATCH(result, R"(signal 11 \(SIGSEGV\), code 9 \(SEGV_MTESERR\))");
  ASSERT_MATCH(result, R"(Cause: \[MTE\]: Buffer Underflow, 4 bytes left of a 16-byte allocation)");
  ASSERT_MATCH(result, R"(Cause: \[MTE\]: Buffer Underflow, 4 bytes left of a 16-byte allocation.*

allocated by thread .*
      #00 pc)");
#else
  GTEST_SKIP() << "Requires aarch64 + ANDROID_EXPERIMENTAL_MTE";
#endif