[PATCH] osmo-gsm-tester[master]: ussd: Workaround ofono issue to prevent test failure

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 2 11:45:19 UTC 2017


Review at  https://gerrit.osmocom.org/3402

ussd: Workaround ofono issue to prevent test failure

Change-Id: I72f68bc980e6421a65f7d33712a587da340698e5
---
M suites/aoip_ussd/assert_extension.py
M suites/ussd/assert_extension.py
2 files changed, 20 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/02/3402/1

diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py
index da5dad3..9046c14 100755
--- a/suites/aoip_ussd/assert_extension.py
+++ b/suites/aoip_ussd/assert_extension.py
@@ -31,6 +31,16 @@
 wait(ms.is_connected, msc.mcc_mnc())
 wait(msc.subscriber_attached, ms)
 
+# ofono (qmi) currently changes state to 'registered' jut after sending
+# 'Location Update Request', but before receiving 'Location Updating Accept'.
+# Which means we can reach lines below and send USSD code while still not being
+# attached, which will then fail. See OsmoGsmTester #2239 for more detailed
+# information.
+# Until we find an ofono fix or a better way to workaround this, let's just
+# sleep for a while in order to reveie the 'Location Updating Accept' message
+# before attemting to send the USSD.
+sleep(10)
+
 print('Sending ussd code %s' % USSD_COMMAND_GET_EXTENSION)
 response = ms.ussd_send(USSD_COMMAND_GET_EXTENSION)
 assert ' ' + ms.msisdn + '\r' in response
diff --git a/suites/ussd/assert_extension.py b/suites/ussd/assert_extension.py
index 4e2e0e1..f61db2f 100755
--- a/suites/ussd/assert_extension.py
+++ b/suites/ussd/assert_extension.py
@@ -21,6 +21,16 @@
 wait(ms.is_connected, nitb.mcc_mnc())
 wait(nitb.subscriber_attached, ms)
 
+# ofono (qmi) currently changes state to 'registered' jut after sending
+# 'Location Update Request', but before receiving 'Location Updating Accept'.
+# Which means we can reach lines below and send USSD code while still not being
+# attached, which will then fail. See OsmoGsmTester #2239 for more detailed
+# information.
+# Until we find an ofono fix or a better way to workaround this, let's just
+# sleep for a while in order to reveie the 'Location Updating Accept' message
+# before attemting to send the USSD.
+sleep(10)
+
 print('Sending ussd code %s' % USSD_COMMAND_GET_EXTENSION)
 response = ms.ussd_send(USSD_COMMAND_GET_EXTENSION)
 assert ' ' + ms.msisdn + '\r' in response

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72f68bc980e6421a65f7d33712a587da340698e5
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list