/system/netd/libnetdutils/ |
D | FdTest.cpp | 70 StrictMock<ScopedMockSyscalls> mSyscalls; member in android::netdutils::UniqueFdTest 75 EXPECT_CALL(mSyscalls, close(toFd(u))).WillOnce(Return(status::ok)); in TEST_F() 85 EXPECT_CALL(mSyscalls, close(toFd(u))).WillOnce(Return(status::ok)); in TEST_F() 88 Mock::VerifyAndClearExpectations(&mSyscalls); in TEST_F() 93 EXPECT_CALL(mSyscalls, close(toFd(u))).WillOnce(Return(status::ok)); in TEST_F() 97 Mock::VerifyAndClearExpectations(&mSyscalls); in TEST_F() 108 EXPECT_CALL(mSyscalls, close(kFd)).WillOnce(Return(status::ok)); in TEST_F() 111 Mock::VerifyAndClearExpectations(&mSyscalls); in TEST_F() 127 EXPECT_CALL(mSyscalls, close(kFd)).WillOnce(Return(status::ok)); in TEST_F() 130 Mock::VerifyAndClearExpectations(&mSyscalls); in TEST_F() [all …]
|
D | SyscallsTest.cpp | 44 StrictMock<ScopedMockSyscalls> mSyscalls; member in android::netdutils::SyscallsTest 62 EXPECT_CALL(mSyscalls, open(kPath, kFlags, kMode)).WillOnce(Return(ByMove(UniqueFd(kFd)))); in TEST_F() 63 EXPECT_CALL(mSyscalls, close(kFd)).WillOnce(Return(status::ok)); in TEST_F() 75 EXPECT_CALL(mSyscalls, getsockname(kFd, _, _)) in TEST_F() 87 EXPECT_CALL(mSyscalls, getsockname(kFd, _, _)).WillOnce(Return(kError)); in TEST_F() 99 EXPECT_CALL(mSyscalls, setsockopt(kFd, kLevel, kOptname, &expected, sizeof(expected))) in TEST_F() 105 EXPECT_CALL(mSyscalls, setsockopt(kFd, kLevel, kOptname, &expected, sizeof(expected))) in TEST_F() 119 EXPECT_CALL(mSyscalls, getsockopt(kFd, kLevel, kOptname, &expected, &optLen)) in TEST_F() 125 EXPECT_CALL(mSyscalls, getsockopt(kFd, kLevel, kOptname, &expected, &optLen)) in TEST_F() 136 EXPECT_CALL(mSyscalls, bind(kFd, asSockaddrPtr(&expected), sizeof(expected))) in TEST_F() [all …]
|
D | Syscalls.cpp | 241 auto* syscalls = mSyscalls.load(std::memory_order_relaxed); in get() 250 bool success = mSyscalls.compare_exchange_strong(expected, tmp.get()); in get() 259 return *mSyscalls.exchange(&syscalls); in swap()
|
/system/netd/server/ |
D | InterfaceControllerTest.cpp | 70 EXPECT_CALL(mSyscalls, open(path, _, _)).WillOnce(Return(ByMove(UniqueFd(fd)))); in expectOpenFile() 71 EXPECT_CALL(mSyscalls, close(fd)).WillOnce(Return(ok)); in expectOpenFile() 73 EXPECT_CALL(mSyscalls, open(path, _, _)) in expectOpenFile() 80 EXPECT_CALL(mSyscalls, read(kDevRandomFd, _)).WillOnce(Invoke([data](Fd, const Slice buf) { in expectReadFromDevRandom() 101 EXPECT_CALL(mSyscalls, write(fd, _)) in expectWriteToFile() 115 StrictMock<ScopedMockSyscalls> mSyscalls; member in android::net::StablePrivacyTest
|
D | BandwidthControllerTest.cpp | 189 EXPECT_CALL(mSyscalls, fopen(_, _)).WillOnce(Return(ByMove(UniqueFile(dummyFile)))); in expectUpdateQuota() 190 EXPECT_CALL(mSyscalls, vfprintf(dummyFile, _, _)) in expectUpdateQuota() 195 EXPECT_CALL(mSyscalls, fclose(dummyFile)).WillOnce(Return(ok)); in expectUpdateQuota() 215 StrictMock<android::netdutils::ScopedMockSyscalls> mSyscalls; member in BandwidthControllerTest
|
/system/netd/libnetdutils/include/netdutils/ |
D | Syscalls.h | 195 std::atomic<Syscalls*> mSyscalls{nullptr};
|