From 79d7ae82076a3ff340dfc49ac7907071aa7b2fa2 Mon Sep 17 00:00:00 2001 From: Leon Scroggins III Date: Wed, 11 Oct 2023 16:03:52 -0400 Subject: [PATCH] Remove deprecated warnings for SKIP_VALIDATE We deliberately use a deprecated API to test that it is not used. Ignore warnings from using it in this test. In PresentDisplayNoLayerStateChanges, remove the check for SKIP_VALIDATE, removing the other warning. As written, the test would be skipped without SKIP_VALIDATE support. But devices should *not* claim Capability::SKIP_VALIDATE, meaning the test would always be skipped. The docs state that the behavior previously indicated by SKIP_VALIDATE is now the default, so we should always be running the test. Bug: NA Test: atest VtsHalGraphicsComposer3_TargetTest (no warnings) Change-Id: Icc89a82b4850428c2f0940be0f78f5ebff1881b3 --- .../aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp index 1e6f34b534..09882f5911 100644 --- a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp +++ b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp @@ -1860,10 +1860,6 @@ TEST_P(GraphicsComposerAidlCommandTest, PresentDisplay) { * surface damage have been set */ TEST_P(GraphicsComposerAidlCommandTest, PresentDisplayNoLayerStateChanges) { - if (!hasCapability(Capability::SKIP_VALIDATE)) { - GTEST_SUCCEED() << "Device does not have skip validate capability, skipping"; - return; - } EXPECT_TRUE(mComposerClient->setPowerMode(getPrimaryDisplayId(), PowerMode::ON).isOk()); const auto& [renderIntentsStatus, renderIntents] = @@ -2571,8 +2567,11 @@ class GraphicsComposerAidlCommandV2Test : public GraphicsComposerAidlCommandTest * Capability::SKIP_VALIDATE has been deprecated and should not be enabled. */ TEST_P(GraphicsComposerAidlCommandV2Test, SkipValidateDeprecatedTest) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" ASSERT_FALSE(hasCapability(Capability::SKIP_VALIDATE)) << "Found Capability::SKIP_VALIDATE capability."; +#pragma clang diagnostic pop } TEST_P(GraphicsComposerAidlCommandV2Test, SetLayerBufferSlotsToClear) {