Commit Graph

1198 Commits

Author SHA1 Message Date
Neels Hofmeyr 109ebca44c Revert "osmo-bts-trx config: remove settsc"
According to pespin, this makes all osmo-bts-trx test runs fail.
We will still figure out the details, but for the time being
let's go with the known working config.

This reverts commit 72ded64705.

Change-Id: I57a3db0d060203ad6540c9a3cc7735e273ee0048
2017-06-27 14:19:40 +00:00
Neels Hofmeyr 72ded64705 osmo-bts-trx config: remove settsc
In osmo-bts change I51aeb17661dfd63ff347f7b2c0d7ffa383ec814c the settsc config
item is being removed. To be able to test it, drop the settsc option from the
config.

Change-Id: I89b35fc587bbac6810511b2317eed24368858f37
2017-06-26 16:58:14 +02:00
Neels Hofmeyr b398b52ad5 jenkins: fix: recent change broke jenkins build
Recent commit 851802b927 introduces a build
branch, which works fine, but only on the first run. A second run in the same
repos can't delete the branch git is currently on.

I've had enough of git being impossibly difficult in UI to simply checkout a
hash or a branch now. Completely wipe out the git repository and clone a fresh
one every time.

Unfortunately, 'git clone -b' doesn't allow passing a commit hash, so we still
need to do a clone-then-checkout dance. At least now we know it will work the
same on every run.

Change-Id: I6aca4c53a796312248a189b815dfc1198a173ed9
2017-06-23 04:13:30 +02:00
Neels Hofmeyr 2581b50408 jenkins-build-common.sh: cosmetic: clear repos a bit later
If we rm -rf * and then checkout a branch, the log prints the entire file tree
as deleted. Instead, rm just before the git reset --hard, which avoids the
extra output.

Change-Id: Ib5b28a82f05d941eae8f3a2f468ef1e9d67e6180
2017-06-23 04:07:44 +02:00
Neels Hofmeyr 851802b927 jenkins-build-common.sh: fix being stuck on branch
It's hard to allow both branch names and git hashes. For a branch, we want to
prepend 'origin' to use the upstream branch. For a git hash, we don't.

We so far prepend 'origin/' if the current branch name doesn't resolve, but
that's not enough. If a local 'master' branch exists, we would stay on that
branch instead of origin/master.

Rather, prepend 'origin/' if 'origin/$branch' exists. Git hashes should not
exist as 'origin/123abc...' and used as-is, where branches from origin should
be updated to upstream by prepending 'origin/'.

Also create a local branch to build. Always force-remove the branch and
re-create from the origin/name or git hash. Keep the reset --hard for paranoia.

Change-Id: I2e610b357f8559c6b6ffb544eb0a952f04dd9f70
2017-06-23 03:52:26 +02:00
Neels Hofmeyr de79cb155d jenkins: aoip: move to libosmocore master
The patches needed for AoIP have now been merged to libosmocore master.

Change-Id: I31f627f24e0e111c2c3461dbdc88f0e54ebf0c8c
2017-06-23 03:01:43 +02:00
Neels Hofmeyr 42bebface8 add cmdline option -R to add src file log to stdout
Change-Id: I5b21ec30453dceb53e7d4cc972607971935ef10f
2017-06-22 06:43:04 +00:00
Neels Hofmeyr 3ce18fcac7 Revert "osmo-bts-trx: wait some longer before starting osmo-bts-trx"
With this patch, the same errors are still happening.
This is not a solution, so drop this again.

This reverts commit 6c8d9497f2.

Change-Id: I324e965fdf40a369e1bcebfa4b32d0a3a7b86eb3
2017-06-18 16:50:13 +00:00
Pau Espin 2d16f6fd2c Add support for SMPP testing
As defined in [1], the different related actors are implemented in this
commit: ESME and SMSC.

SMSC: In Osmocom, the SMSC is currently implemented inside the NITB or
the MSC. A new Smsc abstract class is created to shared code between the
NITB and the MSC, and also makes it easier for later when the SMSC is
splitted. ESMEs can be dynamically added to its configuration in a
similar way to how the BTSs are added.

ESME: A new class Esme is created which can be used by tests to control
an ESME to interact with the SMSC. The ESME functionalities are
implemented using python-smpplib. Required version of this library is at
least 43cc6f819ec76b2c0a9d36d1d439308634716227, which contains support
for python 3 and some required features to poll the socket.

