pespin has uploaded this change for review.

View Change

bsc: Fix regression in TC_assignment_emerg_setup_deny_bts

A recent commit introduced a regression which made
TC_assignment_emerg_setup_deny_bts fail.

The problematic commit (see hash below) set "pars.ra :=
f_rnd_ra_emerg()" in the helper function, which made the BSC early
reject the CHAN RQD with ImmAssRej in the case the BTS policy forbids
emergency calls.
In that scenario, rejection can be done early because there's no need to
wait to find out which MSC it is aimed at.
This scenario, however, is already being validated by test TC_chan_rqd_emerg_deny.

The scenario TC_assignment_emerg_setup_deny_bts was testing is actually
one where CHAN RQD doesn't contain reason="emergency call", which means
BTS doesn't early reject it, but only knows about it being an emergency
call when a CC Emergency Setup is sent to it, time at which it releases
the call.

Hence, this commit sets back pars.ra = f_rnd_ra_emerg() only on the ..._deny_msc
testcase, since it's the only test really needing it.

Fixes: 14076d3b721030c5f0610403cbc7e75a6eed5351
Related: OS#5849
Change-Id: I8d342e5938f6293ae45ee399796417651768af5d
---
M bsc/BSC_Tests.ttcn
1 file changed, 9 insertions(+), 5 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/97/30997/1
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index a9d7c9d..0325c42 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -9249,10 +9249,6 @@
var PDU_BSSAP emerg_setup_data_ind_bssap;
timer T := 3.0;

- /* Make sure the CHAN RQD indicates an emergency call (0b101xxxxx). The difference is that osmo-bsc directly
- * assigns a TCH lchan and establishing voice for the emergency call will use Mode Modify, not reassignment to
- * another lchan. */
- g_pars.ra := f_rnd_ra_emerg();
f_assignment_emerg_setup();

T.start;
@@ -9316,12 +9312,19 @@

f_vty_allow_emerg_msc(false);
f_vty_allow_emerg_bts(true, 0);
+ /* Make sure the CHAN RQD indicates an emergency call (0b101xxxxx): */
+ pars.ra := f_rnd_ra_emerg();
vc_conn := f_start_handler(refers(f_TC_assignment_emerg_setup_deny), pars);
vc_conn.done;
f_shutdown_helper();
}

-/* EMERGENCY CALL situation #3, allowed globally but forbidden by BTS */
+/* EMERGENCY CALL situation #3, allowed globally but forbidden by BTS.
+ * The RACH req (and hence CHAN RQD) indicate other than emergency call.
+ * Hence BSC only learns about it being an emergency call later during call setup.
+ * If interested in the ra="emergency call" + deny bts policy case,
+ * see TC_chan_rqd_emerg_deny.
+ */
testcase TC_assignment_emerg_setup_deny_bts() runs on test_CT {
var TestHdlrParams pars := f_gen_test_hdlr_pars();
var MSC_ConnHdlr vc_conn;
@@ -9336,6 +9339,7 @@

f_vty_allow_emerg_msc(true);
f_vty_allow_emerg_bts(false, 0);
+ /* Note: Here we implicitly leave default g_pars.ra which is differnet than "emergency call" */
vc_conn := f_start_handler(refers(f_TC_assignment_emerg_setup_deny), pars);
vc_conn.done;
f_shutdown_helper();

To view, visit change 30997. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I8d342e5938f6293ae45ee399796417651768af5d
Gerrit-Change-Number: 30997
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-MessageType: newchange