diff options
author | Oliver Smith <osmith@sysmocom.de> | 2023-03-01 14:45:03 +0100 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2023-03-06 10:23:30 +0100 |
commit | 2fd39821f6ac7d4c24961ce56dd80a9db1f3e0cb (patch) | |
tree | 33cc7059aadf5dc4a062f0bc2d68909e01172e8d /tests | |
parent | 2150b307c2578165261cffa964e14f71db7f6629 (diff) |
tests/handover: wrap functions from gsm_08_08.c
Prepare to include gsm_08_08.h in more files in the following patch,
without wrapping these functions it won't build anymore. Remove the
unused stub for bsc_assign_compl() while at it.
Related: OS#4393
Change-Id: I6cb84f493204e393fd719148f54b8bbc173588a4
Diffstat (limited to 'tests')
-rw-r--r-- | tests/handover/Makefile.am | 5 | ||||
-rw-r--r-- | tests/handover/handover_test.c | 24 |
2 files changed, 23 insertions, 6 deletions
diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am index 123fd61d6..b5726b636 100644 --- a/tests/handover/Makefile.am +++ b/tests/handover/Makefile.am @@ -36,6 +36,11 @@ handover_test_SOURCES = \ handover_test_LDFLAGS = \ -Wl,--wrap=abis_rsl_sendmsg \ + -Wl,--wrap=bsc_cipher_mode_compl \ + -Wl,--wrap=bsc_cm_update \ + -Wl,--wrap=bsc_compl_l3 \ + -Wl,--wrap=bsc_dtap \ + -Wl,--wrap=bsc_sapi_n_reject \ -Wl,--wrap=osmo_mgcpc_ep_ci_request \ $(NULL) diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index bf91f024f..b0b5863d3 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -1740,15 +1740,27 @@ void trau_recv_lchan() {} void trau_send_frame() {} /* Stub */ int osmo_bsc_sigtran_open_conn(struct gsm_subscriber_connection *conn, struct msgb *msg) { return 0; } -void bsc_sapi_n_reject(struct gsm_subscriber_connection *conn, uint8_t dlci, enum gsm0808_cause cause) {} -void bsc_cipher_mode_compl(struct gsm_subscriber_connection *conn, struct msgb *msg, uint8_t chosen_a5_n) {} -int bsc_compl_l3(struct gsm_lchan *lchan, struct msgb *msg, uint16_t chosen_channel) + +void __real_bsc_sapi_n_reject(struct gsm_subscriber_connection *conn, uint8_t dlci, enum gsm0808_cause cause); +void __wrap_bsc_sapi_n_reject(struct gsm_subscriber_connection *conn, uint8_t dlci, enum gsm0808_cause cause) {} + +void __real_bsc_cipher_mode_compl(struct gsm_subscriber_connection *conn, struct msgb *msg, uint8_t chosen_a5_n); +void __wrap_bsc_cipher_mode_compl(struct gsm_subscriber_connection *conn, struct msgb *msg, uint8_t chosen_a5_n) {} + +int __real_bsc_compl_l3(struct gsm_lchan *lchan, struct msgb *msg, uint16_t chosen_channel); +int __wrap_bsc_compl_l3(struct gsm_lchan *lchan, struct msgb *msg, uint16_t chosen_channel) { return 0; } -void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg) {} -void bsc_assign_compl(struct gsm_subscriber_connection *conn, uint8_t rr_cause) {} -void bsc_cm_update(struct gsm_subscriber_connection *conn, + +void __real_bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg); +void __wrap_bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg) {} + +void __real_bsc_cm_update(struct gsm_subscriber_connection *conn, + const uint8_t *cm2, uint8_t cm2_len, + const uint8_t *cm3, uint8_t cm3_len); +void __wrap_bsc_cm_update(struct gsm_subscriber_connection *conn, const uint8_t *cm2, uint8_t cm2_len, const uint8_t *cm3, uint8_t cm3_len) {} + const char *osmo_mgcpc_ep_name(const struct osmo_mgcpc_ep *ep) { return "fake-ep"; |