This commit already contains a few tests which checks different
features and tests the API. Extending tested features or scenarios can be
later done quite easily.

The tests are not enabled by default right now, because there are several
of them in a suite and the ip_address resources are not freed after every
tests which ends up in the suite failing due to missing reserved
resources. All the tests run alone work though. When the issue is fixed
they can then be added to the default list of tests to be run.

[1] http://opensmpp.org/specs/SMPP_v3_4_Issue1_2.pdf

Change-Id: I14ca3cb009d6d646a449ca99b0200da12085c0da
2017-06-18 08:48:09 +00:00
Neels Hofmeyr 640c7760e9 jenkins-run: create bin.tgz separately from run.tgz
The binary tars are fairly large, and usually one wants to investigate the run
dir logs without any need to download the binaries. Archive the binary tars
separately from the run logs.

Change-Id: I23e6df0d30fc9ea7c5b48bb2364be075d910bfcd
2017-06-18 02:15:22 +02:00
Pau Espin 1dd2955cb1 Unuse resources after every test
Fix bug in put_all(). That method was unused before this commit.

Clean the process list after the processes are stopped,
otherwise the suite eventually fails with a 'process terminated
prematurely' error. Before it was not necessary because it was not
reused (a new suite run was created).

Change-Id: Iee12866045145544076c6c18786e1a54f18fc293
2017-06-17 17:01:20 +00:00
Pau Espin d091233934 Use a subdir of run_dir for each test
Processes created have the scope of the test, so we should store
everything in a per-suite_run/per-test directory, otherwise everything
is stored in the same trial run_dir directory and it's really messy.

Change-Id: I06be2dd21710e14c1337d13b1fe6c2f68f037957
2017-06-17 16:10:04 +00:00
Neels Hofmeyr 6c8d9497f2 osmo-bts-trx: wait some longer before starting osmo-bts-trx
We get sporadic clock skews when running osmo-bts-trx, causing the process to
end and the test to fail. Try to give some seconds for the osmo-trx process to
sort itself out, in the hope to avoid the clock skews.

Related: OS#2325

Change-Id: I82d29358498e7ad9fef28d409808168926e2f876
2017-06-17 17:44:06 +02:00
Pau Espin fbecf41f01 ofono_client: Cancel pending async dbus methods at cleanup time
This commit should fix issue described #2326, in which a test started
scanning and quickly afterwards failed, leaving the async Scan() method
running and the response arriving when we were already in another
suite/test.

Change-Id: If5e9bcac8e4114718243d178ff50d1ed8b30c95d
2017-06-14 12:27:42 +02:00
Neels Hofmeyr 59f8dfe16b osmo-bts-trx: set l1c logging level to notice
We have sporadic osmo-bts-trx shutdowns with "No clock from osmo-trx" error
messages. Around it are L1C logs on level 'notice', so let's log those as well.

Related: OS#2325
Change-Id: Ic306d2dd8670550d84e9c446098bccaba147e13b
2017-06-14 03:00:24 +02:00
Neels Hofmeyr d28d1a789e cosmetic: dbg log fix in suite.py
Change-Id: I0ff92bc1aa05bf5020bbb3b6965cbb22f1ca4d61
2017-06-14 02:59:55 +02:00
Neels Hofmeyr 02a28e54a5 cosmetic: osmo-stp.cfg: fix indent
Change-Id: I239fe6da004b840fb805c51e46967c8ba3b0d3f5
2017-06-13 17:31:36 +02:00
Neels Hofmeyr eceb3ce032 aoip: use libosmocore neels/aoip branch until patches are merged
Change-Id: I22623135486e41bfc2d32de614124276f330dc36
2017-06-13 15:28:40 +00:00
Neels Hofmeyr 38b051c6da aoip: add osmo-stp, now required for aoip runs
Change-Id: I35d4cb0d173eec240bccc1f3a5965a774b7b3506
2017-06-13 15:28:31 +00:00
Pau Espin 910f3a1107 ofono_client: Improve log around Scan() failure
Change-Id: I8558d7fe41c155db2a9710e1eccf15b6499f24ef
2017-06-13 17:08:24 +02:00
Pau Espin cc5b5a2987 ofono_client: fix use of raise_exn
method raise_exn was removed in
1a7a3f0e43, but due to merge process it
remaine dbeing used in some places.

