[PATCH] 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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Sun Sep 25 15:40:33 UTC 2016


Review at  https://gerrit.osmocom.org/936

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(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/36/936/1

diff --git a/openbsc/tests/channel/channel_test.c b/openbsc/tests/channel/channel_test.c
index 5674607..e339bff 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: newchange
Gerrit-Change-Id: I1349d0f416806416080d4667ad697f7db1ea252d
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list