Lines Matching refs:ret
65 int ret; in start_server_process() local
80 ret = pipe(pipefd); in start_server_process()
81 if (ret < 0) in start_server_process()
82 return ret; in start_server_process()
99 ret = read(pipefd[0], &status, sizeof(status)); in start_server_process()
102 if (ret == sizeof(status)) { in start_server_process()
103 ret = status; in start_server_process()
106 if (ret >= 0) { in start_server_process()
107 ret = NO_INIT; in start_server_process()
110 if (ret < 0) { in start_server_process()
112 return ret; in start_server_process()
137 status_t ret; in TearDown() local
144 ret = m_server->transact(BINDER_LIB_TEST_GET_STATUS_TRANSACTION, data, &reply); in TearDown()
145 EXPECT_EQ(0, ret); in TearDown()
146 … ret = m_server->transact(BINDER_LIB_TEST_EXIT_TRANSACTION, data, &reply, TF_ONE_WAY); in TearDown()
147 EXPECT_EQ(0, ret); in TearDown()
172 int ret; in addServer() local
177 ret = m_server->transact(BINDER_LIB_TEST_ADD_SERVER, data, &reply); in addServer()
178 EXPECT_EQ(NO_ERROR, ret); in addServer()
183 ret = reply.readInt32(&id); in addServer()
184 EXPECT_EQ(NO_ERROR, ret); in addServer()
190 int ret; in waitForReadData() local
195 ret = poll(&pfd, 1, timeout_ms); in waitForReadData()
196 EXPECT_EQ(1, ret); in waitForReadData()
256 int ret; in waitEvent() local
264 ret = m_eventTriggered ? NO_ERROR : TIMED_OUT; in waitEvent()
266 return ret; in waitEvent()
323 status_t ret; in TEST_F() local
325 ret = m_server->transact(BINDER_LIB_TEST_NOP_TRANSACTION, data, &reply); in TEST_F()
326 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
332 status_t ret; in TEST_F() local
335 ret = m_server->transact(BINDER_LIB_TEST_SET_ERROR_TRANSACTION, data, &reply); in TEST_F()
336 EXPECT_EQ(testValue[i], ret); in TEST_F()
341 status_t ret; in TEST_F() local
344 ret = m_server->transact(BINDER_LIB_TEST_GET_ID_TRANSACTION, data, &reply); in TEST_F()
345 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
346 ret = reply.readInt32(&id); in TEST_F()
347 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
352 status_t ret; in TEST_F() local
357 ret = server->transact(BINDER_LIB_TEST_GET_PTR_SIZE_TRANSACTION, data, &reply); in TEST_F()
358 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
359 ret = reply.readInt32(&ptrsize); in TEST_F()
360 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
367 status_t ret; in TEST_F() local
385 ret = m_server->transact(BINDER_LIB_TEST_INDIRECT_TRANSACTION, data, &reply); in TEST_F()
386 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
388 ret = reply.readInt32(&id); in TEST_F()
389 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
392 ret = reply.readInt32(&count); in TEST_F()
393 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
399 ret = replyi.readInt32(&id); in TEST_F()
400 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
410 status_t ret; in TEST_F() local
435 ret = m_server->transact(BINDER_LIB_TEST_INDIRECT_TRANSACTION, data, &reply); in TEST_F()
436 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
438 ret = reply.readInt32(&id); in TEST_F()
439 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
442 ret = reply.readInt32(&count); in TEST_F()
443 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
451 ret = replyi.readInt32(&id); in TEST_F()
452 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
455 ret = replyi.readInt32(&counti); in TEST_F()
456 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
461 ret = replyi2.readInt32(&id); in TEST_F()
462 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
474 status_t ret; in TEST_F() local
478 ret = m_server->transact(BINDER_LIB_TEST_NOP_CALL_BACK, data, &reply, TF_ONE_WAY); in TEST_F()
479 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
480 ret = callBack->waitEvent(5); in TEST_F()
481 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
482 ret = callBack->getResult(); in TEST_F()
483 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
494 status_t ret; in TEST_F() local
501 ret = binder->linkToDeath(testDeathRecipient); in TEST_F()
502 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
505 ret = testDeathRecipient->waitEvent(5); in TEST_F()
506 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
508 ret = binder->unlinkToDeath(testDeathRecipient); in TEST_F()
509 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
515 status_t ret; in TEST_F() local
523 ret = binder->linkToDeath(testDeathRecipient); in TEST_F()
524 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
528 ret = testDeathRecipient->waitEvent(5); in TEST_F()
529 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
531 ret = binder->unlinkToDeath(testDeathRecipient); in TEST_F()
532 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
538 status_t ret; in TEST_F() local
546 ret = binder->linkToDeath(testDeathRecipient); in TEST_F()
547 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
552 ret = sbinder->transact(BINDER_LIB_TEST_EXIT_TRANSACTION, data, &reply, TF_ONE_WAY); in TEST_F()
553 EXPECT_EQ(0, ret); in TEST_F()
556 ret = testDeathRecipient->waitEvent(5); in TEST_F()
557 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
558 ret = sbinder->unlinkToDeath(testDeathRecipient); in TEST_F()
559 EXPECT_EQ(DEAD_OBJECT, ret); in TEST_F()
564 status_t ret; in TEST_F() local
582 … ret = linkedclient[i]->transact(BINDER_LIB_TEST_LINK_DEATH_TRANSACTION, data, &reply, TF_ONE_WAY); in TEST_F()
583 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
591 …ret = passiveclient[i]->transact(BINDER_LIB_TEST_ADD_STRONG_REF_TRANSACTION, data, &reply, TF_ONE_… in TEST_F()
592 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
597 ret = target->transact(BINDER_LIB_TEST_EXIT_TRANSACTION, data, &reply, TF_ONE_WAY); in TEST_F()
598 EXPECT_EQ(0, ret); in TEST_F()
602 ret = callBack[i]->waitEvent(5); in TEST_F()
603 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
604 ret = callBack[i]->getResult(); in TEST_F()
605 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
610 int ret; in TEST_F() local
615 ret = pipe2(pipefd, O_NONBLOCK); in TEST_F()
616 ASSERT_EQ(0, ret); in TEST_F()
622 ret = data.writeFileDescriptor(pipefd[1], true); in TEST_F()
623 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
625 ret = data.writeInt32(sizeof(writebuf)); in TEST_F()
626 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
628 ret = data.write(writebuf, sizeof(writebuf)); in TEST_F()
629 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
631 ret = m_server->transact(BINDER_LIB_TEST_WRITE_FILE_TRANSACTION, data, &reply); in TEST_F()
632 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
635 ret = read(pipefd[0], buf, sizeof(buf)); in TEST_F()
636 EXPECT_EQ(sizeof(buf), (size_t)ret); in TEST_F()
641 ret = read(pipefd[0], buf, sizeof(buf)); in TEST_F()
642 EXPECT_EQ(0, ret); in TEST_F()
660 int ret; in TEST_F() local
668 ret = data.writeWeakBinder(strong); in TEST_F()
669 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
671 ret = server->transact(BINDER_LIB_TEST_PROMOTE_WEAK_REF_TRANSACTION, data, &reply); in TEST_F()
672 EXPECT_GE(ret, 0); in TEST_F()
676 status_t ret; in TEST_F() local
679 ret = m_server->transact(BINDER_LIB_TEST_GET_SELF_TRANSACTION, data, &reply); in TEST_F()
680 EXPECT_EQ(NO_ERROR, ret); in TEST_F()
691 status_t ret; in TEST_F() local
701 ret = server->transact(BINDER_LIB_TEST_CREATE_BINDER_TRANSACTION, data, &reply); in TEST_F()
702 ASSERT_EQ(NO_ERROR, ret); in TEST_F()
718 ret = server->transact(BINDER_LIB_TEST_ADD_STRONG_REF_TRANSACTION, data, &reply); in TEST_F()
723 EXPECT_EQ((status_t)FAILED_TRANSACTION, ret); in TEST_F()
778 int ret; in onTransact() local
787 ret = -EBUSY; in onTransact()
793 ret = start_server_process(serverid); in onTransact()
796 if (ret > 0) { in onTransact()
801 ret = pthread_cond_timedwait(&m_serverWaitCond, &m_serverWaitMutex, &ts); in onTransact()
805 ret = -ETIMEDOUT; in onTransact()
810 ret = NO_ERROR; in onTransact()
812 } else if (ret >= 0) { in onTransact()
814 ret = UNKNOWN_ERROR; in onTransact()
817 return ret; in onTransact()
874 int ret; in onTransact() local
888 ret = target->linkToDeath(testDeathRecipient); in onTransact()
889 if (ret == NO_ERROR) in onTransact()
890 ret = testDeathRecipient->waitEvent(5); in onTransact()
891 data2.writeInt32(ret); in onTransact()
896 int ret; in onTransact() local
905 ret = data.readInt32(&size); in onTransact()
906 if (ret != NO_ERROR) { in onTransact()
907 return ret; in onTransact()
913 ret = write(fd, buf, size); in onTransact()
914 if (ret != size) in onTransact()
919 int ret; in onTransact() local
932 ret = server->transact(BINDER_LIB_TEST_NOP_TRANSACTION, data2, &reply2); in onTransact()
933 if (ret != NO_ERROR) in onTransact()
976 status_t ret; in run_server() local
981 ret = sm->addService(binderLibTestServiceName, testService); in run_server()
988 ret = server->transact(BINDER_LIB_TEST_REGISTER_SERVER, data, &reply); in run_server()
991 write(readypipefd, &ret, sizeof(ret)); in run_server()
994 if (ret) in run_server()
1004 int ret; in main() local