Harald Welte has submitted this change and it was merged. Change subject: VLR tests: mark static test functions as such ......................................................................
VLR tests: mark static test functions as such Related: OS#2864 Change-Id: I5eac4c24257fd38068ba629d3c21848181703220 --- M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h 2 files changed, 7 insertions(+), 14 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 82ab8bc..fd66628 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -113,15 +113,10 @@ return msg; } -const char *gh_type_name(struct gsm48_hdr *gh) +static const char *gh_type_name(struct gsm48_hdr *gh) { return gsm48_pdisc_msgtype_name(gsm48_hdr_pdisc(gh), gsm48_hdr_msg_type(gh)); -} - -const char *msg_type_name(struct msgb *msg) -{ - return gh_type_name((void*)msg->data); } void dtap_expect_tx(const char *hex) @@ -251,7 +246,7 @@ talloc_free(msg); } -int ms_sends_msg_fake(uint8_t pdisc, uint8_t msg_type) +static int ms_sends_msg_fake(uint8_t pdisc, uint8_t msg_type) { int rc; struct msgb *msg; @@ -326,7 +321,7 @@ paging_expecting_imsi = NULL; } -int _paging_sent(enum ran_type via_ran, const char *imsi, uint32_t tmsi, uint32_t lac) +static int _paging_sent(enum ran_type via_ran, const char *imsi, uint32_t tmsi, uint32_t lac) { log("%s sends out paging request to IMSI %s, TMSI 0x%08x, LAC %u", ran_type_name(via_ran), imsi, tmsi, lac); @@ -522,10 +517,10 @@ return 0; } -int _validate_dtap(struct msgb *msg, enum ran_type to_ran) +static int _validate_dtap(struct msgb *msg, enum ran_type to_ran) { btw("DTAP --%s--> MS: %s: %s", - ran_type_name(to_ran), msg_type_name(msg), + ran_type_name(to_ran), gh_type_name((void*)msg->data), osmo_hexdump_nospc(msg->data, msg->len)); OSMO_ASSERT(dtap_tx_expected); @@ -748,7 +743,7 @@ fake_time_passes(0, 0); } -void check_talloc(void *msgb_ctx, void *tall_bsc_ctx, int expected_blocks) +static void check_talloc(void *msgb_ctx, void *tall_bsc_ctx, int expected_blocks) { talloc_report_full(msgb_ctx, stderr); /* Expecting these to stick around in tall_bsc_ctx: @@ -823,7 +818,7 @@ void *msgb_ctx = NULL; -void run_tests(int nr) +static void run_tests(int nr) { int test_nr; const char *imsi = "901700000004620"; diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h index eaec340..2ea3f29 100644 --- a/tests/msc_vlr/msc_vlr_tests.h +++ b/tests/msc_vlr/msc_vlr_tests.h @@ -144,8 +144,6 @@ void thwart_rx_non_initial_requests(); -void check_talloc(void *msgb_ctx, void *tall_bsc_ctx, int expected_blocks); - #define EXPECT_ACCEPTED(expect_accepted) do { \ if (g_conn) \ OSMO_ASSERT(conn_exists(g_conn)); \ -- To view, visit https://gerrit.osmocom.org/6294 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5eac4c24257fd38068ba629d3c21848181703220 Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max <msur...@sysmocom.de> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillm...@sysmocom.de>