Loading cmds/installd/tests/installd_dexopt_test.cpp +31 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,10 @@ protected: std::string secondary_dex_de_; virtual void SetUp() { if (base::GetBoolProperty("dalvik.vm.useartservice", false)) { GTEST_SKIP() << "Skipping legacy dexopt tests when ART Service is enabled"; } setenv("ANDROID_LOG_TAGS", "*:v", 1); android::base::InitLogging(nullptr); // Initialize the globals holding the file system main paths (/data/, /system/ etc..). Loading @@ -223,6 +227,10 @@ protected: } virtual void TearDown() { if (base::GetBoolProperty("dalvik.vm.useartservice", false)) { GTEST_SKIP(); } if (!kDebug) { service_->controlDexOptBlocking(false); service_->destroyAppData( Loading Loading @@ -966,6 +974,10 @@ TEST_F(DexoptTest, DexoptDex2oat64Enabled) { class PrimaryDexReCompilationTest : public DexoptTest { public: virtual void SetUp() { if (base::GetBoolProperty("dalvik.vm.useartservice", false)) { GTEST_SKIP() << "Skipping legacy dexopt tests when ART Service is enabled"; } DexoptTest::SetUp(); CompilePrimaryDexOk("verify", DEXOPT_BOOTCOMPLETE | DEXOPT_PUBLIC, Loading @@ -980,6 +992,10 @@ class PrimaryDexReCompilationTest : public DexoptTest { } virtual void TearDown() { if (base::GetBoolProperty("dalvik.vm.useartservice", false)) { GTEST_SKIP(); } first_compilation_odex_fd_.reset(-1); first_compilation_vdex_fd_.reset(-1); DexoptTest::TearDown(); Loading @@ -1002,6 +1018,10 @@ TEST_F(PrimaryDexReCompilationTest, DexoptPrimaryUpdateInPlaceVdex) { class ReconcileTest : public DexoptTest { virtual void SetUp() { if (base::GetBoolProperty("dalvik.vm.useartservice", false)) { GTEST_SKIP() << "Skipping legacy dexopt tests when ART Service is enabled"; } DexoptTest::SetUp(); CompileSecondaryDex(secondary_dex_ce_, DEXOPT_STORAGE_CE, /*binder_ok*/ true, /*compile_ok*/ true); Loading Loading @@ -1067,6 +1087,10 @@ class ProfileTest : public DexoptTest { static constexpr const char* kPrimaryProfile = "primary.prof"; virtual void SetUp() { if (base::GetBoolProperty("dalvik.vm.useartservice", false)) { GTEST_SKIP() << "Skipping legacy dexopt tests when ART Service is enabled"; } DexoptTest::SetUp(); cur_profile_ = create_current_profile_path( kTestUserId, package_name_, kPrimaryProfile, /*is_secondary_dex*/ false); Loading Loading @@ -1440,6 +1464,9 @@ class BootProfileTest : public ProfileTest { std::vector<int64_t> extra_ce_data_inodes_; virtual void SetUp() { if (base::GetBoolProperty("dalvik.vm.useartservice", false)) { GTEST_SKIP() << "Skipping legacy dexopt tests when ART Service is enabled"; } ProfileTest::SetUp(); intial_android_profiles_dir = android_profiles_dir; Loading @@ -1453,6 +1480,10 @@ class BootProfileTest : public ProfileTest { } virtual void TearDown() { if (base::GetBoolProperty("dalvik.vm.useartservice", false)) { GTEST_SKIP(); } android_profiles_dir = intial_android_profiles_dir; deleteAppProfilesForBootMerge(); ProfileTest::TearDown(); Loading libs/nativewindow/AHardwareBuffer.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <android/hardware_buffer.h> #include <android/hardware_buffer_aidl.h> #include <android/binder_libbinder.h> #include <vndk/hardware_buffer.h> #include <errno.h> Loading @@ -34,9 +35,6 @@ #include <android/hardware/graphics/common/1.1/types.h> #include <aidl/android/hardware/graphics/common/PixelFormat.h> // TODO: Better way to handle this #include "../binder/ndk/parcel_internal.h" static constexpr int kFdBufferSize = 128 * sizeof(int); // 128 ints using namespace android; Loading Loading @@ -421,7 +419,7 @@ binder_status_t AHardwareBuffer_readFromParcel(const AParcel* _Nonnull parcel, AHardwareBuffer* _Nullable* _Nonnull outBuffer) { if (!parcel || !outBuffer) return STATUS_BAD_VALUE; auto buffer = sp<GraphicBuffer>::make(); status_t status = parcel->get()->read(*buffer); status_t status = AParcel_viewPlatformParcel(parcel)->read(*buffer); if (status != STATUS_OK) return status; *outBuffer = AHardwareBuffer_from_GraphicBuffer(buffer.get()); AHardwareBuffer_acquire(*outBuffer); Loading @@ -433,7 +431,7 @@ binder_status_t AHardwareBuffer_writeToParcel(const AHardwareBuffer* _Nonnull bu const GraphicBuffer* gb = AHardwareBuffer_to_GraphicBuffer(buffer); if (!gb) return STATUS_BAD_VALUE; if (!parcel) return STATUS_BAD_VALUE; return parcel->get()->write(*gb); return AParcel_viewPlatformParcel(parcel)->write(*gb); } // ---------------------------------------------------------------------------- Loading services/gpuservice/vts/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ java_test_host { libs: [ "tradefed", "vts-core-tradefed-harness", "compatibility-host-util", ], test_suites: [ "general-tests", Loading services/gpuservice/vts/src/com/android/tests/gpuservice/GpuWorkTracepointTest.java +16 −3 Original line number Diff line number Diff line Loading @@ -19,11 +19,16 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import static org.junit.Assume.assumeTrue; import android.platform.test.annotations.RestrictedBuildTest; import com.android.tradefed.testtype.DeviceJUnit4ClassRunner; import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test; import com.android.tradefed.util.CommandResult; import com.android.tradefed.util.CommandStatus; import com.android.compatibility.common.util.PropertyUtil; import com.android.compatibility.common.util.GmsTest; import org.junit.Test; import org.junit.runner.RunWith; Loading Loading @@ -57,15 +62,23 @@ public class GpuWorkTracepointTest extends BaseHostJUnit4Test { commandResult.getStatus(), CommandStatus.SUCCESS); } @GmsTest(requirement = "VSR-3.3-004") @RestrictedBuildTest @Test public void testGpuWorkPeriodTracepointFormat() throws Exception { CommandResult commandResult = getDevice().executeShellV2Command( String.format("cat %s", GPU_WORK_PERIOD_TRACEPOINT_FORMAT_PATH)); // If we failed to cat the tracepoint format then the test ends here. assumeTrue(String.format("Failed to cat the gpu_work_period tracepoint format at %s", GPU_WORK_PERIOD_TRACEPOINT_FORMAT_PATH), commandResult.getStatus().equals(CommandStatus.SUCCESS)); if (!commandResult.getStatus().equals(CommandStatus.SUCCESS)) { String message = String.format( "Failed to cat the gpu_work_period tracepoint format at %s\n", GPU_WORK_PERIOD_TRACEPOINT_FORMAT_PATH); // Tracepoint MUST exist on devices released with Android 14 or later assumeTrue(message, PropertyUtil.getVsrApiLevel(getDevice()) >= 34); fail(message); } // Otherwise, we check that the fields match the expected fields. String actualFields = Arrays.stream( Loading services/inputflinger/reader/mapper/TouchpadInputMapper.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -256,8 +256,9 @@ std::list<NotifyArgs> TouchpadInputMapper::configure(nsecs_t when, std::list<NotifyArgs> TouchpadInputMapper::reset(nsecs_t when) { mStateConverter.reset(); mGestureConverter.reset(); return InputMapper::reset(when); std::list<NotifyArgs> out = mGestureConverter.reset(when); out += InputMapper::reset(when); return out; } std::list<NotifyArgs> TouchpadInputMapper::process(const RawEvent* rawEvent) { Loading Loading
cmds/installd/tests/installd_dexopt_test.cpp +31 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,10 @@ protected: std::string secondary_dex_de_; virtual void SetUp() { if (base::GetBoolProperty("dalvik.vm.useartservice", false)) { GTEST_SKIP() << "Skipping legacy dexopt tests when ART Service is enabled"; } setenv("ANDROID_LOG_TAGS", "*:v", 1); android::base::InitLogging(nullptr); // Initialize the globals holding the file system main paths (/data/, /system/ etc..). Loading @@ -223,6 +227,10 @@ protected: } virtual void TearDown() { if (base::GetBoolProperty("dalvik.vm.useartservice", false)) { GTEST_SKIP(); } if (!kDebug) { service_->controlDexOptBlocking(false); service_->destroyAppData( Loading Loading @@ -966,6 +974,10 @@ TEST_F(DexoptTest, DexoptDex2oat64Enabled) { class PrimaryDexReCompilationTest : public DexoptTest { public: virtual void SetUp() { if (base::GetBoolProperty("dalvik.vm.useartservice", false)) { GTEST_SKIP() << "Skipping legacy dexopt tests when ART Service is enabled"; } DexoptTest::SetUp(); CompilePrimaryDexOk("verify", DEXOPT_BOOTCOMPLETE | DEXOPT_PUBLIC, Loading @@ -980,6 +992,10 @@ class PrimaryDexReCompilationTest : public DexoptTest { } virtual void TearDown() { if (base::GetBoolProperty("dalvik.vm.useartservice", false)) { GTEST_SKIP(); } first_compilation_odex_fd_.reset(-1); first_compilation_vdex_fd_.reset(-1); DexoptTest::TearDown(); Loading @@ -1002,6 +1018,10 @@ TEST_F(PrimaryDexReCompilationTest, DexoptPrimaryUpdateInPlaceVdex) { class ReconcileTest : public DexoptTest { virtual void SetUp() { if (base::GetBoolProperty("dalvik.vm.useartservice", false)) { GTEST_SKIP() << "Skipping legacy dexopt tests when ART Service is enabled"; } DexoptTest::SetUp(); CompileSecondaryDex(secondary_dex_ce_, DEXOPT_STORAGE_CE, /*binder_ok*/ true, /*compile_ok*/ true); Loading Loading @@ -1067,6 +1087,10 @@ class ProfileTest : public DexoptTest { static constexpr const char* kPrimaryProfile = "primary.prof"; virtual void SetUp() { if (base::GetBoolProperty("dalvik.vm.useartservice", false)) { GTEST_SKIP() << "Skipping legacy dexopt tests when ART Service is enabled"; } DexoptTest::SetUp(); cur_profile_ = create_current_profile_path( kTestUserId, package_name_, kPrimaryProfile, /*is_secondary_dex*/ false); Loading Loading @@ -1440,6 +1464,9 @@ class BootProfileTest : public ProfileTest { std::vector<int64_t> extra_ce_data_inodes_; virtual void SetUp() { if (base::GetBoolProperty("dalvik.vm.useartservice", false)) { GTEST_SKIP() << "Skipping legacy dexopt tests when ART Service is enabled"; } ProfileTest::SetUp(); intial_android_profiles_dir = android_profiles_dir; Loading @@ -1453,6 +1480,10 @@ class BootProfileTest : public ProfileTest { } virtual void TearDown() { if (base::GetBoolProperty("dalvik.vm.useartservice", false)) { GTEST_SKIP(); } android_profiles_dir = intial_android_profiles_dir; deleteAppProfilesForBootMerge(); ProfileTest::TearDown(); Loading
libs/nativewindow/AHardwareBuffer.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <android/hardware_buffer.h> #include <android/hardware_buffer_aidl.h> #include <android/binder_libbinder.h> #include <vndk/hardware_buffer.h> #include <errno.h> Loading @@ -34,9 +35,6 @@ #include <android/hardware/graphics/common/1.1/types.h> #include <aidl/android/hardware/graphics/common/PixelFormat.h> // TODO: Better way to handle this #include "../binder/ndk/parcel_internal.h" static constexpr int kFdBufferSize = 128 * sizeof(int); // 128 ints using namespace android; Loading Loading @@ -421,7 +419,7 @@ binder_status_t AHardwareBuffer_readFromParcel(const AParcel* _Nonnull parcel, AHardwareBuffer* _Nullable* _Nonnull outBuffer) { if (!parcel || !outBuffer) return STATUS_BAD_VALUE; auto buffer = sp<GraphicBuffer>::make(); status_t status = parcel->get()->read(*buffer); status_t status = AParcel_viewPlatformParcel(parcel)->read(*buffer); if (status != STATUS_OK) return status; *outBuffer = AHardwareBuffer_from_GraphicBuffer(buffer.get()); AHardwareBuffer_acquire(*outBuffer); Loading @@ -433,7 +431,7 @@ binder_status_t AHardwareBuffer_writeToParcel(const AHardwareBuffer* _Nonnull bu const GraphicBuffer* gb = AHardwareBuffer_to_GraphicBuffer(buffer); if (!gb) return STATUS_BAD_VALUE; if (!parcel) return STATUS_BAD_VALUE; return parcel->get()->write(*gb); return AParcel_viewPlatformParcel(parcel)->write(*gb); } // ---------------------------------------------------------------------------- Loading
services/gpuservice/vts/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ java_test_host { libs: [ "tradefed", "vts-core-tradefed-harness", "compatibility-host-util", ], test_suites: [ "general-tests", Loading
services/gpuservice/vts/src/com/android/tests/gpuservice/GpuWorkTracepointTest.java +16 −3 Original line number Diff line number Diff line Loading @@ -19,11 +19,16 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import static org.junit.Assume.assumeTrue; import android.platform.test.annotations.RestrictedBuildTest; import com.android.tradefed.testtype.DeviceJUnit4ClassRunner; import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test; import com.android.tradefed.util.CommandResult; import com.android.tradefed.util.CommandStatus; import com.android.compatibility.common.util.PropertyUtil; import com.android.compatibility.common.util.GmsTest; import org.junit.Test; import org.junit.runner.RunWith; Loading Loading @@ -57,15 +62,23 @@ public class GpuWorkTracepointTest extends BaseHostJUnit4Test { commandResult.getStatus(), CommandStatus.SUCCESS); } @GmsTest(requirement = "VSR-3.3-004") @RestrictedBuildTest @Test public void testGpuWorkPeriodTracepointFormat() throws Exception { CommandResult commandResult = getDevice().executeShellV2Command( String.format("cat %s", GPU_WORK_PERIOD_TRACEPOINT_FORMAT_PATH)); // If we failed to cat the tracepoint format then the test ends here. assumeTrue(String.format("Failed to cat the gpu_work_period tracepoint format at %s", GPU_WORK_PERIOD_TRACEPOINT_FORMAT_PATH), commandResult.getStatus().equals(CommandStatus.SUCCESS)); if (!commandResult.getStatus().equals(CommandStatus.SUCCESS)) { String message = String.format( "Failed to cat the gpu_work_period tracepoint format at %s\n", GPU_WORK_PERIOD_TRACEPOINT_FORMAT_PATH); // Tracepoint MUST exist on devices released with Android 14 or later assumeTrue(message, PropertyUtil.getVsrApiLevel(getDevice()) >= 34); fail(message); } // Otherwise, we check that the fields match the expected fields. String actualFields = Arrays.stream( Loading
services/inputflinger/reader/mapper/TouchpadInputMapper.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -256,8 +256,9 @@ std::list<NotifyArgs> TouchpadInputMapper::configure(nsecs_t when, std::list<NotifyArgs> TouchpadInputMapper::reset(nsecs_t when) { mStateConverter.reset(); mGestureConverter.reset(); return InputMapper::reset(when); std::list<NotifyArgs> out = mGestureConverter.reset(when); out += InputMapper::reset(when); return out; } std::list<NotifyArgs> TouchpadInputMapper::process(const RawEvent* rawEvent) { Loading