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/.
Pau Espin Pedrol gerrit-no-reply at lists.osmocom.orgPau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/12143 ) Change subject: test: cs_paging_gprs_active: Make sure gprs data (TBF) is ongoing ...................................................................... test: cs_paging_gprs_active: Make sure gprs data (TBF) is ongoing PACCH is used for paging only if the MS is actively using a PDCH, and the only way to be sure that's happening is to place some data through the GPRS path so MS has TBF in use when the call is placed. Change-Id: Id29391d75101d94e2cd58f444b383f4c5217ab6a --- M suites/gprs/cs_paging_gprs_active.py M suites/gprs/lib/testlib.py 2 files changed, 30 insertions(+), 73 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, but someone else must approve Pau Espin Pedrol: Looks good to me, approved diff --git a/suites/gprs/cs_paging_gprs_active.py b/suites/gprs/cs_paging_gprs_active.py index fc0e160..b7dead2 100755 --- a/suites/gprs/cs_paging_gprs_active.py +++ b/suites/gprs/cs_paging_gprs_active.py @@ -5,79 +5,34 @@ from osmo_gsm_tester.testenv import * -hlr = suite.hlr() -bts = suite.bts() -pcu = bts.pcu() -mgw_msc = suite.mgw() -mgw_bsc = suite.mgw() -stp = suite.stp() -ggsn = suite.ggsn() -sgsn = suite.sgsn(hlr, ggsn) -msc = suite.msc(hlr, mgw_msc, stp) -bsc = suite.bsc(msc, mgw_bsc, stp) -ms_mo = suite.modem() -ms_mt = suite.modem() +import testlib +suite.test_import_modules_register_for_cleanup(testlib) +from testlib import setup_run_iperf3_test_parallel -bsc.bts_add(bts) -sgsn.bts_add(bts) +def ready_cb_place_voicecall(ms_li): + print('waiting a few secs to make sure iperf3 test is running') + sleep(2) + # At this point in time, TBF should be enabled on both MS since they are sending/receiving data. + print('iperf3 running, let\'s place a call') + ms_mo = ms_li[0] + ms_mt = ms_li[1] + assert len(ms_mo.call_id_list()) == 0 and len(ms_mt.call_id_list()) == 0 + mo_cid = ms_mo.call_dial(ms_mt) + mt_cid = ms_mt.call_wait_incoming(ms_mo) + print('dial success') -print('start network...') -hlr.start() -stp.start() -ggsn.start() -sgsn.start() -msc.start() -mgw_msc.start() -mgw_bsc.start() -bsc.start() + assert not ms_mo.call_is_active(mo_cid) and not ms_mt.call_is_active(mt_cid) + ms_mt.call_answer(mt_cid) + wait(ms_mo.call_is_active, mo_cid) + wait(ms_mt.call_is_active, mt_cid) + print('answer success, call established and ongoing') -bts.start() -wait(bsc.bts_is_connected, bts) -print('Waiting for bts to be ready...') -wait(bts.ready_for_pcu) -pcu.start() + sleep(5) # maintain the call active for 5 seconds -hlr.subscriber_add(ms_mo) -hlr.subscriber_add(ms_mt) + assert ms_mo.call_is_active(mo_cid) and ms_mt.call_is_active(mt_cid) + ms_mt.call_hangup(mt_cid) + wait(lambda: len(ms_mo.call_id_list()) == 0 and len(ms_mt.call_id_list()) == 0) + print('hangup success') -ms_mo.connect(msc.mcc_mnc()) -ms_mt.connect(msc.mcc_mnc()) -ms_mo.attach() -ms_mt.attach() -ms_mo.log_info() -ms_mt.log_info() - -print('waiting for modems to attach...') -wait(ms_mo.is_connected, msc.mcc_mnc()) -wait(ms_mt.is_connected, msc.mcc_mnc()) -wait(msc.subscriber_attached, ms_mo, ms_mt) - -print('waiting for modems to attach to data services...') -wait(ms_mo.is_attached) -wait(ms_mt.is_attached) - -# We need to use inet46 since ofono qmi only uses ipv4v6 eua (OS#2713) -ctx_id_v4_mo = ms_mo.activate_context(apn='inet46', protocol=ms_mo.CTX_PROT_IPv4) -ctx_id_v4_mt = ms_mt.activate_context(apn='inet46', protocol=ms_mt.CTX_PROT_IPv4) - -assert len(ms_mo.call_id_list()) == 0 and len(ms_mt.call_id_list()) == 0 -mo_cid = ms_mo.call_dial(ms_mt) -mt_cid = ms_mt.call_wait_incoming(ms_mo) -print('dial success') - -assert not ms_mo.call_is_active(mo_cid) and not ms_mt.call_is_active(mt_cid) -ms_mt.call_answer(mt_cid) -wait(ms_mo.call_is_active, mo_cid) -wait(ms_mt.call_is_active, mt_cid) -print('answer success, call established and ongoing') - -sleep(5) # maintain the call active for 5 seconds - -assert ms_mo.call_is_active(mo_cid) and ms_mt.call_is_active(mt_cid) -ms_mt.call_hangup(mt_cid) -wait(lambda: len(ms_mo.call_id_list()) == 0 and len(ms_mt.call_id_list()) == 0) -print('hangup success') - -ms_mo.deactivate_context(ctx_id_v4_mo) -ms_mt.deactivate_context(ctx_id_v4_mt) +setup_run_iperf3_test_parallel(2, ready_cb=ready_cb_place_voicecall) diff --git a/suites/gprs/lib/testlib.py b/suites/gprs/lib/testlib.py index 13a6671..ac3a847 100644 --- a/suites/gprs/lib/testlib.py +++ b/suites/gprs/lib/testlib.py @@ -11,7 +11,7 @@ print("\tSEND: %d KB, %d kbps, %d seconds" % (cli_sent['bytes']/1000, cli_sent['bits_per_second']/1000, cli_sent['seconds'])) print("\tRECV: %d KB, %d kbps, %d seconds" % (cli_recv['bytes']/1000, cli_recv['bits_per_second']/1000, cli_recv['seconds'])) -def run_iperf3_cli_parallel(iperf3clients, ms_li): +def run_iperf3_cli_parallel(iperf3clients, ms_li, ready_cb): assert len(iperf3clients) == len(ms_li) procs = [] for i in range(len(iperf3clients)): @@ -20,6 +20,8 @@ try: for proc in procs: proc.launch() + if ready_cb: + ready_cb(ms_li) for proc in procs: proc.wait() except Exception as e: @@ -28,7 +30,7 @@ raise e -def setup_run_iperf3_test_parallel(num_ms): +def setup_run_iperf3_test_parallel(num_ms, ready_cb=None): hlr = suite.hlr() bts = suite.bts() pcu = bts.pcu() @@ -98,7 +100,7 @@ ms.setup_context_data_plane(ctx_id_v4) setattr(ms, 'tmp_ctx_id', ctx_id_v4) - run_iperf3_cli_parallel(clients, ms_li) + run_iperf3_cli_parallel(clients, ms_li, ready_cb) for i in range(num_ms): servers[i].stop() -- To view, visit https://gerrit.osmocom.org/12143 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id29391d75101d94e2cd58f444b383f4c5217ab6a Gerrit-Change-Number: 12143 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181206/70307913/attachment.htm>