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
This commit is contained in:
Pau Espin 2017-08-31 18:30:59 +02:00
parent a5ed18ac7e
commit 3c9b80d53b
3 changed files with 65 additions and 0 deletions

View File

@ -7,6 +7,8 @@ ip_address:
- 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

54
suites/gprs/ping.py Executable file
View File

@ -0,0 +1,54 @@
#!/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()
print('Waiting for bts to be ready...')
wait(bts.ready_for_pcu)
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)

9
suites/gprs/suite.conf Normal file
View File

@ -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