<p><a href="https://gerrit.osmocom.org/10686">View Change</a></p><p>7 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py">File src/osmo_gsm_tester/ms_driver.py:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@68">Patch Set #1, Line 68:</a> <code style="font-family:monospace,monospace">    def prepare(self):</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">We usually used "configure()" for most object for this kind of action.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@73">Patch Set #1, Line 73:</a> <code style="font-family:monospace,monospace">        # TODO: That needs some re-factoring</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This temporary socket files needs to go into the run dir.</p><p style="white-space: pre-wrap; word-wrap: break-word;">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.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@81">Patch Set #1, Line 81:</a> <code style="font-family:monospace,monospace">        self._suite_run.remember_to_stop(self)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">That's actually aimed at (sub)classes of process.py:Process.</p><p style="white-space: pre-wrap; word-wrap: break-word;">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():</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">    def modem(self, specifics=None):<br>        conf = self.reserved_resources.get(resource.R_MODEM, specifics=specifics)<br>        self.dbg('create Modem object', conf=conf)<br>        ms = modem.Modem(conf)<br>        self.register_for_cleanup(ms)<br>        return ms</pre></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@97">Patch Set #1, Line 97:</a> <code style="font-family:monospace,monospace">    def run_test(self):</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">We usually used "start()" for most object for this kind of action.</p><p style="white-space: pre-wrap; word-wrap: break-word;">We then actually call "configure()" from here so that tests need as small number of lines as possible.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@105">Patch Set #1, Line 105:</a> <code style="font-family:monospace,monospace">        self._test_case.run_test(self._loop, self._test_duration)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">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.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@113">Patch Set #1, Line 113:</a> <code style="font-family:monospace,monospace">    def terminate(self):</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This should then be "cleanup(self)".</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/suite.py">File src/osmo_gsm_tester/suite.py:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/suite.py@311">Patch Set #1, Line 311:</a> <code style="font-family:monospace,monospace">        return ms_driver.MsDriver(self)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">You want to call self.register_for_cleanup(ms_driver) here.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/10686">change 10686</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/10686"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-gsm-tester </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I586b6d532c6e6395b4e6f2cf2128372237d05a7d </div>
<div style="display:none"> Gerrit-Change-Number: 10686 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Holger Freyther <holger@freyther.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-CC: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 29 Aug 2018 11:14:08 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>