This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
arvind.sirsikar gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/818
DL TS allocation: add test case to show TS allocation for 2nd DL TBF
This patch adds a test case test_2_consecutive_dl_tbfs which
expects a current bug with TS allocation for 2nd DL TBF.
The test's expectation is corrected along with the bug fix in a
subsequent commit
Related: OS#1792
Change-Id: I890e4fbb2b64037e051433e70082a197e2a929a6
---
M tests/alloc/AllocTest.cpp
M tests/alloc/AllocTest.ok
2 files changed, 55 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/18/818/1
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp
index b636b6e..0b4d1c1 100644
--- a/tests/alloc/AllocTest.cpp
+++ b/tests/alloc/AllocTest.cpp
@@ -792,6 +792,57 @@
test_many_connections(alloc_algorithm_dynamic, 160, "algorithm dynamic");
}
+static void test_2_consecutive_dl_tbfs()
+{
+ BTS the_bts;
+ struct gprs_rlcmac_bts *bts;
+ struct gprs_rlcmac_trx *trx;
+ uint8_t ms_class = 11;
+ uint8_t egprs_ms_class = 11;
+ gprs_rlcmac_tbf *dl_tbf1, *dl_tbf2;
+ uint8_t numTs1 = 0, numTs2 = 0;
+
+ printf("Testing DL TS allocation for Multi UEs\n");
+
+ bts = the_bts.bts_data();
+ bts->alloc_algorithm = alloc_algorithm_b;
+
+ trx = &bts->trx[0];
+ trx->pdch[4].enable();
+ trx->pdch[5].enable();
+ trx->pdch[6].enable();
+ trx->pdch[7].enable();
+
+ dl_tbf1 = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, egprs_ms_class, 0);
+ OSMO_ASSERT(dl_tbf1);
+
+ for (int i = 0; i < 8; i++) {
+ if (dl_tbf1->pdch[i])
+ numTs1++;
+ }
+ OSMO_ASSERT(numTs1 == 4);
+ printf("TBF1: numTs(%d)\n", numTs1);
+
+ dl_tbf2 = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, egprs_ms_class, 0);
+ OSMO_ASSERT(dl_tbf2);
+
+ for (int i = 0; i < 8; i++) {
+ if (dl_tbf2->pdch[i])
+ numTs2++;
+ }
+
+ /*
+ * TODO: currently 2nd DL TBF gets 3 TS
+ * This behaviour will be fixed in subsequent patch
+ */
+ printf("TBF2: numTs(%d)\n", numTs2);
+ OSMO_ASSERT(numTs2 == 3);
+ OSMO_ASSERT(numTs2 != numTs1);
+
+ tbf_free(dl_tbf1);
+ tbf_free(dl_tbf2);
+}
+
int main(int argc, char **argv)
{
tall_pcu_ctx = talloc_named_const(NULL, 1, "moiji-mobile AllocTest context");
@@ -809,6 +860,7 @@
test_alloc_b();
test_successive_allocation();
test_many_connections();
+ test_2_consecutive_dl_tbfs();
return EXIT_SUCCESS;
}
diff --git a/tests/alloc/AllocTest.ok b/tests/alloc/AllocTest.ok
index 9f88186..cbb65aa 100644
--- a/tests/alloc/AllocTest.ok
+++ b/tests/alloc/AllocTest.ok
@@ -10793,3 +10793,6 @@
TBF[31] class 14 reserves ......C.
TBF[31] class 15 reserves .......C
Successfully allocated 160 TBFs
+Testing DL TS allocation for Multi UEs
+TBF1: numTs(4)
+TBF2: numTs(3)
--
To view, visit https://gerrit.osmocom.org/818
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I890e4fbb2b64037e051433e70082a197e2a929a6
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: arvind.sirsikar <arvind.sirsikar at radisys.com>