Loading cmds/dumpstate/dumpstate.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -1902,6 +1902,9 @@ Dumpstate::RunStatus Dumpstate::DumpstateDefaultAfterCritical() { } ds.AddDir(PREREBOOT_DATA_DIR, false); add_mountinfo(); for (const char* path : {"/proc/cpuinfo", "/proc/meminfo"}) { ds.AddZipEntry(ZIP_ROOT_DIR + path, path); } DumpIpTablesAsRoot(); DumpDynamicPartitionInfo(); ds.AddDir(OTA_METADATA_DIR, true); Loading libs/binder/RecordedTransaction.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -127,8 +127,7 @@ std::optional<RecordedTransaction> RecordedTransaction::fromDetails( t.mData.mInterfaceName = std::string(String8(interfaceName).string()); if (interfaceName.size() != t.mData.mInterfaceName.size()) { LOG(ERROR) << "Interface Name is not valid. Contains characters that aren't single byte " "utf-8: " << interfaceName; "utf-8."; return std::nullopt; } Loading libs/binder/TEST_MAPPING +5 −0 Original line number Diff line number Diff line Loading @@ -119,5 +119,10 @@ { "name": "memunreachable_binder_test" } ], "imports": [ { "path": "packages/modules/Virtualization" } ] } libs/binder/tests/IBinderRpcTest.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -80,4 +80,8 @@ interface IBinderRpcTest { // get queued. oneway void blockingSendFdOneway(in ParcelFileDescriptor fd); ParcelFileDescriptor blockingRecvFd(); // Same as blockingSendFdOneway, but with integers. oneway void blockingSendIntOneway(int n); int blockingRecvInt(); } libs/binder/tests/binderRpcTest.cpp +9 −17 Original line number Diff line number Diff line Loading @@ -587,30 +587,22 @@ TEST_P(BinderRpc, OnewayCallQueueing) { GTEST_SKIP() << "This test requires multiple threads"; } constexpr size_t kNumSleeps = 10; constexpr size_t kNumQueued = 10; constexpr size_t kNumExtraServerThreads = 4; constexpr size_t kSleepMs = 50; // make sure calls to the same object happen on the same thread auto proc = createRpcTestSocketServerProcess({.numThreads = 1 + kNumExtraServerThreads}); EXPECT_OK(proc.rootIface->lock()); size_t epochMsBefore = epochMillis(); // all these *Async commands should be queued on the server sequentially, // all these *Oneway commands should be queued on the server sequentially, // even though there are multiple threads. for (size_t i = 0; i + 1 < kNumSleeps; i++) { proc.rootIface->sleepMsAsync(kSleepMs); for (size_t i = 0; i + 1 < kNumQueued; i++) { proc.rootIface->blockingSendIntOneway(i); } for (size_t i = 0; i + 1 < kNumQueued; i++) { int n; proc.rootIface->blockingRecvInt(&n); EXPECT_EQ(n, i); } EXPECT_OK(proc.rootIface->unlockInMsAsync(kSleepMs)); // this can only return once the final async call has unlocked EXPECT_OK(proc.rootIface->lockUnlock()); size_t epochMsAfter = epochMillis(); EXPECT_GE(epochMsAfter, epochMsBefore + kSleepMs * kNumSleeps); saturateThreadPool(1 + kNumExtraServerThreads, proc.rootIface); } Loading Loading
cmds/dumpstate/dumpstate.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -1902,6 +1902,9 @@ Dumpstate::RunStatus Dumpstate::DumpstateDefaultAfterCritical() { } ds.AddDir(PREREBOOT_DATA_DIR, false); add_mountinfo(); for (const char* path : {"/proc/cpuinfo", "/proc/meminfo"}) { ds.AddZipEntry(ZIP_ROOT_DIR + path, path); } DumpIpTablesAsRoot(); DumpDynamicPartitionInfo(); ds.AddDir(OTA_METADATA_DIR, true); Loading
libs/binder/RecordedTransaction.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -127,8 +127,7 @@ std::optional<RecordedTransaction> RecordedTransaction::fromDetails( t.mData.mInterfaceName = std::string(String8(interfaceName).string()); if (interfaceName.size() != t.mData.mInterfaceName.size()) { LOG(ERROR) << "Interface Name is not valid. Contains characters that aren't single byte " "utf-8: " << interfaceName; "utf-8."; return std::nullopt; } Loading
libs/binder/TEST_MAPPING +5 −0 Original line number Diff line number Diff line Loading @@ -119,5 +119,10 @@ { "name": "memunreachable_binder_test" } ], "imports": [ { "path": "packages/modules/Virtualization" } ] }
libs/binder/tests/IBinderRpcTest.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -80,4 +80,8 @@ interface IBinderRpcTest { // get queued. oneway void blockingSendFdOneway(in ParcelFileDescriptor fd); ParcelFileDescriptor blockingRecvFd(); // Same as blockingSendFdOneway, but with integers. oneway void blockingSendIntOneway(int n); int blockingRecvInt(); }
libs/binder/tests/binderRpcTest.cpp +9 −17 Original line number Diff line number Diff line Loading @@ -587,30 +587,22 @@ TEST_P(BinderRpc, OnewayCallQueueing) { GTEST_SKIP() << "This test requires multiple threads"; } constexpr size_t kNumSleeps = 10; constexpr size_t kNumQueued = 10; constexpr size_t kNumExtraServerThreads = 4; constexpr size_t kSleepMs = 50; // make sure calls to the same object happen on the same thread auto proc = createRpcTestSocketServerProcess({.numThreads = 1 + kNumExtraServerThreads}); EXPECT_OK(proc.rootIface->lock()); size_t epochMsBefore = epochMillis(); // all these *Async commands should be queued on the server sequentially, // all these *Oneway commands should be queued on the server sequentially, // even though there are multiple threads. for (size_t i = 0; i + 1 < kNumSleeps; i++) { proc.rootIface->sleepMsAsync(kSleepMs); for (size_t i = 0; i + 1 < kNumQueued; i++) { proc.rootIface->blockingSendIntOneway(i); } for (size_t i = 0; i + 1 < kNumQueued; i++) { int n; proc.rootIface->blockingRecvInt(&n); EXPECT_EQ(n, i); } EXPECT_OK(proc.rootIface->unlockInMsAsync(kSleepMs)); // this can only return once the final async call has unlocked EXPECT_OK(proc.rootIface->lockUnlock()); size_t epochMsAfter = epochMillis(); EXPECT_GE(epochMsAfter, epochMsBefore + kSleepMs * kNumSleeps); saturateThreadPool(1 + kNumExtraServerThreads, proc.rootIface); } Loading