Pau Espin Pedrol | dcc67fc | 2018-11-21 13:55:47 +0100 | [diff] [blame] | 1 | #!/usr/bin/env python3 |
| 2 | |
| 3 | # Following test verifies CS paging works when MS is GPRS attached. |
| 4 | # See OS#2204 for more information. |
| 5 | |
| 6 | from osmo_gsm_tester.testenv import * |
| 7 | |
Pau Espin Pedrol | ffe1b08 | 2018-12-05 17:46:21 +0100 | [diff] [blame] | 8 | import testlib |
Pau Espin Pedrol | 40c7bc7 | 2020-05-05 13:41:42 +0200 | [diff] [blame] | 9 | tenv.test_import_modules_register_for_cleanup(testlib) |
Pau Espin Pedrol | ffe1b08 | 2018-12-05 17:46:21 +0100 | [diff] [blame] | 10 | from testlib import setup_run_iperf3_test_parallel |
Pau Espin Pedrol | dcc67fc | 2018-11-21 13:55:47 +0100 | [diff] [blame] | 11 | |
Pau Espin Pedrol | ffe1b08 | 2018-12-05 17:46:21 +0100 | [diff] [blame] | 12 | def ready_cb_place_voicecall(ms_li): |
| 13 | print('waiting a few secs to make sure iperf3 test is running') |
| 14 | sleep(2) |
| 15 | # At this point in time, TBF should be enabled on both MS since they are sending/receiving data. |
| 16 | print('iperf3 running, let\'s place a call') |
| 17 | ms_mo = ms_li[0] |
| 18 | ms_mt = ms_li[1] |
| 19 | assert len(ms_mo.call_id_list()) == 0 and len(ms_mt.call_id_list()) == 0 |
| 20 | mo_cid = ms_mo.call_dial(ms_mt) |
| 21 | mt_cid = ms_mt.call_wait_incoming(ms_mo) |
| 22 | print('dial success') |
Pau Espin Pedrol | dcc67fc | 2018-11-21 13:55:47 +0100 | [diff] [blame] | 23 | |
Pau Espin Pedrol | ffe1b08 | 2018-12-05 17:46:21 +0100 | [diff] [blame] | 24 | assert not ms_mo.call_is_active(mo_cid) and not ms_mt.call_is_active(mt_cid) |
| 25 | ms_mt.call_answer(mt_cid) |
| 26 | wait(ms_mo.call_is_active, mo_cid) |
| 27 | wait(ms_mt.call_is_active, mt_cid) |
| 28 | print('answer success, call established and ongoing') |
Pau Espin Pedrol | dcc67fc | 2018-11-21 13:55:47 +0100 | [diff] [blame] | 29 | |
Pau Espin Pedrol | ffe1b08 | 2018-12-05 17:46:21 +0100 | [diff] [blame] | 30 | sleep(5) # maintain the call active for 5 seconds |
Pau Espin Pedrol | dcc67fc | 2018-11-21 13:55:47 +0100 | [diff] [blame] | 31 | |
Pau Espin Pedrol | ffe1b08 | 2018-12-05 17:46:21 +0100 | [diff] [blame] | 32 | assert ms_mo.call_is_active(mo_cid) and ms_mt.call_is_active(mt_cid) |
| 33 | ms_mt.call_hangup(mt_cid) |
| 34 | wait(lambda: len(ms_mo.call_id_list()) == 0 and len(ms_mt.call_id_list()) == 0) |
| 35 | print('hangup success') |
Pau Espin Pedrol | dcc67fc | 2018-11-21 13:55:47 +0100 | [diff] [blame] | 36 | |
Pau Espin Pedrol | dcc67fc | 2018-11-21 13:55:47 +0100 | [diff] [blame] | 37 | |
Pau Espin Pedrol | ffe1b08 | 2018-12-05 17:46:21 +0100 | [diff] [blame] | 38 | setup_run_iperf3_test_parallel(2, ready_cb=ready_cb_place_voicecall) |