ms: Simplify starting of the test and combine loop and wait This will make it easier to strt different kind of tests. The cost of calling step_once is hopefully neglectable as it simplifies the test. Change-Id: I3708ac382c0a34e17cf147d18f03603946437a53
ms: Only use completed tests for min/max handling Remove non completed results before calculating the min/max. We will need to check success/failure based on completion ratio. Change-Id: Icaf9e90dd729b2339e409b3ec1593f456969fd19
bts: Recreate resources.conf trx_list with len based on num_trx We are already doing this for defaults.cfg, but not for resources.conf. As a result, if we have a trx_list with 2 trx but we have set num_trx=1 (default), parsing will fail later in bsc.cfg.tmpl because conf_for_bsc_prepare() will pass a trx_list with 2 trx. Change-Id: I28ed34abeedaa0ee2e7862ced45a46042192d831
nanobts: Support multiTRX num_trx is left for now by default to 1, but it has been tested to work properly (current tests pass and both trx are configured) with num_trx=2. Change-Id: Ib3962f824a804e2aa582601475a8514c6cb0d8e7
jenkins-build-osmo-msc.sh: Build osmo-hlr before osmo-msc osmo-msc now needs libosmo-gsup-client, which is built during omso-hlr compilation. Change-Id: I67c5d168011a385fd4f68df351e0a93e9bef37a7
bts_nanobts: Fix pwsup_list increasing its size every new test variables under class section are shared among all instances, and are used unless the specific class instance attribute is set. As a result, the same pwsup_list object was being re-used. Take the chance to do the same with the _pcu var, since we want same behavior for it. See for reference: https://stackoverflow.com/a/1716730 Fixes: OS#3456 Change-Id: I3f6a9d64b35aec33430e90872f41c3d046653ce6
Cleanup of class scoped variables After bug described in OS#3456 and fixed in last commit, let's categorize and place variables in its correct plac to avoid similar issus. We leave under the class keyword (class scoped variables) the attributes which are to be used as static class attributes. All other ones are initialized during __init__(). This way w avoid scenarios in which while using an object from an instance attribute we end up reading a class scoped variable which is shared among all instances. Change-Id: I5ad4cac34a9f49eaf42966c01c9c5a4d3f3e9dc8
osmo-hlr.cfg.tmpl: Add ussd routing prefix for *#100# and fix expected answer format Since osmo-hlr.git I1d09fab810a6bb9ab02904de72dbc9e8a414f9f9, USSD processing has been moved to osmo-hlr and prefix routing needs to be configured, otherwise USSD requested are answered back to the MS with an error "ss-NotAvailable (18)". mesage received for extension resolution (*#100#) had its format change, so update to new format (carriage return at the end was dropped). Change-Id: I5f75eff0df2d20d7f9b39e69184cffb0e635713d
Introduce scenario modifiers Before this patch, scenarios were only used to select resources with specific attributes. This commit introduces "modifiers" in scenarios, which allows setting or modifing config attributes of resources once they have been reserved. This way same test can be run selecting same resources but modifying its configuration, allowing for instance running different number of TRX, different timeslot configuration, etc. Modifiers are described by placing a "modifiers" dictionary in any scenario file, similar to the current "resources" one used to select requird resources. The "modifiers" dictionary is overlaid on top of the "resources" one resulting from combining all the "resources" dictionary of all scenario files. Change-Id: If8c422c67d9a971d9ce2c72594f55cde2db7550d
Replace suites dyn_ts_ipa* and voice using scenario modifiers Now that we support modifiers in scenario files, we don't need to duplicate tests and testsuites to dynamically set trx configuration at run time. It can be done more easily with scenario modifiers. Change-Id: I80c441bb5b98d5d2e95d4c6ae1efab3e5f3c40d9
Add testsuite + scenarios to test nanoBTS multiTRX Currently only 2 nanoBTS in the 900 band are attached together as a multiTRX setup. We thus set num_trx to 2 and set channel allocator descending to force the BTS to use the 2nd TRX when allocating channels. Change-Id: I12e1bcb047c4efac5693cf725739e0ce2e0532ee
Check for the sispm dependency From the commit that added it: Using it requires the following extra dependencies: $ apt-get install python3-usb $ pip3 install pysispm Change-Id: Id347604f47ac5243b7eae12b9bdf675f2379f4c6
suite: Fix generation of config() dictionary suite.config() hasn't been activetly used anywere. New upcoming patches will start using it to set and overlay config parameters for objects which are not necessarily allocated as resources. Since these options don't apply to specific resources, there's no sense in running replicate_times() on them. Change-Id: I5fcdc9151d1663e738f5c8abe588a42ab51c8f6e
default-suites: Remove octobts tests Since latest release firmware, we have been unable to start up octobts correctly. As it's annoying having all those tests failing all the time, let's disable them in nightly builds until we have a working OctoBTS setup working again. Change-Id: I828723193564b3a91aeac0c163c7c8c6b7e4058c
osmo-bts-trx: Big refactor and cleanup of osmo-trx related code * This commit is a preparation for future commits to add support for different osmo-trx devices and backends like osmo-trx-lms. * Drop deprecated osmo-trx-* cmd line params and use VTY cfg to set them. * As number of osmo-trx related osmo-gsm-tester attributes grow, group them togther in an "osmo_trx" dictionary. Change-Id: I77d29413c9e3b600b796627ba366f80c3281b7e1
Check for smpplib being installed as well from the docs: pip3 install git+git://github.com/podshumok/python-smpplib.git Change-Id: I6be1c961e512e68d5bed8b317d1dda363a58fbe7
Generate imsi/ki on OsmoMobile construction Take an IMSI/KI when creating the OsmoMobile and not when starting it. This will allow other code to know which IMSIs will be used before the system starts (e.g. to add it to the HLR/nitb db). Change-Id: I79e259e948aa797c13118143ecd64bb7e29d274b
Remove tests for unspecified speech HR2 HR2 was never specified, so there's no sense in attempting to test it. Change-Id: Ifd7cab43bae0729106a9402e3e610eeecde645e4
contrib: Disable installing unneeded systemd service files Otherwise since we install without root perissins to a local directory, systemd files will fail to be installed to regular systemd location /lib/systemd/system/). Change-Id: I20a285e4e92fec7990770568e8d5dc117d6bf477
Build and use osmo-bsc_mgcp from openbsc.git instead of osmo-mgw.git In osmo-mgw.git 31b4729f2731c747b8b33c4646dd5ade2ace29bc, osmo-bsc_mgcp was dropped and the one from openbsc.git must be used. Change-Id: Ib1c46baf4d36ab18f8064a2234a0ba28a1e7d2c2
Keep track of all mobiles and copy them to unstarted later At all times have a list of mobiles that were created. Make a shallow copy and use it as the unstarted list. This will be used by the upcoming gsm tester integration to build a list of subscribers to be added into the HLR/AuC database. Change-Id: Id72b7ce8821cf53ac0d5e4a141b9a2b66242e2a3
Sanitize existing suite names When first suites were added, osmo-nitb was used. Then new tests using regular split components were added with "aoip_" prefix. At some point it was clear that osmo-nitb was being deprecated so new tests for split components were added without any prefix, as they are expected to be the default one. Since most current and future development is going to be done for split components, as well as new tests added, it makes sense to move the few old testsuites using osmo-nitb to have all "nitb_" prefix, while keeping the split component tests without prefix as it's the regular network topology. Change-Id: Idea2e053d337548e0e9b1b47441dbb262124f909
build: Add overload to clone repo and build in subdirectory To build osmo-nitb we need to clone "openbsc" and then enter the "openbsc" sub-directory. For building "mobile" and "virt_phy" of OsmocomBB we will need to do something similar. Instead of added more hardcoded paths, add a variant that allows to specify the source directory. Change-Id: I67fbd54296f2c68316bf8e89cfeb37d147193d53
osmo-bts-trx: Add multiTRX support Support is limited to 1 osmo-trx with 1 phy and multiple instances. Change-Id: If2bda5ec7ac9fa3fe6bc5d71f323c3ccc2a70158
osmo-trx: Add multi_arfcn support 2nd TRX arfcn is changed in defaults.conf because multi_arfcn requires them to be alocated in steps of 4 starting from TRX0. It is not enabled by default yet on B200 (it must use it to support several TRX) because current host running osmo-gsm-tester is not performant enough and cannot keep up with timers due to multi-arfcn CPU overhead. Change-Id: I096df82ad1f4cbb41dfbd6a78466a845f34be385
default-suites: Remove nanobts HR1 voice test nanobts doesn't support this codec, so it will always fail. Change-Id: Iea4e6395809e5ef5485892f8f17e0dcfa36640dc
contrib: Use correct var to write repo name in git_hashes.txt We want to write repo name in there, not $dep which actually doesn't exist in local context of have_repo function. In most cases it's actually the same because in almost all cases $dep is passed as $1 to have_repo and thus is the same as local $repo. But in a few recipes which don't use build_repo directly but instead use have_repo and build manually, $dep may not point to $repo. That's the case for osmocom-bb for instance. As a result, "libosmocore" is printed twice, were second word should be "osmocom-bb". Change-Id: I7a7db7cf4cc020295d216c60d6dc688f110916dc
Add dynts suite to test switch between PDCH and TCH It seems for not yet clear reasons the MS require some time after the PDCH channels have been activated again to use them reliably. If no sleep is used between call hangup and gprs activate pdp ctx, the MS fails to activate the pdp ctx due to QMI error respone to the "Start network" requested. Related: OS#2582 Change-Id: I73b51c31309ac4c28c64ed7eb7c8c649e535aa22
Optimize and re-use an existing repository Instead of cloning osmocom-bb three times this will allow us to re-use the repository. Simply change the directory, set the new origin and fetch. Change-Id: I63f103b2f70559e969e8c66477ab9ee7f2886832
Be able to switch-off ASAN builds of our binaries. Inroduce a way to not take a 2x performance hit when testing. It is of importance if we run with hundreds of BTSes and 10k+ subscribers. In the absence of using getops or shflags use an environment for it. Change-Id: I540ba1c35e8fb72abcee0d86e0bdc1136b47345c
Make code copying inst through ssh generic It can later on be used by other classes that need to run binaries in inst remotely. Change-Id: I838b999528695207e1147cfe76e6f7aaf3b1dd53
osmotrx: Make sure remote process stops after ssh session is closed First of all, it was found that vty allocation must be forced (-t -t) during ssh session creation to make sure SIGHUP is forwarded when session is closed. Second, since osmo-trx ignores SIGHUP (osmo_init_ignore_signals()), we must add a wrapper script which converts received SIGHUP into a SIGINT to stop osmo-trx. Change-Id: Ic334a54b1a1827d74fe0b453ac32bb77b8616147
bts_osmo: Only check for socket path in ready_for_pcu() Previous implementation was done due to osmo-pcu dying if failed to connect to not-yet prepared BTS. This is no longer the case, so we can start osmo-pcu as soon as the socket exists. Change-Id: I3aa6bef0c4893bdcac668002ca018af019f666a3
resources.conf.prod: Use specific remote machine to run osmo-trx Run osmo-trx in a separate more powerful machine (i5) rather than running in low end APU where osmo-gsm-tester runs. Change-Id: I0479643789783d5e8a142042a65c4d53020d1e79
templates: Update .cfg files to use logging level set-all VTY cmd "logging level all" is deprecated in favour of "logging level set-all", but the required behaviour in this case is "logging level set-all". Change-Id: Ice54fca6be86f05a02ce4ae783e6e42e6958b95d
defaults.conf: Add SDCCH8 ts in TRX1 cfg This way we can test too if SDCH8 channels are allocated and used correctly in TRX1 in multiTRX setups. Change-Id: I9d08f3d019a28cf775d70d941c5a60a7e7ca20a9
resources.conf.prod: Update TRX host ip addr The host was updated to have several IP address to be able to run several instances of osmo-trx in parallel. Change-Id: I3595b82a5d202caec7bc48a63e28ce0331e5abb7
bsc: Record RSL traffic in case rsl_ip and oml_ip differs This change allows recording all interesting traffic for TTCN3 tests, having GSMTAP and RSL together, because osmo-bsc is configured to pass the RSL IP of the TTCN3 testsuite emulating a BSC. Change-Id: I6bd1d1bec8e7b698d12aa886acc21d92532d9e6c
ttcn3: Allow remote hosts (sysmobts) to access RSL srv inside TTCN3 docker And extra IP address is required/requested on the docker host because the BSC handling the OML instance is binding to it's address, so we cannot ask docker to use that one because it fails binding to it. Change-Id: I734fba91db535d7b183ddc7f51d324a6cd2eaf6f
First round of clean-ups of imports and unused variables Run pyflakes src/osmo_gsm_tester and then address the first round of problems. Change-Id: I02f1d89078dfdf37d53e2e20811bf36fb14ec3b0
defaults.conf: Set valid default codec_list matching avail TS types By default, all channels are TCH/F, and as a result we cannot run half rate codecs on it. Since recent versions of osmo-bsc, it checks this kind of misconfigurations and answers with an Assignment Failure: .... 20181029162133430 DMSC <0007> codec_pref.c:445 codec-support/trx config of BTS 0 does not intersect with codec-list of MSC 0 20181029162133430 DMSC <0007> osmo_bsc_main.c:887 Configuration contains mutually exclusive codec settings -- check configuration! .... 20181029162255253 DMSC <0007> osmo_bsc_bssap.c:859 Rx MSC DT1 BSSMAP ASSIGNMENT REQ 20181029162255254 DMSC <0007> osmo_bsc_bssap.c:718 No supported audio type found for channel_type = { ch_indctr=0x1, ch_rate_type=0xa, perm_spch=[ 42 21 11 01 25 05 ] Change-Id: Ie6b37839fe363b5d1ba64c267d751221434cdedb
default-suites.conf: Make sure we use fr codec with IPA dyn TS IPA style dynamic timeslots (TCH/F_PDCH) support only TCH/F and thus only full rate codecs are to be used. On the other hand, OSMO style dynamic timeslots (TCH/F_TCH/H_PDCH) can use both full rate and half rate, so no need to be restrictive there. Change-Id: I0039ef60b323ed72cfe00d8fd9e9287e9c82d49f
Always initialize the _started in the test We don't know at which state the termiation routine will be called and it is best to have a fully initialized object. In prepare we start with a fresh list just to be sure. Change-Id: I675772c89e32620da5695aa4793b735cc266684c
Create a "ms_driver" stub for the testsuite All config parameters are hardcoded for now and it should push subscribers into the test (which should be a base class but not a specific test). Change-Id: I586b6d532c6e6395b4e6f2cf2128372237d05a7d
contrib: build-osmo-sgsn: Depend on osmo-hlr build Since osmo-sgsn f4b2c4ca42cc530c38c9ac6f275e4d7da9315fa2, it depends on libosmo-gsup-client available in osmo-hlr. Change-Id: I6aa997ff2092f9ddf2ac475fd094803be9063980
utils: Introduce show_usb_device.py This is a small script written by Alexander Couzens that is useful to list modems and its properties in a quick and easy way in osmo-gsm-tester setup. Change-Id: Iec049e2d56d61ecd50b65b64d95d69641fa0f8be
utils: Introduce modem-netns-setup.py Used to quickly set modem net interfaces into their own net namespace (named after modem USB ID path). The idea is that since osmo-gsm-tester ofono modem.py knowns the USB path from a modem (path yml attr), it can infer the netns from it and run a ping process inside it. Related: OS#2308 Change-Id: Iadb2df2974e132044fba1f1bc2db8b559912e4e1
utils: Add osmo-gsm-tester_setcap_net_*.sh scripts This scripts were already being used by osmo-gsm-tester for a while, but were not avaialable in this repository. Let's put them here to easy find them and have all this kind of helper scripts together with code using it. Change-Id: Ib88a1b7818155fc608cc6ff763300fbd0e03a07a
Add support to test gprs IPv4 data plane Since the modem iface and the GGSN iface are on the same host/netns, it's really difficult to conveniently test data plane without getting routing loops. As a result, either GGSN or modem iface must be moved to a different namespace. The decision after a few discussions was finally to move modem interfaces to a different netns. Expected setup: * ofono is patched to avoid removing modem if it detects through udev that its net iface was removed (due to for instance, net iface being moved to another netns and thus not being reachable anymore by systemd-udev process running in root netns). * After ofono is started (and successfully configured all the modems and detected its net ifaces through syfs/udev), script "modem-netns-setup.py start" which creates a netns for each modem, naming it after its usb path ID. net ifaces for that modem are moved into its netns. * Modem is configured to use 802-3 data format, and as a result the net iface is configured through DHCP (DHCP req only replied AFTER pdp ctx is activated!). * Since osmo-gsm-tester knowns the modem USB path ID (available in resources.conf), it can run required steps (ifup, DHCP) to configure the interface. The interface name is provided by ofono to osmo-gsm-tester. * As a result, any process willing to transmit data through the modem must be in the modem netns. Related: OS#2308 Change-Id: Icb06bdfcdd37c797be95ab5addb28da2d9f6681c
resources.conf: ec20: Enable voice support It was tested that it could do MO and MT voicecall just fine as SierraW modems. Change-Id: Ie14c00f9f80e00fdbb52ab82a53b4b5a187d41e7
resources.conf.prod: Update modem info after HW upgrade A new quadmodem with 4xEC20 has been added to the Prod setup. Change-Id: I51f0b7dd7a1857d34fc2c5076016caeffa15240d
templates: osmo-pcu: Set log level from dbg to info Otherwise there's too much output. With debug enabled, iperf3 test from gprs testsuite generates a 96MB osmo-pcu.log. With log level set to info, size drops to 1.4M, which is a lot less after compressing in an archive. Change-Id: I008234024b9369db42c90ef5d59a013fd2d22718
templates: osmo-pcu-sysmo: Set log level from dbg to info Otherwise there's too much output. With debug enabled, iperf3 test from gprs testsuite generates a 111MB osmo-pcu.log. Change-Id: I687361f3d6ede9a77531cd71204b1b07e0d1af42
misc: Use RPATH to avoid having tests to set LD_LIBRARY_PATH Instead of each binary launcher having to check if there is a lib/ directory and then setting a LD_LIBRARY_PATH we can use an RPATH and know these binaries pick-up the right libraries. This requires I6e4ad2e3855af7bcefc22d4190cc4e6f58581857. Change-Id: If771767dd82662e13b6b10ee7a8b8d0c84dcbdb1
ms_driver: Allow to specify env and binary name/path For the proper trial/suite integration we can't assume that the virtphy/mobile are in the PATH and that they can be executed directly (e.g. need a LD_LIBRARY_PATH to be applied). Introduce BinaryOptions to pass the name/path of the two executables and the env to use. Default this to virtphy/mobile and an empty environment. Change-Id: I79a57e53bc20613ac061453c24fd29a6d05e1721
ms_driver: Switch to process.Process from subprocess Use a single tmp/rundir for all these instances. In the next step we can create separate directories. Change-Id: Icf4d4e161ac4283a63ed4e0745b375e7e6a25004
resources.conf.rnd: gobi2k changed by ec20 Given current bad support of most features used, gobi2k modem was removed and an EC20 was added instead. Change-Id: I2df38547978c7d2b1a1309f6e73b5a59413e08ff
iperf3: Allow changing port of iperf3 server This way several servers can run sharing same IP address. default port variable is moved inside class to be available to tests. Change-Id: Id4eae7cefbb1a18ecf2676f9cb22c60cc91cec7c
iperf3: implement str() method in iperf3 server This way it can be logged easily during test runs. Change-Id: I699f0a9a8d263ac9f02ea9594a28ca9fd8d48db6
tests: iperf3: Support testing parallel iperf3 clients in test Since tests running a single MS and several of them are really similar, generic code handling the test for N concurrent iperf3 sessions is writen an moved to testlib, and existing and new test use that code. Change-Id: I57799fde49e6845379cca332eec0a1f70aaecd2b
templates: bsc/nitb: Remove explicit no force-combined-si It's always been the default anyway, so no need to explicitly state it. Furthermore, recently (osmobsc 167cb828665b91ed7d28007abd4a1862ebbb78c9) force-combined-si was enabled by default for nanoBTS due to issues with some MS not registering when it's not enabled, so let's osmo-bsc decide were should it be enabled. Related: OS#3063 Change-Id: I97b10406a4a0048c66a47aa7d32a113f0c0366d1
resources.conf: Set UHD identifiers on B200 devices osmo-trx-uhd uses these args during device search/selection process. As those were not set until now for B200, it means when a B200 was used by osmo-gsm-tester any UHD device could be picked up and used by UHD. That was actually happening since inclusion of UmTRX devices in Prod setup, when running tests against desired B200, actually the UmTRX device was being used. Change-Id: I696bbc800b05fdd9a68a77f363d76dcc53ef24ee
suites: Add an initial test for the ms_driver Things to make configurable: * IMSI and matching MSISDN ranges (start + count) * Timeouts and number of MS (which should be related) Change-Id: I5be2a6b4d3d21bf48625624b9e2cccb33765fe39