Commit 1e4fbecb authored by Cedric Roux's avatar Cedric Roux

save commit

parent 56005c78
......@@ -233,7 +233,7 @@ static void rlc_am_reception_actions(rlc_entity_am_t *entity,
/* the list was empty, we need to init decoder */
entity->reassemble.sn = -1;
if (!rlc_am_reassemble_next_segment(&entity->reassemble)) {
/* TODO: proper error recovery (or remove the test, it should not happen */
/* TODO: proper error recovery (or remove the test, it should not happen) */
printf("%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
exit(1);
}
......
#!/bin/sh
test_count=43
test_count=45
for i in `seq $test_count`
do
......
......@@ -71,6 +71,9 @@
*
* UE_DISCARD_SDU <sdu ID>
* discards given SDU
*
* RE_ESTABLISH
* re-establish both eNB and UE
*/
enum action {
......@@ -81,7 +84,8 @@ enum action {
ENB_RECV_FAILS, UE_RECV_FAILS,
MUST_FAIL,
ENB_BUFFER_STATUS, UE_BUFFER_STATUS,
ENB_DISCARD_SDU, UE_DISCARD_SDU
ENB_DISCARD_SDU, UE_DISCARD_SDU,
RE_ESTABLISH
};
int test[] = {
......@@ -304,13 +308,21 @@ int test_main(void)
pos++;
break;
case ENB_DISCARD_SDU:
printf("TEST: ENB: %d: discard SDU %d\n", i, test[pos+1]);
enb->discard_sdu(enb, test[pos+1]);
pos += 2;
break;
case UE_DISCARD_SDU:
printf("TEST: UE: %d: discard SDU %d\n", i, test[pos+1]);
ue->discard_sdu(ue, test[pos+1]);
pos += 2;
break;
case RE_ESTABLISH:
printf("TEST: %d: re-establish eNB and UE\n", i);
enb->reestablishment(enb);
ue->reestablishment(ue);
pos++;
break;
}
}
......
/*
* am: test function rlc_entity_am_reestablishment
*/
TIME, 1,
ENB_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
UE_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
RE_ESTABLISH,
TIME, 2,
ENB_SDU, 0, 10,
RE_ESTABLISH,
TIME, 3,
ENB_SDU, 0, 40,
ENB_PDU_SIZE, 14,
UE_RECV_FAILS, 1,
TIME, 4,
UE_RECV_FAILS, 0,
TIME, 10,
RE_ESTABLISH,
TIME, -1
/*
* um: test function rlc_entity_am_reestablishment
* and also the function clear_entity, case 'while (cur_rx != NULL)'
*/
TIME, 1,
ENB_UM, 100000, 100000, 35, 5,
UE_UM, 100000, 100000, 35, 5,
RE_ESTABLISH,
TIME, 2,
ENB_SDU, 0, 10,
RE_ESTABLISH,
TIME, 3,
ENB_SDU, 0, 10,
ENB_SDU, 0, 10,
ENB_SDU, 0, 10,
ENB_SDU, 0, 10,
ENB_PDU_SIZE, 14,
TIME, 5,
UE_RECV_FAILS, 1,
TIME, 6,
UE_RECV_FAILS, 0,
TIME, 10,
RE_ESTABLISH,
TIME, 998,
ENB_SDU, 0, 10,
ENB_SDU, 0, 10,
UE_RECV_FAILS, 1,
TIME, 999,
UE_RECV_FAILS, 0,
TIME, -1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment