Added test for reception of duplicated packets

master
Pedro Alvarez 5 years ago committed by Andre Puschmann
parent 347e10d967
commit 900d535baa

@ -110,7 +110,7 @@ int test_rx(std::vector<pdcp_test_event_t> events,
const pdcp_initial_state& init_state, const pdcp_initial_state& init_state,
uint8_t pdcp_sn_len, uint8_t pdcp_sn_len,
uint32_t n_sdus_exp, uint32_t n_sdus_exp,
const srslte::unique_byte_buffer_t &sdu_exp, const srslte::unique_byte_buffer_t& sdu_exp,
srslte::byte_buffer_pool* pool, srslte::byte_buffer_pool* pool,
srslte::log* log) srslte::log* log)
@ -134,7 +134,7 @@ int test_rx(std::vector<pdcp_test_event_t> events,
// Decript and integrity check the PDU // Decript and integrity check the PDU
pdcp_rx->write_pdu(std::move(event.pkt)); pdcp_rx->write_pdu(std::move(event.pkt));
for (uint32_t i = 0; i < event.ticks; ++i){ for (uint32_t i = 0; i < event.ticks; ++i) {
timers_rx->step_all(); timers_rx->step_all();
} }
} }
@ -464,11 +464,11 @@ int run_all_tests(srslte::byte_buffer_pool* pool)
TESTASSERT(test_rx_all(pool, &log) == 0); TESTASSERT(test_rx_all(pool, &log) == 0);
// Helpers for generating expected PDUs // Helpers for generating expected PDUs
//srslte::unique_byte_buffer_t sdu = srslte::allocate_unique_buffer(*pool); // srslte::unique_byte_buffer_t sdu = srslte::allocate_unique_buffer(*pool);
//sdu->append_bytes(sdu2, sizeof(sdu2)); // sdu->append_bytes(sdu2, sizeof(sdu2));
//uint32_t tx_next = 1; // uint32_t tx_next = 1;
//srslte::unique_byte_buffer_t pdu = gen_expected_pdu(std::move(sdu), tx_next, srslte::PDCP_SN_LEN_18, sec_cfg, pool, &log); // srslte::unique_byte_buffer_t pdu = gen_expected_pdu(std::move(sdu), tx_next, srslte::PDCP_SN_LEN_18, sec_cfg, pool,
//print_packet_array(pdu); // &log); print_packet_array(pdu);
return 0; return 0;
} }

Loading…
Cancel
Save