mirror of https://github.com/PentHertz/srsLTE.git
lib,rlc_am_nr: fix checking some statistics in unit test
This commit is contained in:
parent
832d650574
commit
3b9ad84bda
|
@ -750,7 +750,7 @@ int retx_segment_test()
|
|||
}
|
||||
TESTASSERT(0 == rlc1.get_buffer_state());
|
||||
}
|
||||
/*
|
||||
|
||||
// Check statistics
|
||||
rlc_bearer_metrics_t metrics1 = rlc1.get_metrics();
|
||||
rlc_bearer_metrics_t metrics2 = rlc2.get_metrics();
|
||||
|
@ -761,17 +761,20 @@ int retx_segment_test()
|
|||
TESTASSERT_EQ(15, metrics1.num_tx_sdu_bytes);
|
||||
TESTASSERT_EQ(0, metrics1.num_rx_sdu_bytes);
|
||||
TESTASSERT_EQ(0, metrics1.num_lost_sdus);
|
||||
|
||||
// PDU metrics
|
||||
TESTASSERT_EQ(5 + 3, metrics1.num_tx_pdus); // 3 re-transmissions
|
||||
TESTASSERT_EQ(15 + 3, metrics1.num_tx_pdus); // 15 PDUs + 3 re-transmissions
|
||||
TESTASSERT_EQ(2, metrics1.num_rx_pdus); // Two status PDU
|
||||
TESTASSERT_EQ(38, metrics1.num_tx_pdu_bytes); // 2 Bytes * NBUFFS (header size) + NBUFFS * 3 (data) +
|
||||
// 3 (1 retx no SO) + 2 * 5 (2 retx with SO) = 38
|
||||
TESTASSERT_EQ(3 + 5, metrics1.num_rx_pdu_bytes); // Two status PDU (one with a NACK)
|
||||
TESTASSERT_EQ(78, metrics1.num_tx_pdu_bytes); // 3 Bytes * 5 (5 PDUs without SO) + 10 * 5 (10 PDUs with SO)
|
||||
// 3 (1 retx no SO) + 2 * 5 (2 retx with SO) = 78
|
||||
TESTASSERT_EQ(24, metrics1.num_rx_pdu_bytes); // Two status PDU. One with just an ack (3 bytes)
|
||||
// Another with 3 NACKs all with SO. (3 + 3*6 bytes)
|
||||
TESTASSERT_EQ(0, metrics1.num_lost_sdus); // No lost SDUs
|
||||
|
||||
// PDU metrics
|
||||
TESTASSERT_EQ(0, metrics2.num_tx_sdus);
|
||||
TESTASSERT_EQ(5, metrics2.num_rx_sdus);
|
||||
/*
|
||||
TESTASSERT_EQ(0, metrics2.num_tx_sdu_bytes);
|
||||
TESTASSERT_EQ(15, metrics2.num_rx_sdu_bytes); // 5 SDUs, 3 bytes each
|
||||
TESTASSERT_EQ(0, metrics2.num_lost_sdus);
|
||||
|
|
Loading…
Reference in New Issue