Commit Graph

847 Commits

Author SHA1 Message Date
Pau Espin 90c23cc991 suite: Use event_loop.poll in interactive poll
This way we also poll dbus events from ofono_client

Change-Id: I06fe9a78d702ebb05c4ece78e14fcae9e2e74ee2
2017-07-03 13:12:41 +02:00
Pau Espin 0d8deec6ae Add microsecond accuracy to log timestamps
This is useful while debugging and trying to check events across other
outputs such as pcap files, process logs, etc.

Change-Id: I43bb5c6e9977189251802bc2b078c52eb046bab8
2017-07-03 10:39:56 +00:00
Pau Espin 58ff38d456 ofono_client: Power off modem during cleanup()
Change-Id: Ic0c509e77ababf385beb8b1d26659ca4d18f9331
2017-07-03 10:39:46 +00:00
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 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
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 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 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 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
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 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 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
Neels Hofmeyr 8c7477f5d8 cosmetic: SMS tokens: add modem name to SMS message
Change-Id: I66b8f30303e21ad781d16f3aa9fe30067d6a0e20
2017-05-29 20:30:06 +00:00
Neels Hofmeyr 0cc53ef4bc log.Origin: return self on __enter__
Allows using 'with some_origin() as foo:' constructs.
Not used actively, but is sometimes useful during debugging sessions.

Change-Id: I7a6463ee39761775305dd2272c24f248552db4ad
2017-05-29 20:29:09 +00:00
Neels Hofmeyr 206803d59a fix osmo-bts-trx: missing patch to use new event_loop
Change-Id: I640258d8451aff1633cba7390df5430da50d0b0b
2017-05-29 04:32:32 +02:00
Neels Hofmeyr 908faf8d1b fix log: print suite-run separator in proper place
error was introduced by 0ffb414406
'Add JUnit XML reports; refactor test reporting'

Change-Id: I9acf1a840277979a19a2019c69e4562ff7fe2ca0
2017-05-29 04:32:26 +02:00
Neels Hofmeyr 4d688c2faf fix multi-suite runs: implement modem cleanup
After a suite was done, the modem object would linger. If two suites were run
consecutively, the first suite's modem objects would still log incoming SMS.

Add an object cleanup mechanism in the SuiteRun class. Start by adding a
cleanup() to the Modem object and subscribing created modems there.

Move the modem_obj() function into SuiteRun, there is no use of it being
separate, and it makes for better logging.

Change-Id: I0048d33e661d683a263c98128cd5c38b8d897dab
2017-05-29 04:32:13 +02:00
Neels Hofmeyr 896f08f6ab fix: refresh dbus object when interfaces have changed
This solves the KeyError problems when we attempt to use new Interfaces that
have come up. The solution is to get a fresh pydbus object when interfaces have
been added.

Another key solution is to not completely discard and unregister all signals
every time. This is racy and may cause signals getting lost. If an interface
was not removed, it is not harmful to have it subscribed using an older pydbus
object. These older objects may linger until the specific signal subscriptions
are disconnected. It is important to fetch a new dbus object for subscribing to
signals on interfaces that have just been added.

Put signal subscription and property watching in a separate class
ModemDbusInteraction. This class may also be used without signals or a modem
config, in anticipation of the IMSI discovery patch that's coming up.

Related: OS#2233
Change-Id: Ia36b881c25976d7e69dbb587317dd139169ce3d9
2017-05-29 04:30:34 +02:00
Neels Hofmeyr ed4e528693 fix: free resources when a suite run is done
Add missing code to free resources, not upon program exit, but when a suite is
done.

This allows running more than one suite in a row.

Also add a check to not attempt to free if there is nothing to be freed, to
avoid a regression test failure triggered when a suite exits without reserving
anything.

Change-Id: Ic017a1cf07052f5e48812c8553fba6f972d280f0
Related: OS#2301
2017-05-29 03:03:39 +02:00
Neels Hofmeyr 2a1a1fa8f9 fix: None error on unavailable resources
If not a single resource of a wanted item was left, we ran into a None. Report
unavailability instead.