Change-Id: I89f4abe3d69aa4e7bc1fd6c6fd7e9fdea2cd8d19
2017-06-13 16:56:04 +02:00
Pau Espin 4d63d92033 ofono_client: gracefully handle Scan() failure
ofono's NetworkRegistration.Scan() method fails sporadically. On failure,
check if we are now registered to the desired network, and schedule another
scan otherwise.

For instance it fails with org.ofono.Error.Failed if the modem starts to
register internally after we started Scan() and the registering succeeds
while we are still waiting for Scan() to finsih.

Change-Id: I4a2265ee39a94daa00f525b1c7037a6775509425
2017-06-13 14:37:57 +00:00
Neels Hofmeyr e4cd7910a5 log_test.py: cosmetic follow-up
This is kept separate to not clutter up previous patch
I5f9b53150f2bb6fa9d63ce27f0806f0ca6a45e90.

Change-Id: I0ce50375fdb028da96c2159d577d8ed1967d4fe6
2017-06-13 13:32:37 +02:00
Neels Hofmeyr 1a7a3f0e43 fix and refactor logging: drop 'with', simplify
With the recent fix of the junit report related issues, another issue arose:
the 'with log.Origin' was changed to disallow __enter__ing an object twice to
fix problems, now still code would fail because it tries to do 'with' on the
same object twice. The only reason is to ensure that logging is associated with
a given object. Instead of complicating even more, implement differently.

Refactor logging to simplify use: drop the 'with Origin' style completely, and
instead use the python stack to determine which objects are created by which,
and which object to associate a log statement with.

The new way: we rely on the convention that each class instance has a local
'self' referencing the object instance. If we need to find an origin as a new
object's parent, or to associate a log message with, we traverse each stack
frame, fetching the first local 'self' object that is a log.Origin class
instance.

How to use:

Simply call log.log() anywhere, and it finds an Origin object to log for, from
the stack. Alternatively call self.log() for any Origin() object to skip the
lookup.

Create classes as child class of log.Origin and make sure to call
super().__init__(category, name). This constructor will magically find a parent
Origin on the stack.

When an exception happens, we first escalate the exception up through call
scopes to where ever it is handled by log.log_exn(). This then finds an Origin
object in the traceback's stack frames, no need to nest in 'with' scopes.

Hence the 'with log.Origin' now "happens implicitly", we can write pure natural
python code, no more hassles with scope ordering.

Furthermore, any frame can place additional logging information in a frame by
calling log.ctx(). This is automatically inserted in the ancestry associated
with a log statement / exception.

Change-Id: I5f9b53150f2bb6fa9d63ce27f0806f0ca6a45e90
2017-06-13 13:32:01 +02:00
Pau Espin 0e57aadd28 ofono_client: Implement network registration during connect()
A new mcc_mnc parameter is now optionally passed to connect() in order
to manually register to a specific network with a given MCC+MNC pair.
If no parameter is passed (or None), then the modem will be instructed
to attempt an automatic registration with any available network which
permits it.

We get the MCC+MNC parameter from the MSC/NITB and we pass it to the
modem object at connect time as shown in the modified tests. Two new
simple tests to check network registration is working are added in this
commit.

Ofono modems seem to be automatically registering at some point after
they are set Online=true, and we were actually using that 'feature'
before this patch. Thus, it is possible that a modem quickly becomes
registered, and we then check so before starting the scan+registration
process, which can take a few seconds.

The scanning method can take a few seconds to complete. To avoid
blocking in the dbus ofono Scan() method, this commit adds some code to
make use of glib/gdbus async methods, which are not yet supported
directly by pydbus. This way, we can continue polling while waiting for
the scan process to complete and we can register several modems in
parallel. When scan completes, a callback is run which attempts to
register. If no MCC+MNC was passed, as we just finished scanning the
modem should have enough fresh operator information to take good and
quick decisions on where to connect. If we have an MCC+MNC, then we check
the operator list received by Scan() method. If operator with desired
MCC+MNC is there, we register with it. If it's not there, we start
scanning() again asynchronously hoping the operator will show up in next
scan.

As scanning() and registration is done in the background, tests are
expected to call connect(), and then later on wait for the modem to
register by waiting/polling the method "modem.is_connected()". Tests
first check for the modem being connected and after with MSC
subscriber_attached(). The order is intentional because the later has to
poll through network and adds unneeded garbage to the pcap files bein
recorded.

