[PATCH 5/5] This is a hack to fix channel_test.c compilation.

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Alexander Chemeris alexander.chemeris at gmail.com
Tue Oct 8 01:17:33 UTC 2013


The test fails, though, because we have removed a mock up version of paging_request().
I'm not sure how to properly fix the test, as the way it used to work is a pure hack.
---
 openbsc/tests/channel/Makefile.am    |    4 +++-
 openbsc/tests/channel/channel_test.c |   12 ------------
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/openbsc/tests/channel/Makefile.am b/openbsc/tests/channel/Makefile.am
index 89f015a..a626ccf 100644
--- a/openbsc/tests/channel/Makefile.am
+++ b/openbsc/tests/channel/Makefile.am
@@ -8,5 +8,7 @@ noinst_PROGRAMS = channel_test
 channel_test_SOURCES = channel_test.c
 channel_test_LDADD = -ldl $(LIBOSMOCORE_LIBS) \
 	$(top_builddir)/src/libcommon/libcommon.a \
+	$(top_builddir)/src/libmsc/libmsc.a \
+	$(top_builddir)/src/libtrau/libtrau.a \
 	$(top_builddir)/src/libbsc/libbsc.a \
-	$(top_builddir)/src/libmsc/libmsc.a -ldbi $(LIBOSMOGSM_LIBS)
+	-ldbi $(LIBOSMOGSM_LIBS) $(LIBOSMOABIS_LIBS)
diff --git a/openbsc/tests/channel/channel_test.c b/openbsc/tests/channel/channel_test.c
index ab0d9eb..0d50b08 100644
--- a/openbsc/tests/channel/channel_test.c
+++ b/openbsc/tests/channel/channel_test.c
@@ -45,12 +45,6 @@ static int subscr_cb(unsigned int hook, unsigned int event, struct msgb *msg, vo
 	return 0;
 }
 
-/* mock object for testing, directly invoke the cb... maybe later through the timer */
-void paging_request(struct gsm_bts *bts, struct gsm_subscriber *subscriber, int type, gsm_cbfn *cbfn, void *data)
-{
-	cbfn(101, 200, (void*)0x1323L, &s_conn, data);
-}
-
 
 int main(int argc, char **argv)
 {
@@ -83,13 +77,7 @@ int main(int argc, char **argv)
 	return EXIT_SUCCESS;
 }
 
-void _abis_nm_sendmsg() {}
-void sms_alloc() {}
-void gsm_net_update_ctype(struct gsm_network *network) {}
-void gsm48_secure_channel() {}
-void paging_request_stop() {}
 void vty_out() {}
-void* connection_for_subscr(void) { abort(); return NULL; }
 
 
 struct tlv_definition nm_att_tlvdef;
-- 
1.7.9.5





More information about the OpenBSC mailing list