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
This commit is contained in:
Neels Hofmeyr 2018-03-02 01:05:38 +01:00
parent 87524ab620
commit f3d81f6ef5
11 changed files with 71 additions and 71 deletions

View File

@ -38,10 +38,10 @@
break; \ break; \
} }
void _test_auth_reuse(enum ran_type via_ran, static void _test_auth_reuse(enum ran_type via_ran,
int set_max_reuse_count, int set_max_reuse_count,
int loop_requests_without_hlr, int loop_requests_without_hlr,
bool final_request_with_hlr) bool final_request_with_hlr)
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000010650"; const char *imsi = "901700000010650";
@ -284,42 +284,42 @@ void _test_auth_reuse(enum ran_type via_ran,
clear_vlr(); clear_vlr();
} }
void test_auth_use_twice_geran() static void test_auth_use_twice_geran()
{ {
comment_start(); comment_start();
_test_auth_reuse(RAN_GERAN_A, 1, 1, true); _test_auth_reuse(RAN_GERAN_A, 1, 1, true);
comment_end(); comment_end();
} }
void test_auth_use_twice_utran() static void test_auth_use_twice_utran()
{ {
comment_start(); comment_start();
_test_auth_reuse(RAN_UTRAN_IU, 1, 1, true); _test_auth_reuse(RAN_UTRAN_IU, 1, 1, true);
comment_end(); comment_end();
} }
void test_auth_use_infinitely_geran() static void test_auth_use_infinitely_geran()
{ {
comment_start(); comment_start();
_test_auth_reuse(RAN_GERAN_A, -1, 3, false); _test_auth_reuse(RAN_GERAN_A, -1, 3, false);
comment_end(); comment_end();
} }
void test_auth_use_infinitely_utran() static void test_auth_use_infinitely_utran()
{ {
comment_start(); comment_start();
_test_auth_reuse(RAN_UTRAN_IU, -1, 3, false); _test_auth_reuse(RAN_UTRAN_IU, -1, 3, false);
comment_end(); comment_end();
} }
void test_no_auth_reuse_geran() static void test_no_auth_reuse_geran()
{ {
comment_start(); comment_start();
_test_auth_reuse(RAN_GERAN_A, 0, 0, true); _test_auth_reuse(RAN_GERAN_A, 0, 0, true);
comment_end(); comment_end();
} }
void test_no_auth_reuse_utran() static void test_no_auth_reuse_utran()
{ {
comment_start(); comment_start();
_test_auth_reuse(RAN_UTRAN_IU, 0, 0, true); _test_auth_reuse(RAN_UTRAN_IU, 0, 0, true);

View File

@ -25,7 +25,7 @@
#include <osmocom/msc/gsm_04_08.h> #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->msg_type = msg_type;
mncc_tx_to_cc(net, msg_type, mncc); mncc_tx_to_cc(net, msg_type, mncc);
@ -151,7 +151,7 @@ static void standard_lu()
vlr_subscr_put(vsub); vlr_subscr_put(vsub);
} }
void test_call_mo() static void test_call_mo()
{ {
struct gsm_mncc mncc = { struct gsm_mncc mncc = {
.imsi = IMSI, .imsi = IMSI,
@ -251,7 +251,7 @@ void test_call_mo()
comment_end(); comment_end();
} }
void test_call_mt() static void test_call_mt()
{ {
struct gsm_mncc mncc = { struct gsm_mncc mncc = {
.imsi = IMSI, .imsi = IMSI,

View File

@ -23,7 +23,7 @@
#include "msc_vlr_tests.h" #include "msc_vlr_tests.h"
void test_gsm_authen() static void test_gsm_authen()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -213,7 +213,7 @@ void test_gsm_authen()
comment_end(); comment_end();
} }
void test_gsm_authen_tmsi() static void test_gsm_authen_tmsi()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -490,7 +490,7 @@ void test_gsm_authen_tmsi()
comment_end(); comment_end();
} }
void test_gsm_authen_imei() static void test_gsm_authen_imei()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -586,7 +586,7 @@ void test_gsm_authen_imei()
comment_end(); comment_end();
} }
void test_gsm_authen_tmsi_imei() static void test_gsm_authen_tmsi_imei()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -702,7 +702,7 @@ void test_gsm_authen_tmsi_imei()
comment_end(); comment_end();
} }
void test_gsm_milenage_authen() static void test_gsm_milenage_authen()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000010650"; const char *imsi = "901700000010650";

