aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/abis/Makefile.am1
-rw-r--r--tests/acc/Makefile.am1
-rw-r--r--tests/acc/acc_test.c5
-rw-r--r--tests/bsc/Makefile.am1
-rw-r--r--tests/gsm0408/Makefile.am1
-rw-r--r--tests/gsm0408/gsm0408_test.c5
-rw-r--r--tests/handover/Makefile.am1
-rw-r--r--tests/nanobts_omlattr/Makefile.am1
-rw-r--r--tests/nanobts_omlattr/nanobts_omlattr_test.c14
9 files changed, 19 insertions, 11 deletions
diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am
index d7d53b70d..681e35a19 100644
--- a/tests/abis/Makefile.am
+++ b/tests/abis/Makefile.am
@@ -29,6 +29,7 @@ abis_test_LDADD = \
$(top_builddir)/src/osmo-bsc/acc.o \
$(top_builddir)/src/osmo-bsc/bts.o \
$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
+ $(top_builddir)/src/osmo-bsc/bts_sm.o \
$(top_builddir)/src/osmo-bsc/bts_trx.o \
$(top_builddir)/src/osmo-bsc/gsm_data.o \
$(top_builddir)/src/osmo-bsc/net_init.o \
diff --git a/tests/acc/Makefile.am b/tests/acc/Makefile.am
index b1315e383..1536365eb 100644
--- a/tests/acc/Makefile.am
+++ b/tests/acc/Makefile.am
@@ -28,6 +28,7 @@ acc_test_LDADD = \
$(top_builddir)/src/osmo-bsc/abis_nm.o \
$(top_builddir)/src/osmo-bsc/acc.o \
$(top_builddir)/src/osmo-bsc/bts.o \
+ $(top_builddir)/src/osmo-bsc/bts_sm.o \
$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
$(top_builddir)/src/osmo-bsc/bts_trx.o \
$(top_builddir)/src/osmo-bsc/gsm_data.o \
diff --git a/tests/acc/acc_test.c b/tests/acc/acc_test.c
index 81b9e8dd2..73757c7c6 100644
--- a/tests/acc/acc_test.c
+++ b/tests/acc/acc_test.c
@@ -44,7 +44,8 @@ static void clock_debug(char* str)
#define bts_init(net) _bts_init(net, __func__)
static inline struct gsm_bts *_bts_init(struct gsm_network *net, const char *msg)
{
- struct gsm_bts *bts = gsm_bts_alloc(net, 0);
+ struct gsm_bts_sm *bts_sm = gsm_bts_sm_alloc(net, 0);
+ struct gsm_bts *bts = bts_sm->bts[0];
if (!bts) {
fprintf(stderr, "BTS allocation failure in %s()\n", msg);
exit(1);
@@ -66,7 +67,7 @@ static inline void _bts_del(struct gsm_bts *bts, const char *msg)
if (osmo_timer_pending(&bts->acc_ramp.step_timer))
osmo_timer_del(&bts->acc_ramp.step_timer);
/* no need to llist_del(&bts->list), we never registered the bts there. */
- talloc_free(bts);
+ talloc_free(bts->site_mgr);
fprintf(stderr, "BTS deallocated OK in %s()\n", msg);
}
diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am
index f040cbce9..02842eb46 100644
--- a/tests/bsc/Makefile.am
+++ b/tests/bsc/Makefile.am
@@ -39,6 +39,7 @@ bsc_test_LDADD = \
$(top_builddir)/src/osmo-bsc/osmo_bsc_filter.o \
$(top_builddir)/src/osmo-bsc/bsc_subscriber.o \
$(top_builddir)/src/osmo-bsc/bts.o \
+ $(top_builddir)/src/osmo-bsc/bts_sm.o \
$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
$(top_builddir)/src/osmo-bsc/bts_trx.o \
$(top_builddir)/src/osmo-bsc/gsm_data.o \
diff --git a/tests/gsm0408/Makefile.am b/tests/gsm0408/Makefile.am
index de3874717..c04a5ae46 100644
--- a/tests/gsm0408/Makefile.am
+++ b/tests/gsm0408/Makefile.am
@@ -29,6 +29,7 @@ gsm0408_test_LDADD = \
$(top_builddir)/src/osmo-bsc/arfcn_range_encode.o \
$(top_builddir)/src/osmo-bsc/bts.o \
$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
+ $(top_builddir)/src/osmo-bsc/bts_sm.o \
$(top_builddir)/src/osmo-bsc/bts_trx.o \
$(top_builddir)/src/osmo-bsc/gsm_data.o \
$(top_builddir)/src/osmo-bsc/net_init.o \
diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index 8ee29f70b..c23b26285 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -123,7 +123,8 @@ static inline void _bts_uarfcn_add(struct gsm_bts *bts, uint16_t arfcn, uint16_t
#define bts_init(net) _bts_init(net, __func__)
static inline struct gsm_bts *_bts_init(struct gsm_network *net, const char *msg)
{
- struct gsm_bts *bts = gsm_bts_alloc(net, 0);
+ struct gsm_bts_sm *bts_sm = gsm_bts_sm_alloc(net, 0);
+ struct gsm_bts *bts = bts_sm->bts[0];
if (!bts) {
printf("BTS allocation failure in %s()\n", msg);
exit(1);
@@ -143,7 +144,7 @@ static inline void _bts_del(struct gsm_bts *bts, const char *msg)
if (osmo_timer_pending(&bts->acc_mgr.rotate_timer))
osmo_timer_del(&bts->acc_mgr.rotate_timer);
/* no need to llist_del(&bts->list), we never registered the bts there. */
- talloc_free(bts);
+ talloc_free(bts->site_mgr);
printf("BTS deallocated OK in %s()\n", msg);
}
diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am
index 42bb9379f..02fcdc141 100644
--- a/tests/handover/Makefile.am
+++ b/tests/handover/Makefile.am
@@ -58,6 +58,7 @@ handover_test_LDADD = \
$(top_builddir)/src/osmo-bsc/bsc_subscriber.o \
$(top_builddir)/src/osmo-bsc/bsc_vty.o \
$(top_builddir)/src/osmo-bsc/bts.o \
+ $(top_builddir)/src/osmo-bsc/bts_sm.o \
$(top_builddir)/src/osmo-bsc/bts_trx.o \
$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts.o \
$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
diff --git a/tests/nanobts_omlattr/Makefile.am b/tests/nanobts_omlattr/Makefile.am
index 3dd7f2fa4..29097b834 100644
--- a/tests/nanobts_omlattr/Makefile.am
+++ b/tests/nanobts_omlattr/Makefile.am
@@ -27,6 +27,7 @@ nanobts_omlattr_test_LDADD = \
$(top_builddir)/src/osmo-bsc/acc.o \
$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
$(top_builddir)/src/osmo-bsc/bts.o \
+ $(top_builddir)/src/osmo-bsc/bts_sm.o \
$(top_builddir)/src/osmo-bsc/bts_trx.o \
$(top_builddir)/src/osmo-bsc/gsm_data.o \
$(top_builddir)/src/osmo-bsc/nm_common_fsm.o \
diff --git a/tests/nanobts_omlattr/nanobts_omlattr_test.c b/tests/nanobts_omlattr/nanobts_omlattr_test.c
index da220c1f4..c36abc659 100644
--- a/tests/nanobts_omlattr/nanobts_omlattr_test.c
+++ b/tests/nanobts_omlattr/nanobts_omlattr_test.c
@@ -243,7 +243,7 @@ int main(int argc, char **argv)
};
/* Parameters needed to test nanobts_attr_nse_get() */
- bts->gprs.nse.nsei = 101;
+ bts->site_mgr->gprs.nse.nsei = 101;
uint8_t attr_nse_expected[] =
{ 0x9d, 0x00, 0x02, 0x00, 0x65, 0xa0, 0x00, 0x07, 0x03, 0x03, 0x03,
0x03, 0x1e, 0x03, 0x0a, 0xa1, 0x00, 0x0b, 0x03, 0x03, 0x03,
@@ -266,9 +266,9 @@ int main(int argc, char **argv)
/* Parameters needed to test nanobts_attr_nscv_get() */
struct osmo_sockaddr_str addr;
osmo_sockaddr_str_from_str(&addr, "10.9.1.101", 23000);
- osmo_sockaddr_str_to_sockaddr(&addr, &bts->gprs.nsvc[0].remote.u.sas);
- bts->gprs.nsvc[0].nsvci = 0x65;
- bts->gprs.nsvc[0].local_port = 0x5a3c;
+ osmo_sockaddr_str_to_sockaddr(&addr, &bts->site_mgr->gprs.nsvc[0].remote.u.sas);
+ bts->site_mgr->gprs.nsvc[0].nsvci = 0x65;
+ bts->site_mgr->gprs.nsvc[0].local_port = 0x5a3c;
uint8_t attr_nscv_expected[] =
{ 0x9f, 0x00, 0x02, 0x00, 0x65, 0xa2, 0x00, 0x08, 0x59, 0xd8, 0x0a,
0x09, 0x01, 0x65, 0x5a, 0x3c
@@ -291,9 +291,9 @@ int main(int argc, char **argv)
/* NSVC IPv6 test */
struct osmo_sockaddr_str addr6;
osmo_sockaddr_str_from_str(&addr6, "fd00:5678:9012:3456:7890:1234:5678:9012", 23010);
- osmo_sockaddr_str_to_sockaddr(&addr6, &bts->gprs.nsvc[0].remote.u.sas);
- bts->gprs.nsvc[0].nsvci = 0x65;
- bts->gprs.nsvc[0].local_port = 0x5a3c;
+ osmo_sockaddr_str_to_sockaddr(&addr6, &bts->site_mgr->gprs.nsvc[0].remote.u.sas);
+ bts->site_mgr->gprs.nsvc[0].nsvci = 0x65;
+ bts->site_mgr->gprs.nsvc[0].local_port = 0x5a3c;
uint8_t attr_nscv6_expected[] =
/* |- oml attr |-16bit length */
{ 0x9f, 0x00, 0x02, 0x00, 0x65, 0xfd, 0x00, 0x16,