m3ua and sua testing as part of jenkins?

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Harald Welte laforge at gnumonks.org
Tue May 16 16:38:29 UTC 2017


Dear all,

for some time, I've been wanting to have an easy way to run
m3ua-testtool and sua-testtool as part of our regular regression
testing setup.

After some very disappointing trials using docker (see my blog), I
managed to make this work using the 'unshare' program (part of
util-linux).

The key regquirement basically is:
* create a network namespace
* configure some netdevice / ip adresses in it
* run the software under test (osmo-stp in this case)
* run the test suite
* tear down everything

Initially I tried to do this using 'ip netns', but the problem is that
you normally require root permissions to configure the netdevice inside
the new namespace.  And being root is of course difficult if you think
of a jenkins build slave.

However, 'unshare' offers the ability to map your real UID to root
inside the namespace.  At that point, everything can be done as
non-root.

The resulting scripts are in libosmo-sccp/contrib/test:
"run-in-ns.sh" is a simple wrapper around unshare, so you have to call
something like
	./run-in-ns.sh ./test-m3ua.sh

In order to use the m3ua-testtool, you will need to
* install guile
* clone + build + install https://github.com/nplab/guile-sctp
* clone + build m3ua-testtool and sua-testtool from git.osmocom.org,
  no installation of this require.

I would appreciate feedback from others trying to reproduce the above
setup on their machine[s].  All tests should be GREEN/PASS.

If anyone knowns how to integrate this with jenkins for libosmo-sccp,I
think it would be great to have this as part of our testing of gerrit
patches.

I'm not so sure if it makes sense to try to integrate this with "make
check", as it is not a unit test (and it would only work on Linux).

I'm planning to use the saee "run-in-ns.sh" approach for my SCCP
level tests implemented in TTCN-3/Titan.

One further idea is if it make sense to report the test reuslts in a
more friendly way.  Right now it's deailed osmo-stp logs interspersed
with output from the tester.  Mayb there's some more information we can
feed back into jenkins?  Again, I have very little understanding of
jenkins.

Regards,
	Harald

-- 
- Harald Welte <laforge at gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)



More information about the OpenBSC mailing list