adapt AM test to new MAC timer

This commit is contained in:
Andre Puschmann 2018-08-10 15:50:08 +02:00
parent 860d8af911
commit 6c4aaa6e10
2 changed files with 25 additions and 7 deletions

View File

@ -867,7 +867,6 @@ bool resegment_test_3()
bool resegment_test_4()
{
// SDUs: | 10 | 10 | 10 | 10 | 10 |
// PDUs: | 5 | 5| 30 | 5 | 5|
// Retx PDU segments: | 15 | 15 |
@ -980,7 +979,6 @@ bool resegment_test_4()
bool resegment_test_5()
{
// SDUs: | 10 | 10 | 10 | 10 | 10 |
// PDUs: |2|3| 40 |3|2|
// Retx PDU segments: | 20 | 20 |
@ -1373,6 +1371,18 @@ bool resegment_test_7()
timers.step_all();
}
// Read status PDU from RLC2
assert(rlc2.get_buffer_state());
status_buf.N_bytes = rlc2.read_pdu(status_buf.msg, 10); // 10 bytes is enough to hold the status
// Write status PDU to RLC1
rlc1.write_pdu(status_buf.msg, status_buf.N_bytes);
#if HAVE_PCAP
pcap.write_ul_am_ccch(status_buf.msg, status_buf.N_bytes);
#endif
// check status again
assert(0 == rlc1.get_buffer_state());
assert(0 == rlc2.get_buffer_state());
// Check number of SDUs and their content
@ -1441,11 +1451,11 @@ bool resegment_test_8()
cnfg.ul_am_rlc.t_poll_retx = LIBLTE_RRC_T_POLL_RETRANSMIT_MS5;
if (not rlc1.configure(&cnfg)) {
exit(-1);
return -1;
}
if (not rlc2.configure(&cnfg)) {
exit(-1);
return -1;
}
// Push 2 SDUs into RLC1

View File

@ -122,7 +122,7 @@ public:
,lcid(lcid_)
,log("MAC ")
{
log.set_level(srslte::LOG_LEVEL_ERROR);
log.set_level(srslte::LOG_LEVEL_WARNING);
log.set_hex_limit(LOG_HEX_LIMIT);
}
@ -170,7 +170,7 @@ private:
pcap->write_ul_am_ccch(pdu->msg, pdu->N_bytes);
}
} else {
log.info_hex(pdu->msg, pdu->N_bytes, "Dropping RLC PDU (%d B)\n", pdu->N_bytes);
log.warning_hex(pdu->msg, pdu->N_bytes, "Dropping RLC PDU (%d B)\n", pdu->N_bytes);
}
}
byte_buffer_pool::get_instance()->deallocate(pdu);
@ -355,12 +355,20 @@ void stress_test(stress_test_args_t args)
usleep(1e6);
}
printf("Test finished, tearing down ..\n");
// Stop RLC instances first to release blocking writers
rlc1.stop();
rlc2.stop();
printf("RLC entities stopped.\n");
// Stop upper layer writers
tester1.stop();
tester2.stop();
printf("Writers stopped.\n");
mac.stop();
if (args.write_pcap) {
pcap.close();
@ -387,7 +395,7 @@ void stress_test(stress_test_args_t args)
int main(int argc, char **argv) {
stress_test_args_t args;
stress_test_args_t args = {};
parse_args(&args, argc, argv);
if (args.zero_seed) {