[PATCH] osmo-msc[master]: msc_vlr_tests: make all test functions static

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
Fri Mar 2 00:09:37 UTC 2018


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

msc_vlr_tests: make all test functions static

All functions in the individual msc_vlr_test_*.c files should be static; hence
we would be warned if one of them were unused (forgotten to add to the tests
array).

Change-Id: Ia169c6a1443a48879ab4777e09c2040c48810bf6
---
M tests/msc_vlr/msc_vlr_test_authen_reuse.c
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_hlr_reject.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_umts_authen.c
11 files changed, 71 insertions(+), 71 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/54/7054/1

diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.c b/tests/msc_vlr/msc_vlr_test_authen_reuse.c
index 103c904..e78ab06 100644
--- a/tests/msc_vlr/msc_vlr_test_authen_reuse.c
+++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.c
@@ -38,10 +38,10 @@
 		break; \
 	}
 
-void _test_auth_reuse(enum ran_type via_ran,
-		      int set_max_reuse_count,
-		      int loop_requests_without_hlr,
-		      bool final_request_with_hlr)
+static void _test_auth_reuse(enum ran_type via_ran,
+			     int set_max_reuse_count,
+			     int loop_requests_without_hlr,
+			     bool final_request_with_hlr)
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000010650";
@@ -284,42 +284,42 @@
 	clear_vlr();
 }
 
-void test_auth_use_twice_geran()
+static void test_auth_use_twice_geran()
 {
 	comment_start();
 	_test_auth_reuse(RAN_GERAN_A, 1, 1, true);
 	comment_end();
 }
 
-void test_auth_use_twice_utran()
+static void test_auth_use_twice_utran()
 {
 	comment_start();
 	_test_auth_reuse(RAN_UTRAN_IU, 1, 1, true);
 	comment_end();
 }
 
-void test_auth_use_infinitely_geran()
+static void test_auth_use_infinitely_geran()
 {
 	comment_start();
 	_test_auth_reuse(RAN_GERAN_A, -1, 3, false);
 	comment_end();
 }
 
-void test_auth_use_infinitely_utran()
+static void test_auth_use_infinitely_utran()
 {
 	comment_start();
 	_test_auth_reuse(RAN_UTRAN_IU, -1, 3, false);
 	comment_end();
 }
 
-void test_no_auth_reuse_geran()
+static void test_no_auth_reuse_geran()
 {
 	comment_start();
 	_test_auth_reuse(RAN_GERAN_A, 0, 0, true);
 	comment_end();
 }
 
-void test_no_auth_reuse_utran()
+static void test_no_auth_reuse_utran()
 {
 	comment_start();
 	_test_auth_reuse(RAN_UTRAN_IU, 0, 0, true);
diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c
index cc120c8..28540b1 100644
--- a/tests/msc_vlr/msc_vlr_test_call.c
+++ b/tests/msc_vlr/msc_vlr_test_call.c
@@ -25,7 +25,7 @@
 
 #include <osmocom/msc/gsm_04_08.h>
 
-void mncc_sends_to_cc(uint32_t msg_type, struct gsm_mncc *mncc)
+static void mncc_sends_to_cc(uint32_t msg_type, struct gsm_mncc *mncc)
 {
 	mncc->msg_type = msg_type;
 	mncc_tx_to_cc(net, msg_type, mncc);
@@ -151,7 +151,7 @@
 	vlr_subscr_put(vsub);
 }
 
-void test_call_mo()
+static void test_call_mo()
 {
 	struct gsm_mncc mncc = {
 		.imsi = IMSI,
@@ -251,7 +251,7 @@
 	comment_end();
 }
 
-void test_call_mt()
+static void test_call_mt()
 {
 	struct gsm_mncc mncc = {
 		.imsi = IMSI,
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c b/tests/msc_vlr/msc_vlr_test_gsm_authen.c
index 70b7614..9c09aa4 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c
@@ -23,7 +23,7 @@
 
 #include "msc_vlr_tests.h"
 
-void test_gsm_authen()
+static void test_gsm_authen()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -213,7 +213,7 @@
 	comment_end();
 }
 
-void test_gsm_authen_tmsi()
+static void test_gsm_authen_tmsi()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -490,7 +490,7 @@
 	comment_end();
 }
 
-void test_gsm_authen_imei()
+static void test_gsm_authen_imei()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -586,7 +586,7 @@
 	comment_end();
 }
 
-void test_gsm_authen_tmsi_imei()
+static void test_gsm_authen_tmsi_imei()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -702,7 +702,7 @@
 	comment_end();
 }
 
