jolly has uploaded this change for review.
ipad: Fix sporadic test failures
After ipad has retrieved data from SIM card, it request package from
eIM. Therefore the test case registers an HTTP server to receive the
package request:
f_es10x_init(); <- SIM card process
f_http_register(); <- HTTP server registration
This leads to a race condition, where the http server emulation is
partly initialized, while the request is received. This results in
dropping the received request. It is not forwarded and the testsuite
times out.
The solution is to register the HTTP server before the ipad is started
and is retrieving data from SIM card.
Change-Id: I3693352dca648de910f15cdda2e16f618452c8db
---
M ipad/IPAd_Tests.ttcn
1 file changed, 10 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/96/44096/1
diff --git a/ipad/IPAd_Tests.ttcn b/ipad/IPAd_Tests.ttcn
index 4eb6843..e70ef2d 100644
--- a/ipad/IPAd_Tests.ttcn
+++ b/ipad/IPAd_Tests.ttcn
@@ -607,9 +607,9 @@
f_respond_empty_notifications();
}
private function f_TC_proc_indirect_prfle_dwnld(charstring id) runs on IPAd_ConnHdlr {
+ f_http_register();
f_exec_ipad();
f_es10x_init();
- f_http_register();
f_package_indirect_prfle_dwnld(id);
@@ -669,9 +669,9 @@
f_respond_empty_notifications();
}
private function f_TC_proc_euicc_pkg_dwnld_exec(charstring id) runs on IPAd_ConnHdlr {
+ f_http_register();
f_exec_ipad();
f_es10x_init();
- f_http_register();
f_package_euicc_pkg_dwnld_exec(id);
@@ -748,9 +748,9 @@
f_respond_empty_notifications();
}
private function f_TC_proc_euicc_pkg_dwnld_exec_rollback(charstring id) runs on IPAd_ConnHdlr {
+ f_http_register();
f_exec_ipad();
f_es10x_init();
- f_http_register();
f_package_euicc_pkg_dwnld_exec_rollback(id);
@@ -805,9 +805,9 @@
var integer i;
var boolean do_next_eim := false;
+ f_http_register();
f_exec_ipad("-f skipEIM");
f_es10x_init();
- f_http_register();
for (i := 0; i < sizeof(g_pars.eim_list); i := i + 1) {
/* We expect a skipped eIM not to be polled. */
@@ -870,9 +870,9 @@
/* A testcase to try out what happens when the eIM package request is rejected */
private function f_TC_get_eim_pkg_req_rej(charstring id) runs on IPAd_ConnHdlr {
+ f_http_register();
f_exec_ipad();
f_es10x_init();
- f_http_register();
/* IPAd requests a package, we respond with an eimPackageError code 127 (undefined error) */
f_terminate_poll_cycle(127);
@@ -1057,9 +1057,9 @@
/* A testcase to verify if the given device capabilities are set (the lower 3 bits are always set). */
private function f_TC_set_device_capabilities(charstring id) runs on IPAd_ConnHdlr {
+ f_http_register();
f_exec_ipad("-D 0xF1");
f_es10x_init(dev_capa := 'F1'O);
- f_http_register();
/* IPAd will poll for eIM package. */
f_terminate_poll_cycle();
@@ -1107,9 +1107,9 @@
f_respond_empty_notifications();
}
private function f_TC_euiccPackageRequest_PSMO(charstring id) runs on IPAd_ConnHdlr {
+ f_http_register();
f_exec_ipad();
f_es10x_init();
- f_http_register();
f_package_euiccPackageRequest_PSMO(id);
@@ -1165,9 +1165,9 @@
f_respond_empty_notifications();
}
private function f_TC_proc_indirect_prfle_dwnld_cancel_euicc(charstring id) runs on IPAd_ConnHdlr {
+ f_http_register();
f_exec_ipad();
f_es10x_init();
- f_http_register();
f_package_indirect_prfle_dwnld_cancel_euicc(id);
@@ -1226,9 +1226,9 @@
f_respond_empty_notifications();
}
private function f_TC_proc_indirect_prfle_dwnld_cancel_eim(charstring id) runs on IPAd_ConnHdlr {
+ f_http_register();
f_exec_ipad();
f_es10x_init();
- f_http_register();
f_package_indirect_prfle_dwnld_cancel_eim(id);
@@ -1257,9 +1257,9 @@
private function f_TC_multi_packages(charstring id) runs on IPAd_ConnHdlr {
var integer i;
+ f_http_register();
f_exec_ipad();
f_es10x_init();
- f_http_register();
for (i := 0; i < mp_tc_multi_package_rounds; i := i + 1) {
log("Test round ", i, " of ", mp_tc_multi_package_rounds);
To view, visit change 44096. To unsubscribe, or for help writing mail filters, visit settings.