osmo-bsc/tests/handover/test_dyn_ts_favor_moving_ha...

43 lines
2.0 KiB
Plaintext
Raw Normal View History

# Congestion check: favor moving a TCH/H that frees a half-used dyn TS completely.
# The algorithm should notice that this is about moving an lchan within the same cell, so all candidates will remain
# with unchanged rxlev after a re-assignment; hence the current rxlev for each candidate should not make a difference.
handover_test: implement as VTY shell Drop the string arrays, and move the 32 handover tests to separate script files. Instead of the peculiar implementation and instead of cryptic commands, implement the handover test scripts as a VTY. handover_test.c now sets up a VTY with handover testing VTY commands. It also features the complete and unabridged VTY configuration nodes of osmo-bsc itself. That allows dropping various ho script commands. Before: static char *test_case_14[] = { "Handover to congested cell, if RX level is below minimum\n\n" "The better neighbor cell is congested, so no handover is performed.\n" "If the RX level of the current cell drops below minimum acceptable\n" "level, the handover is performed.\n", "create-n-bts", "2", "create-ms", "0", "TCH/F", "AMR", "expect-ts-use", "0", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-", "set-min-free", "1", "TCH/F", "4", "set-min-free", "1", "TCH/H", "4", "meas-rep", "0","0","1","0", "10","0", "1","0","30", "expect-no-chan", "meas-rep", "0","0","1","0", "9","0", "1","0","30", "expect-chan", "1", "1", "ack-chan", "expect-ho", "0", "1", "ho-complete", "expect-ts-use", "0", "0", "*", "-", "-", "-", "-", "-", "-", "-", "expect-ts-use", "1", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-", } After: # Handover to congested cell, if RX level is below minimum # The better neighbor cell is congested, so no handover is performed. # If the RX level of the current cell drops below minimum acceptable # level, the handover is performed. create-n-bts 2 set-ts-use trx 0 0 states * TCH/F - - - - - - network bts 1 handover2 min-free-slots tch/f 4 handover2 min-free-slots tch/h 4 meas-rep lchan 0 0 1 0 rxlev 10 rxqual 0 ta 0 neighbors 30 expect-no-chan meas-rep lchan 0 0 1 0 rxlev 9 rxqual 0 ta 0 neighbors 30 expect-ho from lchan 0 0 1 0 to lchan 1 0 1 0 expect-ts-use trx 0 0 states * - - - - - - - expect-ts-use trx 1 0 states * TCH/F - - - - - - Note how osmo-bsc's stock vty config nodes seamlessly integrate in the test steps: just enter a configuration node, modify some values, and indenting trivially takes care of exiting nodes correctly. Running a test manually: ./handover_test test_0123.ho_vty Instead of calling each test separately in testsuite.at, have a handover_tests.sh script that picks up new tests just by presence of files named test*.ho_vty. Rationale: It was considered to move handover tests to the TTCN suite, but there is an advantage in having these C tests: they run super fast and catch bugs even in the gerrit verification job, potentially saving a lot of time. It is a reality that I need more of these tests, for dynamic timeslots and TCH/F <-> TCH/H switches. The way the handover tests are written, as arrays of strings containing cryptic fixed-argument script commands, has been a pain to work with from the start, and now I am no longer willing to endure that pain. Change-Id: Ie238ebe41039d3fa44c9699937589e000883e052
2020-11-18 15:25:55 +00:00
create-bts trx-count 1 timeslots c+s4 TCH/F dyn dyn dyn dyn - -
network
handover2 min-free-slots tch/h 6
# Test with identical rxlev across lchans (trivial and unrealistic)
set-ts-use trx 0 0 states * - TCH/HH TCH/H- TCH/HH pdch - -
meas-rep lchan * * * * rxlev 30 rxqual 0 ta 0
handover_test: implement as VTY shell Drop the string arrays, and move the 32 handover tests to separate script files. Instead of the peculiar implementation and instead of cryptic commands, implement the handover test scripts as a VTY. handover_test.c now sets up a VTY with handover testing VTY commands. It also features the complete and unabridged VTY configuration nodes of osmo-bsc itself. That allows dropping various ho script commands. Before: static char *test_case_14[] = { "Handover to congested cell, if RX level is below minimum\n\n" "The better neighbor cell is congested, so no handover is performed.\n" "If the RX level of the current cell drops below minimum acceptable\n" "level, the handover is performed.\n", "create-n-bts", "2", "create-ms", "0", "TCH/F", "AMR", "expect-ts-use", "0", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-", "set-min-free", "1", "TCH/F", "4", "set-min-free", "1", "TCH/H", "4", "meas-rep", "0","0","1","0", "10","0", "1","0","30", "expect-no-chan", "meas-rep", "0","0","1","0", "9","0", "1","0","30", "expect-chan", "1", "1", "ack-chan", "expect-ho", "0", "1", "ho-complete", "expect-ts-use", "0", "0", "*", "-", "-", "-", "-", "-", "-", "-", "expect-ts-use", "1", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-", } After: # Handover to congested cell, if RX level is below minimum # The better neighbor cell is congested, so no handover is performed. # If the RX level of the current cell drops below minimum acceptable # level, the handover is performed. create-n-bts 2 set-ts-use trx 0 0 states * TCH/F - - - - - - network bts 1 handover2 min-free-slots tch/f 4 handover2 min-free-slots tch/h 4 meas-rep lchan 0 0 1 0 rxlev 10 rxqual 0 ta 0 neighbors 30 expect-no-chan meas-rep lchan 0 0 1 0 rxlev 9 rxqual 0 ta 0 neighbors 30 expect-ho from lchan 0 0 1 0 to lchan 1 0 1 0 expect-ts-use trx 0 0 states * - - - - - - - expect-ts-use trx 1 0 states * TCH/F - - - - - - Note how osmo-bsc's stock vty config nodes seamlessly integrate in the test steps: just enter a configuration node, modify some values, and indenting trivially takes care of exiting nodes correctly. Running a test manually: ./handover_test test_0123.ho_vty Instead of calling each test separately in testsuite.at, have a handover_tests.sh script that picks up new tests just by presence of files named test*.ho_vty. Rationale: It was considered to move handover tests to the TTCN suite, but there is an advantage in having these C tests: they run super fast and catch bugs even in the gerrit verification job, potentially saving a lot of time. It is a reality that I need more of these tests, for dynamic timeslots and TCH/F <-> TCH/H switches. The way the handover tests are written, as arrays of strings containing cryptic fixed-argument script commands, has been a pain to work with from the start, and now I am no longer willing to endure that pain. Change-Id: Ie238ebe41039d3fa44c9699937589e000883e052
2020-11-18 15:25:55 +00:00
congestion-check
expect-as from lchan 0 0 3 0 to lchan 0 0 1 0
handover_test: implement as VTY shell Drop the string arrays, and move the 32 handover tests to separate script files. Instead of the peculiar implementation and instead of cryptic commands, implement the handover test scripts as a VTY. handover_test.c now sets up a VTY with handover testing VTY commands. It also features the complete and unabridged VTY configuration nodes of osmo-bsc itself. That allows dropping various ho script commands. Before: static char *test_case_14[] = { "Handover to congested cell, if RX level is below minimum\n\n" "The better neighbor cell is congested, so no handover is performed.\n" "If the RX level of the current cell drops below minimum acceptable\n" "level, the handover is performed.\n", "create-n-bts", "2", "create-ms", "0", "TCH/F", "AMR", "expect-ts-use", "0", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-", "set-min-free", "1", "TCH/F", "4", "set-min-free", "1", "TCH/H", "4", "meas-rep", "0","0","1","0", "10","0", "1","0","30", "expect-no-chan", "meas-rep", "0","0","1","0", "9","0", "1","0","30", "expect-chan", "1", "1", "ack-chan", "expect-ho", "0", "1", "ho-complete", "expect-ts-use", "0", "0", "*", "-", "-", "-", "-", "-", "-", "-", "expect-ts-use", "1", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-", } After: # Handover to congested cell, if RX level is below minimum # The better neighbor cell is congested, so no handover is performed. # If the RX level of the current cell drops below minimum acceptable # level, the handover is performed. create-n-bts 2 set-ts-use trx 0 0 states * TCH/F - - - - - - network bts 1 handover2 min-free-slots tch/f 4 handover2 min-free-slots tch/h 4 meas-rep lchan 0 0 1 0 rxlev 10 rxqual 0 ta 0 neighbors 30 expect-no-chan meas-rep lchan 0 0 1 0 rxlev 9 rxqual 0 ta 0 neighbors 30 expect-ho from lchan 0 0 1 0 to lchan 1 0 1 0 expect-ts-use trx 0 0 states * - - - - - - - expect-ts-use trx 1 0 states * TCH/F - - - - - - Note how osmo-bsc's stock vty config nodes seamlessly integrate in the test steps: just enter a configuration node, modify some values, and indenting trivially takes care of exiting nodes correctly. Running a test manually: ./handover_test test_0123.ho_vty Instead of calling each test separately in testsuite.at, have a handover_tests.sh script that picks up new tests just by presence of files named test*.ho_vty. Rationale: It was considered to move handover tests to the TTCN suite, but there is an advantage in having these C tests: they run super fast and catch bugs even in the gerrit verification job, potentially saving a lot of time. It is a reality that I need more of these tests, for dynamic timeslots and TCH/F <-> TCH/H switches. The way the handover tests are written, as arrays of strings containing cryptic fixed-argument script commands, has been a pain to work with from the start, and now I am no longer willing to endure that pain. Change-Id: Ie238ebe41039d3fa44c9699937589e000883e052
2020-11-18 15:25:55 +00:00
expect-ts-use trx 0 0 states * TCH/F TCH/HH pdch TCH/HH pdch - -
# clear measurements for the next run
set-ts-use trx 0 0 states * - pdch pdch pdch pdch - -
# Check that a weaker rxlev coming up earlier in the congestion checking loop does not override the favored half-used
# TCH/H
set-ts-use trx 0 0 states * - TCH/HH TCH/H- TCH/HH pdch - -
meas-rep lchan 0 0 2 1 rxlev 30 rxqual 0 ta 0
meas-rep lchan 0 0 3 0 rxlev 31 rxqual 0 ta 0
meas-rep lchan 0 0 4 0 rxlev 32 rxqual 0 ta 0
meas-rep lchan 0 0 4 1 rxlev 33 rxqual 0 ta 0
congestion-check
expect-as from lchan 0 0 3 0 to lchan 0 0 1 0
expect-ts-use trx 0 0 states * TCH/F TCH/HH pdch TCH/HH pdch - -
# clear measurements for the next run
set-ts-use trx 0 0 states * - pdch pdch pdch pdch - -
# Check that a weaker rxlev coming up later in the congestion checking loop does not override the favored half-used
# TCH/H
set-ts-use trx 0 0 states * - TCH/HH TCH/H- TCH/HH pdch - -
meas-rep lchan 0 0 2 1 rxlev 34 rxqual 0 ta 0
meas-rep lchan 0 0 3 0 rxlev 33 rxqual 0 ta 0
meas-rep lchan 0 0 4 0 rxlev 32 rxqual 0 ta 0
meas-rep lchan 0 0 4 1 rxlev 31 rxqual 0 ta 0
congestion-check
expect-as from lchan 0 0 3 0 to lchan 0 0 1 0
expect-ts-use trx 0 0 states * TCH/F TCH/HH pdch TCH/HH pdch - -