Patch Set 2: Code-Review-1

(2 comments)

https://gerrit.osmocom.org/#/c/2676/2/src/osmo_gsm_tester/ofono_client.py
File src/osmo_gsm_tester/ofono_client.py:

Line 70: def _wait(condition, condition_args, condition_kwargs, timeout, 
timestep):
I'm confused, didn't I write this code? are you moving it around, but I don't 
see it being removed elsewhere? duplicating it?


Line 123:             wait(log_obj, modem_is_powered, dbus_obj, True)
hmm I see a problem here that I didn't think of before. If another run is using 
a modem, we must not interfere. Even if we see it is not powered, then do our 
thing, the other run in the meantime may have decided to power it, and we must 
not power it off again even though that was the state when we started.

So what we need to do:

Get the state of currently reserved modems, and

a) do not touch those that are currently reserved.

b) reserve modems, then fetch the IMSI, then free the reservation.

c) from a., the list will omit modems that are currently reserved. So we may 
need to re-run the IMSI discovery for every suite run. Alternatively we could 
keep the discovered IMSIs in the state file -- but if modems change due to 
$foo, we still need to re-run.

Let me know if you need help with the code to reserve resources...


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9f4de81abc18e8db0c15df965e4811b6513e1b1
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>
Gerrit-HasComments: Yes

Reply via email to