summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArpit Singh <arpitks@google.com>2023-11-16 16:15:17 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-11-16 16:15:17 +0000
commit3f15d1b1f452b30654f715af1b53f10b552193b3 (patch)
tree3e9f7439a7e9a627f2984cd8d31ca1ecd722cf67
parent40119718abf54d5b66ecc223120b8e13aaf3b9e0 (diff)
parent20029aa7de12dc24660cbe6b0501c93d5baa93c2 (diff)
downloadlibchrome-gestures-3f15d1b1f452b30654f715af1b53f10b552193b3.tar.gz
Disable parts of two gesturelib tests to prevent hwasan crash am: 20029aa7de
Original change: https://android-review.googlesource.com/c/platform/external/libchrome-gestures/+/2832832 Change-Id: I2f3a39b0542a0947a747cad9c5424b2605586d67 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--src/activity_log_unittest.cc5
-rw-r--r--src/gestures_unittest.cc3
2 files changed, 8 insertions, 0 deletions
diff --git a/src/activity_log_unittest.cc b/src/activity_log_unittest.cc
index f1b4f37..aadf2f5 100644
--- a/src/activity_log_unittest.cc
+++ b/src/activity_log_unittest.cc
@@ -131,6 +131,10 @@ TEST(ActivityLogTest, SimpleTest) {
TEST(ActivityLogTest, WrapAroundTest) {
ActivityLog log(nullptr);
+#ifndef __ANDROID__
+ // Disabling this test with DISABLED_ prefix is not sufficient as just by compiling this
+ // section causes the hwasan crash at runtime in some other tests
+ // TODO(b/311110623): re-enable this section once we've tracked down the hwasan crash
// overfill the buffer
const size_t fill_size = (ActivityLog::kBufferSize * 3) / 2;
for (size_t i = 0; i < fill_size; i++)
@@ -140,6 +144,7 @@ TEST(ActivityLogTest, WrapAroundTest) {
log.LogCallbackRequest(static_cast<stime_t>(fill_size));
string second_prefix = log.Encode().substr(0, prefix_length);
EXPECT_NE(first_prefix, second_prefix);
+#endif
}
TEST(ActivityLogTest, VersionTest) {
diff --git a/src/gestures_unittest.cc b/src/gestures_unittest.cc
index 77d4db0..6a22b2f 100644
--- a/src/gestures_unittest.cc
+++ b/src/gestures_unittest.cc
@@ -342,12 +342,15 @@ TEST(GesturesTest, SimpleTest) {
gs_ptr->Initialize(GESTURES_DEVCLASS_POINTING_STICK);
DeleteGestureInterpreter(gs_ptr);
+#ifndef __ANDROID__
+ // TODO(b/311110623): re-enable this section once we've tracked down the hwasan crash
gs_ptr = NewGestureInterpreter();
EXPECT_NE(nullptr, gs_ptr);
gs_ptr->Initialize(GESTURES_DEVCLASS_MULTITOUCH_MOUSE);
std::string activity = gs_ptr->EncodeActivityLog();
EXPECT_NE(activity.size(), 0);
DeleteGestureInterpreter(gs_ptr);
+#endif
EXPECT_EQ("1073741824", FingerState::FlagsString(1 << 30));
}