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

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

pespin gerrit-no-reply at lists.osmocom.org
Wed Aug 21 09:07:45 UTC 2019


pespin has submitted this change and it was merged. ( 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, 89 insertions(+), 5 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  neels: Looks good to me, approved



diff --git a/tests/Makefile.am b/tests/Makefile.am
index 035cfb0..6c392af 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -33,6 +33,7 @@
 	$(TESTSUITE) \
 	vty_test_runner.py \
 	ctrl_test_runner.py \
+	test_nodes.vty \
 	$(NULL)
 
 TESTSUITE = $(srcdir)/testsuite
@@ -43,16 +44,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 $(builddir)/sms.db $(builddir)/gsn_restart
+
+# 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..630094f
--- /dev/null
+++ b/tests/test_nodes.vty
@@ -0,0 +1,61 @@
+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
+...
+  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
+...

-- 
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: 7
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190821/804ffa7b/attachment.htm>


More information about the gerrit-log mailing list