Change in osmo-gsm-tester[master]: Create a "ms_driver" stub for the testsuite

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.org
Wed Aug 29 11:14:08 UTC 2018


Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/10686 )

Change subject: Create a "ms_driver" stub for the testsuite
......................................................................


Patch Set 1:

(7 comments)

https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py
File src/osmo_gsm_tester/ms_driver.py:

https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@68
PS1, Line 68:     def prepare(self):
We usually used "configure()" for most object for this kind of action.


https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@73
PS1, Line 73:         # TODO: That needs some re-factoring
This temporary socket files needs to go into the run dir.

See bts_osmo.py:OsmoBtsMainUnit.pcu_socket_path() as an example on how to handle Unix sockets. Check then how pcu_osmo.py calls it to get the same path too.


https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@81
PS1, Line 81:         self._suite_run.remember_to_stop(self)
That's actually aimed at (sub)classes of process.py:Process.

You are probably looking for "_suite_run.register_for_cleanup()" here. We actually call it from suite.py when generating new objects. See for instance suite.py:modem():

    def modem(self, specifics=None):
        conf = self.reserved_resources.get(resource.R_MODEM, specifics=specifics)
        self.dbg('create Modem object', conf=conf)
        ms = modem.Modem(conf)
        self.register_for_cleanup(ms)
        return ms


https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@97
PS1, Line 97:     def run_test(self):
We usually used "start()" for most object for this kind of action.

We then actually call "configure()" from here so that tests need as small number of lines as possible.


https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@105
PS1, Line 105:         self._test_case.run_test(self._loop, self._test_duration)
Not sure right now how the SimpleLoop integrates with osmo-gsm-tester event_loop.py:EventLoop. I think it was improved since you started coding your mass LU tests, so we should try to integrate those into using EventLoop and improving it as required.


https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@113
PS1, Line 113:     def terminate(self):
This should then be "cleanup(self)".


https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/suite.py
File src/osmo_gsm_tester/suite.py:

https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/suite.py@311
PS1, Line 311:         return ms_driver.MsDriver(self)
You want to call self.register_for_cleanup(ms_driver) here.



-- 
To view, visit https://gerrit.osmocom.org/10686
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I586b6d532c6e6395b4e6f2cf2128372237d05a7d
Gerrit-Change-Number: 10686
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-CC: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Comment-Date: Wed, 29 Aug 2018 11:14:08 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180829/677a938c/attachment.htm>


More information about the gerrit-log mailing list