View File

@ -23,7 +23,7 @@
#include "msc_vlr_tests.h" #include "msc_vlr_tests.h"
void test_ciph() static void test_ciph()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -235,7 +235,7 @@ void test_ciph()
comment_end(); comment_end();
} }
void test_ciph_tmsi() static void test_ciph_tmsi()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -474,7 +474,7 @@ void test_ciph_tmsi()
comment_end(); comment_end();
} }
void test_ciph_imei() static void test_ciph_imei()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -576,7 +576,7 @@ void test_ciph_imei()
comment_end(); comment_end();
} }
void test_ciph_imeisv() static void test_ciph_imeisv()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -674,7 +674,7 @@ void test_ciph_imeisv()
comment_end(); comment_end();
} }
void test_ciph_tmsi_imei() static void test_ciph_tmsi_imei()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";

View File

@ -23,7 +23,7 @@
#include "msc_vlr_tests.h" #include "msc_vlr_tests.h"
void test_hlr_rej_auth_info_unknown_imsi() static void test_hlr_rej_auth_info_unknown_imsi()
{ {
comment_start(); comment_start();
@ -49,7 +49,7 @@ void test_hlr_rej_auth_info_unknown_imsi()
comment_end(); comment_end();
} }
void test_hlr_rej_auth_info_net_fail() static void test_hlr_rej_auth_info_net_fail()
{ {
comment_start(); comment_start();
@ -75,7 +75,7 @@ void test_hlr_rej_auth_info_net_fail()
comment_end(); 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; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -162,7 +162,7 @@ void test_hlr_rej_auth_info_net_fail_no_reuse_tuples()
comment_end(); 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; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -250,7 +250,7 @@ void test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples()
comment_end(); comment_end();
} }
void test_hlr_acc_but_no_auth_tuples() static void test_hlr_acc_but_no_auth_tuples()
{ {
comment_start(); comment_start();
@ -282,7 +282,7 @@ void test_hlr_acc_but_no_auth_tuples()
comment_end(); 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; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -385,7 +385,7 @@ void test_hlr_rej_auth_info_net_fail_reuse_tuples()
comment_end(); comment_end();
} }
void test_hlr_rej_lu() static void test_hlr_rej_lu()
{ {
comment_start(); comment_start();
@ -408,7 +408,7 @@ void test_hlr_rej_lu()
comment_end(); comment_end();
} }
void test_hlr_no_insert_data() static void test_hlr_no_insert_data()
{ {
comment_start(); comment_start();

View File

@ -25,7 +25,7 @@
#include <osmocom/core/logging.h> #include <osmocom/core/logging.h>
void test_hlr_timeout_lu_auth_info() static void test_hlr_timeout_lu_auth_info()
{ {
comment_start(); comment_start();
@ -64,7 +64,7 @@ void test_hlr_timeout_lu_auth_info()
comment_end(); comment_end();
} }
void test_hlr_timeout_lu_upd_loc_result() static void test_hlr_timeout_lu_upd_loc_result()
{ {
comment_start(); comment_start();

View File

@ -23,7 +23,7 @@
#include "msc_vlr_tests.h" #include "msc_vlr_tests.h"
void test_ms_timeout_lu_auth_resp() static void test_ms_timeout_lu_auth_resp()
{ {
comment_start(); comment_start();
@ -83,7 +83,7 @@ void test_ms_timeout_lu_auth_resp()
comment_end(); comment_end();
} }
void test_ms_timeout_cm_auth_resp() static void test_ms_timeout_cm_auth_resp()
{ {
comment_start(); comment_start();
@ -182,7 +182,7 @@ void test_ms_timeout_cm_auth_resp()
comment_end(); comment_end();
} }
void test_ms_timeout_paging() static void test_ms_timeout_paging()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";

View File

@ -23,7 +23,7 @@
#include "msc_vlr_tests.h" #include "msc_vlr_tests.h"
void test_no_authen() static void test_no_authen()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -162,7 +162,7 @@ void test_no_authen()
comment_end(); comment_end();
} }
void test_no_authen_tmsi() static void test_no_authen_tmsi()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -382,7 +382,7 @@ void test_no_authen_tmsi()
comment_end(); comment_end();
} }
void test_no_authen_imei() static void test_no_authen_imei()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -450,7 +450,7 @@ void test_no_authen_imei()
comment_end(); comment_end();
} }
void test_no_authen_tmsi_imei() static void test_no_authen_tmsi_imei()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -527,7 +527,7 @@ void test_no_authen_tmsi_imei()
comment_end(); comment_end();
} }
void test_no_authen_imeisv() static void test_no_authen_imeisv()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -588,7 +588,7 @@ void test_no_authen_imeisv()
comment_end(); comment_end();
} }
void test_no_authen_imeisv_imei() static void test_no_authen_imeisv_imei()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -666,7 +666,7 @@ void test_no_authen_imeisv_imei()
comment_end(); comment_end();
} }
void test_no_authen_imeisv_tmsi() static void test_no_authen_imeisv_tmsi()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
@ -804,7 +804,7 @@ void test_no_authen_imeisv_tmsi()
comment_end(); comment_end();
} }
void test_no_authen_imeisv_tmsi_imei() static void test_no_authen_imeisv_tmsi_imei()
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";