Change-Id: Ie1849a74cb227964e7c3ac06852582baa2333697
2017-05-29 02:54:41 +02:00
Neels Hofmeyr 48055ed0aa fix osmo-bts-trx: add config: 'osmotrx tx-attenuation oml'
Before this, the network opened up by osmo-bts-trx would be invisible through
the attenuation of the osmo-gsm-tester hardware, because tx-attenuation would
apparently default to 50, meaning maximum attenuation.

Change-Id: I1c026b5691033127eef766d82566c39cc070e14a
2017-05-29 00:29:50 +02:00
Neels Hofmeyr 9576f5f9a5 log: change 'log_all_origins' from bool to a list of levels to apply to
The idea is to see the full origin list for log level ERR, while the rest
of the logging can be kept less verbose.

Change-Id: I0277782652548fa321f767da79b207d70678fad1
2017-05-28 22:26:23 +00:00
Neels Hofmeyr 798e592fd6 MSC+BSC: add test api to run OsmoMSC and OsmoBSC with AoIP
Change-Id: I5842e8f1cba8e8e6bedfc08540efcafe207159cb
2017-05-29 00:19:45 +02:00
Neels Hofmeyr d41dae9820 bts: add remote_addr() function
To start an MGCPGW, we so far need the BTS address in advance (should get fixed
at some point, but so far we do).

The sysmoBTS has a fixed IP address configured. The osmo-bts-trx so far always
uses 127.0.0.1 (should also be fixed at some point). Both now return this
address with the remote_addr() function.

This also replaces a SysmoBts.remote_addr member variable (which is not
sufficient because it is only populated during configure()).

Change-Id: I7af9275914f34808cb60ae16b65ecd3688fd6b5b
2017-05-29 00:18:43 +02:00
Neels Hofmeyr 4f59ba6e68 config: nitb template: move ip_address to nitb.ip_address
It's the NITB's address, so it should go in the nitb.* scope.

Change-Id: I71a5ef153b7156b0644253f5aa8a0c848f42ab3b
2017-05-29 00:18:43 +02:00
Neels Hofmeyr c4ba4a6866 rename more items from nitb to bsc
A NITB is a BSC + MSC, and if a BTS talks to a NITB, it talks to the BSC part
of the NITB. Hence it makes more sense to name certain things 'bsc' instead of
'nitb', to prepare for a separate BSC process appearing soon.

Change-Id: I6a0343b9243b166d4053cc44f523543f1245d772
2017-05-29 00:18:43 +02:00
Neels Hofmeyr 76d8103bfb rename resource nitb_iface to ip_address
I would like to use the IP addresses also for OsmoBSC processes, so it is more
than clear now that 'nitb_iface' was the wrong naming choice.

The only distinction we may need in the future is public versus loopback
interface. To add that, we may add a trait to the 'ip_address' resource
like:

  ip_address:
  - addr: 10.42.42.1
    type: public
  - addr: 127.0.0.1
    type: loopback

This way we can substitute public vs loopback addresses flexibly (e.g. using
scenarios).

Change-Id: I3ad583ae7a33f7a7bb56fe78a125f73c56a0e860
2017-05-29 00:18:43 +02:00
Neels Hofmeyr 943c81d878 debug: config logging before templates: use pprint and an all-caps label
Change-Id: I0e1c1d3ce8163d5b40c17b7d0fb0847a068ced76
2017-05-29 00:18:43 +02:00
Neels Hofmeyr 6d8e485a2b nitb config: set: logging color 1, category 1
Change-Id: Icd9022f5732caac65d16fc49f2ed7833199523de
2017-05-29 00:18:43 +02:00
Neels Hofmeyr 2d1d561eeb resource error logging that is easier to understand
Log what a suite requested, what it has reserved and the complete resource
state.

Change-Id: Ic6887bbe5fe74a73f0e344cd4078dd7ed989cc15
2017-05-29 00:18:42 +02:00
Pau Espin 927344b4dc event_loop: Create a global event loop to poll and wait for events
Tweaked-by: nhofmeyr
Change-Id: Iaa78bae0f053496377609b24a11ebaef3fd77598
2017-05-25 17:25:09 +00:00
Neels Hofmeyr 391afe3b13 remove bts_ocpthy.py
We're not currently paying attention to the octphy in osmo-gsm-tester. So
instead of maintaining dead code, remove the bts_octphy.py; we can re-add when
the octphy is implemented properly.

