Lines Matching refs:ret
85 int ret; in start_server_process() local
102 ret = pipe(pipefd); in start_server_process()
103 if (ret < 0) in start_server_process()
104 return ret; in start_server_process()
123 ret = read(pipefd[0], &status, sizeof(status)); in start_server_process()
126 if (ret == sizeof(status)) { in start_server_process()
127 ret = status; in start_server_process()
130 if (ret >= 0) { in start_server_process()
131 ret = NO_INIT; in start_server_process()
134 if (ret < 0) { in start_server_process()
136 return ret; in start_server_process()
161 status_t ret; in TearDown() local
168 ret = m_server->transact(BINDER_LIB_TEST_GET_STATUS_TRANSACTION, data, &reply); in TearDown()
169 EXPECT_EQ(0, ret); in TearDown()
170 … ret = m_server->transact(BINDER_LIB_TEST_EXIT_TRANSACTION, data, &reply, TF_ONE_WAY); in TearDown()
171 EXPECT_EQ(0, ret); in TearDown()
197 int ret; in addServerEtc() local
202 ret = m_server->transact(code, data, &reply); in addServerEtc()
203 EXPECT_EQ(NO_ERROR, ret); in addServerEtc()
208 ret = reply.readInt32(&id); in addServerEtc()
209 EXPECT_EQ(NO_ERROR, ret); in addServerEtc()
226 int ret; in waitForReadData() local
231 ret = poll(&pfd, 1, timeout_ms); in waitForReadData()
232 EXPECT_EQ(1, ret); in waitForReadData()
292 int ret; in waitEvent() local
300 ret = m_eventTriggered ? NO_ERROR : TIMED_OUT; in waitEvent()
302 return ret; in waitEvent()
354 int ret; in onTransact() local
368 ret = server->transact(BINDER_LIB_TEST_INDIRECT_TRANSACTION, in onTransact()
370 EXPECT_EQ(NO_ERROR, ret); in onTransact()
393 status_t ret; in TEST_F() local
395 ret = m_server->transact(BINDER_LIB_TEST_NOP_TRANSACTION, data, &reply); in TEST_F()
396 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
402 status_t ret; in TEST_F() local
405 ret = m_server->transact(BINDER_LIB_TEST_SET_ERROR_TRANSACTION, data, &reply); in TEST_F()
406 EXPECT_EQ(testValue[i], ret); in TEST_F()
411 status_t ret; in TEST_F() local
414 ret = m_server->transact(BINDER_LIB_TEST_GET_ID_TRANSACTION, data, &reply); in TEST_F()
415 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
416 ret = reply.readInt32(&id); in TEST_F()
417 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
422 status_t ret; in TEST_F() local
427 ret = server->transact(BINDER_LIB_TEST_GET_PTR_SIZE_TRANSACTION, data, &reply); in TEST_F()
428 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
429 ret = reply.readInt32(&ptrsize); in TEST_F()
430 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
437 status_t ret; in TEST_F() local
455 ret = m_server->transact(BINDER_LIB_TEST_INDIRECT_TRANSACTION, data, &reply); in TEST_F()
456 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
458 ret = reply.readInt32(&id); in TEST_F()
459 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
462 ret = reply.readInt32(&count); in TEST_F()
463 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
469 ret = replyi.readInt32(&id); in TEST_F()
470 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
480 status_t ret; in TEST_F() local
505 ret = m_server->transact(BINDER_LIB_TEST_INDIRECT_TRANSACTION, data, &reply); in TEST_F()
506 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
508 ret = reply.readInt32(&id); in TEST_F()
509 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
512 ret = reply.readInt32(&count); in TEST_F()
513 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
521 ret = replyi.readInt32(&id); in TEST_F()
522 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
525 ret = replyi.readInt32(&counti); in TEST_F()
526 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
531 ret = replyi2.readInt32(&id); in TEST_F()
532 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
544 status_t ret; in TEST_F() local
548 ret = m_server->transact(BINDER_LIB_TEST_NOP_CALL_BACK, data, &reply, TF_ONE_WAY); in TEST_F()
549 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
550 ret = callBack->waitEvent(5); in TEST_F()
551 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
552 ret = callBack->getResult(); in TEST_F()
553 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
564 status_t ret; in TEST_F() local
572 ret = binder->linkToDeath(testDeathRecipient); in TEST_F()
573 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
578 ret = sbinder->transact(BINDER_LIB_TEST_EXIT_TRANSACTION, data, &reply, TF_ONE_WAY); in TEST_F()
579 EXPECT_EQ(0, ret); in TEST_F()
582 ret = testDeathRecipient->waitEvent(5); in TEST_F()
583 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
584 ret = sbinder->unlinkToDeath(testDeathRecipient); in TEST_F()
585 EXPECT_EQ(DEAD_OBJECT, ret); in TEST_F()
590 status_t ret; in TEST_F() local
608 … ret = linkedclient[i]->transact(BINDER_LIB_TEST_LINK_DEATH_TRANSACTION, data, &reply, TF_ONE_WAY); in TEST_F()
609 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
617 …ret = passiveclient[i]->transact(BINDER_LIB_TEST_ADD_STRONG_REF_TRANSACTION, data, &reply, TF_ONE_… in TEST_F()
618 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
623 ret = target->transact(BINDER_LIB_TEST_EXIT_TRANSACTION, data, &reply, TF_ONE_WAY); in TEST_F()
624 EXPECT_EQ(0, ret); in TEST_F()
628 ret = callBack[i]->waitEvent(5); in TEST_F()
629 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
630 ret = callBack[i]->getResult(); in TEST_F()
631 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
637 status_t ret; in TEST_F() local
646 ret = target->linkToDeath(testDeathRecipient); in TEST_F()
647 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
651 ret = target->transact(BINDER_LIB_TEST_EXIT_TRANSACTION, data, &reply, TF_ONE_WAY); in TEST_F()
652 EXPECT_EQ(0, ret); in TEST_F()
684 ret = client->transact(BINDER_LIB_TEST_LINK_DEATH_TRANSACTION, data, &reply, TF_ONE_WAY); in TEST_F()
685 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
688 ret = callback->waitEvent(5); in TEST_F()
689 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
690 ret = callback->getResult(); in TEST_F()
691 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
695 int ret; in TEST_F() local
700 ret = pipe2(pipefd, O_NONBLOCK); in TEST_F()
701 ASSERT_EQ(0, ret); in TEST_F()
707 ret = data.writeFileDescriptor(pipefd[1], true); in TEST_F()
708 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
710 ret = data.writeInt32(sizeof(writebuf)); in TEST_F()
711 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
713 ret = data.write(writebuf, sizeof(writebuf)); in TEST_F()
714 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
716 ret = m_server->transact(BINDER_LIB_TEST_WRITE_FILE_TRANSACTION, data, &reply); in TEST_F()
717 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
720 ret = read(pipefd[0], buf, sizeof(buf)); in TEST_F()
721 EXPECT_EQ(sizeof(buf), (size_t)ret); in TEST_F()
726 ret = read(pipefd[0], buf, sizeof(buf)); in TEST_F()
727 EXPECT_EQ(0, ret); in TEST_F()
798 status_t ret; in TEST_F() local
801 ret = m_server->transact(BINDER_LIB_TEST_GET_SELF_TRANSACTION, data, &reply); in TEST_F()
802 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
813 status_t ret; in TEST_F() local
822 ret = server->transact(BINDER_LIB_TEST_CREATE_BINDER_TRANSACTION, data, &reply); in TEST_F()
823 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
840 ret = server->transact(BINDER_LIB_TEST_ADD_STRONG_REF_TRANSACTION, data, &reply); in TEST_F()
845 EXPECT_EQ((status_t)FAILED_TRANSACTION, ret); in TEST_F()
854 status_t ret; in TEST_F() local
868 ret = m_server->transact(BINDER_LIB_TEST_INDIRECT_TRANSACTION, data, &reply); in TEST_F()
869 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
874 status_t ret; in TEST_F() local
887 ret = pollServer->transact(BINDER_LIB_TEST_DELAYED_CALL_BACK, data, nullptr, TF_ONE_WAY); in TEST_F()
888 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
892 ret = pollServer->transact(BINDER_LIB_TEST_DELAYED_CALL_BACK, data2, nullptr, TF_ONE_WAY); in TEST_F()
893 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
897 ret = callBack->waitEvent(2); in TEST_F()
898 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
899 ret = callBack->getResult(); in TEST_F()
900 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
902 ret = callBack2->waitEvent(2); in TEST_F()
903 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
904 ret = callBack2->getResult(); in TEST_F()
905 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
910 status_t ret; in TEST_F() local
913 ret = m_server->transact(BINDER_LIB_TEST_GET_WORK_SOURCE_TRANSACTION, data, &reply); in TEST_F()
915 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
920 status_t ret; in TEST_F() local
925 ret = m_server->transact(BINDER_LIB_TEST_GET_WORK_SOURCE_TRANSACTION, data, &reply); in TEST_F()
929 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
934 status_t ret; in TEST_F() local
941 ret = m_server->transact(BINDER_LIB_TEST_GET_WORK_SOURCE_TRANSACTION, data, &reply); in TEST_F()
944 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
949 status_t ret; in TEST_F() local
956 ret = m_server->transact(BINDER_LIB_TEST_GET_WORK_SOURCE_TRANSACTION, data, &reply); in TEST_F()
960 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
965 status_t ret; in TEST_F() local
973 ret = m_server->transact(BINDER_LIB_TEST_GET_WORK_SOURCE_TRANSACTION, data, &reply); in TEST_F()
977 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
1007 status_t ret; in TEST_F() local
1009 ret = m_server->transact(BINDER_LIB_TEST_GET_WORK_SOURCE_TRANSACTION, data, &reply); in TEST_F()
1024 status_t ret = server->transact(BINDER_LIB_TEST_GET_SCHEDULING_POLICY, data, &reply); in TEST_F() local
1025 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
1043 status_t ret = server->transact(BINDER_LIB_TEST_ECHO_VECTOR, data, &reply); in TEST_F() local
1044 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
1046 ret = reply.readUint64Vector(&readValue); in TEST_F()
1109 int ret; in onTransact() local
1117 ret = -EBUSY; in onTransact()
1124 ret = start_server_process(serverid, usePoll); in onTransact()
1127 if (ret > 0) { in onTransact()
1132 ret = pthread_cond_timedwait(&m_serverWaitCond, &m_serverWaitMutex, &ts); in onTransact()
1136 ret = -ETIMEDOUT; in onTransact()
1141 ret = NO_ERROR; in onTransact()
1143 } else if (ret >= 0) { in onTransact()
1145 ret = UNKNOWN_ERROR; in onTransact()
1148 return ret; in onTransact()
1241 int ret; in onTransact() local
1255 ret = target->linkToDeath(testDeathRecipient); in onTransact()
1256 if (ret == NO_ERROR) in onTransact()
1257 ret = testDeathRecipient->waitEvent(5); in onTransact()
1258 data2.writeInt32(ret); in onTransact()
1263 int ret; in onTransact() local
1272 ret = data.readInt32(&size); in onTransact()
1273 if (ret != NO_ERROR) { in onTransact()
1274 return ret; in onTransact()
1280 ret = write(fd, buf, size); in onTransact()
1281 if (ret != size) in onTransact()
1286 int ret; in onTransact() local
1291 ret = data.readUniqueParcelFileDescriptor(&fd); in onTransact()
1292 if (ret != NO_ERROR) { in onTransact()
1293 return ret; in onTransact()
1295 ret = data.readInt32(&size); in onTransact()
1296 if (ret != NO_ERROR) { in onTransact()
1297 return ret; in onTransact()
1303 ret = write(fd.get(), buf, size); in onTransact()
1304 if (ret != size) return UNKNOWN_ERROR; in onTransact()
1361 status_t ret; in run_server() local
1383 ret = sm->addService(binderLibTestServiceName, testService); in run_server()
1390 ret = server->transact(BINDER_LIB_TEST_REGISTER_SERVER, data, &reply); in run_server()
1393 write(readypipefd, &ret, sizeof(ret)); in run_server()
1396 if (ret) in run_server()