handover_test: add test 31: TCH/H: re-use dyn TS
Show undesired behavior of opening up another TCH/H timeslot even though
another TCH/H timeslot still has room for a second lchan. This is particularly
bad for dynamic timeslots, reducing PDCH as well as TCH/F resources.
Change-Id: If222835af92d832b848824e5466bdcaf9af8a614
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 46f7cb8..d2d3229 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -1694,6 +1694,18 @@
NULL
};
+static char *test_case_31[] = {
+ "2",
+
+ "Congestion check: re-use half used TCH/H to avoid switching more dyn TS to TCH/H\n"
+ ,
+ "create-bts", "1", "c+s4", "TCH/F", "TCH/F", "TCH/F", "dyn", "dyn", "dyn", "PDCH",
+ "set-ts-use", "0", "0", "*", "-", "-", "-", "PDCH", "TCH/H-", "PDCH", "PDCH",
+ "create-ms", "0", "TCH/H", "AMR",
+ /* bad: should re-use existing dyn TS instead of switching another one */
+ "expect-ts-use", "0", "0", "*", "-", "-", "-", "TCH/H-", "TCH/H-", "PDCH", "PDCH",
+ NULL
+};
static char **test_cases[] = {
test_case_0,
@@ -1727,6 +1739,7 @@
test_case_28,
test_case_29,
test_case_30,
+ test_case_31,
};
static const struct log_info_cat log_categories[] = {
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 787f33d..bd6f56f 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -236,3 +236,9 @@
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 30], [], [expout], [ignore])
AT_CLEANUP
+
+AT_SETUP([handover test 31])
+AT_KEYWORDS([handover])
+cat $abs_srcdir/handover/handover_test.ok > expout
+AT_CHECK([$abs_top_builddir/tests/handover/handover_test 31], [], [expout], [ignore])
+AT_CLEANUP