jolly has uploaded this change for review.
IPAd: Split f_terminate_poll_cycle()
Remove the handling of notification list polling from
f_terminate_poll_cycle() and put it into an extra function. The
notification list is polled by IPAd after every eIM package processing.
This allows to send multiple eIM packages (and process notification list
polling) before terminating the poll cycle at the end. Later tests will
use this to check for memory leaks.
Related: SYS#8199
Change-Id: I4e278f74ce3bb9bbd666f13c2a72ed90eba34af7
---
M ipad/IPAd_Tests.ttcn
1 file changed, 34 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/19/43619/1
diff --git a/ipad/IPAd_Tests.ttcn b/ipad/IPAd_Tests.ttcn
index 75e7be7..8f3af56 100644
--- a/ipad/IPAd_Tests.ttcn
+++ b/ipad/IPAd_Tests.ttcn
@@ -450,12 +450,15 @@
f_esipa_transceive(valueof(ts_authenticateClientResponseEsipa_dpe), tr_authenticateClientRequestEsipa);
}
-/* After processing notifications and eIM packages, IPAd will poll again.
- * Respond with empty notification list and with no eIM package. */
-private function f_terminate_poll_cycle() runs on IPAd_ConnHdlr {
+/* Respond with empty notification list. */
+private function f_respond_empty_notifications() runs on IPAd_ConnHdlr {
/* Expect the IPAd to query the eUICC for pending notifications, we respond with an empty list */
f_vpcd_transceive(enc_RetrieveNotificationsListResponse(valueof(ts_retrieveNotificationsListResponse_empty)), 'BF2B00'O);
+}
+/* After processing notifications and eIM packages, IPAd will poll again.
+ * Respond with no eIM package. */
+private function f_terminate_poll_cycle() runs on IPAd_ConnHdlr {
/* IPAd requests a package, we tell it that there is no package available */
f_esipa_transceive(valueof(ts_getEimPackageResponse_noEimPackageAvailable), tr_getEimPackageRequest);
}
@@ -562,7 +565,10 @@
/* Receive RemoveNotificationFromList from iPAD->eUICC */
f_vpcd_transceive(enc_NotificationSentResponse(valueof(ts_notificationSentResponse)));
- /* IPAd will poll again. */
+ /* IPAd will poll for notifications. */
+ f_respond_empty_notifications();
+
+ /* IPAd will poll for eIM package. */
f_terminate_poll_cycle();
/* Wait some time until the the last HTTP response is actually delivered */
@@ -618,7 +624,10 @@
f_vpcd_transceive(enc_NotificationSentResponse(valueof(ts_notificationSentResponse)));
f_vpcd_transceive(enc_NotificationSentResponse(valueof(ts_notificationSentResponse)));
- /* IPAd will poll again. */
+ /* IPAd will poll for notifications. */
+ f_respond_empty_notifications();
+
+ /* IPAd will poll for eIM package. */
f_terminate_poll_cycle();
/* Wait some time until the the last HTTP response is actually delivered */
@@ -691,7 +700,10 @@
f_vpcd_transceive(enc_NotificationSentResponse(valueof(ts_notificationSentResponse)));
f_vpcd_transceive(enc_NotificationSentResponse(valueof(ts_notificationSentResponse)));
- /* IPAd will poll again. */
+ /* IPAd will poll for notifications. */
+ f_respond_empty_notifications();
+
+ /* IPAd will poll for eIM package. */
f_terminate_poll_cycle();
/* Wait some time until the the last HTTP response is actually delivered */
@@ -739,7 +751,10 @@
f_esipa_transceive(valueof(ts_provideEimPackageResultResponse_eimAck(eimAcknowledgements := {1,2,3,4})),
tr_provideEimPackageResult(*, tr_eimPackageResult_euiccDataResp(eimTransactionId := '42'O)));
- /* IPAd will poll again. */
+ /* IPAd will poll for notifications. */
+ f_respond_empty_notifications();
+
+ /* IPAd will poll for eIM package. */
f_terminate_poll_cycle();
/* Wait some time until the the last HTTP response is actually delivered */
@@ -993,7 +1008,10 @@
f_esipa_transceive(valueof(ts_provideEimPackageResultResponse_eimAck()), ?);
f_vpcd_transceive(enc_NotificationSentResponse(valueof(ts_notificationSentResponse)));
- /* IPAd will poll again. */
+ /* IPAd will poll for notifications. */
+ f_respond_empty_notifications();
+
+ /* IPAd will poll for eIM package. */
f_terminate_poll_cycle();
/* Wait some time until the the last HTTP response is actually delivered */
@@ -1045,7 +1063,10 @@
f_esipa_transceive(valueof(ts_cancelSessionResponseEsipa),
tr_cancelSessionRequestEsipa(cancelSessionResponse := tr_SGP32_cancelSessionResponse));
- /* IPAd will poll again. */
+ /* IPAd will poll for notifications. */
+ f_respond_empty_notifications();
+
+ /* IPAd will poll for eIM package. */
f_terminate_poll_cycle();
/* Wait some time until the the last HTTP response is actually delivered */
@@ -1100,7 +1121,10 @@
f_esipa_transceive(valueof(ts_cancelSessionResponseEsipa),
tr_cancelSessionRequestEsipa(cancelSessionResponse := tr_SGP32_cancelSessionResponse));
- /* IPAd will poll again. */
+ /* IPAd will poll for notifications. */
+ f_respond_empty_notifications();
+
+ /* IPAd will poll for eIM package. */
f_terminate_poll_cycle();
/* Wait some time until the the last HTTP response is actually delivered */
To view, visit change 43619. To unsubscribe, or for help writing mail filters, visit settings.