Change in osmo-gsm-tester[master]: 4g-iperf3-ul: modified the test to parameterize the number of ue in t...

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
Thu May 20 12:42:06 UTC 2021


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24274 )

Change subject: 4g-iperf3-ul: modified the test to parameterize the number of ue in the test.
......................................................................


Patch Set 1: Code-Review-1

(5 comments)

https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24274/1/sysmocom/suites/4g/iperf3_ul.py 
File sysmocom/suites/4g/iperf3_ul.py:

https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24274/1/sysmocom/suites/4g/iperf3_ul.py@19 
PS1, Line 19: ue = []
this naming is a bit confusing, it seems as it should contain only 1 ue. ue_li?


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24274/1/sysmocom/suites/4g/iperf3_ul.py@31 
PS1, Line 31:   iperf3srv.append(tenv.iperf3srv({'addr': epc.tun_addr()}, n))
here you can use the .set_port() API ;)


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24274/1/sysmocom/suites/4g/iperf3_ul.py@58 
PS1, Line 58: proc = []
Naming: Same here, proc is usually used for a single proc object, not a list.


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24274/1/sysmocom/suites/4g/iperf3_ul.py@67 
PS1, Line 67:   wait(ue[n].is_registered)
You can speed up the test by moving this wait to a follow-up loop, so that you start all UE in parallel in the background and then wait for all of them to be registered.


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24274/1/sysmocom/suites/4g/iperf3_ul.py@74 
PS1, Line 74:   threads.append(threading.Thread(target=run_iperf, args=(proc[n],)))
You don't really need threads here, and better not use them unless really necessarily, since you may end up with dangling threads if something fails (exception thrown by test or osmo-gsm-tester core).
See how to do it properly here:
osmo-gsm-tester/sysmocom/suites/gprs/iperf3m4.py
osmo-gsm-tester/sysmocom/suites/gprs/lib/testlib.py

In summary:

    try:
        for proc in procs:
            proc.launch()
        if ready_cb:
            ready_cb(ms_li)
        for proc in procs:
            proc.wait()
    except Exception as e:
        for proc in procs:
            try:
                proc.terminate()
            except Exception:
                print("Exception while terminating process %r" % repr(process))
        raise e



-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24274
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: I4b006df04bd1af6c117bcb25e6a6b1609ac732fb
Gerrit-Change-Number: 24274
Gerrit-PatchSet: 1
Gerrit-Owner: Alejandro Leal <alejandro.leal at srs.io>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Thu, 20 May 2021 12:42:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210520/d5a6d436/attachment.htm>


More information about the gerrit-log mailing list