Change-Id: I8d9eb47eac1044550d3885adb55105c304b0c15c
2017-06-12 15:34:21 +02:00
Pau Espin 56bf31c82a ofono_client: Print debug information about network registration changes
Change-Id: I61414c49544b7553058d2979b152fde95e0a3b58
2017-06-12 15:33:17 +02:00
Neels Hofmeyr f8e6186406 junit result: also write for aborted runs
Even if aborted due to signal, write a JUnit report XML, and make sure to
indicate the runs as erratic.

Change-Id: I7a334ef3463896c543c0fe592d3903c15e67d4c4
2017-06-12 11:34:44 +00:00
Pau Espin daf96e449e test: Remove unused variable Failure
Commit 6ccda11a98 removed its use but forgot to
remove it on this line.

Change-Id: I90375ce1e4b8e0b7e140df908323bc269e0baf40
2017-06-12 12:07:46 +02:00
Neels Hofmeyr 6ccda11a98 refactor: fix error handling; fix log.Origin; only one trial
A bit of refactoring to fix logging and error reporting, and simplify the code.
This transmogrifies some of the things committed in
0ffb414406 "Add JUnit XML reports; refactor test
reporting", which did not fully match the code structuring ideas used in
osmo-gsm-tester. Also solve some problems present from the start of the code
base.

Though this is a bit of a code bomb, it would take a lot of time to separate
this into smaller bits: these changes are closely related and resulted
incrementally from testing error handling and logging details. I hope it's ok.

Things changed / problems fixed:

Allow only a single trial to be run per cmdline invocation: unbloat trial and
suite invocation in osmo-gsm-tester.py.

There is a SuiteDefinition, intended to be immutable, and a mutable SuiteRun.
SuiteDefinition had a list of tests, which was modified by the SuiteRun to
record test results. Instead, have only the test basenames in the
SuiteDefinition and create a new set of Test() instances for each SuiteRun, to
ensure that no state leaks between separate suite runs.

State leaking across runs can be seen in
http://jenkins.osmocom.org/jenkins/view/osmo-gsm-tester/job/osmo-gsm-tester_run/453/
where an earlier sms test for sysmo succeeds, but its state gets overwritten by
the later sms test for trx that fails. The end result is that both tests
failed, although the first run was successful.

Fix a problem with Origin: log.Origin allowed to be __enter__ed more than once,
skipping the second entry. The problem there is that we'd still __exit__ twice
or more, popping the Origin off the stack even though it should still remain.
We could count __enter__ recurrences, but instead, completely disallow entering
a second time.

A code path should have one 'with' statement per object, at pivotal points like
run_suites or run_tests. Individual utility functions should not do 'with' on a
central object. The structure needed is, in pseudo code:

  try:
    with trial:
      try:
        with suite_run:
	  try:
	    with test:
	      test_actions()

The 'with' needs to be inside the 'try', so that the exception can be handled
in __exit__ before it reaches the exception logging.

To clarify this, like test exceptions caught in Test.run(), also move suite
exception handling from Trial into SuiteRun.run_tests(). There are 'with self'
in Test.run() and SuiteRun.run_tests(), which are well placed, because these
are pivotal points in the main code path.

Log output: clearly separate logging of distinct suites and test scripts, by
adding more large_separator() calls at the start of each test. Place these
separator calls in more logical places. Add separator size and spacing args.

Log output: print tracebacks only once, for the test script where they happen.

Have less state that duplicates other state: drop SuiteRun.test_failed_ctr and
suite.test_skipped_ctr, instead add SuiteRun.count_test_results().

For test failure reporting, store the traceback text in a separate member var.

In the text report, apply above changes and unclutter to achieve a brief and
easy to read result overview: print less filler characters, drop the starting
times, drop the tracebacks. This can be found in the individual test logs.
Because the tracebacks are no longer in the text report, the suite_test.py can
just print the reports and expect that output instead of asserting individual
contents.

In the text report, print duration in precision of .1 seconds.

Add origin information and a traceback text to the junit XML result to give
more context when browsing the result XML. For 'AssertionError', add the source
line of where the assertion hit.

Drop the explicit Failure exception. We don't need one specific exception to
mark a failure, instead any arbitrary exception is treated as a failure. Use
the exception's class name as fail_type.

Though my original idea was to use raising exceptions as the only way to cause
a test failure, I'm keeping the set_fail() function as an alternative way,
because it allows test specific cleanup and may come in handy later. To have
both ways integrate seamlessly, shift some result setting into 'finally'
clauses and make sure higher levels (suite, trial) count the contained items'
stati.

Minor tweak: write the 'pass' and 'skip' reports in lower case so that the
'FAIL' stands out.

