aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-01 12:19:40 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-07 09:35:26 +0200
commited46afda6f647e47702379abacf632e7dcc9ee5b (patch)
tree046fd778dfc72b09e50be23c7d77ad0eaa0a164f /tests
parentea65c72d069c279951c022daf337d99e3aaa670a (diff)
alloc: Only use common UL slots when calculating the capacity
Currently al possible UL slots are included in the capacity calculation which is the base of the slot selection. Nevertheless UL-only slots will never be used, since only one uplink slot (which must be a common slot) will be used. This patch changes the code to only include common slots in the capacity sum. Note that this might not be optimal if algorithm B supported multiple uplink slots. Sponsored-by: On-Waves ehf
Diffstat (limited to 'tests')
-rw-r--r--tests/alloc/AllocTest.cpp6
-rw-r--r--tests/alloc/AllocTest.err4
-rw-r--r--tests/alloc/AllocTest.ok109
3 files changed, 65 insertions, 54 deletions
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp
index 187b88a..b804aab 100644
--- a/tests/alloc/AllocTest.cpp
+++ b/tests/alloc/AllocTest.cpp
@@ -567,11 +567,11 @@ static void test_successive_allocation()
test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_UL_AND_DL,
32, "algorithm B class 10 (UL and DL)");
test_successive_allocation(alloc_algorithm_b, 12, 12, TEST_MODE_UL_AND_DL,
- 29, "algorithm B class 12 (UL and DL)");
+ 32, "algorithm B class 12 (UL and DL)");
test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL,
- 31, "algorithm B class 1-12 (UL and DL)");
+ 32, "algorithm B class 1-12 (UL and DL)");
test_successive_allocation(alloc_algorithm_b, 1, 29, TEST_MODE_UL_AND_DL,
- 24, "algorithm B class 1-29 (UL and DL)");
+ 31, "algorithm B class 1-29 (UL and DL)");
test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_DL_AND_UL,
32, "algorithm A (DL and UL)");
diff --git a/tests/alloc/AllocTest.err b/tests/alloc/AllocTest.err
index 58a57d2..d38a1ce 100644
--- a/tests/alloc/AllocTest.err
+++ b/tests/alloc/AllocTest.err
@@ -4,8 +4,8 @@ No TFI available.
- Failed to allocate a TS, no USF available
No TFI available.
No TFI available.
-No USF available
-No USF available
+No TFI available.
+No TFI available.
No USF available
No TFI available.
No USF available
diff --git a/tests/alloc/AllocTest.ok b/tests/alloc/AllocTest.ok
index 4b6aad9..f8fb485 100644
--- a/tests/alloc/AllocTest.ok
+++ b/tests/alloc/AllocTest.ok
@@ -8659,34 +8659,37 @@ Going to test assignment with many TBF, algorithm B class 10 (UL and DL)
Going to test assignment with many TBF, algorithm B class 12 (UL and DL)
TBF[0] class 12 reserves ...DDCD.
TBF[1] class 12 reserves .....DCD
- TBF[2] class 12 reserves ...CD...
+ TBF[2] class 12 reserves ...DCD..
TBF[3] class 12 reserves .....DDC
- TBF[4] class 12 reserves ...DC...
+ TBF[4] class 12 reserves ...DCD..
TBF[5] class 12 reserves .....DCD
- TBF[6] class 12 reserves ...CD...
+ TBF[6] class 12 reserves ...DDC..
TBF[7] class 12 reserves .....DDC
- TBF[8] class 12 reserves ...DC...
+ TBF[8] class 12 reserves ...DCD..
TBF[9] class 12 reserves .....DCD
- TBF[10] class 12 reserves ...CD...
+ TBF[10] class 12 reserves ...DDC..
TBF[11] class 12 reserves .....DDC
- TBF[12] class 12 reserves ...DC...
+ TBF[12] class 12 reserves ...DCD..
TBF[13] class 12 reserves .....DCD
- TBF[14] class 12 reserves ...CD...
+ TBF[14] class 12 reserves ...DDC..
TBF[15] class 12 reserves .....DDC
- TBF[16] class 12 reserves ...DC...
+ TBF[16] class 12 reserves ...DCD..
TBF[17] class 12 reserves .....DCD
- TBF[18] class 12 reserves ...CD...
+ TBF[18] class 12 reserves ...DDC..
TBF[19] class 12 reserves .....DDC
- TBF[20] class 12 reserves ...DC...
+ TBF[20] class 12 reserves ...DCD..
TBF[21] class 12 reserves .....DCD
TBF[22] class 12 reserves ...CD...
TBF[23] class 12 reserves .....DDC
- TBF[24] class 12 reserves ...DC...
- TBF[25] class 12 reserves .....DCD
- TBF[26] class 12 reserves ...CD...
- TBF[27] class 12 reserves .....DDC
- TBF[28] class 12 reserves ...DC...
- Successfully allocated 29 UL TBFs
+ TBF[24] class 12 reserves ...CD...
+ TBF[25] class 12 reserves ...CD...
+ TBF[26] class 12 reserves .....DCD
+ TBF[27] class 12 reserves ...CD...
+ TBF[28] class 12 reserves ....DCD.
+ TBF[29] class 12 reserves .....DDC
+ TBF[30] class 12 reserves ...CD...
+ TBF[31] class 12 reserves ...CD...
+ Successfully allocated 32 UL TBFs
Going to test assignment with many TBF, algorithm B class 1-12 (UL and DL)
TBF[0] class 1 reserves ...C....
TBF[1] class 2 reserves ....DC..
@@ -8698,28 +8701,29 @@ Going to test assignment with many TBF, algorithm B class 1-12 (UL and DL)
TBF[7] class 8 reserves ....DDCD
TBF[8] class 9 reserves ...DCD..
TBF[9] class 10 reserves .....DDC
- TBF[10] class 11 reserves ...CD...
- TBF[11] class 12 reserves ...C....
- TBF[12] class 1 reserves .......C
+ TBF[10] class 11 reserves ...DCD..
+ TBF[11] class 12 reserves .....DCD
+ TBF[12] class 1 reserves ...C....
TBF[13] class 2 reserves ......DC
- TBF[14] class 3 reserves ...C....
+ TBF[14] class 3 reserves ...DC...
TBF[15] class 4 reserves ....DCD.
- TBF[16] class 5 reserves ......CD
- TBF[17] class 6 reserves ...DC...
- TBF[18] class 7 reserves .....C..
+ TBF[16] class 5 reserves ...CD...
+ TBF[17] class 6 reserves ......CD
+ TBF[18] class 7 reserves ...CD...
TBF[19] class 8 reserves ....DDCD
- TBF[20] class 9 reserves .....DCD
- TBF[21] class 10 reserves ...DCD..
- TBF[22] class 11 reserves ...DC...
- TBF[23] class 12 reserves ...C....
- TBF[24] class 1 reserves .......C
+ TBF[20] class 9 reserves .....DDC
+ TBF[21] class 10 reserves ...DDC..
+ TBF[22] class 11 reserves .....DDC
+ TBF[23] class 12 reserves ...DCD..
+ TBF[24] class 1 reserves ...C....
TBF[25] class 2 reserves ......DC
- TBF[26] class 3 reserves ...C....
- TBF[27] class 4 reserves ....DCD.
- TBF[28] class 5 reserves ......CD
- TBF[29] class 6 reserves ...DC...
- TBF[30] class 7 reserves ......C.
- Successfully allocated 31 UL TBFs
+ TBF[26] class 3 reserves ......DC
+ TBF[27] class 4 reserves ...DCD..
+ TBF[28] class 5 reserves ...CD...
+ TBF[29] class 6 reserves .....CD.
+ TBF[30] class 7 reserves ...DC...
+ TBF[31] class 8 reserves ....DDCD
+ Successfully allocated 32 UL TBFs
Going to test assignment with many TBF, algorithm B class 1-29 (UL and DL)
TBF[0] class 1 reserves ...C....
TBF[1] class 2 reserves ....DC..
@@ -8731,21 +8735,28 @@ Going to test assignment with many TBF, algorithm B class 1-29 (UL and DL)
TBF[7] class 8 reserves ....DDCD
TBF[8] class 9 reserves ...DCD..
TBF[9] class 10 reserves .....DDC
- TBF[10] class 11 reserves ...CD...
- TBF[11] class 12 reserves ...C....
- TBF[12] class 13 reserves .....CDD
- TBF[13] class 14 reserves ....DDCD
- TBF[14] class 15 reserves ...DCD..
- TBF[15] class 16 reserves ...DCD..
- TBF[16] class 17 reserves ...DDDDC
- TBF[17] class 18 reserves ...DDC..
- TBF[18] class 19 reserves ...DDCDD
- TBF[19] class 20 reserves ...DDCDD
- TBF[20] class 21 reserves ....CD..
- TBF[21] class 22 reserves .....DC.
- TBF[22] class 23 reserves ...C....
- TBF[23] class 24 reserves ...DDCDD
- Successfully allocated 24 UL TBFs
+ TBF[10] class 11 reserves ...DCD..
+ TBF[11] class 12 reserves .....DCD
+ TBF[12] class 13 reserves ...CDD..
+ TBF[13] class 14 reserves ....DCDD
+ TBF[14] class 15 reserves ...DDDDC
+ TBF[15] class 16 reserves ...DDCDD
+ TBF[16] class 17 reserves ...DDDCD
+ TBF[17] class 18 reserves ...DDDDC
+ TBF[18] class 19 reserves ...DCDD.
+ TBF[19] class 20 reserves ...DCDD.
+ TBF[20] class 21 reserves ...DDCD.
+ TBF[21] class 22 reserves ....DDCD
+ TBF[22] class 23 reserves ...DDDDC
+ TBF[23] class 24 reserves ...DCDD.
+ TBF[24] class 25 reserves ....DCDD
+ TBF[25] class 26 reserves ...DCDD.
+ TBF[26] class 27 reserves ...DDDDC
+ TBF[27] class 28 reserves ....DDCD
+ TBF[28] class 29 reserves ...CDD..
+ TBF[29] class 1 reserves ...C....
+ TBF[30] class 2 reserves ......DC
+ Successfully allocated 31 UL TBFs
Going to test assignment with many TBF, algorithm A (DL and UL)
TBF[0] class 1 reserves ...C....
TBF[1] class 1 reserves ....C...