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
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 7f0b205..15948a3 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -4866,6 +4866,28 @@
 	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 @@
 		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");
 	}