From f5239c7055c7f6a6c9d151085eeabe90c9446cab Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Wed, 28 Aug 2019 10:01:25 +0200 Subject: bts: add test TC_pcu_socket_verify_info_ind Verify that the CellID of SI3 (TS 04.08 9.1.35) and other values are passed properly to the PCU socket. A bug in OsmoBTS is currently causing it to send a byte-swapped CellID, related fix is in [1]. [1] I68faf4558f0686fb2a3db24077dceaae05bf0262 (osmo-bts) Related: OS#3854 Change-Id: I6516808f4b9e9a2301f9ccc1e55ded14e7334c33 --- bts/BTS_Tests.ttcn | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'bts/BTS_Tests.ttcn') diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 7f0b205e..15948a33 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -4866,6 +4866,28 @@ testcase TC_pcu_socket_disconnect_nosi3gprs() runs on test_CT { Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } +/* Verify that the cell_id of SI3 (TS 04.08 9.1.35) and other values are passed properly to the PCU socket (OS#3854) */ +testcase TC_pcu_socket_verify_info_ind() runs on test_CT { + var SystemInformation si3 := valueof(ts_SI3_default); + + f_init(); + + /* Verify cell_id */ + var uint16_t cell_id_si3 := si3.payload.si3.cell_id; + var uint16_t cell_id_pcu := g_pcu_last_info.u.info_ind.cell_id; + if (cell_id_si3 != cell_id_pcu) { + setverdict(fail, "Expected cell_id ", cell_id_si3, " got: ", cell_id_pcu); + } + + /* Verify LAC */ + var uint16_t lac_si3 := si3.payload.si3.lai.lac; + var uint16_t lac_pcu := g_pcu_last_info.u.info_ind.lac; + if (lac_si3 != lac_pcu) { + setverdict(fail, "Expected LAC ", lac_si3, " got: ", lac_pcu); + } + + setverdict(pass); +} /*********************************************************************** * Osmocom Style Dynamic Timeslot Support @@ -6253,6 +6275,7 @@ control { execute( TC_pcu_socket_noconnect_nosi3gprs() ); execute( TC_pcu_socket_connect_si3gprs() ); execute( TC_pcu_socket_disconnect_nosi3gprs() ); + execute( TC_pcu_socket_verify_info_ind() ); } else { log("PCU socket path not available, skipping PCU tests"); } -- cgit v1.2.3