python/osmo-python-tests[master]: Update ctrl command parsing for python3

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Dec 22 18:18:44 UTC 2017


Patch Set 7: Code-Review-1

(2 comments)

https://gerrit.osmocom.org/#/c/5028/7/tests/test_py3.py
File tests/test_py3.py:

Line 35:     server = loop.run_until_complete(loop.create_server(CtrlProtocol, '127.0.0.1', 4249))
this test assumes that this particular port is available at runtime of the test.  Particularly since it's a port used by some real osmocom program, chances are high that a jenkins job will execute in parallel on a given build note which also uses that port.  Best idea might be to chose a random port here, and/or deal with failure to bind and re-attempt for a couple of times?  clashes of random ports are unlikely.


Line 40:     loop.run_until_complete(asyncio.gather(asyncio.create_subprocess_exec('./scripts/osmo_ctrl.py', '-g', 'mnc', '-d' 'localhost'), loop = loop))
you bind the server to 127.0.0.1 but you connect the client to localhost.  Localhost also resolves to e.g. ::1 so best to be consistent on client and server.


-- 
To view, visit https://gerrit.osmocom.org/5028
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1
Gerrit-PatchSet: 7
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list