aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-08-14 20:22:59 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-08-20 17:48:47 +0200
commit5ed3f67f96ce29a1afcd9db89b45752c1d69ac8c (patch)
tree4ca7dae3c65e9d1eda8354b11cb5ac2847af937d
parenta299d6511486dc384af920592f1ff8488e8fcf0c (diff)
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
-rw-r--r--tests/Makefile.am31
-rw-r--r--tests/test_nodes.vty61
2 files changed, 88 insertions, 4 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 035cfb01..6c392af9 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -33,6 +33,7 @@ EXTRA_DIST = \
$(TESTSUITE) \
vty_test_runner.py \
ctrl_test_runner.py \
+ test_nodes.vty \
$(NULL)
TESTSUITE = $(srcdir)/testsuite
@@ -43,15 +44,37 @@ DISTCLEANFILES = \
if ENABLE_EXT_TESTS
python-tests: $(BUILT_SOURCES)
+ $(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
-else
-python-tests: $(BUILT_SOURCES)
- echo "Not running python-based tests (determined at configure-time)"
-endif
check-local: atconfig $(TESTSUITE)
$(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS)
diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty
new file mode 100644
index 00000000..630094fd
--- /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
+...