-void test_gsm_milenage_authen()
+static void test_gsm_milenage_authen()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000010650";
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
index 9809108..a9daaae 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
+++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
@@ -23,7 +23,7 @@
 
 #include "msc_vlr_tests.h"
 
-void test_ciph()
+static void test_ciph()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -235,7 +235,7 @@
 	comment_end();
 }
 
-void test_ciph_tmsi()
+static void test_ciph_tmsi()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -474,7 +474,7 @@
 	comment_end();
 }
 
-void test_ciph_imei()
+static void test_ciph_imei()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -576,7 +576,7 @@
 	comment_end();
 }
 
-void test_ciph_imeisv()
+static void test_ciph_imeisv()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -674,7 +674,7 @@
 	comment_end();
 }
 
-void test_ciph_tmsi_imei()
+static void test_ciph_tmsi_imei()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
diff --git a/tests/msc_vlr/msc_vlr_test_hlr_reject.c b/tests/msc_vlr/msc_vlr_test_hlr_reject.c
index 6cf4afc..8532f8e 100644
--- a/tests/msc_vlr/msc_vlr_test_hlr_reject.c
+++ b/tests/msc_vlr/msc_vlr_test_hlr_reject.c
@@ -23,7 +23,7 @@
 
 #include "msc_vlr_tests.h"
 
-void test_hlr_rej_auth_info_unknown_imsi()
+static void test_hlr_rej_auth_info_unknown_imsi()
 {
 	comment_start();
 
@@ -49,7 +49,7 @@
 	comment_end();
 }
 
-void test_hlr_rej_auth_info_net_fail()
+static void test_hlr_rej_auth_info_net_fail()
 {
 	comment_start();
 
@@ -75,7 +75,7 @@
 	comment_end();
 }
 
-void test_hlr_rej_auth_info_net_fail_no_reuse_tuples()
+static void test_hlr_rej_auth_info_net_fail_no_reuse_tuples()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -162,7 +162,7 @@
 	comment_end();
 }
 
-void test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples()
+static void test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -250,7 +250,7 @@
 	comment_end();
 }
 
-void test_hlr_acc_but_no_auth_tuples()
+static void test_hlr_acc_but_no_auth_tuples()
 {
 	comment_start();
 
@@ -282,7 +282,7 @@
 	comment_end();
 }
 
-void test_hlr_rej_auth_info_net_fail_reuse_tuples()
+static void test_hlr_rej_auth_info_net_fail_reuse_tuples()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -385,7 +385,7 @@
 	comment_end();
 }
 
-void test_hlr_rej_lu()
+static void test_hlr_rej_lu()
 {
 	comment_start();
 
@@ -408,7 +408,7 @@
 	comment_end();
 }
 
-void test_hlr_no_insert_data()
+static void test_hlr_no_insert_data()
 {
 	comment_start();
 
diff --git a/tests/msc_vlr/msc_vlr_test_hlr_timeout.c b/tests/msc_vlr/msc_vlr_test_hlr_timeout.c
index c2f17c8..610b388 100644
--- a/tests/msc_vlr/msc_vlr_test_hlr_timeout.c
+++ b/tests/msc_vlr/msc_vlr_test_hlr_timeout.c
@@ -25,7 +25,7 @@
 
 #include <osmocom/core/logging.h>
 
-void test_hlr_timeout_lu_auth_info()
+static void test_hlr_timeout_lu_auth_info()
 {
 	comment_start();
 
@@ -64,7 +64,7 @@
 	comment_end();
 }
 
-void test_hlr_timeout_lu_upd_loc_result()
+static void test_hlr_timeout_lu_upd_loc_result()
 {
 	comment_start();
 
diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.c b/tests/msc_vlr/msc_vlr_test_ms_timeout.c
index 4cfd035..c81f5b5 100644
--- a/tests/msc_vlr/msc_vlr_test_ms_timeout.c
+++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.c
@@ -23,7 +23,7 @@
 
 #include "msc_vlr_tests.h"
 
-void test_ms_timeout_lu_auth_resp()
+static void test_ms_timeout_lu_auth_resp()
 {
 	comment_start();
 
@@ -83,7 +83,7 @@
 	comment_end();
 }
 
-void test_ms_timeout_cm_auth_resp()
+static void test_ms_timeout_cm_auth_resp()
 {
 	comment_start();
 
@@ -182,7 +182,7 @@
 	comment_end();
 }
 
-void test_ms_timeout_paging()
+static void test_ms_timeout_paging()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.c b/tests/msc_vlr/msc_vlr_test_no_authen.c
index 32e0b40..59c5603 100644
--- a/tests/msc_vlr/msc_vlr_test_no_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_no_authen.c
@@ -23,7 +23,7 @@
 
 #include "msc_vlr_tests.h"
 
-void test_no_authen()
+static void test_no_authen()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -162,7 +162,7 @@
 	comment_end();
 }
 
-void test_no_authen_tmsi()
+static void test_no_authen_tmsi()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -382,7 +382,7 @@
 	comment_end();
 }
 