Minor tweak: pass the return code that the program exit should return further
outward, so that the exit(1) call does not cause a SystemExit exception to be
logged.

The aims of this patch are:
- Logs are readable so that it is clear which logging belongs to which test and
  suite.
- The logging origins are correct (vs. parents gone missing as previously)
- A single test error does not cause following tests or suites to be skipped.
- An exception "above" Exception, i.e. SystemExit and the like, *does*
  immediately abort all tests and suites, and the results for tests that were
  not run are reported as "unknown" (rather than skipped on purpose):
  - Raising a SystemExit aborts all.
  - Hitting ctrl-c aborts all.
- The resulting summary in the log is brief and readable.

Change-Id: Ibf0846d457cab26f54c25e6906a8bb304724e2d8
2017-06-09 00:35:20 +02:00
Neels Hofmeyr f9e86935a3 error log: clarify for using more resources than reserved
Figure out how many resources were reserved, how many of those match the
requirements, and how many are used, and log one of three matching error
messages for that situation.

For that purpose, allow find()ing reserved resources without logging anything,
using a log_label=None arg.

Change-Id: I1c67600ba69351859e46b8b2f368ee8106db0993
2017-06-09 00:11:56 +02:00
Neels Hofmeyr 7b02ed0f4b osmo-msc: configure HLR address
In db59bcf9fc we added a configured GSUP server
address for the osmo-hlr, but the osmo-msc is still trying to connect to
127.0.0.1.

In the same way as for mgcpgw, add conf_for_msc() to OsmoHLR, and use that to
configure the HLR's address in osmo-msc.cfg.

Related: OS#2320
Change-Id: I005aa160c679fc92b248abd762888959bd5b2c55
2017-06-08 23:26:51 +02:00
Neels Hofmeyr b902b29912 test API: allow passing resource requirements
For all those API functions that directly use reserved_resources.get(), add a
'specifics' argument to be able to pick specific resources. For example, this
allows to pick a suite.bts(specifics={'type': 'osmo-bts-sysmo'})

I needed this to test error reporting for over-using resources, but will most
probably make sense in the future.

Change-Id: If6f175f4bb53dec5306fb3c6479202a7bf1c7116
2017-06-07 18:04:13 +00:00
Neels Hofmeyr a8a05a2e23 error log: clarify for reserving more resources than available
When trying to reserve more resources than available in the resources.conf,
actually print an intelligible error message: catch the nameless error from
solve() and fill in what was requested for solution.

Change-Id: Iba3707f1aaeb40a58c616c33af52a60c9a2e7e1f
2017-06-07 19:53:28 +02:00
Neels Hofmeyr 31e83200b2 fix problem in origin ancestry: don't add self twice
Also add various comments to illustrate what is going on during origin
resolution.

In the regression tests' expectations, some duplicate entries in the origins
are removed, and hence no list of deeper origin ancestry is printed anymore.

Change-Id: I42c3b8635b54c31c27699140e200c1f75a6ada29
2017-06-07 19:53:24 +02:00
Neels Hofmeyr d3a33e393e cosmetic: whitespace in log.py
Change-Id: I356725ba7d874d3d41afb5e4c89dac188c8d7dcc
2017-06-06 22:42:44 +00:00
Neels Hofmeyr f15eaf95de add cmdline arg to set conf dir
Add -c cmdline option to do the same as / in addition to the
OSMO_GSM_TESTER_CONF var, because setting the var is cumbersome in daily
development.

Change-Id: I4c3b482f31f638047ab3f3d785d294b28d244b80
2017-06-06 20:00:43 +02:00
Harald Welte 6a688d6bde Add GPLv3 license text to repository
Change-Id: I094598c0a725a4e8a005bb255779ef5ab3456934
2017-06-03 14:23:51 +00:00
Harald Welte 2720534f27 Re-License under GPLv3-or-later instead of AGPLv3-or-later
The "Affero" nature makes sense for the Osmocom network components like
BSC, SGSN, etc. as they are typically operated to provide a network
service.

For testing, this doesn't make so much sense as it is difficult to
imagine people creating a business out of offering to run test cases on
an end-to-end Osmocom GSM network.  So let's drop the 'Affero' here.

All code is so far developed by sysmocom staff, so as Managing Director
of sysmocom I can effect such a license change unilaterally.

