osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bsc/+/31621 )
Change subject: tests/handover: wrap functions from gsm_08_08.c
......................................................................
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
---
M tests/handover/Makefile.am
M tests/handover/handover_test.c
2 files changed, 37 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/21/31621/1
diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am
index 123fd61..b5726b6 100644
--- a/tests/handover/Makefile.am
+++ b/tests/handover/Makefile.am
@@ -36,6 +36,11 @@
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 2c54526..76ea9ed 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -1745,15 +1745,27 @@
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";
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/31621
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I6cb84f493204e393fd719148f54b8bbc173588a4
Gerrit-Change-Number: 31621
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange