Change in ...osmo-sgsn[master]: tests: Introduce vty-transcript-test tests

pespin gerrit-no-reply at lists.osmocom.org
Wed Aug 14 18:24:41 UTC 2019


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15215


Change subject: tests: Introduce vty-transcript-test tests
......................................................................

tests: Introduce vty-transcript-test tests

Add a few commands to make sure it's working fine, and print all
available timers with default values.

Change-Id: Ifd092b9561d49be1f62769d95ba49f6e4aeb4066
---
M tests/Makefile.am
A tests/test_nodes.vty
2 files changed, 91 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/15/15215/1

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 035cfb0..93412ac 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -43,16 +43,38 @@
 
 if ENABLE_EXT_TESTS
 python-tests: $(BUILT_SOURCES)
-	osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v
-	osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v
-	$(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v
-	$(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v
-	rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count
+	$(MAKE) vty-test
+	$(MAKE) ctrl-python-test
 else
 python-tests: $(BUILT_SOURCES)
 	echo "Not running python-based tests (determined at configure-time)"
 endif
 
+vty-python-test: $(BUILT_SOURCES)
+	osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v
+	osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v
+	$(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v
+	rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count
+
+# To update the VTY script from current application behavior,
+# pass -u to vty_script_runner.py by doing:
+#   make vty-transcript-test U=-u
+vty-transcript-test:
+	osmo_verify_transcript_vty.py -v \
+		-n OsmoSGSN -p 4245 \
+		-r "$(top_builddir)/src/gprs/osmo-sgsn -c $(top_srcdir)/doc/examples/osmo-sgsn/osmo-sgsn.cfg" \
+		$(U) $${T:-$(srcdir)/*.vty}
+	rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count
+
+# don't run multiple tests concurrently so that the ports don't conflict
+vty-test:
+	$(MAKE) vty-python-test
+	$(MAKE) vty-transcript-test
+
+ctrl-python-test: $(BUILT_SOURCES)
+	$(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v
+	rm -f $(top_builddir)/sms.db $(top_builddir)/gsn_restart $(top_builddir)/gtphub_restart_count
+
 check-local: atconfig $(TESTSUITE)
 	$(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS)
 	$(MAKE) $(AM_MAKEFLAGS) python-tests
diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty
new file mode 100644
index 0000000..ab8b7fd
--- /dev/null
+++ b/tests/test_nodes.vty
@@ -0,0 +1,64 @@
+OsmoSGSN> enable
+OsmoSGSN# show timer
+T3312 = 600 s	Periodic RA Update timer (s) (default: 600 s)
+T3313 = 30 s	Waiting for paging response timer (s) (default: 30 s)
+T3314 = 44 s	Force to STANDBY on expiry timer (s) (default: 44 s)
+T3316 = 44 s	AA-Ready timer (s) (default: 44 s)
+T3322 = 6 s	Detach request -> accept timer (s) (default: 6 s)
+T3350 = 6 s	Waiting for ATT/RAU/TMSI_COMPL timer (s) (default: 6 s)
+T3360 = 6 s	Waiting for AUTH/CIPH response timer (s) (default: 6 s)
+T3370 = 6 s	Waiting for IDENTITY response timer (s) (default: 6 s)
+T3385 = 8 s	Wait for ACT PDP CTX REQ timer (s) (default: 8 s)
+T3386 = 8 s	Wait for MODIFY PDP CTX ACK timer (s) (default: 8 s)
+T3395 = 8 s	Wait for DEACT PDP CTX ACK timer (s) (default: 8 s)
+T3397 = 8 s	Wait for DEACT AA PDP CTX ACK timer (s) (default: 8 s)
+OsmoSGSN# configure terminal
+OsmoSGSN(config)# list
+...
+  sgsn
+  ctrl
+  cs7 instance <0-15>
+  ns
+  bssgp
+...
+
+OsmoSGSN(config)# sgsn
+OsmoSGSN(config-sgsn)# list
+...
+  gtp local-ip A.B.C.D
+  ggsn <0-255> remote-ip A.B.C.D
+  ggsn <0-255> gtp-version (0|1)
+  ggsn <0-255> echo-interval <1-36000>
+  ggsn <0-255> no echo-interval
+  imsi-acl (add|del) IMSI
+  auth-policy (accept-all|closed|acl-only|remote)
+  authentication (optional|required)
+  encryption (GEA0|GEA1|GEA2|GEA3|GEA4)
+  gsup ipa-name NAME
+  gsup remote-ip A.B.C.D
+  gsup remote-port <0-65535>
+  gsup oap-id <0-65535>
+  gsup oap-k K
+  gsup oap-opc OPC
+  apn APNAME ggsn <0-255>
+  apn APNAME imsi-prefix IMSIPRE ggsn <0-255>
+  access-point-name NAME
+  no access-point-name NAME
+  cdr filename NAME
+  no cdr filename
+  cdr trap
+  no cdr trap
+  cdr interval <1-2147483647>
+  ggsn dynamic
+  grx-dns-add A.B.C.D
+  timer [TNNNN] [(<0-2147483647>|default)]
+  no compression rfc1144
+  compression rfc1144 active slots <1-256>
+  compression rfc1144 passive
+  no compression v42bis
+  compression v42bis active direction (ms|sgsn|both) codewords <512-65535> strlen <6-250>
+  compression v42bis passive
+  iu rab-assign-addr-enc (x213|v4raw)
+  asn1 debug (1|0)
+  asn1 xer-print (1|0)
+...

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ifd092b9561d49be1f62769d95ba49f6e4aeb4066
Gerrit-Change-Number: 15215
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190814/72981954/attachment.html>


More information about the gerrit-log mailing list