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
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 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 @@
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;
}