[PATCH] osmo-gsm-tester[master]: MSC+BSC: add separate suites for AoIP: aoip_sms, aoip_debug

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/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu May 25 02:52:16 UTC 2017


Hello Pau Espin Pedrol, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/2720

to look at the new patch set (#4).

MSC+BSC: add separate suites for AoIP: aoip_sms, aoip_debug

It would be nicer to select the network programs as scenarios, i.e.
independently from the specifics of tests that don't care whether a NITB or a
MSC+BSC is in place. See OS#2270.

For now have a separate script for BSC+MSC+HLR operation to be able to rapidly
get the binaries to work. We might even simply drop the NITB style, in which
case we don't need to make it configurable.

Change-Id: I06d2529822f3e483ce7fffc439edfa57844e01ef
---
A suites/aoip_debug/interactive.py
A suites/aoip_debug/suite.conf
A suites/aoip_sms/mo_mt_sms.py
A suites/aoip_sms/suite.conf
4 files changed, 86 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/20/2720/4

diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py
new file mode 100755
index 0000000..4f56d5c
--- /dev/null
+++ b/suites/aoip_debug/interactive.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python3
+from osmo_gsm_tester.test import *
+hlr = suite.hlr()
+bts = suite.bts()
+mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr())
+msc = suite.msc(hlr, mgcpgw)
+bsc = suite.bsc(msc)
+modems = suite.modems(int(prompt('How many modems?')))
+
+hlr.start()
+msc.start()
+
+bsc.bts_add(bts)
+bsc.start()
+
+bts.start()
+
+for m in modems:
+  hlr.subscriber_add(m)
+  m.connect(bsc)
+
+while True:
+  cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered')
+  cmd = cmd.strip().lower()
+
+  if not cmd:
+    continue
+  if 'quit'.startswith(cmd):
+    break
+  elif 'wait-registered'.startswith(cmd):
+    try:
+      wait(msc.subscriber_attached, *modems)
+    except Timeout:
+      print('Timeout while waiting for registration.')
+  elif 'get-registered'.startswith(cmd):
+    print(msc.imsi_list_attached())
+    print('RESULT: %s' %
+       ('All modems are registered.' if msc.subscriber_attached(*modems)
+        else 'Some modem(s) not registered yet.'))
+  elif 'sms'.startswith(cmd):
+    for mo in modems:
+      for mt in modems:
+        mo.sms_send(mt.msisdn, 'to ' + mt.name())
diff --git a/suites/aoip_debug/suite.conf b/suites/aoip_debug/suite.conf
new file mode 100644
index 0000000..48c76b6
--- /dev/null
+++ b/suites/aoip_debug/suite.conf
@@ -0,0 +1,7 @@
+resources:
+  ip_address:
+  - times: 4
+  bts:
+  - times: 1
+  modem:
+  - times: 4
diff --git a/suites/aoip_sms/mo_mt_sms.py b/suites/aoip_sms/mo_mt_sms.py
new file mode 100755
index 0000000..96e1caf
--- /dev/null
+++ b/suites/aoip_sms/mo_mt_sms.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python3
+from osmo_gsm_tester.test import *
+
+hlr = suite.hlr()
+bts = suite.bts()
+mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr())
+msc = suite.msc(hlr, mgcpgw)
+bsc = suite.bsc(msc)
+ms_mo = suite.modem()
+ms_mt = suite.modem()
+
+hlr.start()
+msc.start()
+mgcpgw.start()
+
+bsc.bts_add(bts)
+bsc.start()
+
+bts.start()
+
+hlr.subscriber_add(ms_mo)
+hlr.subscriber_add(ms_mt)
+
+ms_mo.connect(bsc)
+ms_mt.connect(bsc)
+wait(msc.subscriber_attached, ms_mo, ms_mt)
+
+sms = ms_mo.sms_send(ms_mt.msisdn)
+wait(ms_mt.sms_was_received, sms)
diff --git a/suites/aoip_sms/suite.conf b/suites/aoip_sms/suite.conf
new file mode 100644
index 0000000..c6cbd88
--- /dev/null
+++ b/suites/aoip_sms/suite.conf
@@ -0,0 +1,7 @@
+resources:
+  ip_address:
+  - times: 4
+  bts:
+  - times: 1
+  modem:
+  - times: 2

-- 
To view, visit https://gerrit.osmocom.org/2720
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I06d2529822f3e483ce7fffc439edfa57844e01ef
Gerrit-PatchSet: 4
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list