Change in osmo-gsm-tester[master]: iperf3_bidir: add extra test for bi-directional iperf 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
Tue Mar 16 17:12:26 UTC 2021


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/23382 )

Change subject: iperf3_bidir: add extra test for bi-directional iperf test
......................................................................

iperf3_bidir: add extra test for bi-directional iperf test

Change-Id: Ibb62f53dbb15bc4788c92ebb2dee70e31dd851de
---
A sysmocom/suites/4g/iperf3_bidir.py
1 file changed, 45 insertions(+), 0 deletions(-)

Approvals:
  pespin: Looks good to me, approved; Verified



diff --git a/sysmocom/suites/4g/iperf3_bidir.py b/sysmocom/suites/4g/iperf3_bidir.py
new file mode 100755
index 0000000..bb1d73a
--- /dev/null
+++ b/sysmocom/suites/4g/iperf3_bidir.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python3
+from osmo_gsm_tester.testenv import *
+
+epc = tenv.epc()
+enb = tenv.enb()
+ue = tenv.modem()
+iperf3srv = tenv.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()
+enb.ue_add(ue)
+enb.start(epc)
+
+print('waiting for ENB to connect to EPC...')
+wait(epc.enb_is_connected, enb)
+print('ENB is connected to EPC')
+
+ue.connect(enb)
+
+max_rate_ratio = 0.8
+max_rate_dl = enb.ue_max_rate(downlink=True, num_carriers=ue.num_carriers)
+max_rate_ul = enb.ue_max_rate(downlink=False, num_carriers=ue.num_carriers)
+
+iperf3srv.start()
+proc = iperf3cli.prepare_test_proc(iperf3cli.DIR_BI, ue.netns(), bitrate=max_rate_dl)
+
+print('waiting for UE to attach...')
+wait(ue.is_registered)
+print('UE is attached')
+
+print("Running iperf3 client to %s through %s" % (str(iperf3cli), ue.netns()))
+proc.launch_sync()
+iperf3srv.stop()
+
+iperf3cli.print_results()
+iperf3srv.print_results(iperf3cli.proto() == iperf3cli.PROTO_UDP)
+
+# 80% of the maximum rate for half of the test duration
+half_duration = int(round(iperf3cli.time_sec() / 2))
+res_str = ue.verify_metric((max_rate_dl + max_rate_ul) * max_rate_ratio, operation='max_rolling_avg', metric='dl_brate+ul_brate', criterion='gt', window=half_duration)
+print(res_str)
+test.set_report_stdout(res_str)
\ No newline at end of file

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/23382
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: Ibb62f53dbb15bc4788c92ebb2dee70e31dd851de
Gerrit-Change-Number: 23382
Gerrit-PatchSet: 4
Gerrit-Owner: srs_andre <andre at softwareradiosystems.com>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210316/ae80c053/attachment.htm>


More information about the gerrit-log mailing list