Lines Matching refs:ret

80     int ret;  in start_server_process()  local
97 ret = pipe(pipefd); in start_server_process()
98 if (ret < 0) in start_server_process()
99 return ret; in start_server_process()
117 ret = read(pipefd[0], &status, sizeof(status)); in start_server_process()
120 if (ret == sizeof(status)) { in start_server_process()
121 ret = status; in start_server_process()
124 if (ret >= 0) { in start_server_process()
125 ret = NO_INIT; in start_server_process()
128 if (ret < 0) { in start_server_process()
130 return ret; in start_server_process()
155 status_t ret; in TearDown() local
162 ret = m_server->transact(BINDER_LIB_TEST_GET_STATUS_TRANSACTION, data, &reply); in TearDown()
163 EXPECT_EQ(0, ret); in TearDown()
164ret = m_server->transact(BINDER_LIB_TEST_EXIT_TRANSACTION, data, &reply, TF_ONE_WAY); in TearDown()
165 EXPECT_EQ(0, ret); in TearDown()
191 int ret; in addServerEtc() local
196 ret = m_server->transact(code, data, &reply); in addServerEtc()
197 EXPECT_EQ(NO_ERROR, ret); in addServerEtc()
202 ret = reply.readInt32(&id); in addServerEtc()
203 EXPECT_EQ(NO_ERROR, ret); in addServerEtc()
220 int ret; in waitForReadData() local
225 ret = poll(&pfd, 1, timeout_ms); in waitForReadData()
226 EXPECT_EQ(1, ret); in waitForReadData()
286 int ret; in waitEvent() local
294 ret = m_eventTriggered ? NO_ERROR : TIMED_OUT; in waitEvent()
296 return ret; in waitEvent()
348 int ret; in onTransact() local
362 ret = server->transact(BINDER_LIB_TEST_INDIRECT_TRANSACTION, in onTransact()
364 EXPECT_EQ(NO_ERROR, ret); in onTransact()
387 status_t ret; in TEST_F() local
389 ret = m_server->transact(BINDER_LIB_TEST_NOP_TRANSACTION, data, &reply); in TEST_F()
390 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
396 status_t ret; in TEST_F() local
399 ret = m_server->transact(BINDER_LIB_TEST_SET_ERROR_TRANSACTION, data, &reply); in TEST_F()
400 EXPECT_EQ(testValue[i], ret); in TEST_F()
405 status_t ret; in TEST_F() local
408 ret = m_server->transact(BINDER_LIB_TEST_GET_ID_TRANSACTION, data, &reply); in TEST_F()
409 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
410 ret = reply.readInt32(&id); in TEST_F()
411 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
416 status_t ret; in TEST_F() local
421 ret = server->transact(BINDER_LIB_TEST_GET_PTR_SIZE_TRANSACTION, data, &reply); in TEST_F()
422 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
423 ret = reply.readInt32(&ptrsize); in TEST_F()
424 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
431 status_t ret; in TEST_F() local
449 ret = m_server->transact(BINDER_LIB_TEST_INDIRECT_TRANSACTION, data, &reply); in TEST_F()
450 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
452 ret = reply.readInt32(&id); in TEST_F()
453 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
456 ret = reply.readInt32(&count); in TEST_F()
457 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
463 ret = replyi.readInt32(&id); in TEST_F()
464 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
474 status_t ret; in TEST_F() local
499 ret = m_server->transact(BINDER_LIB_TEST_INDIRECT_TRANSACTION, data, &reply); in TEST_F()
500 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
502 ret = reply.readInt32(&id); in TEST_F()
503 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
506 ret = reply.readInt32(&count); in TEST_F()
507 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
515 ret = replyi.readInt32(&id); in TEST_F()
516 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
519 ret = replyi.readInt32(&counti); in TEST_F()
520 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
525 ret = replyi2.readInt32(&id); in TEST_F()
526 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
538 status_t ret; in TEST_F() local
542 ret = m_server->transact(BINDER_LIB_TEST_NOP_CALL_BACK, data, &reply, TF_ONE_WAY); in TEST_F()
543 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
544 ret = callBack->waitEvent(5); in TEST_F()
545 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
546 ret = callBack->getResult(); in TEST_F()
547 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
558 status_t ret; in TEST_F() local
565 ret = binder->linkToDeath(testDeathRecipient); in TEST_F()
566 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
569 ret = testDeathRecipient->waitEvent(5); in TEST_F()
570 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
572 ret = binder->unlinkToDeath(testDeathRecipient); in TEST_F()
573 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
579 status_t ret; in TEST_F() local
587 ret = binder->linkToDeath(testDeathRecipient); in TEST_F()
588 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
592 ret = testDeathRecipient->waitEvent(5); in TEST_F()
593 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
595 ret = binder->unlinkToDeath(testDeathRecipient); in TEST_F()
596 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
602 status_t ret; in TEST_F() local
610 ret = binder->linkToDeath(testDeathRecipient); in TEST_F()
611 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
616 ret = sbinder->transact(BINDER_LIB_TEST_EXIT_TRANSACTION, data, &reply, TF_ONE_WAY); in TEST_F()
617 EXPECT_EQ(0, ret); in TEST_F()
620 ret = testDeathRecipient->waitEvent(5); in TEST_F()
621 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
622 ret = sbinder->unlinkToDeath(testDeathRecipient); in TEST_F()
623 EXPECT_EQ(DEAD_OBJECT, ret); in TEST_F()
628 status_t ret; in TEST_F() local
646ret = linkedclient[i]->transact(BINDER_LIB_TEST_LINK_DEATH_TRANSACTION, data, &reply, TF_ONE_WAY); in TEST_F()
647 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
655ret = passiveclient[i]->transact(BINDER_LIB_TEST_ADD_STRONG_REF_TRANSACTION, data, &reply, TF_ONE_… in TEST_F()
656 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
661 ret = target->transact(BINDER_LIB_TEST_EXIT_TRANSACTION, data, &reply, TF_ONE_WAY); in TEST_F()
662 EXPECT_EQ(0, ret); in TEST_F()
666 ret = callBack[i]->waitEvent(5); in TEST_F()
667 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
668 ret = callBack[i]->getResult(); in TEST_F()
669 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
675 status_t ret; in TEST_F() local
684 ret = target->linkToDeath(testDeathRecipient); in TEST_F()
685 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
689 ret = target->transact(BINDER_LIB_TEST_EXIT_TRANSACTION, data, &reply, TF_ONE_WAY); in TEST_F()
690 EXPECT_EQ(0, ret); in TEST_F()
722 ret = client->transact(BINDER_LIB_TEST_LINK_DEATH_TRANSACTION, data, &reply, TF_ONE_WAY); in TEST_F()
723 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
726 ret = callback->waitEvent(5); in TEST_F()
727 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
728 ret = callback->getResult(); in TEST_F()
729 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
733 int ret; in TEST_F() local
738 ret = pipe2(pipefd, O_NONBLOCK); in TEST_F()
739 ASSERT_EQ(0, ret); in TEST_F()
745 ret = data.writeFileDescriptor(pipefd[1], true); in TEST_F()
746 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
748 ret = data.writeInt32(sizeof(writebuf)); in TEST_F()
749 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
751 ret = data.write(writebuf, sizeof(writebuf)); in TEST_F()
752 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
754 ret = m_server->transact(BINDER_LIB_TEST_WRITE_FILE_TRANSACTION, data, &reply); in TEST_F()
755 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
758 ret = read(pipefd[0], buf, sizeof(buf)); in TEST_F()
759 EXPECT_EQ(sizeof(buf), (size_t)ret); in TEST_F()
764 ret = read(pipefd[0], buf, sizeof(buf)); in TEST_F()
765 EXPECT_EQ(0, ret); in TEST_F()
818 int ret; in TEST_F() local
826 ret = data.writeWeakBinder(strong); in TEST_F()
827 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
829 ret = server->transact(BINDER_LIB_TEST_PROMOTE_WEAK_REF_TRANSACTION, data, &reply); in TEST_F()
830 EXPECT_GE(ret, 0); in TEST_F()
834 status_t ret; in TEST_F() local
837 ret = m_server->transact(BINDER_LIB_TEST_GET_SELF_TRANSACTION, data, &reply); in TEST_F()
838 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
849 status_t ret; in TEST_F() local
859 ret = server->transact(BINDER_LIB_TEST_CREATE_BINDER_TRANSACTION, data, &reply); in TEST_F()
860 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
876 ret = server->transact(BINDER_LIB_TEST_ADD_STRONG_REF_TRANSACTION, data, &reply); in TEST_F()
881 EXPECT_EQ((status_t)FAILED_TRANSACTION, ret); in TEST_F()
890 status_t ret; in TEST_F() local
904 ret = m_server->transact(BINDER_LIB_TEST_INDIRECT_TRANSACTION, data, &reply); in TEST_F()
905 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
910 status_t ret; in TEST_F() local
923 ret = pollServer->transact(BINDER_LIB_TEST_DELAYED_CALL_BACK, data, nullptr, TF_ONE_WAY); in TEST_F()
924 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
928 ret = pollServer->transact(BINDER_LIB_TEST_DELAYED_CALL_BACK, data2, nullptr, TF_ONE_WAY); in TEST_F()
929 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
933 ret = callBack->waitEvent(2); in TEST_F()
934 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
935 ret = callBack->getResult(); in TEST_F()
936 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
938 ret = callBack2->waitEvent(2); in TEST_F()
939 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
940 ret = callBack2->getResult(); in TEST_F()
941 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
946 status_t ret; in TEST_F() local
949 ret = m_server->transact(BINDER_LIB_TEST_GET_WORK_SOURCE_TRANSACTION, data, &reply); in TEST_F()
951 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
956 status_t ret; in TEST_F() local
961 ret = m_server->transact(BINDER_LIB_TEST_GET_WORK_SOURCE_TRANSACTION, data, &reply); in TEST_F()
965 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
970 status_t ret; in TEST_F() local
977 ret = m_server->transact(BINDER_LIB_TEST_GET_WORK_SOURCE_TRANSACTION, data, &reply); in TEST_F()
980 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
985 status_t ret; in TEST_F() local
992 ret = m_server->transact(BINDER_LIB_TEST_GET_WORK_SOURCE_TRANSACTION, data, &reply); in TEST_F()
996 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
1001 status_t ret; in TEST_F() local
1009 ret = m_server->transact(BINDER_LIB_TEST_GET_WORK_SOURCE_TRANSACTION, data, &reply); in TEST_F()
1013 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
1018 status_t ret; in TEST_F() local
1028 status_t ret; in TEST_F() local
1038 status_t ret; in TEST_F() local
1052 status_t ret; in TEST_F() local
1054 ret = m_server->transact(BINDER_LIB_TEST_GET_WORK_SOURCE_TRANSACTION, data, &reply); in TEST_F()
1072 status_t ret = server->transact(BINDER_LIB_TEST_ECHO_VECTOR, data, &reply); in TEST_F() local
1073 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
1075 ret = reply.readUint64Vector(&readValue); in TEST_F()
1138 int ret; in onTransact() local
1147 ret = -EBUSY; in onTransact()
1154 ret = start_server_process(serverid, usePoll); in onTransact()
1157 if (ret > 0) { in onTransact()
1162 ret = pthread_cond_timedwait(&m_serverWaitCond, &m_serverWaitMutex, &ts); in onTransact()
1166 ret = -ETIMEDOUT; in onTransact()
1171 ret = NO_ERROR; in onTransact()
1173 } else if (ret >= 0) { in onTransact()
1175 ret = UNKNOWN_ERROR; in onTransact()
1178 return ret; in onTransact()
1271 int ret; in onTransact() local
1285 ret = target->linkToDeath(testDeathRecipient); in onTransact()
1286 if (ret == NO_ERROR) in onTransact()
1287 ret = testDeathRecipient->waitEvent(5); in onTransact()
1288 data2.writeInt32(ret); in onTransact()
1293 int ret; in onTransact() local
1302 ret = data.readInt32(&size); in onTransact()
1303 if (ret != NO_ERROR) { in onTransact()
1304 return ret; in onTransact()
1310 ret = write(fd, buf, size); in onTransact()
1311 if (ret != size) in onTransact()
1316 int ret; in onTransact() local
1321 ret = data.readUniqueParcelFileDescriptor(&fd); in onTransact()
1322 if (ret != NO_ERROR) { in onTransact()
1323 return ret; in onTransact()
1325 ret = data.readInt32(&size); in onTransact()
1326 if (ret != NO_ERROR) { in onTransact()
1327 return ret; in onTransact()
1333 ret = write(fd.get(), buf, size); in onTransact()
1334 if (ret != size) return UNKNOWN_ERROR; in onTransact()
1338 int ret; in onTransact() local
1351 ret = server->transact(BINDER_LIB_TEST_NOP_TRANSACTION, data2, &reply2); in onTransact()
1352 if (ret != NO_ERROR) in onTransact()
1410 status_t ret; in run_server() local
1423 ret = sm->addService(binderLibTestServiceName, testService); in run_server()
1430 ret = server->transact(BINDER_LIB_TEST_REGISTER_SERVER, data, &reply); in run_server()
1433 write(readypipefd, &ret, sizeof(ret)); in run_server()
1436 if (ret) in run_server()
1491 int ret; in main() local