Hello Neels Hofmeyr, Harald Welte, Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/5011
to look at the new patch set (#2).
suites: gprs: Introduce suite with ping test
Only GPRS signalling setup is supported so far by osmo-gsm-tester, thus
we don't test sending data yet here, but at least we can already test
pdp context activation.
This test will be extended to run ping once we support setting up the
GPRS data plane in osmo-gsm-tester.
Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b
---
M example/resources.conf
A suites/gprs/ping.py
A suites/gprs/suite.conf
3 files changed, 63 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/11/5011/2
diff --git a/example/resources.conf b/example/resources.conf
index d503a48..26e1d80 100644
--- a/example/resources.conf
+++ b/example/resources.conf
@@ -7,6 +7,8 @@
- addr: 10.42.42.5
- addr: 10.42.42.6
- addr: 10.42.42.7
+- addr: 10.42.42.8
+- addr: 10.42.42.9
bts:
- label: sysmoBTS 1002
diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py
new file mode 100755
index 0000000..3a0eb3a
--- /dev/null
+++ b/suites/gprs/ping.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python3
+from osmo_gsm_tester.testenv import *
+
+hlr = suite.hlr()
+bts = suite.bts()
+pcu = bts.pcu()
+mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr())
+mgw_bsc = suite.mgw()
+stp = suite.stp()
+ggsn = suite.ggsn()
+sgsn = suite.sgsn(hlr, ggsn)
+msc = suite.msc(hlr, mgcpgw, stp)
+bsc = suite.bsc(msc, mgw_bsc, stp)
+ms = suite.modem()
+
+bsc.bts_add(bts)
+sgsn.bts_add(bts)
+
+print('start network...')
+hlr.start()
+stp.start()
+ggsn.start()
+sgsn.start()
+msc.start()
+mgcpgw.start()
+mgw_bsc.start()
+bsc.start()
+
+bts.start()
+pcu.start()
+
+hlr.subscriber_add(ms)
+
+ms.connect(msc.mcc_mnc())
+ms.attach()
+
+ms.log_info()
+
+print('waiting for modems to attach...')
+wait(ms.is_connected, msc.mcc_mnc())
+wait(msc.subscriber_attached, ms)
+
+print('waiting for modems to attach to data services...')
+wait(ms.is_attached)
+ctx_id_v4 = ms.activate_context(apn='internet', protocol=ms.CTX_PROT_IPv4)
+# IPv6 no supported in EC20: org.ofono.Error.NotImplemented: Implementation
not provided (36)
+# ctx_id_v6 = ms.activate_context(apn='inet6', protocol=ms.CTX_PROT_IPv6)
+# IPv46 (dual) not supported in EC20: org.ofono.Error.Failed: Operation failed
(36)
+# ctx_id_v46 = ms.activate_context(apn='inet6', protocol=ms.CTX_PROT_IPv46)
+sleep(5)
+# TODO: send ping to server or open TCP conn with a socket in python
+ms.deactivate_context(ctx_id_v4)
diff --git a/suites/gprs/suite.conf b/suites/gprs/suite.conf
new file mode 100644
index 0000000..1590b7d
--- /dev/null
+++ b/suites/gprs/suite.conf
@@ -0,0 +1,9 @@
+resources:
+ ip_address:
+ - times: 8 # msc, bsc, hlr, stp, mgw*2, sgsn, ggsn
+ bts:
+ - times: 1
+ modem:
+ - times: 1
+ features:
+ - gprs
--
To view, visit https://gerrit.osmocom.org/5011
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>
Gerrit-Reviewer: lynxis lazus <[email protected]>