aboutsummaryrefslogtreecommitdiffstats
path: root/tests/paging/paging_test.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2022-05-04 19:27:34 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2022-05-13 14:06:37 +0200
commit9f8137dc735d6da5be642ccbe90827de59841ac1 (patch)
tree59c01447bd738ab3d9aa9876cbf4d4f483a0b3db /tests/paging/paging_test.c
parent50a42e7436db6e675d7e27b6fb1565d8f71ad03a (diff)
paging: start/stop credit_timer based on C0 running
This way we avoid triggering timers and doing extra poll loops for each BTS which is configured but not up. It also has the effect of removing logging about estimating paging buffers for BTS which are down, which can be confusing. Furthermore, since work is delayed until the TRX and cell in general is configured, the first estimation is properly done now since the correct configuration is in place at that time. Related: SYS#5922 Change-Id: I1b5b1a98115b4e9d821eb3330fc5b970a0e78a44
Diffstat (limited to 'tests/paging/paging_test.c')
-rw-r--r--tests/paging/paging_test.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/paging/paging_test.c b/tests/paging/paging_test.c
index 5979e93e9..679c85167 100644
--- a/tests/paging/paging_test.c
+++ b/tests/paging/paging_test.c
@@ -63,6 +63,7 @@ static void clock_inc(unsigned int sec, unsigned int usec)
#define bts_init(net) _bts_init(net, __func__)
static inline struct gsm_bts *_bts_init(struct gsm_network *net, const char *msg)
{
+ struct nm_running_chg_signal_data nsd;
struct gsm_bts_sm *bts_sm = gsm_bts_sm_alloc(net, 0);
struct gsm_bts *bts = bts_sm->bts[0];
if (!bts) {
@@ -82,6 +83,14 @@ static inline struct gsm_bts *_bts_init(struct gsm_network *net, const char *msg
bts->c0->bb_transc.mo.nm_state.administrative = NM_STATE_UNLOCKED;
bts->c0->rsl_link_primary = (struct e1inp_sign_link *)(intptr_t)0x01; /* Fake RSL is UP */
+ /* Emulate signal stating the TRX C0 is ready: */
+ memset(&nsd, 0, sizeof(nsd));
+ nsd.bts = bts;
+ nsd.obj_class = NM_OC_RADIO_CARRIER;
+ nsd.obj = bts->c0;
+ nsd.running = true;
+ osmo_signal_dispatch(SS_NM, S_NM_RUNNING_CHG, &nsd);
+
return bts;
}
@@ -246,6 +255,7 @@ int main(int argc, char **argv)
fprintf(stderr, "Network init failure.\n");
return EXIT_FAILURE;
}
+ paging_global_init();
test_paging500(net);
test_paging500_samepgroup(net);