Change-Id: I8959c2d605854ffdc21cb29c0fe0e715685c4c05
2017-06-03 14:23:51 +00:00
Pau Espin db59bcf9fc Use reserved ip address for osmo-hlr GSUP interface
Otherwise 0.0.0.0 was being used and we want all interfaces for a
specific osmo-hlr instance to use the same IP

Requires osmo-hlr change id I79f7a300480f308b21116dd14d1698be38725afd
otherwise osmo-hlr won't be able to parse the configuration file.

Change-Id: I4e0063abc8de3d739ebd81942b692cc2e75792f1
2017-06-03 14:21:09 +00:00
Neels Hofmeyr 53e758ae4c jenkins: extract common parts of build scripts to separate file
Have all complexity in one common shell script, greatly simplify the individual
scripts.

This allows to provide a specific branch or git hash to build instead of
current master. Some scripts allowed to provide branch names before, this now
also allows using git hashes directly.

Environment variables can be used to override the git hash/branch to use for
specific repositories.

Motivation for this patch: we need this to investigate failure causes more
easily.

Change-Id: I5ac2f90d006a1b2f6c246976346d852a70c89089
2017-06-02 16:58:37 +02:00
Neels Hofmeyr e62364e7fc jenkins: remove unused file: jenkins-remote-update.sh
Change-Id: I2858331393722d13e05d194656d8ee4dc17253f9
2017-06-02 14:28:59 +02:00
Neels Hofmeyr 3b906728b7 jenkins: remove unused file: jenkins-build-osmo-bts-octphy.sh
Change-Id: Ia030aebd7341f198bc768d2beb6abbe8f57a57a0
2017-06-02 14:28:49 +02:00
Pau Espin fa00b0f843 Use reserved ip address for osmo-mgcpgw VTY interface
Otherwise 127.0.0.1 was being used and we want all interfaces for a
specific osmo-mgcpgw instance to use the same IP

Change-Id: I60dbfbb66458cd333fe07139ee175c94fa1672a7
2017-05-31 19:00:16 +00:00
Pau Espin 1ba2deda37 aoip_debug/interactive: Start mgcpgw
Change-Id: I32079a7ed70e23d9bf170672e2220bc44d434e5d
2017-05-31 18:59:44 +00:00
Pau Espin ea3549f844 Use reserved ip address for osmo-bsc ctrl interface
Otherwise 127.0.0.1 was being used and we want all interfaces for a
specific osmo-bsc instance to use the same IP

Change-Id: I38dccac6707bf55f0abcf96e3a9d7d8ec765a156
2017-05-31 18:58:58 +00:00
Neels Hofmeyr ff1becfbf7 sms_test: add output checks
Change-Id: I4b033dc0d3d43825901308cda05c6999946b664e
2017-05-31 20:40:18 +02:00
Neels Hofmeyr b3b3104b6a fix: Sms.__eq__ bug due to typo
Add test of this to sms_test.py

Change-Id: Ib0b420a81c1b211a9f03a2521d244b3a427d5e5b
2017-05-31 20:39:42 +02:00
Pau Espin 996651a3a3 Move Sms class to a separate module
Preparation for following commits to add smpp support, as we will have a
class SmppClient with a method accepting an Sms object to send it.

Change-Id: I1f28e14e963abb64df687b69d54975be2aeb0d0d
2017-05-31 16:14:08 +02:00
Neels Hofmeyr b8011695b8 cosmetic: review mo_mt_sms.py's logging
Implement the Modem.log_info() function, use that instead of logging all modem
properties.

Tweak mo_mt_sms.py print() statements.

Pass modem object to SMS generation to inlcude the modem name as SMS token.

Change-Id: I2b17fce0b3b05594fd9038b54e5b65f5127bd0a4
2017-05-30 15:38:52 +00:00
Pau Espin 0993bf6f98 ofono_client: Fix race condition when checking for required features
I got a backtrace in which the modem was lacking feature 'net'. That
happens for 2 reasons:
1- net feature is not shown unless the modem is Online (at least for
sierra modems)
2- Even after it has been set online, a lapse of time can pass before
the feature gets shown.

This was added in 896f08f6ab
"fix: refresh dbus object when interfaces have changed"
with the expectation that the 'Features' list would be available in all
modem states. Since it depends on being powered and online, the same
functionality is already provided by checking the Interfaces list, hence
this code can be dropped entirely.

Change-Id: Iedd62235d1a3a8b917ad4ac0b61b9c5dbf0fe43c
2017-05-30 15:26:00 +00:00