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/.
Max gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/4957 AllocTest: expand test output * print MS classes * unify test mode description * print additional info on test completion Change-Id: I30a4b8f561a9677f4e9ded33a051a249bd15a6a2 Related: OS#2282 --- M tests/alloc/AllocTest.cpp M tests/alloc/AllocTest.ok 2 files changed, 68 insertions(+), 73 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/57/4957/1 diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index cd24de1..9477295 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -479,7 +479,7 @@ { switch (t) { case TEST_MODE_UL_ONLY: return (char*)"UL only"; - case TEST_MODE_DL_ONLY: return (char*)"DL ONLY"; + case TEST_MODE_DL_ONLY: return (char*)"DL only"; case TEST_MODE_UL_AND_DL: return (char*)"UL and DL"; case TEST_MODE_DL_AND_UL: return (char*)"DL and UL"; case TEST_MODE_DL_AFTER_UL: return (char*)"DL after UL"; @@ -673,8 +673,8 @@ struct gprs_rlcmac_trx *trx; unsigned counter; - printf("Going to test assignment with many TBF, algorithm %s (%s)\n", - text, test_mode_descr(mode)); + printf("Going to test assignment with many TBF, algorithm %s class %u..%u (%s)\n", + text, min_class, max_class, test_mode_descr(mode)); bts = the_bts.bts_data(); bts->alloc_algorithm = algo; @@ -688,9 +688,11 @@ counter = alloc_many_tbfs(&the_bts, min_class, max_class, mode); - printf(" Successfully allocated %d UL TBFs\n", counter); + printf(" Successfully allocated %u UL TBFs, algorithm %s class %u..%u (%s)\n", + counter, text, min_class, max_class, test_mode_descr(mode)); if (counter != expect_num) - fprintf(stderr, " Expected %d TBFs for %s\n", expect_num, text); + fprintf(stderr, " Expected %u TBFs (got %u), algorithm %s class %u..%u (%s)\n", + expect_num, counter, text, min_class, max_class, test_mode_descr(mode)); OSMO_ASSERT(counter == expect_num); @@ -753,40 +755,33 @@ printf(" Successfully allocated %d TBFs\n", counter1); if (counter1 != (int)expect_num) - fprintf(stderr, " Expected %d TBFs for %s\n", expect_num, text); + fprintf(stderr, " Expected %d TBFs (got %d) for algorithm %s\n", expect_num, counter1, text); OSMO_ASSERT(expect_num == (unsigned)counter1); } +static inline void test_a_b_dyn(enum test_mode mode, uint8_t exp_A, uint8_t exp_B, uint8_t exp_dyn) +{ + test_successive_allocation_single(alloc_algorithm_a, 1, mode, exp_A, "A"); + test_successive_allocation_single(alloc_algorithm_b, 10, mode, exp_B, "B"); + test_successive_allocation_single(alloc_algorithm_dynamic, 10, mode, exp_dyn, "dynamic"); +} + static void test_successive_allocations() { - test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_UL_AND_DL, 35, "A"); - test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_UL_AND_DL, 32, "B class 10"); - test_successive_allocation_single(alloc_algorithm_b, 12, TEST_MODE_UL_AND_DL, 32, "B class 12"); + test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_UL_AND_DL, 35, "A"); + test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_UL_AND_DL, 32, "B"); + test_successive_allocation_single(alloc_algorithm_b, 12, TEST_MODE_UL_AND_DL, 32, "B"); - test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL, 32, "B class 1-12"); - test_successive_allocation(alloc_algorithm_b, 1, 29, TEST_MODE_UL_AND_DL, 32, "B class 1-29"); - test_successive_allocation(alloc_algorithm_dynamic, 1, 29, TEST_MODE_UL_AND_DL, 35, "dynamic class 1-29"); + test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL, 32, "B"); + test_successive_allocation(alloc_algorithm_b, 1, 29, TEST_MODE_UL_AND_DL, 32, "B"); + test_successive_allocation(alloc_algorithm_dynamic, 1, 29, TEST_MODE_UL_AND_DL, 35, "dynamic"); - test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_DL_AND_UL, 35, "A"); - test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_DL_AND_UL, 32, "B class 10"); - test_successive_allocation_single(alloc_algorithm_dynamic, 10, TEST_MODE_DL_AND_UL, 32, "dynamic class 10"); - - test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_DL_AFTER_UL, 160, "A"); - test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_DL_AFTER_UL, 32, "B class 10"); - test_successive_allocation_single(alloc_algorithm_dynamic, 10, TEST_MODE_DL_AFTER_UL, 95, "dynamic class 10"); - - test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_UL_AFTER_DL, 35, "A"); - test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_UL_AFTER_DL, 32, "B class 10"); - test_successive_allocation_single(alloc_algorithm_dynamic, 10, TEST_MODE_UL_AFTER_DL, 35, "dynamic class 10"); - - test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_UL_ONLY, 35, "A"); - test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_UL_ONLY, 32, "B class 10"); - test_successive_allocation_single(alloc_algorithm_dynamic, 10, TEST_MODE_UL_ONLY, 35, "dynamic class 10"); - - test_successive_allocation_single(alloc_algorithm_a, 1, TEST_MODE_DL_ONLY, 160, "A"); - test_successive_allocation_single(alloc_algorithm_b, 10, TEST_MODE_DL_ONLY, 32, "B class 10"); - test_successive_allocation_single(alloc_algorithm_dynamic, 10, TEST_MODE_DL_ONLY, 101, "dynamic class 10"); + test_a_b_dyn(TEST_MODE_DL_AND_UL, 35, 32, 32); + test_a_b_dyn(TEST_MODE_DL_AFTER_UL, 160, 32, 95); + test_a_b_dyn(TEST_MODE_UL_AFTER_DL, 35, 32, 35); + test_a_b_dyn(TEST_MODE_UL_ONLY, 35, 32, 35); + test_a_b_dyn(TEST_MODE_DL_ONLY, 160, 32, 101); } static void test_2_consecutive_dl_tbfs() diff --git a/tests/alloc/AllocTest.ok b/tests/alloc/AllocTest.ok index cbb65aa..a46bedb 100644 --- a/tests/alloc/AllocTest.ok +++ b/tests/alloc/AllocTest.ok @@ -8588,7 +8588,7 @@ Mass test: TS0(OOOOOOOO)TS7 MS_Class=27 Mass test: TS0(OOOOOOOO)TS7 MS_Class=28 Mass test: TS0(OOOOOOOO)TS7 MS_Class=29 -Going to test assignment with many TBF, algorithm A (UL and DL) +Going to test assignment with many TBF, algorithm A class 1..1 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... TBF[0] class 1 reserves .....C.. @@ -8624,8 +8624,8 @@ TBF[6] class 1 reserves .....C.. TBF[6] class 1 reserves ......C. TBF[6] class 1 reserves .......C - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (UL and DL) + Successfully allocated 35 UL TBFs, algorithm A class 1..1 (UL and DL) +Going to test assignment with many TBF, algorithm B class 10..10 (UL and DL) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -8658,8 +8658,8 @@ TBF[29] class 10 reserves ...CD... TBF[30] class 10 reserves ...CD... TBF[31] class 10 reserves ...CD... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm B class 12 (UL and DL) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (UL and DL) +Going to test assignment with many TBF, algorithm B class 12..12 (UL and DL) TBF[0] class 12 reserves ...DDCD. TBF[1] class 12 reserves .....DCD TBF[2] class 12 reserves ...DCD.. @@ -8692,8 +8692,8 @@ TBF[29] class 12 reserves ...CD... 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) + Successfully allocated 32 UL TBFs, algorithm B class 12..12 (UL and DL) +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.. TBF[2] class 3 reserves ......DC @@ -8726,8 +8726,8 @@ TBF[29] class 6 reserves ......CD TBF[30] class 7 reserves ...CD... 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) + Successfully allocated 32 UL TBFs, algorithm B class 1..12 (UL and DL) +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.. TBF[2] class 3 reserves ......DC @@ -8760,8 +8760,8 @@ TBF[29] class 1 reserves ...C.... TBF[30] class 2 reserves ......DC TBF[31] class 3 reserves ....DC.. - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 1-29 (UL and DL) + Successfully allocated 32 UL TBFs, algorithm B class 1..29 (UL and DL) +Going to test assignment with many TBF, algorithm dynamic class 1..29 (UL and DL) TBF[0] class 1 reserves ...C.... TBF[1] class 2 reserves ....DC.. TBF[2] class 3 reserves ......DC @@ -8797,8 +8797,8 @@ TBF[1] class 4 reserves ...C.... TBF[2] class 5 reserves ...C.... TBF[0] class 6 reserves ......C. - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm A (DL and UL) + Successfully allocated 35 UL TBFs, algorithm dynamic class 1..29 (UL and DL) +Going to test assignment with many TBF, algorithm A class 1..1 (DL and UL) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... TBF[0] class 1 reserves .....C.. @@ -8834,8 +8834,8 @@ TBF[6] class 1 reserves .....C.. TBF[6] class 1 reserves ......C. TBF[6] class 1 reserves .......C - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (DL and UL) + Successfully allocated 35 UL TBFs, algorithm A class 1..1 (DL and UL) +Going to test assignment with many TBF, algorithm B class 10..10 (DL and UL) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -8868,8 +8868,8 @@ TBF[29] class 10 reserves ...CD... TBF[30] class 10 reserves .....DDC TBF[31] class 10 reserves ...CD... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 10 (DL and UL) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (DL and UL) +Going to test assignment with many TBF, algorithm dynamic class 10..10 (DL and UL) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -8902,8 +8902,8 @@ TBF[29] class 10 reserves ...CD... TBF[30] class 10 reserves .....DDC TBF[31] class 10 reserves ...CD... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm A (DL after UL) + Successfully allocated 32 UL TBFs, algorithm dynamic class 10..10 (DL and UL) +Going to test assignment with many TBF, algorithm A class 1..1 (DL after UL) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... TBF[0] class 1 reserves .....C.. @@ -9064,8 +9064,8 @@ TBF[31] class 1 reserves .....C.. TBF[31] class 1 reserves ......C. TBF[31] class 1 reserves .......C - Successfully allocated 160 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (DL after UL) + Successfully allocated 160 UL TBFs, algorithm A class 1..1 (DL after UL) +Going to test assignment with many TBF, algorithm B class 10..10 (DL after UL) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -9098,8 +9098,8 @@ TBF[29] class 10 reserves .....DCD TBF[30] class 10 reserves ...DCD.. TBF[31] class 10 reserves .....DCD - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 10 (DL after UL) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (DL after UL) +Going to test assignment with many TBF, algorithm dynamic class 10..10 (DL after UL) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -9195,8 +9195,8 @@ TBF[28] class 10 reserves ......C. TBF[31] class 10 reserves ....C... TBF[30] class 10 reserves ......C. - Successfully allocated 95 UL TBFs -Going to test assignment with many TBF, algorithm A (UL after DL) + Successfully allocated 95 UL TBFs, algorithm dynamic class 10..10 (DL after UL) +Going to test assignment with many TBF, algorithm A class 1..1 (UL after DL) TBF[0] class 1 reserves ...U.... TBF[0] class 1 reserves ....U... TBF[0] class 1 reserves .....U.. @@ -9232,8 +9232,8 @@ TBF[6] class 1 reserves .....U.. TBF[6] class 1 reserves ......U. TBF[6] class 1 reserves .......U - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (UL after DL) + Successfully allocated 35 UL TBFs, algorithm A class 1..1 (UL after DL) +Going to test assignment with many TBF, algorithm B class 10..10 (UL after DL) TBF[0] class 10 reserves .....U.. TBF[1] class 10 reserves ......U. TBF[2] class 10 reserves ....U... @@ -9266,8 +9266,8 @@ TBF[29] class 10 reserves ...U.... TBF[30] class 10 reserves .......U TBF[31] class 10 reserves ...U.... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 10 (UL after DL) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (UL after DL) +Going to test assignment with many TBF, algorithm dynamic class 10..10 (UL after DL) TBF[0] class 10 reserves .....U.. TBF[1] class 10 reserves ......U. TBF[2] class 10 reserves ....U... @@ -9303,8 +9303,8 @@ TBF[0] class 10 reserves ...U.... TBF[1] class 10 reserves ...U.... TBF[2] class 10 reserves ...U.... - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm A (UL only) + Successfully allocated 35 UL TBFs, algorithm dynamic class 10..10 (UL after DL) +Going to test assignment with many TBF, algorithm A class 1..1 (UL only) TBF[0] class 1 reserves ...U.... TBF[0] class 1 reserves ....U... TBF[0] class 1 reserves .....U.. @@ -9340,8 +9340,8 @@ TBF[6] class 1 reserves .....U.. TBF[6] class 1 reserves ......U. TBF[6] class 1 reserves .......U - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (UL only) + Successfully allocated 35 UL TBFs, algorithm A class 1..1 (UL only) +Going to test assignment with many TBF, algorithm B class 10..10 (UL only) TBF[0] class 10 reserves .....U.. TBF[1] class 10 reserves ......U. TBF[2] class 10 reserves ....U... @@ -9374,8 +9374,8 @@ TBF[29] class 10 reserves ...U.... TBF[30] class 10 reserves ...U.... TBF[31] class 10 reserves ...U.... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 10 (UL only) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (UL only) +Going to test assignment with many TBF, algorithm dynamic class 10..10 (UL only) TBF[0] class 10 reserves .....U.. TBF[1] class 10 reserves ......U. TBF[2] class 10 reserves ....U... @@ -9411,8 +9411,8 @@ TBF[0] class 10 reserves ...U.... TBF[1] class 10 reserves ...U.... TBF[2] class 10 reserves ...U.... - Successfully allocated 35 UL TBFs -Going to test assignment with many TBF, algorithm A (DL ONLY) + Successfully allocated 35 UL TBFs, algorithm dynamic class 10..10 (UL only) +Going to test assignment with many TBF, algorithm A class 1..1 (DL only) TBF[0] class 1 reserves ...C.... TBF[0] class 1 reserves ....C... TBF[0] class 1 reserves .....C.. @@ -9573,8 +9573,8 @@ TBF[31] class 1 reserves .....C.. TBF[31] class 1 reserves ......C. TBF[31] class 1 reserves .......C - Successfully allocated 160 UL TBFs -Going to test assignment with many TBF, algorithm B class 10 (DL ONLY) + Successfully allocated 160 UL TBFs, algorithm A class 1..1 (DL only) +Going to test assignment with many TBF, algorithm B class 10..10 (DL only) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -9607,8 +9607,8 @@ TBF[29] class 10 reserves .....DCD TBF[30] class 10 reserves ...CD... TBF[31] class 10 reserves ...CD... - Successfully allocated 32 UL TBFs -Going to test assignment with many TBF, algorithm dynamic class 10 (DL ONLY) + Successfully allocated 32 UL TBFs, algorithm B class 10..10 (DL only) +Going to test assignment with many TBF, algorithm dynamic class 10..10 (DL only) TBF[0] class 10 reserves ...DDCD. TBF[1] class 10 reserves .....DCD TBF[2] class 10 reserves ...DCD.. @@ -9710,7 +9710,7 @@ TBF[29] class 10 reserves ....C... TBF[31] class 10 reserves ......C. TBF[31] class 10 reserves .......C - Successfully allocated 101 UL TBFs + Successfully allocated 101 UL TBFs, algorithm dynamic class 10..10 (DL only) Going to test assignment with many connections, algorithm A TBF[0] class 1 reserves ...C.... TBF[0] class 2 reserves ....C... -- To view, visit https://gerrit.osmocom.org/4957 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30a4b8f561a9677f4e9ded33a051a249bd15a6a2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max <msuraev at sysmocom.de>