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>
Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( 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
......................................................................
Patch Set 1: Code-Review+2
--
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: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id7d5970bb0fe0e42fedcb56fe4a738a92ddd5bbf
Gerrit-Change-Number: 39126
Gerrit-PatchSet: 1
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-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 13 Dec 2024 09:48:52 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes