|
|
|
@ -410,10 +410,18 @@ int lost_pdu_test(rlc_am_nr_sn_size_t sn_size)
|
|
|
|
|
retx_buf.N_bytes = len;
|
|
|
|
|
TESTASSERT_EQ(data_pdu_size, len);
|
|
|
|
|
|
|
|
|
|
// Polling bit on the RETX should be required, as the buffers are not empty.
|
|
|
|
|
rlc2.write_pdu(retx_buf.msg, retx_buf.N_bytes);
|
|
|
|
|
|
|
|
|
|
TESTASSERT_EQ(3, rlc2.get_buffer_state()); // Status report shoud be required, as the TX buffers are now empty.
|
|
|
|
|
TESTASSERT_EQ(0, rlc2.get_buffer_state()); // t-StatusProhibit is still running
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Step timers until t-StatusProhibit expires
|
|
|
|
|
for (int cnt = 0; cnt < 8; cnt++) {
|
|
|
|
|
timers.step_all();
|
|
|
|
|
}
|
|
|
|
|
TESTASSERT_EQ(3, rlc2.get_buffer_state()); // t-StatusProhibit no longer running
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
// Double check status report
|
|
|
|
|
byte_buffer_t status_buf;
|
|
|
|
@ -588,8 +596,15 @@ int lost_pdu_duplicated_nack_test(rlc_am_nr_sn_size_t sn_size)
|
|
|
|
|
|
|
|
|
|
rlc2.write_pdu(retx_buf.msg, retx_buf.N_bytes);
|
|
|
|
|
|
|
|
|
|
TESTASSERT_EQ(3, rlc2.get_buffer_state()); // Status report shoud be required, as the TX buffers are now empty.
|
|
|
|
|
TESTASSERT_EQ(0, rlc2.get_buffer_state()); // Status report shoud be required, as the TX buffers are now empty.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Step timers until t-StatusProhibit expires
|
|
|
|
|
for (int cnt = 0; cnt < 8; cnt++) {
|
|
|
|
|
timers.step_all();
|
|
|
|
|
}
|
|
|
|
|
TESTASSERT_EQ(3, rlc2.get_buffer_state()); // t-StatusProhibit no longer running
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
// Double check status report
|
|
|
|
|
byte_buffer_t status_buf;
|
|
|
|
@ -765,8 +780,15 @@ int lost_pdus_trimmed_nack_test(rlc_am_nr_sn_size_t sn_size)
|
|
|
|
|
rlc2.write_pdu(retx_buf.msg, retx_buf.N_bytes);
|
|
|
|
|
|
|
|
|
|
expected_size = status_pdu_ack_size + 1 * status_pdu_nack_size;
|
|
|
|
|
TESTASSERT_EQ(expected_size, rlc2.get_buffer_state()); // Status report should now include the chopped NACK
|
|
|
|
|
TESTASSERT_EQ(0, rlc2.get_buffer_state()); // Status report should now include the chopped NACK
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Step timers until t-StatusProhibit expires
|
|
|
|
|
for (int cnt = 0; cnt < 8; cnt++) {
|
|
|
|
|
timers.step_all();
|
|
|
|
|
}
|
|
|
|
|
TESTASSERT_EQ(expected_size, rlc2.get_buffer_state()); // t-StatusProhibit no longer running
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
// Double check status report
|
|
|
|
|
byte_buffer_t status_buf;
|
|
|
|
@ -801,8 +823,13 @@ int lost_pdus_trimmed_nack_test(rlc_am_nr_sn_size_t sn_size)
|
|
|
|
|
rlc2.write_pdu(retx_buf.msg, retx_buf.N_bytes);
|
|
|
|
|
|
|
|
|
|
expected_size = status_pdu_ack_size;
|
|
|
|
|
TESTASSERT_EQ(expected_size, rlc2.get_buffer_state()); // Status report should have no NACKs
|
|
|
|
|
TESTASSERT_EQ(0, rlc2.get_buffer_state()); // Status report should have no NACKs
|
|
|
|
|
}
|
|
|
|
|
// Step timers until t-StatusProhibit expires
|
|
|
|
|
for (int cnt = 0; cnt < 8; cnt++) {
|
|
|
|
|
timers.step_all();
|
|
|
|
|
}
|
|
|
|
|
TESTASSERT_EQ(expected_size, rlc2.get_buffer_state()); // t-StatusProhibit no longer running
|
|
|
|
|
{
|
|
|
|
|
// Double check status report
|
|
|
|
|
byte_buffer_t status_buf;
|
|
|
|
|