osmo-bsc/tests/handover/test_amr_tch_f_to_h_congest...

16 lines
478 B
Plaintext
Raw Normal View History

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: Balancing congestion by handover TCH/F -> TCH/H
# One BTS, and TCH/F are considered congested, TCH/H are not.
create-n-bts 1
network
bts 0
handover2 min-free-slots tch/f 3
handover2 min-free-slots tch/h 0
set-ts-use trx 0 0 states * TCH/F TCH/F - - TCH/H- - -
meas-rep lchan 0 0 1 0 rxlev 30 rxqual 0 ta 0 neighbors 30
expect-no-chan
congestion-check
expect-as from lchan 0 0 1 0 to lchan 0 0 5 1
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 - -