Change in osmo-gsm-tester[master]: suites/4g: Introduce sample handover test

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/.

pespin gerrit-no-reply at lists.osmocom.org
Mon Apr 20 14:15:47 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17902 )


Change subject: suites/4g: Introduce sample handover test
......................................................................

suites/4g: Introduce sample handover test

Change-Id: I1afc77c7bc3ca6a247ffdf96e3b7e31c4c7606c3
---
M src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl
M sysmocom/suites/4g/handover.py
2 files changed, 31 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/02/17902/1

diff --git a/src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl b/src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl
index c675d33..8f857b2 100644
--- a/src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl
+++ b/src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl
@@ -72,7 +72,7 @@
     root_seq_idx = ${loop.index + 204};
     dl_earfcn = ${cell.dl_earfcn};
     //ul_earfcn = 20850;
-    ho_active = false;
+    ho_active = true;
 
     // CA cells
     scell_list = (
diff --git a/sysmocom/suites/4g/handover.py b/sysmocom/suites/4g/handover.py
index 3a49321..3cb8b02 100755
--- a/sysmocom/suites/4g/handover.py
+++ b/sysmocom/suites/4g/handover.py
@@ -4,6 +4,10 @@
 epc = suite.epc()
 enb = suite.enb()
 ue = suite.modem()
+iperf3srv = suite.iperf3srv({'addr': epc.tun_addr()})
+iperf3srv.set_run_node(epc.run_node())
+iperf3cli = iperf3srv.create_client()
+iperf3cli.set_run_node(ue.run_node())
 
 epc.subscriber_add(ue)
 epc.start()
@@ -15,15 +19,35 @@
 print('ENB is connected to EPC')
 
 ue.connect(enb)
+
+iperf3srv.start()
+proc = iperf3cli.prepare_test_proc(False, ue.netns())
+
 print('waiting for UE to attach...')
 wait(ue.is_connected, None)
 print('UE is attached')
 
-sleep(2)
+rfemu_cell1 = enb.get_rfemu(0)
+rfemu_cell2 = enb.get_rfemu(1)
 
-rfemu = enb.get_rfemu()
-for att in range(1, 10, 1):
-    print("Setting cell attenuation %d..." % att)
-    rfemu.set_attenuation(att)
-    sleep(1)
+# attenuation from 0 to 10, then back to 0
+cell1_att_li = list(range(0, 11, 1)) + list(range(9, -1, -1))
+# attenuation from 10 to 0, then back to 10
+cell2_att_li = list(range(10, 0, -1)) + list(range(0, 11, 1))
+
+try:
+    proc.launch()
+    step = 0
+    while step < len(cell1_gain_li):
+        rfemu_cell1.set_attenuation(cell1_att_li[step])
+        rfemu_cell2.set_attenuation(cell2_att_li[step])
+        step += 1
+        sleep(1)
+    proc.wait()
+except Exception as e:
+    try:
+        proc.terminate() # make sure we always terminate the process
+    except Exception:
+            print("Exception while terminating process %r" % repr(process))
+    raise e
 print("Done")

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17902
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I1afc77c7bc3ca6a247ffdf96e3b7e31c4c7606c3
Gerrit-Change-Number: 17902
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200420/fabcbca9/attachment.htm>


More information about the gerrit-log mailing list