View File

@ -23,7 +23,7 @@
#include "msc_vlr_tests.h" #include "msc_vlr_tests.h"
void test_reject_2nd_conn() static void test_reject_2nd_conn()
{ {
struct gsm_subscriber_connection *conn1; struct gsm_subscriber_connection *conn1;
comment_start(); comment_start();
@ -67,7 +67,7 @@ void test_reject_2nd_conn()
comment_end(); comment_end();
} }
void _normal_lu_part1() static void _normal_lu_part1()
{ {
btw("Location Update Request"); btw("Location Update Request");
lu_result_sent = RES_NONE; lu_result_sent = RES_NONE;
@ -78,7 +78,7 @@ void _normal_lu_part1()
EXPECT_CONN_COUNT(1); 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"); btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT");
lu_result_sent = RES_NONE; lu_result_sent = RES_NONE;
@ -96,14 +96,14 @@ void _normal_lu_part2()
EXPECT_CONN_COUNT(0); EXPECT_CONN_COUNT(0);
} }
void _normal_lu() static void _normal_lu()
{ {
BTW("Subscriber does a normal LU"); BTW("Subscriber does a normal LU");
_normal_lu_part1(); _normal_lu_part1();
_normal_lu_part2(); _normal_lu_part2();
} }
void _normal_cm_service_req() static void _normal_cm_service_req()
{ {
BTW("Subscriber does a normal CM Service Request"); BTW("Subscriber does a normal CM Service Request");
cm_service_result_sent = RES_NONE; cm_service_result_sent = RES_NONE;
@ -115,7 +115,7 @@ void _normal_cm_service_req()
EXPECT_ACCEPTED(true); EXPECT_ACCEPTED(true);
} }
void _page() static void _page()
{ {
const char *imsi = "901700000004620"; const char *imsi = "901700000004620";
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
@ -138,7 +138,7 @@ void _page()
VERBOSE_ASSERT(paging_stopped, == false, "%d"); 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"); btw("MS replies with Paging Response, we deliver the SMS");
dtap_expect_tx("09" /* SMS messages */ dtap_expect_tx("09" /* SMS messages */
@ -170,7 +170,7 @@ void _paging_resp_part1()
EXPECT_CONN_COUNT(1); 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"); btw("MS replies with CP-ACK for received SMS");
ms_sends_msg("8904"); ms_sends_msg("8904");
@ -189,7 +189,7 @@ void _paging_resp_part2(int expect_conn_count, bool expect_clear)
EXPECT_CONN_COUNT(expect_conn_count); EXPECT_CONN_COUNT(expect_conn_count);
} }
void test_reject_lu_during_lu() static void test_reject_lu_during_lu()
{ {
comment_start(); comment_start();
@ -207,7 +207,7 @@ void test_reject_lu_during_lu()
comment_end(); comment_end();
} }
void test_reject_cm_during_lu() static void test_reject_cm_during_lu()
{ {
comment_start(); comment_start();
@ -228,7 +228,7 @@ void test_reject_cm_during_lu()
comment_end(); comment_end();
} }
void test_reject_paging_resp_during_lu() static void test_reject_paging_resp_during_lu()
{ {
comment_start(); comment_start();
@ -246,7 +246,7 @@ void test_reject_paging_resp_during_lu()
comment_end(); comment_end();
} }
void test_reject_lu_during_cm() static void test_reject_lu_during_cm()
{ {
comment_start(); comment_start();
@ -270,7 +270,7 @@ void test_reject_lu_during_cm()
comment_end(); comment_end();
} }
void test_reject_cm_during_cm() static void test_reject_cm_during_cm()
{ {
comment_start(); comment_start();
@ -293,7 +293,7 @@ void test_reject_cm_during_cm()
comment_end(); comment_end();
} }
void test_reject_paging_resp_during_cm() static void test_reject_paging_resp_during_cm()
{ {
comment_start(); comment_start();
@ -318,7 +318,7 @@ void test_reject_paging_resp_during_cm()
comment_end(); comment_end();
} }
void test_reject_paging_resp_during_paging_resp() static void test_reject_paging_resp_during_paging_resp()
{ {
comment_start(); comment_start();
@ -335,7 +335,7 @@ void test_reject_paging_resp_during_paging_resp()
comment_end(); comment_end();
} }
void test_reject_lu_during_paging_resp() static void test_reject_lu_during_paging_resp()
{ {
comment_start(); comment_start();
@ -355,7 +355,7 @@ void test_reject_lu_during_paging_resp()
comment_end(); comment_end();
} }
void test_accept_cm_during_paging_resp() static void test_accept_cm_during_paging_resp()
{ {
comment_start(); comment_start();

View File

@ -23,7 +23,7 @@
#include "msc_vlr_tests.h" #include "msc_vlr_tests.h"
void test_early_stage() static void test_early_stage()
{ {
comment_start(); comment_start();
@ -62,7 +62,7 @@ void test_early_stage()
comment_end(); comment_end();
} }
void test_cm_service_without_lu() static void test_cm_service_without_lu()
{ {
comment_start(); comment_start();
@ -78,7 +78,7 @@ void test_cm_service_without_lu()
comment_end(); comment_end();
} }
void test_two_lu() static void test_two_lu()
{ {
comment_start(); comment_start();
@ -150,7 +150,7 @@ void test_two_lu()
comment_end(); comment_end();
} }
void test_lu_unknown_tmsi() static void test_lu_unknown_tmsi()
{ {
comment_start(); comment_start();

View File

@ -36,7 +36,7 @@
break; \ break; \
} }
void _test_umts_authen(enum ran_type via_ran) static void _test_umts_authen(enum ran_type via_ran)
{ {
struct vlr_subscr *vsub; struct vlr_subscr *vsub;
const char *imsi = "901700000010650"; const char *imsi = "901700000010650";
@ -322,14 +322,14 @@ void _test_umts_authen(enum ran_type via_ran)
clear_vlr(); clear_vlr();
} }
void test_umts_authen_geran() static void test_umts_authen_geran()
{ {
comment_start(); comment_start();
_test_umts_authen(RAN_GERAN_A); _test_umts_authen(RAN_GERAN_A);
comment_end(); comment_end();
} }
void test_umts_authen_utran() static void test_umts_authen_utran()
{ {
comment_start(); comment_start();
_test_umts_authen(RAN_UTRAN_IU); _test_umts_authen(RAN_UTRAN_IU);
@ -346,7 +346,7 @@ extern int milenage_f1(const u8 *opc, const u8 *k, const u8 *_rand,
const u8 *sqn, const u8 *amf, u8 *mac_a, u8 *mac_s); const u8 *sqn, const u8 *amf, u8 *mac_a, u8 *mac_s);
#endif #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; struct vlr_subscr *vsub;
const char *imsi = "901700000010650"; const char *imsi = "901700000010650";
@ -558,14 +558,14 @@ void _test_umts_authen_resync(enum ran_type via_ran)
clear_vlr(); clear_vlr();
} }
void test_umts_authen_resync_geran() static void test_umts_authen_resync_geran()
{ {
comment_start(); comment_start();
_test_umts_authen_resync(RAN_GERAN_A); _test_umts_authen_resync(RAN_GERAN_A);
comment_end(); comment_end();
} }
void test_umts_authen_resync_utran() static void test_umts_authen_resync_utran()
{ {
comment_start(); comment_start();
_test_umts_authen_resync(RAN_UTRAN_IU); _test_umts_authen_resync(RAN_UTRAN_IU);