aboutsummaryrefslogtreecommitdiffstats
path: root/tests/handover
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-01-05 12:18:58 +0100
committerlaforge <laforge@osmocom.org>2021-01-11 14:35:34 +0000
commitba9d45badb752c24d15fe3ab9934e3c549b75842 (patch)
treec3938bb353bdb8b622c4156e022e6f6422329ad4 /tests/handover
parent351e0f10026df2005e9f89e048f18403e0c8015c (diff)
handover_test: safeguard against unhandled chan req
Diffstat (limited to 'tests/handover')
-rw-r--r--tests/handover/handover_test.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index e3ccb64df..3747bd8db 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -704,8 +704,14 @@ int __wrap_abis_rsl_sendmsg(struct msgb *msg)
switch (dh->c.msg_type) {
case RSL_MT_CHAN_ACTIV:
rc = parse_chan_act(lchan, dh->data);
- if (rc == 0)
+ if (rc == 0) {
+ if (got_chan_req) {
+ fprintf(stderr, "Test script is erratic: a channel is requested"
+ " while a previous channel request is still unhandled\n");
+ exit(1);
+ }
got_chan_req = 1;
+ }
break;
case RSL_MT_RF_CHAN_REL:
rc = parse_chan_rel(lchan, dh->data);