AgeCommit message (Collapse)AuthorFilesLines
2017-09-07jenkins: build from new osmo-{msc,bsc,mgw,sgsn} repositoriesneels/testNeels Hofmeyr9-12/+67
The idea is to build each binary separately: even though osmo-msc requires libosmo-sccp, which already includes the osmo-stp binary, we still want osmo-stp to be built from a separate script. The reason: to track down regressions, we can change the versions each binary is built from separately. The additional build effort and jenkins script multitude is acceptable. Change-Id: I194ad5169dbe013c8e1cf9d631033cb2576744dd
2017-09-07jenkins-common: ensure requested binaries indeed have been builtNeels Hofmeyr1-0/+9
Recent change Ib1a00b2149453fedf9ece0460dd4d6e83f774d45 drops binaries from a build artifact by leaving only explicitly requested ones. This adds a check that the requested ones indeed exist. Change-Id: Iceddeee6aebb1cdb54d7304495c3e332390261db
2017-09-05jenkins: per build, drop programs built "unintentionally"Neels Hofmeyr9-8/+24
Each of the jenkins-build-* scripts intends to build a specific set of programs. While compiling dependencies, other programs may end up in $prefix/bin. Drop those other binaries to reduce potential confusion. Add arguments to the create_bin_tgz function: callers need to list exactly the $prefix/bin/* binaries that should be tar'd. All others are first removed from the prefix. Adjust existing scripts to provide such binary names. Change-Id: Ib1a00b2149453fedf9ece0460dd4d6e83f774d45
2017-08-31contrib: Add scripts to build osmo-pcuPau Espin Pedrol2-0/+29
Change-Id: I90e7d2a79fb4ab7cc7fae5f3a1287a2e5bb748ab
2017-08-25default-suites.conf: Add suites to explicitly test with sysmoCell5000Pau Espin Pedrol1-0/+2
Change-Id: I6ff08a281c0c32148ca2c59f731d6550bf7b1c90
2017-08-25modem: Attempt fixing crash from Register() dbus methodPau Espin Pedrol1-2/+12
Register() method returned today this error which is expected acording to ofono documentation API. In this case it probably happens because the modem internally starts registering at some point between the time Scan() is finished and we call Register(). In this case it is fine for us and we should just ignore the error. A helper method is added to check for this as so far it seems tricky to check error information coming from pydbus. I could not reproduce this issue locally so I could not test that the helper function is going to handle it correctly when it is triggered. That's why I added extra debug information to be able to fix it next time it is triggered. File "/home/jenkins/workspace/osmo-gsm-tester_run/osmo-gsm-tester/src/osmo_gsm_tester/ofono_client.py", line 489, in scan_cb_register dbus_op.Register() File "/usr/local/lib/python3.4/dist-packages/pydbus/proxy_method.py", line 75, in __call__ 0, timeout_to_glib(timeout), None).unpack() GLib.Error: g-io-error-quark: GDBus.Error:org.ofono.Error.InProgress: Operation already in progress (36) Change-Id: I58dda09416ee7328812431220fd3d239c5c2980a
2017-08-24Introduce aoip_encryption suitePau Espin Pedrol5-0/+139
This suite aims testing different authentication and encryption setups. Change-Id: I5816ecc19a818e5b821fbc6272c9f37f9650ae10
2017-08-24schema: Remove uneeded TRX_REMOTE_IP validate typePau Espin Pedrol1-2/+0
Attribute trx_remote_ip is actually using IPv4 validate type, thus this validate type is not needed. Change-Id: Ia8e154ac5fe33932935ba049f08eb5af15195d99
2017-08-24Introduce auth_algo modem config attributePau Espin Pedrol6-5/+40
Algorithm to use to generate response for the challenge during authentication time is hardcoded in the sim card and cannot be easily changed. Thus specify in the config of each modem the algorithm used by the SIM Card. This attribute is used add subscriber_add() time, when the IMSI, KI and algorithm to use in the MSC to authenticate a given subscriber is stored in the database. This way we can easily set up a specific algorithm for each SimCard/Modem, in case different SimCards are configured with different algorithms. This can be used to specificially test different algorithms too. For instance, let's imagine we have 2 simcards, one configured to use comp128v1 and another one with xor, and we create a test which ckecks that XOR is algo is working fine. We don't want to accidentally select the modem with comp128v1 in this case. Thus we can use this attribute to create a scenario file matching 'auth_algo: xor' to ensure always the correct modem is picked. Change-Id: Ifdf74630afeb05452994bbc9eb62a745a1d745ce
2017-08-24bsc: Allow tests to select network encryptionPau Espin Pedrol1-0/+8
Nowadays encryption parameter in bsc needs to be set to the same cipher as the one specified in msc, otherwise the cipher negotation will fail. See OS#2461 for more information on the matter. Change-Id: I857b3860fb771b36fb3d587d4e92b320f0685a19
2017-08-23Add support for authentication VTY param in msc and bscPau Espin Pedrol4-0/+14
Change-Id: Ie1eb76149d4b006631050f8a1e532fbdbdad6a7f
2017-08-23hlr: Implement subscriber_delete APIPau Espin Pedrol1-0/+13
Change-Id: Iefb30ad552929386743d936bf629fe7a760a4713
2017-08-23hlr: Use python module instead of cmdline to modify sqlite dbPau Espin Pedrol2-16/+12
Change-Id: I94a294c37f361a666064094455c9a1e1399fdfc7
2017-08-23nitb: Introduce subscriber_delete APIPau Espin Pedrol1-0/+17
Change-Id: I62829ed243857681bcc40a4a1861c5c583907f4b
2017-08-23nitb: ctrl: Remove unused return statement in subscriber_addPau Espin Pedrol1-1/+0
In case of failure an exception is raised. If everything goes well no need to return True. Change-Id: I5194eeb9208f973da12f2fa710f2b3e7acd78fb5
2017-08-23hlr: fill auc_2g table when registering a subscriberPau Espin Pedrol1-2/+11
Change-Id: I491d093934c129a01baa1c5d7ada4acf370bf37d
2017-08-23Add scenarios for each osmo-bts-trx typePau Espin Pedrol4-3/+11
This way we can run tests with a specific instance of an osmo-bts-trx, for instance we may want to run some tests with an Ettus B200 and also with a sysmoCell 5000. Change-Id: I5fd78d79b8bfab8ccacc4666563b66b6da9f2bde
2017-08-23bts_osmotrx: Support configuring bts addr, trx_remote_ip and launch_trxPau Espin Pedrol7-11/+49
We may want to support running a device which runs its own TRX (osmo-trx or different implementation). Furthermore, this TRX may be available in some specific hwardare rather than on the main unit. This makes it easy to configure OsmoBtsTrx to launch it's own osmo-trx or not. In case it is launched, all IPs are configured correctly to ensure connection can be established. Before this commit, osmo-trx was binding to Now we can support multiple osmo-trx being launched on the main unit. Change-Id: I825ed1fc0c3fe75d196db90c1508283fbd04acf8
2017-08-23resources.conf: Remove empty linePau Espin Pedrol1-1/+0
Change-Id: I821bff68ce3a4a81a9deb79e6302bd7c341a8255
2017-08-23modem: Allow tests to change KIPau Espin Pedrol1-0/+6
This is useful for tests that wants to fake a bad KI to test if auth and encryption are working correctly. Change-Id: I40cfed6f6b9239eea2b97ffa010b98c78f0cb9cb
2017-08-23Allow tests to select network encryptionPau Espin Pedrol2-0/+18
Change-Id: I273eee44c095690d0c2e3994befa97edc42496ac
2017-08-23ctrl: Add dbg log to print received dataPau Espin Pedrol1-1/+3
This is useful to see for instance the returned values from NITB when asked for active subscribers. Change-Id: I5c616646da360457930888b54d9019b76f05fe2f
2017-08-21Increase log verbosity for osmo-bts-trxPau Espin Pedrol1-1/+2
The log levels changed are useful to understand clock failures we see from time to time in osmo-gsm-tester. See OS-2325. Change-Id: Id74af3ccb2f3db3c1793c7ff7b7a60a534e78e81
2017-08-21bts_osmotrx: Allow LD_LIBRARY_PATH when loading osmo-trxPau Espin Pedrol1-0/+2
When splitting osmo-trx to its own class the env injection part was removed because it seemed not needed as it has no dependencies included by default in the trial. However, it may still be required by the osmo-gsm-tester main unit to launch osmo-gsm-tester with LD_PRELOAD_PATH to point to specific versions of libuhd, so let's add the env injection back in there. Change-Id: I069ba69f4207665c8c575fed0fc8ff164c571e36
2017-08-18esme: Remove temporary workaround for non-implemented deliver_smPau Espin Pedrol1-3/+1
Openbsc has SMS Delivery Reports since recently, which means we are now receiving deliver_sm messages and this workaround introduced in commit db0d8ab4fcfac67e76729241d92ca128d4526240 is not required anymore. Closes OS-#2353. Change-Id: Iecf3983bfc24fec8023ba5d589c2d7620ec5d921
2017-08-18Split osmo-trx from osmo-bts-trxPau Espin Pedrol3-12/+50
In the future, some environments/products may come with a trx interface pre-installed. Start work to easily disable launching it. Change-Id: I556c3e2ba16753393c7e70800c533a18122daeaa
2017-08-17esme: user_message_referece values should be smaller than 256Pau Espin Pedrol1-1/+1
SMPP specs say message reference is 16 bits field. However, message reference field in GSM03.40 spec is only 8 bits. Change-Id: I52968a10089d14e0e3b0f9be678c261e3f92939c
2017-08-17esme: smpp pdu field is a string and needs conversionPau Espin Pedrol1-2/+3
I take the chance to also swap the two log parameters, because they are included into a dictionary and shown in swapped order in the log anyway, which distracts me every time I look at the values. Change-Id: I6e6ec5b9980958de82ade40e4cd898dc6f1b889f
2017-08-10util: ip_to_iface: Return secondary iface if presentPau Espin Pedrol1-1/+1
In the following example setup, if osmo-nitb is listening on, we want to return eth1:0 instead of eth1. ip addr show eth1 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:0d:b9:35:3a:41 brd ff:ff:ff:ff:ff:ff inet brd scope global eth1 valid_lft forever preferred_lft forever inet brd scope global secondary eth1:0 valid_lft forever preferred_lft forever inet brd scope global secondary eth1:1 valid_lft forever preferred_lft forever Change-Id: Ia66e6fd8138fc11a70437a573128aacf6a01b8ff
2017-08-10esme: Add cleanup function to avoid cascade failure of testsPau Espin Pedrol2-0/+4
In commit 6100b629e55ed4aa319f46ad797741131b9da8e7 I assumed esme already had a cleanup function, which doesn't seem to be the case. This means if a test calls esme.connect() and fails afterwards without calling esme.disconnect(), the connection will be kept but as the test will finish and the NITB is closed, then the connection will be kept forever in an erroneous state. With the cleanup function we ensure we will close the connection after the test. Change-Id: Ia3a23bb8bbccfe7ac5c544521b5566164609f0a5
2017-08-10osmo-bts-trx config: remove settscNeels Hofmeyr1-1/+0
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: I58002a84b6b0104de4fb5c7cade27b263e375c1f
2017-08-09Set osmo-bts pcu-socket config to point to run dirPau Espin Pedrol4-3/+15
Otherwise osmo-bts stores the socket file in /tmp. If an earlier instance doesn't finish cleanly, the file is left there and a new instance will fail to start because it cannot create a new socket file in the same place. Change-Id: I5a1da23c45a4ac496fe765e0d78c52dae3e7808b
2017-08-07cosmetic: osmo-msc.cfg.tmpl: fix indentNeels Hofmeyr1-2/+2
Change-Id: Iefc3b06338cff4f5e51b7b03d9a5f92de18ca86a
2017-08-07aoip: add newly needed osmo-msc point-code configNeels Hofmeyr1-0/+4
OsmoMSC no longer has a hard-coded point-code of 0.0.1. Configure it. Change-Id: I54be984415445e695c583f35c419aed559ac5c84
2017-08-07osmo-bsc.cfg.tmpl: add point code addressesAlexander Couzens1-0/+10
osmo-bsc requires atm to have point code addresses given for msc + bsc Change-Id: I94f8a6892ad7e10001322cbc5a46687c0d532cb2
2017-07-31suite: Don't stop cleanup of objects on cleanup exceptionPau Espin Pedrol1-1/+4
Let's accept that during cleanup time some stuff may not be in a good state, specially in case of a failure, but let's keep harder to clean up everything as much as possible. This should fix an issue in which after a test failure using an esme object, an smpp connection is kept in a buggy state and never removed/cleaned up, and makes all tests after it fail too because the conn is triggered at poll() time: File "/home/jenkins/workspace/osmo-gsm-tester_run/osmo-gsm-tester/src/osmo_gsm_tester/suite.py", line 260, in run_tests self.objects_cleanup() File "/home/jenkins/workspace/osmo-gsm-tester_run/osmo-gsm-tester/src/osmo_gsm_tester/suite.py", line 199, in objects_cleanup obj.cleanup() File "/home/jenkins/workspace/osmo-gsm-tester_run/osmo-gsm-tester/src/osmo_gsm_tester/ofono_client.py", line 345, in cleanup self.dbus.cleanup() File "/home/jenkins/workspace/osmo-gsm-tester_run/osmo-gsm-tester/src/osmo_gsm_tester/ofono_client.py", line 170, in cleanup self.set_powered(False) File "/home/jenkins/workspace/osmo-gsm-tester_run/osmo-gsm-tester/src/osmo_gsm_tester/ofono_client.py", line 304, in set_powered self.set_bool('Powered', powered) File "/home/jenkins/workspace/osmo-gsm-tester_run/osmo-gsm-tester/src/osmo_gsm_tester/ofono_client.py", line 295, in set_bool event_loop.poll() File "/home/jenkins/workspace/osmo-gsm-tester_run/osmo-gsm-tester/src/osmo_gsm_tester/event_loop.py", line 39, in poll func() File "/home/jenkins/workspace/osmo-gsm-tester_run/osmo-gsm-tester/src/osmo_gsm_tester/esme.py", line 78, in poll self.client.poll() File "/usr/local/lib/python3.4/dist-packages/smpplib/client.py", line 321, in poll self.read_once(ignore_error_codes) File "/usr/local/lib/python3.4/dist-packages/smpplib/client.py", line 279, in read_once p = self.read_pdu() File "/usr/local/lib/python3.4/dist-packages/smpplib/client.py", line 206, in read_pdu raise exceptions.ConnectionError() smpplib.exceptions.ConnectionError Change-Id: Ie7ef9284490f12f5cfd76c35b33b57eefab20eb6
2017-07-31esme: Log connection parameters of the SMSCPau Espin Pedrol1-1/+1
Change-Id: Ie4d3019503a68b02ace849defe618bdc74eacbd9
2017-07-20esme: Fix race condition waiting for message responsePau Espin Pedrol1-1/+2
Sometimes in test esme_ms_sms_transaction.py we get the following error: esme_ms_sms_transaction.py:54: ERR: ValueError: list.remove(x): x not in list This appears due to a race condition because sms_send is used several times, which means we don't wait or sync until we receive the response before calling sms_send_wait_resp. That means when we wait for response of message with seqnum X, we may receive response from message seqnum X-1 which was initiated by sms_send and thus was not stored in the self.pdus_pending array. As it's not there, trying to remove it triggers an exception. Change-Id: Idf49f40eb46be1448b328a5c338ddbc4547148ff
2017-07-20aoip_smpp: Disable check in esme_ms_sms_storeforward due to known issuePau Espin Pedrol1-6/+7
A test case checked in that test is known to be failing at the moment due to missing correct implementation bits for AoIP software. Comment it in a separate commit so that is easy to revert it once we have it implemented. See OsmoSMSC #2354 for more information. Change-Id: I12f8dbe1d6dc9a554438fda1e38b2e5e3245c320
2017-07-20Improve SMPP supported features and test coveragePau Espin Pedrol5-24/+178
esme: Add several bits to handle logic required by tests: - Allow specifying the mode used to send an sms - Add a parameter to ask to receive a Delivery receipt for that message - Add sms_send_wait_resp API, which waits until the response message for a given smpp message is received when sending an sms. - Add receipt_was_received API, which together with message_received_handler maintains state of the delivery receipts we asked for and were still not received. However, the check needs to be disabled for now because OsmoNITB doens't seem to be sending stuff properly, see OsmoNITB #2353. - On message_received_handler, also print alert_notification messages, to show that there's actually a bug in OsmoNITB, see #2352. Move old esme_ms_sms to esme_ms_sms_transaction, and explicitly state that we are using that mode. On the same test, we can now enable the part which asserts that sending an SMS to an msisdn with unknown destination triggers an error. The issue was mainly that the error had to come from the SMSC server response, not from the sent message, so we have to wait for the response to have the failure triggered. Finally, add esme_ms_sms_storeforward, which tests features for sms sent using that mode, and uses the APIs described above. Change-Id: Ia2c0c325fee14143deca8310312fc530cd9ce92e
2017-07-20remove timer section from osmo-{bts,bsc}.cfg.tmplHarald Welte4-44/+0
As described in https://osmocom.org/issues/2380 and related gerrit patch https://gerrit.osmocom.org/#/c/3306 the config files currently contain timers with a 'zero' value, leading to issues. The config file templates used in osmo-gsm-tester suffer actually from exactly the same issue: They basically contain values that were written back to the file based on the default initialization in libbsc, which unfortunately was zero in some cases. Let's remove those values, they are the (bad) default anyway. libbsc patches in the pipeline will introduce reasonable defaults and forbid the use of zero for timers. Change-Id: I8cde29a597a17c2659b3b87268be4b12975f4bef
2017-07-06contrib: Disable doxygen doc generationPau Espin Pedrol6-11/+7
The --disable-doxygen was recently added to libosmocore and libosmo-netif. No need to manually remove documentation anymore. Change-Id: I3ca3dd1c115fc6784e4dc26a5ff5bf35d65b4e22
2017-07-05default-suites: Add smppPau Espin Pedrol1-0/+2
No need to run it for several BTS as the focus here is testing the core network and interoperation with different BTS is already tested with the sms suite. This way we avoid lossing extra time running the default suite set. Change-Id: Ie6458801ec1ecce63e08617d1e449047dc496e16
2017-07-05contrib: Fix removal of doc directoriesPau Espin Pedrol1-1/+1
The docs are actually not removed because the shell takes {libosmocore,libosmo-sccp} as a string literal if found inside quote marks, see [1] for more information. [1] https://unix.stackexchange.com/questions/67757/wildcards-inside-quotes Change-Id: Ida8941525db2d6a80539ffda29fb4fa74dbb1e16
2017-07-03suite: Print process ending prematurelyPau Espin Pedrol1-1/+1
Change-Id: Icec476ccc536611f771dcc7872f5190bbd0572e7
2017-07-03suite: Use event_loop.poll in interactive pollPau Espin Pedrol1-1/+1
This way we also poll dbus events from ofono_client Change-Id: I06fe9a78d702ebb05c4ece78e14fcae9e2e74ee2
2017-07-03Add microsecond accuracy to log timestampsPau Espin Pedrol3-5/+7
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-03ofono_client: Power off modem during cleanup()Pau Espin Pedrol1-0/+1
Change-Id: Ic0c509e77ababf385beb8b1d26659ca4d18f9331
2017-06-29jenkins: build msc using libosmo-sccp masterNeels Hofmeyr1-1/+1
Since 81c0bcab068174036f6897e69311f413d94c74d4 was merged, it is not necessary to build the neels/aoip branch anymore. Other patches on that branch are not necessary either. Change-Id: I850e0dd2fc61d59d56c0dd69ee00b6e19685fb95
2017-06-27Revert "osmo-bts-trx config: remove settsc"Neels Hofmeyr1-0/+1
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 72ded64705a85df362f918879ddc075d1a0191fe. Change-Id: I57a3db0d060203ad6540c9a3cc7735e273ee0048