Hi,
I wrote some code that lets me test OpenBSC without using real hardware, e.g. one is bothered to wait for the nanoBTS to open the OML connection again, one doesn't have the unit for the right band, one doesn't have a dual trx system, or because reproducing the issue is difficult (RF interference, LAPDm timeouts).
I have packaged the code with OBS and right now it is only available for debian stable (it can be installed on unstable as long as the stable feeds are inside the sources.list).
Install: $ echo 'deb http://download.opensuse.org/repositories/home:/zecke23/Debian_6.0/ ./' > /etc/apt/sources.list.d/ $ aptitude update; aptitude install gnu-smalltalk osmo-st-openbsc-test (the packages are signed but the key expired two years ago, so the question is if you want to trust Debian packages from OpenSUSE)
Using: $ gst st> PackageLoader fileInPackage: #FakeBTS ... st> bts := FakeBTS.BTS new. st> bts btsId: '1/0/0' st> bts connect: 'localhost'; waitForBTSReady. ...
Testing: There is the FakeBTS.OpenBSCTest class that has methods to require channels and these Lchans can be used to send RSL messages. I don't have a public example at this point though.
Vision: I hope this code will be used to do nightly tests of OpenBSC, specially the error paths (e.g. timeouts on handover, timeouts on assignment, timeouts on channel release, etc.)
There is a branch that brings DualTRX support and I am going to merge this to master soon. What I am missing is some test launcher code (it can be in python or ruby if someone volunteers) that will launch osmo-bsc/osmo-nitb with a given configuration file and initialize the HLR with a set of given subscribers.
enjoy holger
PS: Blog post will follow once the code has matured a bit
On Mon, Oct 22, 2012 at 09:39:30PM +0200, Holger Hans Peter Freyther wrote:
Hi,
Hi again,
I have updated the packages (so aptitude update, aptitude safe-upgrade) and I have comitted and attached a simple Location Updating Request.
Start openbsc and roughly do the following:
$ gst LUTest.st ... it will fail because of a LU Reject, authorize the subscriber.. $ gst LUTest.st ... the LU should now succeed.
Some small explanations. First I create a class that inherits the OpenBSCTest class and create a startTest method (called a selector in Smalltalk). In that method I connect as a new BTS, then require any channel and send a LURequest through this new lchan. I am then read/sending messages until the connection comes to an end.
The Smalltalk syntax is explained here[1], it contains a very short explanation of the Smalltalk syntax and features.
enjoy holger
[1] http://esug.heeg.de/whyusesmalltalktoteachoop/smalltalksyntaxonapostcard/