aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2020-01-18 07:20:14 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2020-01-25 12:49:42 +0700
commitfc2b019cd88c66a2d66a810ece532c2ff3b13aa7 (patch)
treedf3a9a76ee3e7e286d598d66a444d2f67b7ba1be /tests
parentbaf71a72ecbdb6b69bedced43853cf6c032ed492 (diff)
libmsc: move subscriber expiration timer T3212 to libvlr
Since the split of OsmoNiTB, OsmoMSC does not deal with the radio access network directly. Therefore the only purpose of T3212 is to control subscriber expiration in the local VLR. The timeout value indicated in System Information Type 3 needs to be configured separately in the BSC/RNC. This means that we don't need to store it in deci-hours anymore. Let's move T3212 to the group of VLR specific timers, so it can be configured and introspected using the generic 'timer' command, and deprecate the old '[no] periodic location update' command. It should be also noted that in the old code subscriber expiration timeout was actually set to twice the T3212 value plus one minute. After this change, we apply the configured value 'as-is', but keep the old behaviour for 'periodic location update' command. Change-Id: I9b12066599a7c834a53a93acf5902d91273bc74f
Diffstat (limited to 'tests')
-rw-r--r--tests/msc_vlr/msc_vlr_test_no_authen.c2
-rw-r--r--tests/test_nodes.vty3
-rwxr-xr-xtests/vty_test_runner.py19
3 files changed, 13 insertions, 11 deletions
diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.c b/tests/msc_vlr/msc_vlr_test_no_authen.c
index 7b684fe1b..5d3db69ae 100644
--- a/tests/msc_vlr/msc_vlr_test_no_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_no_authen.c
@@ -941,7 +941,7 @@ static void test_no_authen_subscr_expire()
vlr_subscr_put(vsub, __func__);
/* Let T3212 (periodic Location update timer) expire */
- fake_time_passes((net->t3212 * 60 * 6 * 2) + 60*4, 0);
+ fake_time_passes(vlr_timer(net->vlr, 3212) + 60 * 4, 0);
/* The subscriber should now be gone. */
vsub = vlr_subscr_find_by_imsi(net->vlr, imsi, __func__);
diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty
index b87a3719d..5a81c611d 100644
--- a/tests/test_nodes.vty
+++ b/tests/test_nodes.vty
@@ -24,8 +24,6 @@ OsmoMSC(config-net)# list
timezone <-19-19> (0|15|30|45)
timezone <-19-19> (0|15|30|45) <0-2>
no timezone
- periodic location update <6-1530>
- no periodic location update
call-waiting
no call-waiting
@@ -153,7 +151,6 @@ network
authentication optional
rrlp mode none
mm info 1
- periodic location update 30
msc
mncc guard-timeout 180
ncss guard-timeout 30
diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py
index f954b5d30..242114467 100755
--- a/tests/vty_test_runner.py
+++ b/tests/vty_test_runner.py
@@ -198,17 +198,22 @@ class TestVTYMSC(TestVTYBase):
self.vty.verify("periodic location update 5", ['% Unknown command.'])
self.vty.verify("periodic location update 1531", ['% Unknown command.'])
- # Enable periodic lu..
- self.vty.verify("periodic location update 60", [''])
+ depr_str = "% 'periodic location update' is now deprecated: " \
+ "use 'timer T3212' to change subscriber expiration timeout."
+ set_str = "% Setting T3212 to 121 minutes (emulating the old behaviour)."
+
+ # Enable periodic LU (deprecated command)
+ self.vty.verify("periodic location update 60", [depr_str, set_str])
res = self.vty.command("write terminal")
- self.assertTrue(res.find('periodic location update 60') > 0)
+ self.assertTrue(res.find('timer vlr T3212 121') > 0)
+ self.assertEqual(res.find('periodic location update 60'), -1)
self.assertEqual(res.find('no periodic location update'), -1)
- # Now disable it..
- self.vty.verify("no periodic location update", [''])
+ # Now disable it (deprecated command)
+ self.vty.verify("no periodic location update", [depr_str])
res = self.vty.command("write terminal")
- self.assertEqual(res.find('periodic location update 60'), -1)
- self.assertTrue(res.find('no periodic location update') > 0)
+ self.assertEqual(res.find('no periodic location update'), -1)
+ self.assertEqual(res.find('timer vlr T3212 121'), -1)
def testShowNetwork(self):
res = self.vty.command("show network")