pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/mncc-python/+/39143?usp=email )
Change subject: mncc_mt_loadgen.py: Allow configuring first_msisdn_called in calls()
......................................................................
mncc_mt_loadgen.py: Allow configuring first_msisdn_called in calls()
The msisdns to use actually depen on external configuration. Hence allow
passing an initial MSIDN to incrementally setup calls.
Take the chance to match the default msisdn first value with abis-load-test.
Change-Id: I2dd6b96ea2da117d67a368bc076969f25fa61a52
---
M mncc_mt_loadgen.py
1 file changed, 11 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/mncc-python refs/changes/43/39143/1
diff --git a/mncc_mt_loadgen.py b/mncc_mt_loadgen.py
index 8e7a65b..1a4a998 100755
--- a/mncc_mt_loadgen.py
+++ b/mncc_mt_loadgen.py
@@ -178,10 +178,16 @@
call_conn.start_call(msisdn_called, msisdn_calling, codec)
return call_conn
-def calls(nr, ramp=1.0, codec='GSM_FR'):
+def calls(nr, ramp=1.0, codec='GSM_FR', first_msisdn_called='402965200501'):
+ first_msisdn_called_int = int(first_msisdn_called)
+ needed_len = len(str(first_msisdn_called_int + (nr-1)))
+ # If user passed a longer zero-preffixed input, take it into account:
+ if len(first_msisdn_called) > needed_len:
+ needed_len = len(first_msisdn_called)
for i in range(nr):
- a = 90001 + i
- a = str(a)
+ a = str(first_msisdn_called_int + i)
+ # prepend with zeros as needed:
+ a = a.zfill(needed_len)
print("%d: mt_call(%r)" % (i, a))
mt_call(a, codec=codec)
time.sleep(ramp)
@@ -189,9 +195,9 @@
log.info("")
log.info("")
log.info("Start a single call by typing:")
-log.info(" mt_call('90001')")
+log.info(" mt_call('402965200501')")
log.info("With a specific codec (default is 'GSM_FR'):")
-log.info(" mt_call('90001', codec='GSM_EFR')")
+log.info(" mt_call('402965200501', codec='GSM_EFR')")
log.info("Start multiple calls with (e.g. 4 calls with EFR):")
log.info(" calls(4, codec='GSM_EFR')")
log.info("")
--
To view, visit https://gerrit.osmocom.org/c/mncc-python/+/39143?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: mncc-python
Gerrit-Branch: master
Gerrit-Change-Id: I2dd6b96ea2da117d67a368bc076969f25fa61a52
Gerrit-Change-Number: 39143
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39126?usp=email )
Change subject: sccp: Let some time for SCCP RLC to reach IUT before finishing test
......................................................................
sccp: Let some time for SCCP RLC to reach IUT before finishing test
Otherwise tear down of the test component immediatelly afterwards
creates a race condition where sometimes the RLC message is not sent
before closing the socket.
As a result, the SCCP-SCOC stays in DISCONN_PEND until T(rel) fires a
while afterwards, generating a new RLSD in a follow-up test, disrupting
expectancies of that unrelated test.
Since sccp_demo_user doesn't implement a Layer Manager, the recv() 0
from the socket doesn't automatically tear down the SCCP conn, since it
could have several ASPs:
"""
0: asp-asp-srv-client: ss7_asp_xua_srv_conn_rx_cb(): sctp_recvmsg() returned 0 (flags=0x80)
...
asp-srv-client: connection closed
XUA_ASP(asp-srv-client){ASP_ACTIVE}: Received Event SCTP-COMM_DOWN.ind
XUA_ASP(asp-srv-client){ASP_ACTIVE}: state_chg to ASP_DOWN
XUA_AS(as-srv-client){AS_ACTIVE}: Received Event ASPAS-ASP_DOWN.ind
XUA_AS(as-srv-client){AS_ACTIVE}: state_chg to AS_PENDING
Delivering N-PCSTATE.indication to SCCP User 'SCCP Management'
Ignoring SCCP user primitive N-PCSTATE.indication
[Here same 2 lines for SCCP User 'refuser', 'echo', 'callback', 'test_client_vty']
XUA_ASP(asp-srv-client){ASP_DOWN}: No Layer Manager, dropping M-ASP_DOWN.indication
XUA_ASP(asp-srv-client){ASP_DOWN}: No Layer Manager, dropping M-SCTP_RELEASE.indication
"""
Change-Id: Id7d5970bb0fe0e42fedcb56fe4a738a92ddd5bbf
---
M sccp/SCCP_Tests_RAW.ttcn
1 file changed, 6 insertions(+), 1 deletion(-)
Approvals:
osmith: Looks good to me, approved
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
diff --git a/sccp/SCCP_Tests_RAW.ttcn b/sccp/SCCP_Tests_RAW.ttcn
index f1f602c..5d5b0ab 100644
--- a/sccp/SCCP_Tests_RAW.ttcn
+++ b/sccp/SCCP_Tests_RAW.ttcn
@@ -252,6 +252,8 @@
log("Waiting for RLSD");
f_exp_sccp(tr_SCCP_RLSD(remote_lref, g_own_lref, hex2int('0D'H))); /* Cause: Expiration of Rx Inactivity Timer */
f_send_sccp(ts_SCCP_RLC(g_own_lref, remote_lref));
+ /* Let some time for peer to receive the RLC */
+ f_sleep(1.0);
setverdict(pass);
}
@@ -325,6 +327,8 @@
self.stop;
}
}
+ /* Let some time for peer to receive the RLC */
+ f_sleep(1.0);
}
private function f_tx_xudt_exp(SCCP_PAR_Address calling, SCCP_PAR_Address called, octetstring data) runs on SCCP_Test_RAW_CT {
@@ -521,7 +525,8 @@
var template (present) integer cause := ?;
f_exp_sccp(tr_SCCP_RLSD(remote_lref, g_own_lref, cause));
f_send_sccp(ts_SCCP_RLC(g_own_lref, remote_lref));
-
+ /* Let some time for peer to receive the RLC */
+ f_sleep(1.0);
setverdict(pass);
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39126?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id7d5970bb0fe0e42fedcb56fe4a738a92ddd5bbf
Gerrit-Change-Number: 39126
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/39134?usp=email )
Change subject: bankd: Add -T and -e cmdline params
......................................................................
bankd: Add -T and -e cmdline params
Change-Id: I2c33c667be77578699f4a5fb70c8b74c67f6e2cf
---
M doc/manuals/chapters/remsim-bankd.adoc
M src/bankd/bankd_main.c
2 files changed, 21 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
diff --git a/doc/manuals/chapters/remsim-bankd.adoc b/doc/manuals/chapters/remsim-bankd.adoc
index e87de52..b9db3d7 100644
--- a/doc/manuals/chapters/remsim-bankd.adoc
+++ b/doc/manuals/chapters/remsim-bankd.adoc
@@ -99,6 +99,16 @@
without knowledge of each other, and either of them might modify the card
state (such as the currently selected file, validated PIN, etc.) in a
way not expected by the other application.
+*-g, --gsmtap-ip A.B.C.D*::
+ Enable GSMTAP and send APDU traces to given IP.
+*-G, --gsmtap-slot <0-1023>*::
+ Limit tracing to given bank slot, only (default: all slots).
+*-L, --disable-color*::
+ Disable colors for logging to stderr.
+*-T, --timestamp*::
+ Prefix every log line with a timestamp.
+*-e, --log-level number*::
+ Set a global loglevel for all logging.
==== Examples
diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c
index e9e4889..14c676d 100644
--- a/src/bankd/bankd_main.c
+++ b/src/bankd/bankd_main.c
@@ -303,6 +303,8 @@
" -g --gsmtap-ip A.B.C.D Enable GSMTAP and send APDU traces to given IP\n"
" -G --gsmtap-slot <0-1023> Limit tracing to given bank slot, only (default: all slots)\n"
" -L --disable-color Disable colors for logging to stderr\n"
+" -T --timestamp Prefix every log line with a timestamp\n"
+" -e --log-level number Set a global loglevel.\n"
);
}
@@ -328,10 +330,12 @@
{ "gsmtap-ip", 1, 0, 'g' },
{ "gsmtap-slot", 1, 0, 'G' },
{ "disable-color", 0, 0, 'L' },
+ { "timestamp", 0, 0, 'T' },
+ { "log-level", 1, 0, 'e' },
{ 0, 0, 0, 0 }
};
- c = getopt_long(argc, argv, "hVd:i:p:b:n:N:I:P:sg:G:L", long_options, &option_index);
+ c = getopt_long(argc, argv, "hVd:i:p:b:n:N:I:P:sg:G:LTe:", long_options, &option_index);
if (c == -1)
break;
@@ -380,6 +384,12 @@
case 'L':
log_set_use_color(osmo_stderr_target, 0);
break;
+ case 'T':
+ log_set_print_timestamp(osmo_stderr_target, 1);
+ break;
+ case 'e':
+ log_set_log_level(osmo_stderr_target, atoi(optarg));
+ break;
}
}
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/39134?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I2c33c667be77578699f4a5fb70c8b74c67f6e2cf
Gerrit-Change-Number: 39134
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>