[MERGED] openbsc[master]: channel test: prepare to add another test function

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/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Sep 28 00:28:03 UTC 2016


Harald Welte has submitted this change and it was merged.

Change subject: channel test: prepare to add another test function
......................................................................


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
---
M openbsc/tests/channel/channel_test.c
1 file changed, 8 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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,12 +58,10 @@
 }
 
 
-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");
 
@@ -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;
 }

-- 
To view, visit https://gerrit.osmocom.org/936
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1349d0f416806416080d4667ad697f7db1ea252d
Gerrit-PatchSet: 4
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list