Commit Graph

1234 Commits

Author SHA1 Message Date
Neels Hofmeyr feb56c0a04 readme: format so that dependencies can be copy-pasted to terminal
Change-Id: I455cb75d6cdd583d31ab0188476bee813a2ab789
2017-05-10 13:08:45 +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 d1bedb1160 selftest: suite_test: ignore line numbers
Change-Id: Ideab363753559ba0b49352dc9da03a27d7b0dadf
2017-05-08 13:06:07 +02:00
Neels Hofmeyr 67cea22236 add debug suite
Change-Id: I818d130d01ed26e38b5f33341de3727e9f17ca52
2017-05-08 11:04:26 +00: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 56b3d7e685 defaults.conf: use only TCH/F instead of dynamic channels
Let's opt for the oldest/simplest case by default.

Change-Id: I89d634cc51e13bdf6ec157ffb64baa80a469f4c8
2017-05-08 10:43:59 +00: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
Pau Espin b73a1dbbe4 resources: Fix path for gobi_3
Change-Id: I10e5e56b6bec6c0b25db15af75d4cbd60fbbc7d9
2017-05-05 16:02:28 +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 2831de5790 move /example/suites to /suites
/suites will be the definitive GSM tests collection where everyone should contribute.

Since we're using /example on our current osmo-gsm-tester setup actually as-is,
change paths.conf to point at ../suites.

Change-Id: I7a4d0161d3dcb3a0c723b0b96db85dd032cc2159
2017-05-04 16:42:51 +02:00
Neels Hofmeyr 0cb4522a92 put the example suite in /example, not /selftest/real_suite
Also drop the env file and tweak the README.txt

Change-Id: Ieea274dfd6756498b760c18a5852398cfa396b50
2017-05-04 16:42:50 +02: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 c9506b8b62 fix template_test after 8dbad8701f (tweak config) 2017-05-04 15:13:41 +02:00
Neels Hofmeyr 417a03df3a lock_test: make more robust
Before, the test would rely on timeouts to work out. Instead, use marker files
to indicate whether to wait longer. Firstly to signal a blocking process should
end, secondly that it has indeed ended.

Also use a mktemp tempdir instead of /tmp
2017-05-04 14:53:46 +02: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 88909ddea9 jenkins-run: add env var to invocation to allow passing more opts from jenkins
Change-Id: I6deaea178cb96bf1c105657091e8798993f7a405
2017-05-03 17:28:56 +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 e725369569 resources: update modems, sierra_3 replaced by a Gobi
Change-Id: I95832920a83ede29f314dfce23e1089729dcf3c7
2017-05-03 16:39:09 +02:00
Neels Hofmeyr 93f5866bd2 cosmetic: rename ofono_client.get() to .systembus_get()
Change-Id: Iccce22fd4f07803e2468a2089f565d41e9a2cd9a
2017-05-03 16:32:16 +02:00