Change-Id: Ia5d5750d440ae7019634b51fa1efe7bbb2a1d1e2
2017-05-25 04:09:20 +02:00
Neels Hofmeyr 8b915073ae osmo_nitb.py: remove unused imports
Change-Id: I55c118c6b277a2c8cddc251e3d36571b12504266
2017-05-25 04:09:20 +02:00
Pau Espin 5bf66c57d6 trial.py: Remove accidental double creation of file
This file is already created in run_suites().
Creating it in here too makes a new file name()_2.xml created and
populated instead of the original name().xml one.

Change-Id: Ibec14a1ef5fd029aa37ce666d00236bb872d636e
2017-05-24 12:02:43 +00:00
Pau Espin 98df394fc6 Exit with failure if not enough resources are found
Change-Id: I9e38435ff71416585a259c823053bd07c670d495
2017-05-24 12:01:07 +00:00
Pau Espin d1f8fe689e osmo_nitb.py: Remove unused var
Change-Id: Ifb0c274aac9f8fda177992f19146807387485627
2017-05-22 22:00:14 +00:00
Pau Espin 374e8a0b26 suite.py: Fix typo in variable name used during exception
Fixes a possible double exception introduced in 0ffb4144

Change-Id: I44a30f51c23e6a57ccae3483c806c0ed25d2ecf9
2017-05-22 17:52:09 +02:00
Pau Espin 469316fae0 Handle termination signals to exit gracefully and prevent resource leak
Make sure we free the reserved resources and kill launched subprocesses
before stopping. Before this patch it was not the case for instance if we
received a SIGTREM signal from kill.

Change-Id: I039e4d1908a04bf606b101ddc6a186ba67e6178e
2017-05-19 14:40:18 +02:00
Pau Espin 0ffb414406 Add JUnit XML reports; refactor test reporting
* Add Junit output file support
* Differentiate between an expected failure test and an error in the
test, as described in JUnit.
* In case of an error/exception during test, record and attach it to the
Test object and continue running the tests, and show it at the end
during the trial report.

Change-Id: Iedf6d912b3cce3333a187a4ac6d5c6b70fe9d5c5
2017-05-19 14:22:39 +02:00
Pau Espin 023fd2c748 pcap_recorder: use self.filters instead of gen_filter
Change-Id: I53779d521fbeed7c37bcaeb12be2531e4dbc005c
2017-05-15 15:01:15 +02:00
Pau Espin 6ab98983bd Enable GSMTAP on BTS and record it on the main unit NITB
Change-Id: I057a83bc20c5e664ac1778812452f189166919ba
2017-05-15 14:57:42 +02:00
Pau Espin 8cd347b2c5 nitb: Filter ssh packets in pcap
Change-Id: I62a6ae7bd3a84baceb684c26727d2269c86ed023
2017-05-15 14:49:22 +02:00
Neels Hofmeyr 95fd67374c pcap: pass complete filter string to PcapRecorder
Composing the filter in gen_filter() is more complex than we need. We pass the
address and potentially further filter elements separately, and then
gen_filter() has to guess how to combine these. Instead, have just a filter
string to use right from the start, so that the caller has full control (and
full responsibility).

Remove the addr argument, which was only used for filtering.

This is my conclusion of looking at the patches with change Ids
I62a6ae7bd3a84baceb684c26727d2269c86ed023 (PS 1) and
Icbb0f8d2058fa7ebb7f0f731645f9266cacdb120

I62... PS 2 will add the SSH filtering.

The name 'filter' is a python built-in, which is why I chose the argument
name 'filters' instead. It works with 'filter' as well, but let's try to
avoid naming conflicts like that.

Change-Id: Iff7ddf51d3bf0189ce07b488a3dcdcfce6907aba
2017-05-15 14:49:22 +02:00
Neels Hofmeyr e44a0cb0d9 trial: always use abspath
No actual failure known, but using the abspath will prevent further problems
when running a binary in its own run dir and passing trial paths to it.

Adjust test expectations.

Change-Id: Ia2ba876a42eef9122a92645edd1f28ddb56e6be3
2017-05-15 14:25:24 +02:00
Neels Hofmeyr e60df6961c fix name of local var, to not shadow 'suite' module
This caused "UnboundLocalError: local variable 'suite' referenced before
assignment".

