pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/22043 )
Change subject: 4g: add checks for received PRACHs for ping tests
......................................................................
4g: add checks for received PRACHs for ping tests
the tests already check for sent PRACHs, this will
also check for received PRACHs on the eNB to make
sure we don't detect any fake PRACHs during the tests.
Change-Id: Ib23056b1ad4b18a7dde6cd0c997f5114ac2acb61
---
M sysmocom/suites/4g/rrc_idle_mo_ping.py
M sysmocom/suites/4g/rrc_idle_mt_ping.py
2 files changed, 19 insertions(+), 5 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/sysmocom/suites/4g/rrc_idle_mo_ping.py
b/sysmocom/suites/4g/rrc_idle_mo_ping.py
index ced798d..389e5a2 100755
--- a/sysmocom/suites/4g/rrc_idle_mo_ping.py
+++ b/sysmocom/suites/4g/rrc_idle_mo_ping.py
@@ -31,9 +31,16 @@
output = proc.get_stdout()
# Check PRACH transmissions
+num_prachs = 2
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))
+if num_prach_sent != num_prachs:
+ raise Exception("Expected to have sent exactly {} PRACHs, but in fact sent
{}".format(num_prachs, num_prach_sent))
+# Check PRACH receptions
+num_prach_received = enb.get_counter('prach_received')
+if num_prach_sent != num_prachs:
+ raise Exception("Expected to have received exactly {} PRACHs, but in fact
received {}".format(num_prachs, num_prach_received))
+
+output +=
"\nnum_prach_sent={}\nnum_prach_received={}\n".format(num_prach_sent,
num_prach_received)
print(output)
test.set_report_stdout(output)
diff --git a/sysmocom/suites/4g/rrc_idle_mt_ping.py
b/sysmocom/suites/4g/rrc_idle_mt_ping.py
index dcabe21..bdebb26 100755
--- a/sysmocom/suites/4g/rrc_idle_mt_ping.py
+++ b/sysmocom/suites/4g/rrc_idle_mt_ping.py
@@ -26,7 +26,7 @@
# Wait a bit
sleep(5)
-# Generate MO traffic, send single ping
+# Generate MT traffic, send single ping
proc = epc.prepare_process('ping', ('ping', '-c', '1', ue.get_assigned_addr()))
proc.launch_sync()
output = proc.get_stdout()
@@ -37,9 +37,16 @@
raise Exception("Expected to receive exactly 1 paging message, but in fact
received {}".format(num_paging_received))
# Check PRACH transmissions
+num_prachs = 2
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))
+if num_prach_sent != num_prachs:
+ raise Exception("Expected to have sent exactly {} PRACHs, but in fact sent
{}".format(num_prachs, num_prach_sent))
+# Check PRACH receptions
+num_prach_received = enb.get_counter('prach_received')
+if num_prach_sent != num_prachs:
+ raise Exception("Expected to have received exactly {} PRACHs, but in fact
received {}".format(num_prachs, num_prach_received))
+
+output +=
"\nnum_prach_sent={}\nnum_prach_received={}\n".format(num_prach_sent,
num_prach_received)
print(output)
test.set_report_stdout(output)
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/22043
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: Ib23056b1ad4b18a7dde6cd0c997f5114ac2acb61
Gerrit-Change-Number: 22043
Gerrit-PatchSet: 6
Gerrit-Owner: srs_andre <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged