summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-25 15:47:36 +0200
committerHarald Welte <laforge@gnumonks.org>2016-09-28 00:28:01 +0000
commit8d878e8a283a3bfa59d4a0fc39baec406c86cc1e (patch)
tree01ce6567e8c73632cf717edf517ac92f24784f9e
parent57e8a1fee0316ca97b8fea83c3a5af94056c15fd (diff)
channel test: prepare to add another test function
Move the main() guts to test_request_chan(), so that I can add another test in an upcoming commit. Change-Id: I1349d0f416806416080d4667ad697f7db1ea252d
-rw-r--r--openbsc/tests/channel/channel_test.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/openbsc/tests/channel/channel_test.c b/openbsc/tests/channel/channel_test.c
index 924d763..2012832 100644
--- a/openbsc/tests/channel/channel_test.c
+++ b/openbsc/tests/channel/channel_test.c
@@ -58,13 +58,11 @@ int paging_request(struct gsm_bts *bts, struct gsm_subscriber *subscriber, int t
}
-int main(int argc, char **argv)
+void test_request_chan(void)
{
struct gsm_network *network;
struct gsm_bts *bts;
- osmo_init_logging(&log_info);
-
printf("Testing the gsm_subscriber chan logic\n");
/* Create a dummy network */
@@ -90,6 +88,13 @@ int main(int argc, char **argv)
s_cbfn(101, 200, (void*)0x1323L, &s_conn, s_data);
OSMO_ASSERT(s_end);
+}
+
+int main(int argc, char **argv)
+{
+ osmo_init_logging(&log_info);
+
+ test_request_chan();
return EXIT_SUCCESS;
}