Commit Graph

847 Commits

Author SHA1 Message Date
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