[PATCH] osmo-gsm-tester[master]: modem: Catch exception: call removed while waiting to become...

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
Sun Apr 22 12:35:46 UTC 2018


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/7895

to look at the new patch set (#2).

modem: Catch exception: call removed while waiting to become active

This can happen while in a test we use:
wait(ms_mo.call_is_active, mo_cid)

And then answer fails for whatever reason, after a timeout ofono will
remove the call object:
/sierra_2: DBG: 'org.ofono.VoiceCallManager'.CallRemoved() -> /sierra_2/voicecall01

As a result, during next call o call_is_active() will try to get the
call object, but it doesn't exist anymore and an exception will be
created in method call_state during call to systembus_get().

Change-Id: I02b7e76425754372756493761819f18f1e3106c1
---
M src/osmo_gsm_tester/modem.py
1 file changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/95/7895/2

diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py
index 2f742ea..59fcc76 100644
--- a/src/osmo_gsm_tester/modem.py
+++ b/src/osmo_gsm_tester/modem.py
@@ -708,9 +708,14 @@
         return self.call_state(call_id) == 'active'
 
     def call_state(self, call_id):
-        call_dbus_obj = systembus_get(call_id)
-        props = call_dbus_obj.GetProperties()
-        state = props.get('State')
+        try:
+            call_dbus_obj = systembus_get(call_id)
+            props = call_dbus_obj.GetProperties()
+            state = props.get('State')
+        except Exception as e:
+            self.log('asking call state for non existent call')
+            log.log_exn()
+            state = 'disconnected'
         self.dbg('call state: %s' % state)
         return state
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I02b7e76425754372756493761819f18f1e3106c1
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list