summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lloyd Pique <lpique@google.com> 2021-04-27 12:53:40 -0700
committer Lloyd Pique <lpique@google.com> 2021-04-30 23:13:35 +0000
commitc60bf70900c34d43a464bab50bdffb928ab4db33 (patch)
treee1df419ccb3921f529c2a57b3a019835ae485f4e
parentc052fed1310874772e2ce1053e85a593ed7f997b (diff)
[RESTRICT AUTOMERGE] SF: Disable flaky unit tests
A good number of OneShotTimer tests, and two LayerHistoryTestV2 tests were flaky. This changes marks them as DISABLED, with a comment linking to the bug. Bug: 186417847 Test: libsurfaceflinger_unittest # Tests marked disabled Change-Id: I36410b802dc03e2408ce6c4c79d975d9eb021332 Merged-In: I75a034e6a79e0469b3a321e410ca0d6db36bd5fe
-rw-r--r--services/surfaceflinger/tests/unittests/LayerHistoryTestV2.cpp6
-rw-r--r--services/surfaceflinger/tests/unittests/OneShotTimerTest.cpp15
2 files changed, 14 insertions, 7 deletions
diff --git a/services/surfaceflinger/tests/unittests/LayerHistoryTestV2.cpp b/services/surfaceflinger/tests/unittests/LayerHistoryTestV2.cpp
index afd2b7197f..536207dc60 100644
--- a/services/surfaceflinger/tests/unittests/LayerHistoryTestV2.cpp
+++ b/services/surfaceflinger/tests/unittests/LayerHistoryTestV2.cpp
@@ -120,7 +120,8 @@ protected:
namespace {
-TEST_F(LayerHistoryTestV2, oneLayer) {
+// TODO(b/186417847) This test is flaky. Reenable once fixed.
+TEST_F(LayerHistoryTestV2, DISABLED_oneLayer) {
const auto layer = createLayer();
EXPECT_CALL(*layer, isVisible()).WillRepeatedly(Return(true));
EXPECT_CALL(*layer, getFrameRateForLayerTree()).WillRepeatedly(Return(Layer::FrameRate()));
@@ -631,7 +632,8 @@ TEST_F(LayerHistoryTestV2, infrequentAnimatingLayer) {
EXPECT_EQ(1, animatingLayerCount(time));
}
-TEST_F(LayerHistoryTestV2, heuristicLayer60Hz) {
+// TODO(b/186417847) This test is flaky. Reenable once fixed.
+TEST_F(LayerHistoryTestV2, DISABLED_heuristicLayer60Hz) {
const auto layer = createLayer();
EXPECT_CALL(*layer, isVisible()).WillRepeatedly(Return(true));
EXPECT_CALL(*layer, getFrameRateForLayerTree()).WillRepeatedly(Return(Layer::FrameRate()));
diff --git a/services/surfaceflinger/tests/unittests/OneShotTimerTest.cpp b/services/surfaceflinger/tests/unittests/OneShotTimerTest.cpp
index 0208728026..0b1b8adf49 100644
--- a/services/surfaceflinger/tests/unittests/OneShotTimerTest.cpp
+++ b/services/surfaceflinger/tests/unittests/OneShotTimerTest.cpp
@@ -80,7 +80,8 @@ TEST_F(OneShotTimerTest, startStopTest) {
mIdleTimer->stop();
}
-TEST_F(OneShotTimerTest, resetTest) {
+// TODO(b/186417847) This test is flaky. Reenable once fixed.
+TEST_F(OneShotTimerTest, DISABLED_resetTest) {
mIdleTimer = std::make_unique<scheduler::OneShotTimer>(20ms, mResetTimerCallback.getInvocable(),
mExpiredTimerCallback.getInvocable());
mIdleTimer->start();
@@ -105,7 +106,8 @@ TEST_F(OneShotTimerTest, resetTest) {
EXPECT_FALSE(mResetTimerCallback.waitForCall(0ms).has_value());
}
-TEST_F(OneShotTimerTest, resetBackToBackTest) {
+// TODO(b/186417847) This test is flaky. Reenable once fixed.
+TEST_F(OneShotTimerTest, DISABLED_resetBackToBackTest) {
mIdleTimer = std::make_unique<scheduler::OneShotTimer>(20ms, mResetTimerCallback.getInvocable(),
mExpiredTimerCallback.getInvocable());
mIdleTimer->start();
@@ -136,7 +138,8 @@ TEST_F(OneShotTimerTest, resetBackToBackTest) {
EXPECT_FALSE(mResetTimerCallback.waitForCall(0ms).has_value());
}
-TEST_F(OneShotTimerTest, startNotCalledTest) {
+// TODO(b/186417847) This test is flaky. Reenable once fixed.
+TEST_F(OneShotTimerTest, DISABLED_startNotCalledTest) {
mIdleTimer = std::make_unique<scheduler::OneShotTimer>(3ms, mResetTimerCallback.getInvocable(),
mExpiredTimerCallback.getInvocable());
// The start hasn't happened, so the callback does not happen.
@@ -148,7 +151,8 @@ TEST_F(OneShotTimerTest, startNotCalledTest) {
EXPECT_FALSE(mResetTimerCallback.waitForCall(0ms).has_value());
}
-TEST_F(OneShotTimerTest, idleTimerIdlesTest) {
+// TODO(b/186417847) This test is flaky. Reenable once fixed.
+TEST_F(OneShotTimerTest, DISABLED_idleTimerIdlesTest) {
mIdleTimer = std::make_unique<scheduler::OneShotTimer>(3ms, mResetTimerCallback.getInvocable(),
mExpiredTimerCallback.getInvocable());
mIdleTimer->start();
@@ -168,7 +172,8 @@ TEST_F(OneShotTimerTest, idleTimerIdlesTest) {
EXPECT_FALSE(mResetTimerCallback.waitForCall(0ms).has_value());
}
-TEST_F(OneShotTimerTest, timeoutCallbackExecutionTest) {
+// TODO(b/186417847) This test is flaky. Reenable once fixed.
+TEST_F(OneShotTimerTest, DISABLED_timeoutCallbackExecutionTest) {
mIdleTimer = std::make_unique<scheduler::OneShotTimer>(3ms, mResetTimerCallback.getInvocable(),
mExpiredTimerCallback.getInvocable());
mIdleTimer->start();