Change-Id: Ic9aa383f5cdc9818c5a21b101fb6ddea4132d9fb
2017-05-15 12:23:57 +00:00
Neels Hofmeyr 2123541574 fix: exception outside of trial run should be logged and cause nonzero rc
From an earlier stage of the code, there was still an exception catcher that
makes no sense. Remove it.

Change-Id: I8085318c91b06a3e8f7d3f8cfdd15a99650666e2
2017-05-15 12:23:57 +00:00
Neels Hofmeyr 143ab81aac pcap recorder: include vim indenting rules as comment
Change-Id: Idbc4521053610d55c9c32eff950ed8fa68dda171
2017-05-15 12:23:36 +00:00
Neels Hofmeyr 39b0b89caf log the location of the detailed log file
The idea is that if someone reads the short log and scratches her head, she can
notice that there is a more detailed log available.

Change-Id: Id5f443f1af0dc774d4d4c588a238b786a83e44d3
2017-05-15 12:22:35 +00:00
Neels Hofmeyr 2296883fc3 log: tweak osmo-gsm-tester.py stdout: all_origins=False, src=False
Change-Id: I24a600f67f7a9f3d1235abfceb86f311ffa97746
2017-05-15 12:22:35 +00:00
Neels Hofmeyr 7e2e8f1d65 log state dir
On the log output, clearly show which state dir is used. Since all runs should
use the same state dir, this is important and/or reassuring to see.

Change-Id: Ie92f1879a35d8bb399ee916b7ef72f9ee7d47409
2017-05-15 12:22:35 +00:00
Neels Hofmeyr 1fe012e6a8 cosmetic: rather have an underscore in pcap_recorder.py
Change-Id: Ib4886cb3fe0cb9c66d170097b98b4d1eb67cab81
2017-05-15 12:43:35 +02:00
Neels Hofmeyr cf0304ff26 cosmetic: cmdline help: add line breaks, fix typo
Fix typo 'patch' -> 'match'

Argparse has a peculiar way of treating the cmdline help strings. Include
explicit newlines in cmdline help, and place a comment explaining the details.

Change-Id: I34a2333c55719986b729b07386bc47314635ee04
2017-05-12 14:34:41 +02:00
Neels Hofmeyr 47de6b0a24 ofono/dbus: detach from signals as appropriate
In the dbus_connect() code path, return the subscription token.

In the Modem class, use this token to disconnect signal callbacks when an
interface is removed.

Generalize the signal connect/disconnect handling: have one tuple defining all
signals and their handler functions, add generalized loop to attach them. Store
all subscription tokens in a dict of lists, any number of signal callbacks per
general interface name. When an interface is announced to be removed from
ofono, detach all signals for that interface implicitly.

So far this only handles the MessageManager interface's IncomingMessage signal,
but others will likely follow soon.

Fixes: OS#2242
Change-Id: I0939ef414bc599ee8742df48da04d8d9569d00ba
2017-05-11 12:33:00 +02:00
Neels Hofmeyr 803d87c2e8 util: simplify listdict
listdict came into the code base from some other python code of mine, for no
apparent reason: it is actually not used here at all. However, an upcoming
patch will use a dict of lists.