-void test_no_authen_imei()
+static void test_no_authen_imei()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -450,7 +450,7 @@
 	comment_end();
 }
 
-void test_no_authen_tmsi_imei()
+static void test_no_authen_tmsi_imei()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -527,7 +527,7 @@
 	comment_end();
 }
 
-void test_no_authen_imeisv()
+static void test_no_authen_imeisv()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -588,7 +588,7 @@
 	comment_end();
 }
 
-void test_no_authen_imeisv_imei()
+static void test_no_authen_imeisv_imei()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -666,7 +666,7 @@
 	comment_end();
 }
 
-void test_no_authen_imeisv_tmsi()
+static void test_no_authen_imeisv_tmsi()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
@@ -804,7 +804,7 @@
 	comment_end();
 }
 
-void test_no_authen_imeisv_tmsi_imei()
+static void test_no_authen_imeisv_tmsi_imei()
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000004620";
diff --git a/tests/msc_vlr/msc_vlr_test_reject_concurrency.c b/tests/msc_vlr/msc_vlr_test_reject_concurrency.c
index 2377c19..b6f6558 100644
--- a/tests/msc_vlr/msc_vlr_test_reject_concurrency.c
+++ b/tests/msc_vlr/msc_vlr_test_reject_concurrency.c
@@ -23,7 +23,7 @@
 
 #include "msc_vlr_tests.h"
 
-void test_reject_2nd_conn()
+static void test_reject_2nd_conn()
 {
 	struct gsm_subscriber_connection *conn1;
 	comment_start();
@@ -67,7 +67,7 @@
 	comment_end();
 }
 
-void _normal_lu_part1()
+static void _normal_lu_part1()
 {
 	btw("Location Update Request");
 	lu_result_sent = RES_NONE;
@@ -78,7 +78,7 @@
 	EXPECT_CONN_COUNT(1);
 }
 
-void _normal_lu_part2()
+static void _normal_lu_part2()
 {
 	btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT");
 	lu_result_sent = RES_NONE;
@@ -96,14 +96,14 @@
 	EXPECT_CONN_COUNT(0);
 }
 
-void _normal_lu()
+static void _normal_lu()
 {
 	BTW("Subscriber does a normal LU");
 	_normal_lu_part1();
 	_normal_lu_part2();
 }
 
-void _normal_cm_service_req()
+static void _normal_cm_service_req()
 {
 	BTW("Subscriber does a normal CM Service Request");
 	cm_service_result_sent = RES_NONE;
@@ -115,7 +115,7 @@
 	EXPECT_ACCEPTED(true);
 }
 
-void _page()
+static void _page()
 {
 	const char *imsi = "901700000004620";
 	struct vlr_subscr *vsub;
@@ -138,7 +138,7 @@
 	VERBOSE_ASSERT(paging_stopped, == false, "%d");
 }
 
