aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-11-13 01:13:48 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2020-11-16 17:02:06 +0100
commitc01c8ba7140f2d1f32706b83ad9f8cb8671ee295 (patch)
treeba6695c98eac34b1d916679a1a013653137d3338
parent6733fdf8eca253a93666a9c00b2bf1795ad138b6 (diff)
handover test: add test 30: de-congest TCH/F by moving to dyn TS TCH/H
-rw-r--r--tests/handover/handover_test.c67
-rw-r--r--tests/testsuite.at6
2 files changed, 66 insertions, 7 deletions
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 5163623a5..46c3258ca 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -311,27 +311,27 @@ bool expect_ts_use(int bts_nr, int trx_nr, const char * const *ts_use)
trx = gsm_bts_trx_num(bts, trx_nr);
OSMO_ASSERT(trx);
- printf("Expect TS use:");
+ fprintf(stderr, "Expect TS use:");
for (i = 0; i < 8; i++)
- printf("\t%s", ts_use[i]);
- printf("\n");
- printf(" Got TS use:");
+ fprintf(stderr, "\t%s", ts_use[i]);
+ fprintf(stderr, "\n");
+ fprintf(stderr, " Got TS use:");
for (i = 0; i < 8; i++) {
struct gsm_bts_trx_ts *ts = &trx->ts[i];
const char *use = ts_use_str(ts);
- printf("\t%s", use);
+ fprintf(stderr, "\t%s", use);
if (!strcmp(ts_use[i], "*"))
continue;
if (strcmp(ts_use[i], use) && mismatching_ts < 0)
mismatching_ts = i;
}
- printf("\n");
+ fprintf(stderr, "\n");
if (mismatching_ts >= 0) {
- printf("Test failed: mismatching TS use in bts %d trx %d ts %d\n",
+ fprintf(stderr, "Test failed: mismatching TS use in bts %d trx %d ts %d\n",
bts_nr, trx_nr, mismatching_ts);
return false;
}
@@ -1460,6 +1460,58 @@ static char *test_case_29[] = {
NULL
};
+static char *test_case_30[] = {
+ "2",
+
+ "Congestion check: Balancing congestion by handover TCH/F -> TCH/H\n\n"
+ "With dynamic timeslots.\n"
+ "As soon as only one TCH/F is left, there should be HO to a dyn TS.\n"
+ ,
+ "create-bts", "1", "c+s4", "TCH/F", "TCH/F", "TCH/F", "dyn", "dyn", "dyn", "PDCH",
+ "set-min-free", "0", "TCH/F", "2",
+ "set-min-free", "0", "TCH/H", "0",
+ "as-enable", "0", "1",
+ "create-ms", "0", "TCH/F", "AMR",
+ "meas-rep", "0", "40","0", "1", "0","30",
+ "expect-ts-use", "0", "0", "*", "TCH/F", "-", "-", "PDCH", "PDCH", "PDCH", "PDCH",
+ "congestion-check",
+ "expect-no-chan",
+ "create-ms", "0", "TCH/F", "AMR",
+ "meas-rep", "1", "40","0", "1", "0","30",
+ "expect-ts-use", "0", "0", "*", "TCH/F", "TCH/F", "-", "PDCH", "PDCH", "PDCH", "PDCH",
+ "congestion-check",
+ "expect-no-chan",
+ "create-ms", "0", "TCH/F", "AMR",
+ "meas-rep", "2", "40","0", "1", "0","30",
+ "expect-ts-use", "0", "0", "*", "TCH/F", "TCH/F", "TCH/F", "PDCH", "PDCH", "PDCH", "PDCH",
+ "congestion-check",
+ "expect-no-chan",
+ "create-ms", "0", "TCH/F", "AMR",
+ "meas-rep", "3", "40","0", "1", "0","30",
+ "expect-ts-use", "0", "0", "*", "TCH/F", "TCH/F", "TCH/F", "TCH/F", "PDCH", "PDCH", "PDCH",
+ "congestion-check",
+ "expect-no-chan",
+ "create-ms", "0", "TCH/F", "AMR",
+ "meas-rep", "4", "40","0", "1", "0","30",
+ "expect-ts-use", "0", "0", "*", "TCH/F", "TCH/F", "TCH/F", "TCH/F", "TCH/F", "PDCH", "PDCH",
+ "congestion-check",
+ "expect-chan", "0", "6",
+ "ack-chan",
+ /* Not so good: rather than moving static TCH/F, we should favor freeing dyn TS, for more PDCH */
+ "expect-ho", "0", "1",
+ "ho-complete",
+ "expect-ts-use", "0", "0", "*", "-", "TCH/F", "TCH/F", "TCH/F", "TCH/F", "TCH/H-", "PDCH",
+ "congestion-check",
+ "expect-chan", "0", "6",
+ "ack-chan",
+ "expect-ho", "0", "2",
+ "ho-complete",
+ "expect-ts-use", "0", "0", "*", "-", "-", "TCH/F", "TCH/F", "TCH/F", "TCH/HH", "PDCH",
+ "congestion-check",
+ "expect-no-chan",
+ NULL
+};
+
static char **test_cases[] = {
test_case_0,
@@ -1492,6 +1544,7 @@ static char **test_cases[] = {
test_case_27,
test_case_28,
test_case_29,
+ test_case_30,
};
static const struct log_info_cat log_categories[] = {
diff --git a/tests/testsuite.at b/tests/testsuite.at
index a0d85ce3e..787f33d4f 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -230,3 +230,9 @@ AT_KEYWORDS([handover])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 29], [], [expout], [ignore])
AT_CLEANUP
+
+AT_SETUP([handover test 30])
+AT_KEYWORDS([handover])
+cat $abs_srcdir/handover/handover_test.ok > expout
+AT_CHECK([$abs_top_builddir/tests/handover/handover_test 30], [], [expout], [ignore])
+AT_CLEANUP