SI2quater: fix EARFCN inclusion check

Previously only the existance of bts->si_common.si2quater_neigh_list was
checked but not the actual number of EARFCNs in it. Fix it by using
si2q_earfcn_count() and adjust tests accordingly. While at it - reformat
tests to include extra information.

The correctness was checked manually by inspecting GSMTAP output.

Change-Id: Ic4fb2a9e870db66cac58b1e8d113587b30d64ce2
Related: RT#8792
diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c
index 0496506..644bebd 100644
--- a/openbsc/src/libbsc/system_information.c
+++ b/openbsc/src/libbsc/system_information.c
@@ -692,6 +692,10 @@
 size_t si2q_earfcn_count(const struct osmo_earfcn_si2q *e)
 {
 	unsigned i, ret = 0;
+
+	if (!e)
+		return 0;
+
 	for (i = 0; i < e->length; i++)
 		if (e->arfcn[i] != OSMO_EARFCN_INVALID)
 			ret++;
@@ -777,7 +781,8 @@
 		si_info.si2ter_indicator = 0;
 	}
 	if ((bts->si_valid & (1 << SYSINFO_TYPE_2quater))) {
-		LOGP(DRR, LOGL_INFO, "SI 2quater is included.\n");
+		LOGP(DRR, LOGL_INFO, "SI 2quater is included, based on %zu EARFCNs and %zu UARFCNs.\n",
+		     si2q_earfcn_count(&bts->si_common.si2quater_neigh_list), bts->si_common.uarfcn_length);
 		si_info.si2quater_indicator = 1;
 	} else {
 		si_info.si2quater_indicator = 0;