Change in osmo-gsm-tester[master]: 4g_suite: add MT and MO test cases

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/.

srs_andre gerrit-no-reply at lists.osmocom.org
Wed May 27 19:47:16 UTC 2020


srs_andre has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18539 )


Change subject: 4g_suite: add MT and MO test cases
......................................................................

4g_suite: add MT and MO test cases

add two new test cases to test paging (MT) and MO traffic

Change-Id: I5c7639f2c6953964a5b6979bc35f59464dbda43f
---
A sysmocom/suites/4g/mobile_originated_traffic.py
A sysmocom/suites/4g/mobile_terminated_traffic.py
2 files changed, 83 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/39/18539/1

diff --git a/sysmocom/suites/4g/mobile_originated_traffic.py b/sysmocom/suites/4g/mobile_originated_traffic.py
new file mode 100755
index 0000000..a30fd87
--- /dev/null
+++ b/sysmocom/suites/4g/mobile_originated_traffic.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python3
+from osmo_gsm_tester.testenv import *
+
+epc = tenv.epc()
+enb = tenv.enb()
+ue = tenv.modem()
+
+epc.subscriber_add(ue)
+epc.start()
+enb.ue_add(ue)
+enb.start(epc)
+
+print('waiting for ENB to connect to EPC...')
+wait(epc.enb_is_connected, enb)
+print('ENB is connected to EPC')
+
+ue.connect(enb)
+print('waiting for UE to attach...')
+wait(ue.is_rrc_connected)
+print('UE is RRC connected')
+
+print('waiting until RRC connection gets released...')
+wait(ue.is_rrc_idle)
+print('UE is RRC idle')
+
+# Wait a bit
+sleep(5)
+
+# Generate MO traffic
+proc = ue.run_netns_wait('ping', ('ping', '-c', '1', epc.tun_addr()))
+output = proc.get_stdout()
+
+# Check PRACH transmissions
+num_prach_sent = ue.get_counter('prach_sent')
+if num_prach_sent != 2:
+    raise Exception("Expected to have sent exactly 2 PRACHs, but in fact sent {}".format(num_prach_sent))
+
+print(output)
+test.set_report_stdout(output)
diff --git a/sysmocom/suites/4g/mobile_terminated_traffic.py b/sysmocom/suites/4g/mobile_terminated_traffic.py
new file mode 100755
index 0000000..7c04e77
--- /dev/null
+++ b/sysmocom/suites/4g/mobile_terminated_traffic.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python3
+from osmo_gsm_tester.testenv import *
+
+epc = tenv.epc()
+enb = tenv.enb()
+ue = tenv.modem()
+
+epc.subscriber_add(ue)
+epc.start()
+enb.ue_add(ue)
+enb.start(epc)
+
+print('waiting for ENB to connect to EPC...')
+wait(epc.enb_is_connected, enb)
+print('ENB is connected to EPC')
+
+ue.connect(enb)
+print('waiting for UE to attach...')
+wait(ue.is_rrc_connected)
+print('UE is RRC connected')
+
+print('waiting until RRC connection gets released...')
+wait(ue.is_rrc_idle)
+print('UE is RRC idle')
+
+# Wait a bit
+sleep(5)
+
+# Generate MO traffic, send single ping
+proc = epc.run_wait('ping', ('ping', '-c', '1', ue.get_ipv4_addr()))
+output = proc.get_stdout()
+
+# Check paging received
+num_paging_received = ue.get_counter('paging_received')
+if num_paging_received != 1:
+    raise Exception("Expected to receive exactly 1 paging message, but in fact received {}".format(num_paging_received))
+
+# Check PRACH transmissions
+num_prach_sent = ue.get_counter('prach_sent')
+if num_prach_sent != 2:
+    raise Exception("Expected to have sent exactly 2 PRACHs, but in fact sent {}".format(num_prach_sent))
+
+print(output)
+test.set_report_stdout(output)

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18539
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I5c7639f2c6953964a5b6979bc35f59464dbda43f
Gerrit-Change-Number: 18539
Gerrit-PatchSet: 1
Gerrit-Owner: srs_andre <andre at softwareradiosystems.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200527/eff05d67/attachment.htm>


More information about the gerrit-log mailing list