local_addr/remote_addr is added

This commit is contained in:
Sukchan Lee 2017-11-21 15:28:23 +09:00
parent 7151a98f41
commit 5bf84f3b62
6 changed files with 51 additions and 13 deletions

View file

@ -60,7 +60,6 @@ static void sock_test2(abts_case *tc, void *data)
{
status_t rv;
sock_id tcp, tcp2;
c_sockaddr_t sa;
ssize_t size;
rv = tcp_server(&tcp, AF_INET6, NULL, PORT);
@ -69,7 +68,7 @@ static void sock_test2(abts_case *tc, void *data)
rv = thread_create(&test2_thread, NULL, test2_main, tc);
ABTS_INT_EQUAL(tc, CORE_OK, rv);
rv = sock_accept(&tcp2, &sa, tcp);
rv = sock_accept(&tcp2, tcp);
ABTS_INT_EQUAL(tc, CORE_OK, rv);
size = core_send(tcp2, DATASTR, strlen(DATASTR), 0);
@ -293,13 +292,17 @@ abts_suite *testsock(abts_suite *suite)
{
suite = ADD_SUITE(suite)
#if 0
abts_run_test(suite, sock_test1, NULL);
#endif
abts_run_test(suite, sock_test2, NULL);
#if 0
abts_run_test(suite, sock_test3, NULL);
abts_run_test(suite, sock_test4, NULL);
abts_run_test(suite, sock_test5, NULL);
abts_run_test(suite, sock_test6, NULL);
abts_run_test(suite, sock_test7, NULL);
#endif
return suite;
}