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

Commit 0de52e92 authored by Tom Cherry's avatar Tom Cherry
Browse files

liblog: use EXPECTED_STREQ for strings

These tests are flaky, but we're not seeing what the failure strings
are.

Bug: 142041379
Test: force a failure and see the right error message
Change-Id: Icd7777e5c309cac3b98ce65925980965a3cc3753
parent 3d8fbfad
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2664,8 +2664,7 @@ static void create_android_logger(const char* (*fn)(uint32_t tag,
      print_barrier();
    }
    EXPECT_EQ(0, buffer_to_string);
    EXPECT_EQ(strlen(expected_string), strlen(msgBuf));
    EXPECT_EQ(0, strcmp(expected_string, msgBuf));
    EXPECT_STREQ(expected_string, msgBuf);
  }

  EXPECT_EQ(1, count);
@@ -2858,7 +2857,7 @@ static ssize_t __pmsg_fn(log_id_t logId, char prio, const char* filename,
  EXPECT_EQ(ANDROID_LOG_VERBOSE, prio);
  EXPECT_FALSE(NULL == strstr(__pmsg_file, filename));
  EXPECT_EQ(len, sizeof(max_payload_buf));
  EXPECT_EQ(0, strcmp(max_payload_buf, buf));
  EXPECT_STREQ(max_payload_buf, buf);

  ++signaled;
  if ((len != sizeof(max_payload_buf)) || strcmp(max_payload_buf, buf)) {