Feature #2208

osmo-gsm-tester: allow running binaries for a whole suite, or only for a single test

Added by neels over 3 years ago. Updated over 3 years ago.

Target version:
Start date:
Due date:
% Done:


Spec Reference:


There are two different use cases for reserving resources / running programs, for example:

a) A given test script launches an osmo-nitb which should be stopped/torn down before the next test script starts.
b) In another suite that contains a number of tests, an earlier test script may launch osmo-nitb and bts processes, which should stay running until the entire suite is through. This is not necessarily the first test script and it should not necessarily have to run until the end of the suite, it should be up to the test scripts to start/end processes / allocate/free resources at will.

Add test API to distinguish between the two cases: should a resource be freed / program be terminated at the end of the test?
This should be generically similar for processes run or "passive" resources allocated. Details follow.

Related issues

Related to OsmoGSMTester - Feature #2209: osmo-gsm-tester: add test API to explicitly free a resourceNew04/27/2017


#1 Updated by neels over 3 years ago

Make sure that at the end of a suite run, all those programs/resources not torn down by the tests are definitely cleaned up and resources are freed.
Also free resoures / terminate processes that were not requested to last beyond the current test script at the end of each test script automatically.

Think of a way how a later test script may obtain a resource allocated / process launched in an earlier test script, without causing a new resource to be allocated (and probably failing because the earlier test already launched it).

The way to keep a resource should be tied to a name given, used by a later test script to look it up. For example:
  nitb = suite.nitb()
  suite.keep(nitb, 'nitb1')
  nitb = suite.earlier('nitb1')
  nitb = suite.earlier('nitb1')

This should work the same for nitb, bts, modems, ...

#2 Updated by neels over 3 years ago

  • Priority changed from High to Normal

#3 Updated by laforge over 3 years ago

  • Assignee deleted (Osmocom CNI Developers)

#4 Updated by laforge over 3 years ago

  • Assignee set to osmo-gsm-tester

#5 Updated by neels over 3 years ago

Right now we assume that each test script is independent on its own. Hence we should automatically terminate processes and un-use resources for each test script that is done.

Later on we can add a feature to let certain resources survive across several test scripts. But I am not entirely sure that we will really use this.

Related: the idea so far is to reserve resources for an entire suite; so a given suite is intended to be a unit in terms of what it uses, which makes sense when several test scripts use the same core network processes. With each test being independent on its own this idea doesn't really deliver, and it might also make sense to change this.

We shall keep this in mind as we further develop tests. When more complex test setups arise, we will hopefully see quite easily how this should work. At the moment it's neither: we don't have automatic cleanup after each test script, but we also can't re-use a process in a subsequent test script.

#6 Updated by neels over 3 years ago

  • Related to Feature #2209: osmo-gsm-tester: add test API to explicitly free a resource added

#7 Updated by neels over 3 years ago

  • Priority changed from Normal to Low

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)