From 8256ed2aa93bc116b969426bc17165726460c20c Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 6 Mar 2019 15:34:01 +0100 Subject: msc: clear the failed SMS when a test is done If an MT SMS is triggered and not handled in the test, it is so far left behind when the test ends. That causes Paging to retrigger for that SMS at any later point during subsequent test runs, causing stray bogus test failures. Actually remove the SMS from the SMS database and the queue with a new VTY command: The vty command to clear failed SMS from the db is added in osmo-msc I637cbd7adc075a192f49752b38779391472ff06d Depends: I637cbd7adc075a192f49752b38779391472ff06d (osmo-msc) Change-Id: I4ff05187131e93f5bc58dc7ea44546f770e5b4c1 --- msc/MSC_Tests.ttcn | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 13d1ddbf..8aa61996 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -1994,6 +1994,13 @@ runs on BSC_ConnHdlr { f_vty_transceive(MSCVTY, "subscriber imsi "&imsi&" sms sender msisdn "&msisdn&" send "&text); } +/* Remove still pending SMS */ +private function f_vty_sms_clear(charstring imsi) +runs on BSC_ConnHdlr { + f_vty_transceive(MSCVTY, "subscriber imsi " & imsi & " sms delete-all"); + f_vty_transceive(MSCVTY, "sms-queue clear"); +} + /* LU followed by MT SMS */ private function f_tc_lu_and_mt_sms(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { var SmsParameters spars := valueof(t_SmsPars); @@ -2088,6 +2095,8 @@ private function f_tc_lu_and_mt_sms_paging_and_nothing(charstring id, BSC_ConnHd } } + f_vty_sms_clear(hex2str(g_pars.imsi)); + setverdict(pass); } testcase TC_lu_and_mt_sms_paging_and_nothing() runs on MTC_CT { @@ -4456,8 +4465,8 @@ private function f_tc_sgsap_mt_sms_and_nothing(charstring id, BSC_ConnHdlrPars p * MSC/VLR would re-try to deliver the test SMS trigered above and * so the screening would fail. */ - /* Expire the subscriber now to avoid that the MSC will try the SMS - * delivery at some later point. */ + f_vty_sms_clear(hex2str(g_pars.imsi)); + f_vty_transceive(MSCVTY, "subscriber imsi " & hex2str(g_pars.imsi) & " expire"); setverdict(pass); @@ -4514,16 +4523,14 @@ private function f_tc_sgsap_mt_sms_and_reject(charstring id, BSC_ConnHdlrPars pa } } + f_vty_sms_clear(hex2str(g_pars.imsi)); + /* A rejected paging with IMSI_unknown (see above) should always send * the SGs association to NULL. */ f_ctrl_get_exp(IPA_CTRL, "fsm.SGs-UE.id.imsi:" & hex2str(g_pars.imsi) & ".state", "SGs-NULL"); f_sgsap_bssmap_screening(); - /* Expire the subscriber now to avoid that the MSC will try the SMS - * delivery at some later point. */ - f_vty_transceive(MSCVTY, "subscriber imsi " & hex2str(g_pars.imsi) & " expire"); - setverdict(pass); } testcase TC_sgsap_mt_sms_and_reject() runs on MTC_CT { -- cgit v1.2.3