Change in osmo-ttcn3-hacks[master]: msc: clear the failed SMS when a test is done

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

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Fri Apr 12 03:48:10 UTC 2019


Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13613


Change subject: msc: clear the failed SMS when a test is done
......................................................................

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
---
M msc/MSC_Tests.ttcn
1 file changed, 13 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/13/13613/1

diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 13d1ddb..8aa6199 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -1994,6 +1994,13 @@
 	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 @@
 		}
 	}
 
+	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 @@
 	 * 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 @@
 		}
 	}
 
+	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 {

-- 
To view, visit https://gerrit.osmocom.org/13613
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ff05187131e93f5bc58dc7ea44546f770e5b4c1
Gerrit-Change-Number: 13613
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190412/f29861dc/attachment.htm>


More information about the gerrit-log mailing list