Also, the listdict implementation is convoluted/complex (to allow accessing
keys as direct object members, which we don't need). Simplify the
implementation to be used by I0939ef414bc599ee8742df48da04d8d9569d00ba.

Change-Id: I09adfd128a19c6c5ba36aae1d4cab83dbd07e0fb
2017-05-11 12:33:00 +02:00
Neels Hofmeyr 4f33dcc4df run dir: add a second log file containing a non-debug log
Change-Id: Ic51b8f87abc52cc4af3672ee70045ba08334f62e
2017-05-10 13:08:52 +00:00
Pau Espin 13143bc4df Log network activity using tcpdump for nitb interface
Change-Id: I4c5d0e2d9857160f905e743517e744f1a06368af
2017-05-10 13:48:31 +02:00
Pau Espin ecf107983b suite: Terminate processes in LIFO order
Usually the first process we started is the one we want to stay until
the end.

Change-Id: I08ea01a42af68191a659fdf8173e3fec9b1e1cfd
2017-05-08 16:57:53 +02:00
Pau Espin e39c6f1a52 Prepend LD_LIBRARY_PATH instead of overwritting it
My current distribution ships a newer libcrypto and libssl which are not
ABI compatible with the ones generated by Jenkins. I had to copy those
libraries locally and use LD_LIBRARY_PATH to be able to run binaries
compiled coming from the jenkins slave. Without this patch I am not
able to run it because it is overwriting the previous variable.

Change-Id: Id9b16d13d343616cbf87b9da8a99e3fae48da6bd
2017-05-08 16:34:30 +02:00
Neels Hofmeyr a88b0c7424 propagate Timeout class to test scope, use in debug suite
Change-Id: Idad34fe799bc8b8e03d773898473773656b005bd
2017-05-08 13:06:58 +02:00
Neels Hofmeyr 1ffc3fed6b on timeout, raise dedicated Timeout exception
Change-Id: I085a52194dde0f5e6dd845ffde1197f7dc83b306
2017-05-08 13:06:58 +02:00
Neels Hofmeyr cccbe5987d improve logging for resource allocation
Log on level 'log', more clearly show whether it's for reservation or actual
use, show the origin that is asking for them.

Change-Id: I3b78c7bdcaec90943900343c878099160f8d2f64
2017-05-08 12:50:42 +02:00
Neels Hofmeyr f31c545f48 log.py: add a log target option to omit the list of deeper origins
Change-Id: I8a0a508ee4aeffe940be906de0e431740653a08c
2017-05-08 10:12:25 +00:00
Neels Hofmeyr fd7b9d040d run dir: write detailed log file
For each run on a trial, create a log target that logs to a file in the run
dir. Set all levels to DBG in that log target.

Related: OS#2206
Change-Id: Ie7279aeaf32950f85d4145abdc917024003d1d99
2017-05-08 10:12:25 +00:00
Neels Hofmeyr 532126a725 log: make 32 the default origin_width.
Change-Id: I1159395251332f3b1af3b3a322e7191559105faa
2017-05-08 10:12:25 +00:00
Neels Hofmeyr 8f4f17437d log.py: add FileLogTarget
Will be used in a subsequent commit.

Change-Id: Id3dfdeea236eb8ade5e6c80e64d5c3ce4de96b81
2017-05-08 10:12:25 +00:00
Neels Hofmeyr 1a2177cd1b log.py: LogTarget: return self for chaining modifiers
For example this allows
  tgt = LogTarget(foo).set_all_levels(bar).style_change(baz)

Change-Id: If168cc06f644bde6183f3bc51e394c7705386b3e
2017-05-08 10:12:25 +00:00
Neels Hofmeyr f816688279 log.py: tweak LogTarget list, require explicit LogTarget
Rename log_sink to log_write_func to make it more clear.

Remember the list of log targets as static member LogTarget.all_targets.

Make each LogTarget instance register with the list of targets implicitly.

No longer create a default log target, rather create one explicitly in
osmo-gsm-tester.py.

Change-Id: I5844485eaed536cb34b44bfe23dc635fe1982dcd
2017-05-08 10:12:25 +00:00
Neels Hofmeyr f9de78fc58 improve doc and usability of osmo-gsm-tester.py -t option
Allow exact matches by prepending a '='.
Properly document the -t option.

Change-Id: I61bed7e05f0c1f08cf3de72f62d9ba6609d44aee
2017-05-08 10:12:10 +00:00
Neels Hofmeyr f49c7daa81 sms: log info as dbg
Change-Id: Ia9ae0fa63a96a541e7d66cf0d8a9032b135760e6
2017-05-08 10:12:00 +00:00
Neels Hofmeyr 2e41defdd4 sms: don't log info
Change-Id: Ie9c4757de1eedcbcc85b7b99b94d164cc6ae3c59
2017-05-08 10:12:00 +00:00
Neels Hofmeyr 9b90770716 Resource.find: allow returning empty instead of raising
Add flag raise_if_missing, and if False, instead of raising an exception,
return an empty list for that kind of resource. This makes sense for a caller
that requests a single resource.

When finding a single resource to use in ReservedResources.get(), use this to
raise a more adequate exception message if none was found.

Change-Id: Ia296ea68a787bede037a6cea38563b570fb0766e
2017-05-08 10:11:52 +00:00
Neels Hofmeyr 2fade33e49 doc: Resources.find: add API doc + inline comments
Change-Id: Ib6376794e28f8faff82517af99dfb38ab4689ac8
2017-05-08 10:11:51 +00:00
Neels Hofmeyr acf0c937e7 fix prompt()
The prompt() is useful for supervisor (user) interaction during tests.

However it had numerous problems:
- closed stdin, so second prompt() didn't work
- no editing
- no utf-8 multichar
- unflexible poll interval (poll often to stay responsive to input)
and unrelated:
- stdin was hijacked by subprocess.Popen

Firstly pass stdin=PIPE to all subprocesses to leave the tester's stdin
untouched.

Secondly use python input() to read the user entry (instead of mucking about
with the stdin fd), and import readline for history and editing features.

The old approach was put in place to allow polling DBus and processes
regularly. Instead, allow this by running input() in a separate thread while
polling regularly and slowly in the main thread.

The prompt code is now simpler, cleaner and works better.
Will be used in the upcoming 'debug' suite.

Change-Id: I580aca52cd038b59418055259d0d09e9aab49124
2017-05-08 10:10:03 +00:00
Neels Hofmeyr f2d279c621 suite.py: add function to get several modems in a list
Will be used in the upcoming 'debug' suite.

Change-Id: Ia1156f523cff18196c88604ce3079b9532187427
2017-05-08 10:10:03 +00:00
Neels Hofmeyr 5a602b752b less verbose origins on interface enable/disable
Change-Id: Ia59b3e6a9617f1b9e8dc0c488846a9fb0ec8f566
2017-05-07 01:22:14 +00:00
Neels Hofmeyr 035cda8483 fix: handle dbus signals outside of the glib main loop
Collect incoming signals in a defer queue and handle them once the DBus polling
is through.

Related: OS#2220

Change-Id: Ic7520f2165888a4ee0f83b779cd58d20c4e45fa0
2017-05-07 01:21:28 +00:00
Neels Hofmeyr fd39f3eb81 osmo-bts-trx: wait for osmo-trx to launch before proceeding
Change-Id: I34feaf27b245f34a47f04cfacebdd19537eed44f
2017-05-07 01:15:57 +00:00
Neels Hofmeyr b69cebc5a3 osmo-bts-trx: add -x to use the external oscillator
Change-Id: I94ea9ab454d3d73b6d363209282df77d562d45dc
2017-05-07 01:15:50 +00:00
Neels Hofmeyr 9741de30d5 bts config: tweak logging parameters
The BTS logs grew exceptionally large because of logging 'level all debug'.

Change-Id: I2901bf47a7b12aabcbd416ca7da49db886a061d5
2017-05-07 01:14:58 +00:00
Neels Hofmeyr 506edbc869 jenkins: fix trials-cleanup.sh: use 'taken' marker
trials-cleanup.sh was still using the old 'SEEN' marker and thus didn't work.

In trial.py, make sure that *every* trial that is run is marked as taken, not
only those discovered by Trial.next().

Change-Id: I8aa6b2eece5d43266a7c84e6b2974b8fe7f3cda1
2017-05-07 01:14:23 +00:00
Neels Hofmeyr 930ac952aa fix osmo-gsm-tester.py -t option
Option to select test names had code rot. Use loaded suite definitions
properly.

Change-Id: I24f0a87a017f211f3a30fb98556a392f2a35be7b
2017-05-07 01:13:23 +00:00
Neels Hofmeyr c86ab211c9 fix resource error reporting for unavailable resource
On failure to find an unused resource (in case a test tries to use more
resources than are reserved), the handling code had a bug: print
reserved_resources from the proper source, i.e. suite_run.

Change-Id: Ifdc4201581b3293605196292339e841543ea284e
2017-05-06 23:07:42 +00:00
Neels Hofmeyr 8d8b03e1e3 compose SMS with more descriptive text
Allow tokens to be passed for SMS composition, and use that to pass MO and MT
modem names into the SMS text for easier debugging.

Change-Id: I5e0d066ffa7a4631e8568c6cd4f210627f209122
2017-05-06 22:29:45 +02:00
Neels Hofmeyr cf1e20ebe6 ofono_client: drop explicit exception catching
For some reason the code there catches exceptions happening while interfaces
are being established. That's not a good idea, drop it.

Related: OS#2220
Change-Id: Ida7731ed6ff3cad44ff437137abe2d6a424fcaa4
2017-05-05 18:36:37 +02:00
Neels Hofmeyr ef9ed2d3eb config: resolve real paths from symlinks, add paths debug logging
Tweak test expectations to include the new debug logging.

Go through the paths in alphabetical order to get deterministic logging output,
so the test expectations always match.

Change-Id: I11a905b2467cda691d9ccea30ae436bac96476c9
2017-05-04 20:56:48 +00:00
Pau Espin 107f2751a7 ofono_client: Sort events more logically
Change-Id: I515203a14cf629e789a7f7659d43126898ab4534
2017-05-04 20:56:38 +00:00
Pau Espin 504a664ca6 ofono_client: Allow other ifaces in some methods
Change-Id: Ic6df1e9c3f8948f694182bd2924753ae3cbe99ee
2017-05-04 20:56:38 +00:00
Neels Hofmeyr 51cfd8e195 fix sysmobts: also use username for dsp firmware reload command 2017-05-04 15:52:08 +02:00
Pau Espin 3895fec34b Add remote user for RemoteProcress
Use it to set root user for SysmoBTS, otherwise if osmo-gsm-tester is
run by another user it will fail to connect

Change-Id: I67d4126fc75cb9c2d249c713cd6f14db1f1e21da
2017-05-04 13:16:21 +00:00
Neels Hofmeyr 96ed9ab14d sysmobts: fix: reload firmware before each osmo-bts-sysmo run 2017-05-04 14:30:39 +02:00
Neels Hofmeyr 8dbad8701f nitb,sysmobts: tweak config
Set saner MCC+MNC, use more power.
2017-05-04 14:29:49 +02:00
Neels Hofmeyr 943f8a28d7 fixup: ofono: try a different way to catch missing dbus interfaces
Change-Id: Ifec1127d8ae38ca98f4d8e203b812ca16dee786e
2017-05-03 17:37:53 +02:00
Neels Hofmeyr 5fe88817d1 ofono: try a different way to catch missing dbus interfaces
The nested wait was definitely a bad idea. This here is certainly not very
nice either, but an attempt to catch cases where a dbus interface cannot
be used yet despite being signalled by ofono (sporadically happens).

Change-Id: I2ac7eb0f5174250f4b97e2bf758666410d8cb854
2017-05-03 17:20:17 +02:00
Neels Hofmeyr 93f5866bd2 cosmetic: rename ofono_client.get() to .systembus_get()
Change-Id: Iccce22fd4f07803e2468a2089f565d41e9a2cd9a
2017-05-03 16:32:16 +02:00
Neels Hofmeyr f1a9029514 fix resources: msisdn must not be too short, start with 1000 2017-05-02 16:31:15 +02:00
Neels Hofmeyr 24bfcee8ad fix: Modem.msisdn is not a function 2017-05-02 16:30:49 +02:00
Neels Hofmeyr 27d459c887 ofono: modem: make sure a property is its set value, make sure an interface is really present 2017-05-02 16:30:18 +02:00
Neels Hofmeyr fec7d16d0c modem: store / match received SMS 2017-05-02 16:29:09 +02:00
Neels Hofmeyr 863cb5678f cosmetic: rename to sms_was_received() 2017-05-02 16:27:59 +02:00
Neels Hofmeyr 9dbcb828aa ofono: modem: have a common function for SetProperty
So far for bool only because we don't have a non-bool setting yet. Should
be extended once we have.

Keep the probably unneeded 'poll()' to not mix changes too much.
2017-05-02 14:57:57 +02:00
Neels Hofmeyr 1ea59eac05 log: also log SMS that is being sent 2017-05-02 14:41:54 +02:00
Pau Espin b995576e40 ofono_client: Set modem online before connecting to the network
Change-Id: I62ba1bfbdee64b18a443e8ad3974bb035b0be344
2017-05-02 14:29:12 +02:00
Neels Hofmeyr 2694a9d329 fix 'make check'
Apply various fixes that arose from test case code rot. These tests will now be
used to verify patches submitted to gerrit, so they need to be up to par.

Change-Id: I5277be0c434226d9d02e038f0bc72fd2557350c1
Related: OS#2215
2017-04-27 20:24:50 +02:00
Neels Hofmeyr 05837ad0de rename default.conf to defaults.conf
Change-Id: I0928ed306b0ca9b173dac092c77a9c6986714803
2017-04-14 04:18:06 +02:00
Your Name 44af3415a5 fix octphy, fix conf, improve logging
Clearly separate the kinds of BTS hardware the GSM tester knows ('type') from
the NITB's bts/type config item ('osmobsc_bts_type' -- not 'osmonitb_...' to
stay in tune with future developments: it is the libbsc that needs this).