-void _paging_resp_part1()
+static void _paging_resp_part1()
 {
 	btw("MS replies with Paging Response, we deliver the SMS");
 	dtap_expect_tx("09" /* SMS messages */
@@ -170,7 +170,7 @@
 	EXPECT_CONN_COUNT(1);
 }
 
-void _paging_resp_part2(int expect_conn_count, bool expect_clear)
+static void _paging_resp_part2(int expect_conn_count, bool expect_clear)
 {
 	btw("MS replies with CP-ACK for received SMS");
 	ms_sends_msg("8904");
@@ -189,7 +189,7 @@
 	EXPECT_CONN_COUNT(expect_conn_count);
 }
 
-void test_reject_lu_during_lu()
+static void test_reject_lu_during_lu()
 {
 	comment_start();
 
@@ -207,7 +207,7 @@
 	comment_end();
 }
 
-void test_reject_cm_during_lu()
+static void test_reject_cm_during_lu()
 {
 	comment_start();
 
@@ -228,7 +228,7 @@
 	comment_end();
 }
 
-void test_reject_paging_resp_during_lu()
+static void test_reject_paging_resp_during_lu()
 {
 	comment_start();
 
@@ -246,7 +246,7 @@
 	comment_end();
 }
 
-void test_reject_lu_during_cm()
+static void test_reject_lu_during_cm()
 {
 	comment_start();
 
@@ -270,7 +270,7 @@
 	comment_end();
 }
 
-void test_reject_cm_during_cm()
+static void test_reject_cm_during_cm()
 {
 	comment_start();
 
@@ -293,7 +293,7 @@
 	comment_end();
 }
 
-void test_reject_paging_resp_during_cm()
+static void test_reject_paging_resp_during_cm()
 {
 	comment_start();
 
@@ -318,7 +318,7 @@
 	comment_end();
 }
 
-void test_reject_paging_resp_during_paging_resp()
+static void test_reject_paging_resp_during_paging_resp()
 {
 	comment_start();
 
@@ -335,7 +335,7 @@
 	comment_end();
 }
 
-void test_reject_lu_during_paging_resp()
+static void test_reject_lu_during_paging_resp()
 {
 	comment_start();
 
@@ -355,7 +355,7 @@
 	comment_end();
 }
 
-void test_accept_cm_during_paging_resp()
+static void test_accept_cm_during_paging_resp()
 {
 	comment_start();
 
diff --git a/tests/msc_vlr/msc_vlr_test_rest.c b/tests/msc_vlr/msc_vlr_test_rest.c
index c19c4c6..1a403c3 100644
--- a/tests/msc_vlr/msc_vlr_test_rest.c
+++ b/tests/msc_vlr/msc_vlr_test_rest.c
@@ -23,7 +23,7 @@
 
 #include "msc_vlr_tests.h"
 
-void test_early_stage()
+static void test_early_stage()
 {
 	comment_start();
 
@@ -62,7 +62,7 @@
 	comment_end();
 }
 
-void test_cm_service_without_lu()
+static void test_cm_service_without_lu()
 {
 	comment_start();
 
@@ -78,7 +78,7 @@
 	comment_end();
 }
 
-void test_two_lu()
+static void test_two_lu()
 {
 	comment_start();
 
@@ -150,7 +150,7 @@
 	comment_end();
 }
 
-void test_lu_unknown_tmsi()
+static void test_lu_unknown_tmsi()
 {
 	comment_start();
 
diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.c b/tests/msc_vlr/msc_vlr_test_umts_authen.c
index 1175bf8..3b1f6dd 100644
--- a/tests/msc_vlr/msc_vlr_test_umts_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_umts_authen.c
@@ -36,7 +36,7 @@
 		break; \
 	}
 
-void _test_umts_authen(enum ran_type via_ran)
+static void _test_umts_authen(enum ran_type via_ran)
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000010650";
@@ -322,14 +322,14 @@
 	clear_vlr();
 }
 
-void test_umts_authen_geran()
+static void test_umts_authen_geran()
 {
 	comment_start();
 	_test_umts_authen(RAN_GERAN_A);
 	comment_end();
 }
 
-void test_umts_authen_utran()
+static void test_umts_authen_utran()
 {
 	comment_start();
 	_test_umts_authen(RAN_UTRAN_IU);
@@ -346,7 +346,7 @@
 		       const u8 *sqn, const u8 *amf, u8 *mac_a, u8 *mac_s);
 #endif
 
-void _test_umts_authen_resync(enum ran_type via_ran)
+static void _test_umts_authen_resync(enum ran_type via_ran)
 {
 	struct vlr_subscr *vsub;
 	const char *imsi = "901700000010650";
@@ -558,14 +558,14 @@
 	clear_vlr();
 }
 
-void test_umts_authen_resync_geran()
+static void test_umts_authen_resync_geran()
 {
 	comment_start();
 	_test_umts_authen_resync(RAN_GERAN_A);
 	comment_end();
 }
 
-void test_umts_authen_resync_utran()
+static void test_umts_authen_resync_utran()
 {
 	comment_start();
 	_test_umts_authen_resync(RAN_UTRAN_IU);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia169c6a1443a48879ab4777e09c2040c48810bf6
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list