Changeset e1b4ae0 in mainline for uspace/srv/net/tcp/test
- Timestamp:
- 2017-09-11T07:05:21Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9713b0b
- Parents:
- 975d528
- Location:
- uspace/srv/net/tcp/test
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tcp/test/iqueue.c
r975d528 re1b4ae0 56 56 tcp_iqueue_init(&iqueue, conn); 57 57 rc = tcp_iqueue_get_ready_seg(&iqueue, &rseg); 58 PCUT_ASSERT_ INT_EQUALS(ENOENT, rc);58 PCUT_ASSERT_ERRNO_VAL(ENOENT, rc); 59 59 60 60 tcp_conn_delete(conn); … … 89 89 tcp_iqueue_init(&iqueue, conn); 90 90 rc = tcp_iqueue_get_ready_seg(&iqueue, &rseg); 91 PCUT_ASSERT_ INT_EQUALS(ENOENT, rc);91 PCUT_ASSERT_ERRNO_VAL(ENOENT, rc); 92 92 93 93 seg->seq = 10; 94 94 tcp_iqueue_insert_seg(&iqueue, seg); 95 95 rc = tcp_iqueue_get_ready_seg(&iqueue, &rseg); 96 PCUT_ASSERT_ INT_EQUALS(EOK, rc);96 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 97 97 98 98 seg->seq = 15; 99 99 tcp_iqueue_insert_seg(&iqueue, seg); 100 100 rc = tcp_iqueue_get_ready_seg(&iqueue, &rseg); 101 PCUT_ASSERT_ INT_EQUALS(ENOENT, rc);101 PCUT_ASSERT_ERRNO_VAL(ENOENT, rc); 102 102 tcp_iqueue_remove_seg(&iqueue, seg); 103 103 … … 137 137 tcp_iqueue_init(&iqueue, conn); 138 138 rc = tcp_iqueue_get_ready_seg(&iqueue, &rseg); 139 PCUT_ASSERT_ INT_EQUALS(ENOENT, rc);139 PCUT_ASSERT_ERRNO_VAL(ENOENT, rc); 140 140 141 141 /* Test reception in ascending order */ … … 146 146 147 147 rc = tcp_iqueue_get_ready_seg(&iqueue, &rseg); 148 PCUT_ASSERT_ INT_EQUALS(EOK, rc);148 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 149 149 PCUT_ASSERT_TRUE(rseg == seg1); 150 150 151 151 rc = tcp_iqueue_get_ready_seg(&iqueue, &rseg); 152 PCUT_ASSERT_ INT_EQUALS(EOK, rc);152 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 153 153 PCUT_ASSERT_TRUE(rseg == seg2); 154 154 … … 160 160 161 161 rc = tcp_iqueue_get_ready_seg(&iqueue, &rseg); 162 PCUT_ASSERT_ INT_EQUALS(EOK, rc);163 PCUT_ASSERT_ TRUE(rseg == seg2);162 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 163 PCUT_ASSERT_EQUALS(seg2, rseg); 164 164 165 165 rc = tcp_iqueue_get_ready_seg(&iqueue, &rseg); 166 PCUT_ASSERT_ INT_EQUALS(EOK, rc);167 PCUT_ASSERT_ TRUE(rseg == seg1);166 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 167 PCUT_ASSERT_EQUALS(seg1, rseg); 168 168 169 169 rc = tcp_iqueue_get_ready_seg(&iqueue, &rseg); 170 PCUT_ASSERT_ INT_EQUALS(ENOENT, rc);170 PCUT_ASSERT_ERRNO_VAL(ENOENT, rc); 171 171 172 172 tcp_segment_delete(seg1); -
uspace/srv/net/tcp/test/main.c
r975d528 re1b4ae0 57 57 PCUT_INIT 58 58 59 PCUT_IMPORT(conn); 59 60 PCUT_IMPORT(iqueue); 60 61 PCUT_IMPORT(pdu); -
uspace/srv/net/tcp/test/pdu.c
r975d528 re1b4ae0 62 62 63 63 rc = tcp_pdu_encode(&epp, seg, &pdu); 64 PCUT_ASSERT_ INT_EQUALS(EOK, rc);64 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 65 65 rc = tcp_pdu_decode(pdu, &depp, &dseg); 66 PCUT_ASSERT_ INT_EQUALS(EOK, rc);66 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 67 67 68 68 test_seg_same(seg, dseg); … … 100 100 101 101 rc = tcp_pdu_encode(&epp, seg, &pdu); 102 PCUT_ASSERT_ INT_EQUALS(EOK, rc);102 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 103 103 rc = tcp_pdu_decode(pdu, &depp, &dseg); 104 PCUT_ASSERT_ INT_EQUALS(EOK, rc);104 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 105 105 106 106 test_seg_same(seg, dseg); -
uspace/srv/net/tcp/test/tqueue.c
r975d528 re1b4ae0 57 57 /* We will be calling functions that perform logging */ 58 58 rc = log_init("test-tcp"); 59 PCUT_ASSERT_INT_EQUALS(EOK, rc); 60 } 59 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 60 61 rc = tcp_conns_init(); 62 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 63 } 64 65 PCUT_TEST_AFTER 66 { 67 tcp_conns_fini(); 68 } 69 61 70 62 71 /** Test */ … … 75 84 seg_cnt = 0; 76 85 86 tcp_conn_lock(conn); 87 tcp_conn_reset(conn); 88 tcp_conn_unlock(conn); 77 89 tcp_conn_delete(conn); 78 90 PCUT_ASSERT_EQUALS(0, seg_cnt);
Note:
See TracChangeset
for help on using the changeset viewer.