For BTS hardware kinds, use the full name of the binary for osmo driven models:
osmo-bts-sysmo, osmo-bts-trx, osmo-bts-octphy.

Change-Id: I1aa9b48e74013a93f9db1a34730f17717fb3b36c
2017-04-13 03:39:07 +02:00
Neels Hofmeyr 17c139ef4c octphy (untested); fix regression test expectations
Change-Id: Ie9986e0fe49171fb616ce92c3d8652002318f94f
2017-04-12 03:13:03 +02:00
Neels Hofmeyr b818b2f096 logging tweak
Change-Id: I59d230cdf9f393fa20bd2b8daf0e5549e4d7da4f
2017-04-10 05:15:38 +02:00
Neels Hofmeyr 5356d0adce trying to get sysmobts to work and various details
I know that these commit messages aren't very good, but the code is not stable
yet, so I'm not bothering with details.

Change-Id: I2d5e5f4a5407725d71093cbd71ef97b271eb8197
2017-04-10 05:09:23 +02:00
Neels Hofmeyr 85eb324165 make prematurely exited processes fail the test
Change-Id: I54394c40718b44378df597e32003742059052869
2017-04-09 22:01:16 +02:00
Neels Hofmeyr b02c21115d wip
Change-Id: Icce6bd83173db86a64fa621e641131758380c7cd
2017-04-09 19:11:25 +02:00
Neels Hofmeyr b3daaea6b5 implement modem and nitb bits for a real test
Change-Id: I1ca3bd874aed1265d83a46340e9b3e469075c7ee
2017-04-09 18:24:52 +02:00
Neels Hofmeyr e352844011 cosmetic: fix import for previous commit
Change-Id: I44eed9a449be8202cea08894bf1c428f52e2625d
2017-04-08 21:18:30 +02:00
Neels Hofmeyr 2ef9b00d51 cosmetic: flush stdout and stderr before printing summary
Change-Id: I9c7eec29c200ec90e9908457a07b79122014a0e9
2017-04-08 21:16:27 +02:00
Neels Hofmeyr ef42cb51fa osmo-gsm-tester.py: return error on failure
Change-Id: I1d2133b5a2eeaede1eb9b321aa17843ce4bd06d2
2017-04-08 19:38:58 +02:00
Neels Hofmeyr eafdbb2fb2 clearly mark not yet implemented test api
Change-Id: Ie0781e618ed49ac31685d69b860e77d791ec5300
2017-04-08 19:27:42 +02:00
Your Name 3c6673aa8c various fixes from first test runs
Change-Id: Ifa5a780dc0123aa84273c57c726c8c1bea563495
2017-04-08 19:20:57 +02:00
Neels Hofmeyr d46ea13d48 review jenkins scripts
Change-Id: I420910bd2d30e96605ecf3acb779ce726c75d912
2017-04-08 18:36:13 +02:00
Neels Hofmeyr 3531a192ae core implementation
code bomb implementing the bulk of the osmo-gsm-tester

Change-Id: I53610becbf643ed51b90cfd9debc6992fe211ec9
2017-04-08 15:43:19 +02:00
Neels Hofmeyr dae3d3c479 initial import
The original osmo-gsm-tester was an internal development at sysmocom, mostly by
D. Laszlo Sitzer <dlsitzer@sysmocom.de>, of which this public osmo-gsm-tester
is a refactoring / rewrite.

This imports an early state of the refactoring and is not functional yet. Bits
from the earlier osmo-gsm-tester will be added as needed. The earlier commit
history is not imported.
2017-03-28 12:37:17 +02:00