osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34542?usp=email )
Change subject: bsc: add test TC_ncc_permitted_si2 ......................................................................
bsc: add test TC_ncc_permitted_si2
Related: SYS#6579 Change-Id: Ibff5c4392d8c19b5bce479b6fa5e33086cdb1272 --- M bsc/BSC_Tests.ttcn 1 file changed, 62 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/42/34542/1
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 7773153..0fe9d63 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -12396,6 +12396,56 @@ f_shutdown_helper(ho := true); }
+/* Verify NCC Permitted in System Information Type 2 + * 3GPP TS 44.018 § 10.5.2.27 */ +testcase TC_ncc_permitted_si2() runs on test_CT { + var ASP_RSL_Unitdata rx_rsl_ud; + timer T := 5.0; + var BIT8 exp; + + f_init_vty(); + + /* Set NCC Permitted to 6 7 8 */ + f_vty_enter_cfg_bts(BSCVTY, 0); + f_vty_transceive(BSCVTY, "ncc-permitted 6 7 8"); + f_vty_transceive(BSCVTY, "end"); + exp := '11100000'B; + + f_init(1); + T.start; + + /* Check value in SI 2 */ + alt { + [] IPA_RSL[0][0].receive(tr_ASP_RSL_UD(tr_RSL_BCCH_INFO(RSL_SYSTEM_INFO_2))) -> value rx_rsl_ud { + var RSL_IE_Body ie := rx_rsl_ud.rsl.ies[2].body; /* FULL BCCH Information IE */ + var SystemInformation si := dec_SystemInformation(ie.other.payload); + + if (si.header.message_type != SYSTEM_INFORMATION_TYPE_2) { + setverdict(fail, "RSL FULL BCCH Information IE contains: ", si); + repeat; + } + + if (si.payload.si2.ncc_permitted != exp) { + setverdict(fail, "NCC Permitted is ", si.payload.si2.ncc_permitted, " but expected ", exp); + break; + } + + } + [] IPA_RSL[0][0].receive { repeat; } + [] T.timeout { + setverdict(fail, "Timeout waiting for RSL BCCH INFOrmation (SI2)"); + } + } + + /* Reset NCC Permitted to default (all permitted). This is already + * getting tested in TC_si_default(). */ + f_vty_enter_cfg_bts(BSCVTY, 0); + f_vty_transceive(BSCVTY, "no ncc-permitted"); + f_vty_transceive(BSCVTY, "end"); + + f_shutdown_helper(); +} + control { /* CTRL interface testing */ execute( TC_ctrl_msc_connection_status() ); @@ -12745,6 +12795,8 @@
execute( TC_ho_meas_rep_multi_band() );
+ execute( TC_ncc_permitted_si2() ); + /* Run TC_ho_out_of_this_bsc last, because it may trigger a segfault before osmo-bsc's patch * with change-id I5a3345ab0005a73597f5c27207480912a2f5aae6 */ execute( TC_ho_out_of_this_bsc() );