diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index 999ece01d..8a1a4256c 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -1861,6 +1861,39 @@ testcase TC_egprs_pkt_chan_req_reject_emergency() runs on RAW_PCU_Test_CT { f_shutdown(__BFILE__, __LINE__, final := true); } +/* Make sure that IUT responds with RR Immediate Assignment Reject due to exhaustion. */ +testcase TC_egprs_pkt_chan_req_reject_exhaustion() runs on RAW_PCU_Test_CT { + var template IARRestOctets rest; + var BIT11 ra11; + + /* Initialize the PCU interface abstraction */ + f_init_raw(testcasename()); + + var EGPRSPktChRequest req := { + one_phase := { + tag := '0'B, + multislot_class := '10101'B, + priority := '01'B, + random_bits := '101'B + } + }; + + /* We send 7 requests, the IUT gives us all available USFs (0..6). + * TODO: make it configurable: usf_max := mp_pdch_ts_num * 7. */ + for (var integer i := 0; i < 7; i := i + 1) { + req.one_phase.random_bits := int2bit(f_rnd_int(8), 3); + f_TC_egprs_pkt_chan_req(req, tr_IMM_TBF_ASS); + } + + ra11 := enc_EGPRSPktChRequest2bits(req); + rest := tr_IARRestOctets({ *, tr_ExtRAOpt(substr(ra11, 6, 5)), * }); + + /* At this point, the IUT should run out of free USFs */ + f_TC_egprs_pkt_chan_req_reject(ra11, 1870, rest); + + f_shutdown(__BFILE__, __LINE__, final := true); +} + control { execute( TC_pcuif_suspend() ); execute( TC_ta_ptcch_idle() ); @@ -1895,6 +1928,7 @@ control { execute( TC_egprs_pkt_chan_req_two_phase() ); execute( TC_egprs_pkt_chan_req_reject_content() ); execute( TC_egprs_pkt_chan_req_reject_emergency() ); + execute( TC_egprs_pkt_chan_req_reject_exhaustion() ); execute( TC_mo_ping_pong_with_ul_racap_egprs_only() ); }