lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

May 2022

  • 2 participants
  • 1343 discussions
Change in libasn1c[master]: configure.ac: fix libtool issue with clang and sanitizer
by fixeria 24 May '22

24 May '22
Attention is currently required from: Hoernchen. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libasn1c/+/28174 ) Change subject: configure.ac: fix libtool issue with clang and sanitizer ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libasn1c/+/28174 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Change-Id: Ie38fa9985187c76b4e456d8b0a83006ef341b97e Gerrit-Change-Number: 28174 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Comment-Date: Tue, 24 May 2022 03:57:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libasn1c[master]: configure.ac: fix libtool issue with clang and sanitizer
by Hoernchen 23 May '22

23 May '22
Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/libasn1c/+/28174 ) Change subject: configure.ac: fix libtool issue with clang and sanitizer ...................................................................... configure.ac: fix libtool issue with clang and sanitizer As pointed out at https://github.com/libexpat/libexpat/issues/312 libtool does not play nice with clang sanitizer builds at all. For those builds LD shoud be set to clang too (and LDFLAGS needs the sanitizer flags as well), because the clang compiler driver knows how linking to the sanitizer libs works, but then at a later stage libtool fails to actually produce the shared libraries and the build fails. This is fixed by this patch. Addtionally LD_LIBRARY_PATH has no effect on conftest runs during configure time, so the rpath needs to be set to the asan library path to ensure the configure run does not fail due to a missing asan library, i.e.: SANS='-fsanitize=memory -fsanitize-recover=all -shared-libsan' export CC=clang-10 ASANPATH=$(dirname `$CC -print-file-name=libclang_rt.asan-x86_64.so`) export LDFLAGS="-Wl,-rpath,$ASANPATH $SANS $LDFLAGS" Change-Id: Ie38fa9985187c76b4e456d8b0a83006ef341b97e --- M configure.ac 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libasn1c refs/changes/74/28174/1 diff --git a/configure.ac b/configure.ac index 8c93c3f..6ba1d37 100644 --- a/configure.ac +++ b/configure.ac @@ -20,6 +20,11 @@ AC_CONFIG_MACRO_DIR([m4]) +dnl patching ${archive_cmds} to affect generation of file "libtool" to fix linking with clang +AS_CASE(["$LD"],[*clang*], + [AS_CASE(["${host_os}"], + [*linux*],[archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'])]) + PKG_CHECK_MODULES(LIBTALLOC, talloc) AC_ARG_ENABLE(sanitize, -- To view, visit https://gerrit.osmocom.org/c/libasn1c/+/28174 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Change-Id: Ie38fa9985187c76b4e456d8b0a83006ef341b97e Gerrit-Change-Number: 28174 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: bsc: test lchan rel during LCS Loc Req
by fixeria 23 May '22

23 May '22
Attention is currently required from: neels. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28092 ) Change subject: bsc: test lchan rel during LCS Loc Req ...................................................................... Patch Set 3: Code-Review+2 (5 comments) File bsc/BSC_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28092/comment/cfefbe25_6950… PS2, Line 11679: TC_emerg_call_and_lcs_loc_req > Why are you removing this one? Looks like unintentionally... Done https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28092/comment/0e438b9b_3e4f… PS2, Line 10304: altstep no_bssmap_clear_req() runs on MSC_ConnHdlr { > 'private', unless you want to use this from other modules. Done https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28092/comment/3edfc4bd_93e9… PS2, Line 10311: type enumerated RslRel { > 'private', unless you want to use this from other modules. Done https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28092/comment/68888731_0390… PS2, Line 10318: 'b7'O > Can we use f_rnd_ra_emerg() here? Done https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28092/comment/98579271_12b7… PS2, Line 10328: isbound > Are you sure it should be isbound() and not ischosen()? Done -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Idea690a4aa4aecbe4642a16e96d086cc0538564a Gerrit-Change-Number: 28092 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Mon, 23 May 2022 18:16:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[master]: bsc: test lchan rel during LCS Loc Req
by pespin 23 May '22

23 May '22
Attention is currently required from: neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28092 ) Change subject: bsc: test lchan rel during LCS Loc Req ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Idea690a4aa4aecbe4642a16e96d086cc0538564a Gerrit-Change-Number: 28092 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Mon, 23 May 2022 14:04:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[master]: bsc: test lchan rel during LCS Loc Req
by neels 23 May '22

23 May '22
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28092 ) Change subject: bsc: test lchan rel during LCS Loc Req ...................................................................... Patch Set 3: (1 comment) Patchset: PS3: thanks, all done -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Idea690a4aa4aecbe4642a16e96d086cc0538564a Gerrit-Change-Number: 28092 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 23 May 2022 13:57:34 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[master]: bsc: test lchan rel during LCS Loc Req
by neels 23 May '22

23 May '22
Attention is currently required from: neels. Hello Jenkins Builder, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28092 to look at the new patch set (#3). Change subject: bsc: test lchan rel during LCS Loc Req ...................................................................... bsc: test lchan rel during LCS Loc Req Test this scenario: Emergency call is started; Location Request is started to locate the emergency; lchan releases early for any reason; (Do not send Clear Request immediately); Location Request is completed, locating the emergency. Related: SYS#5912 Related: Ib44dd05b0adee84234f671313b156ff6625357cc (osmo-bsc) Change-Id: Idea690a4aa4aecbe4642a16e96d086cc0538564a --- M bsc/BSC_Tests.ttcn 1 file changed, 116 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/92/28092/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Idea690a4aa4aecbe4642a16e96d086cc0538564a Gerrit-Change-Number: 28092 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-ttcn3-hacks[master]: pgw: Validate charging reported values
by pespin 23 May '22

23 May '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28173 ) Change subject: pgw: Validate charging reported values ...................................................................... pgw: Validate charging reported values Change-Id: I5024abc672bf92d41027c4c78d2925d0537bb470 --- M pgw/PGW_Tests.ttcn 1 file changed, 18 insertions(+), 9 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn index 6df4ca7..d8ee60d 100644 --- a/pgw/PGW_Tests.ttcn +++ b/pgw/PGW_Tests.ttcn @@ -111,6 +111,9 @@ var OCT4 g_ip4_addr; var OCT16 g_ip6_addr; var integer g_ip6_plen; + + /* Store last received Gy message */ + var PDU_DIAMETER g_rx_gy; } /* configuration data for a given Session */ @@ -487,31 +490,31 @@ return tpl; } -private altstep as_DIA_Gy_CCR(DCC_NONE_CC_Request_Type req_type) runs on PGW_Session_CT { - var PDU_DIAMETER rx_dia; - [] Gy.receive(f_tr_DIA_Gy_CCR(req_type := req_type)) -> value rx_dia { +private altstep as_DIA_Gy_CCR(DCC_NONE_CC_Request_Type req_type) +runs on PGW_Session_CT { + [] Gy.receive(f_tr_DIA_Gy_CCR(req_type := req_type)) -> value g_rx_gy { var template (value) PDU_DIAMETER tx_dia; var template (omit) AVP avp; var octetstring sess_id; var AVP_Unsigned32 req_num; - avp := f_DIAMETER_get_avp(rx_dia, c_AVP_Code_BASE_NONE_Session_Id); + avp := f_DIAMETER_get_avp(g_rx_gy, c_AVP_Code_BASE_NONE_Session_Id); sess_id := valueof(avp.avp_data.avp_BASE_NONE_Session_Id); - avp := f_DIAMETER_get_avp(rx_dia, c_AVP_Code_DCC_NONE_CC_Request_Number); + avp := f_DIAMETER_get_avp(g_rx_gy, c_AVP_Code_DCC_NONE_CC_Request_Number); req_num := valueof(avp.avp_data.avp_DCC_NONE_CC_Request_Number); if (g_pars.gy_validity_time > 0) { - tx_dia := ts_DIA_Gy_CCA_ValidityTime(rx_dia.hop_by_hop_id, rx_dia.end_to_end_id, sess_id, + tx_dia := ts_DIA_Gy_CCA_ValidityTime(g_rx_gy.hop_by_hop_id, g_rx_gy.end_to_end_id, sess_id, req_type, req_num, g_pars.gy_validity_time); } else { - tx_dia := ts_DIA_Gy_CCA(rx_dia.hop_by_hop_id, rx_dia.end_to_end_id, sess_id, + tx_dia := ts_DIA_Gy_CCA(g_rx_gy.hop_by_hop_id, g_rx_gy.end_to_end_id, sess_id, req_type, req_num); } Gy.send(tx_dia); } - [] Gy.receive(PDU_DIAMETER:?) -> value rx_dia { + [] Gy.receive(PDU_DIAMETER:?) -> value g_rx_gy { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, - log2str("Received unexpected DIAMETER Gy", rx_dia)); + log2str("Received unexpected DIAMETER Gy", g_rx_gy)); } } @@ -858,14 +861,20 @@ /* We should receive an update even if no traffic is sent: */ as_DIA_Gy_CCR(UPDATE_REQUEST); + f_validate_gy_cc_report(g_rx_gy, VALIDITY_TIME, (3..4), 0, 0); d := activate(as_DIA_Gy_CCR(UPDATE_REQUEST)); f_ping4(mp_ping_hostname); /* Let the CCA reach the GGSN */ f_sleep(0.5); deactivate(d); + f_validate_gy_cc_report(g_rx_gy, VALIDITY_TIME, (3..4), (28..1000), (28..1000)); + + as_DIA_Gy_CCR(UPDATE_REQUEST); + f_validate_gy_cc_report(g_rx_gy, VALIDITY_TIME, (3..4), ?, ?); f_delete_session(omit, g_teic, '10'O); + f_validate_gy_cc_report(g_rx_gy, FINAL, (0..1), 0, 0); setverdict(pass); } testcase TC_gy_charging_cc_time() runs on PGW_Test_CT { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28173 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I5024abc672bf92d41027c4c78d2925d0537bb470 Gerrit-Change-Number: 28173 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-ttcn3-hacks[master]: pgw: Validate charging reported values
by pespin 23 May '22

23 May '22
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28173 ) Change subject: pgw: Validate charging reported values ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28173 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I5024abc672bf92d41027c4c78d2925d0537bb470 Gerrit-Change-Number: 28173 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 23 May 2022 13:44:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[master]: pgw: Validate charging reported values
by pespin 23 May '22

23 May '22
pespin has removed a vote from this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28173 ) Change subject: pgw: Validate charging reported values ...................................................................... Removed Code-Review+2 by pespin <pespin(a)sysmocom.de> -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28173 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I5024abc672bf92d41027c4c78d2925d0537bb470 Gerrit-Change-Number: 28173 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: deleteVote
1 0
0 0
Change in osmo-ttcn3-hacks[master]: ggsn: Validate charging reported values
by pespin 23 May '22

23 May '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28172 ) Change subject: ggsn: Validate charging reported values ...................................................................... ggsn: Validate charging reported values Change-Id: I497309bb0b30c61bdb00e0c08f18294ecd4dd485 --- M ggsn_tests/GGSN_Tests.ttcn M library/DIAMETER_Emulation.ttcn M library/DIAMETER_Templates.ttcn 3 files changed, 109 insertions(+), 25 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index 4a5f0ba..4e6581c 100644 --- a/ggsn_tests/GGSN_Tests.ttcn +++ b/ggsn_tests/GGSN_Tests.ttcn @@ -141,6 +141,7 @@ port DIAMETER_PT Gy_UNIT; port DIAMETEREM_PROC_PT Gy_PROC; var integer g_gy_validity_time := 0; /* In seconds. 0 => disabled, !0 => grant over CC-Time period */ + var PDU_DIAMETER g_rx_gy; /* Store last received Gy message */ } private function f_init_vty() runs on GT_CT { @@ -653,30 +654,29 @@ } private altstep as_DIA_Gy_CCR(template (omit) PdpContext ctx, DCC_NONE_CC_Request_Type req_type) runs on GT_CT { - var PDU_DIAMETER rx_dia; - [] Gy_UNIT.receive(f_tr_DIA_Gy_CCR(ctx, req_type := req_type)) -> value rx_dia { + [] Gy_UNIT.receive(f_tr_DIA_Gy_CCR(ctx, req_type := req_type)) -> value g_rx_gy { var template (value) PDU_DIAMETER tx_dia; var template (omit) AVP avp; var octetstring sess_id; var AVP_Unsigned32 req_num; - avp := f_DIAMETER_get_avp(rx_dia, c_AVP_Code_BASE_NONE_Session_Id); + avp := f_DIAMETER_get_avp(g_rx_gy, c_AVP_Code_BASE_NONE_Session_Id); sess_id := valueof(avp.avp_data.avp_BASE_NONE_Session_Id); - avp := f_DIAMETER_get_avp(rx_dia, c_AVP_Code_DCC_NONE_CC_Request_Number); + avp := f_DIAMETER_get_avp(g_rx_gy, c_AVP_Code_DCC_NONE_CC_Request_Number); req_num := valueof(avp.avp_data.avp_DCC_NONE_CC_Request_Number); if (g_gy_validity_time > 0) { - tx_dia := ts_DIA_Gy_CCA_ValidityTime(rx_dia.hop_by_hop_id, rx_dia.end_to_end_id, sess_id, + tx_dia := ts_DIA_Gy_CCA_ValidityTime(g_rx_gy.hop_by_hop_id, g_rx_gy.end_to_end_id, sess_id, req_type, req_num, g_gy_validity_time); } else { - tx_dia := ts_DIA_Gy_CCA(rx_dia.hop_by_hop_id, rx_dia.end_to_end_id, sess_id, + tx_dia := ts_DIA_Gy_CCA(g_rx_gy.hop_by_hop_id, g_rx_gy.end_to_end_id, sess_id, req_type, req_num); } Gy_UNIT.send(tx_dia); } - [] Gy_UNIT.receive(PDU_DIAMETER:?) -> value rx_dia { + [] Gy_UNIT.receive(PDU_DIAMETER:?) -> value g_rx_gy { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, - log2str("Received unexpected DIAMETER Gy", rx_dia)); + log2str("Received unexpected DIAMETER Gy", g_rx_gy)); } } @@ -2397,9 +2397,11 @@ g_gy_validity_time := 2; /* First update reports octests/pkt on both UL/DL (see icmp ping-pong above) */ as_DIA_Gy_CCR(ctx, UPDATE_REQUEST); + f_validate_gy_cc_report(g_rx_gy, VALIDITY_TIME, (3..4), 28, 28); /* Second update: 0 ul/dl pkt/octet should be reported, since nothing was sent */ as_DIA_Gy_CCR(ctx, UPDATE_REQUEST); + f_validate_gy_cc_report(g_rx_gy, VALIDITY_TIME, (2..3), 0, 0); /* Third update: make sure report contains again octets/pkts for both UL/DL: */ f_send_gtpu(ctx, f_gen_icmpv4_echo(saddr, dns1_addr)); @@ -2407,6 +2409,7 @@ f_send_gtpu(ctx, f_gen_icmpv4_echo(saddr, dns1_addr)); f_wait_icmp4_echo_reply(ctx); as_DIA_Gy_CCR(ctx, UPDATE_REQUEST); + f_validate_gy_cc_report(g_rx_gy, VALIDITY_TIME, (2..3), 56, 56); /* Let the CCA reach the GGSN */ f_sleep(0.5); @@ -2419,6 +2422,7 @@ f_wait_icmp4_echo_reply(ctx); f_pdp_ctx_del(ctx, '1'B); + f_validate_gy_cc_report(g_rx_gy, FINAL, (0..2), 28, 28); f_shutdown_helper(); diff --git a/library/DIAMETER_Emulation.ttcn b/library/DIAMETER_Emulation.ttcn index 748b452..09f92be 100644 --- a/library/DIAMETER_Emulation.ttcn +++ b/library/DIAMETER_Emulation.ttcn @@ -211,23 +211,6 @@ } } -function f_DIAMETER_get_avp(PDU_DIAMETER pdu, template (present) AVP_Code avp_code) -return template (omit) AVP -{ - var integer i; - - for (i := 0; i < lengthof(pdu.avps); i := i+1) { - if (not ispresent(pdu.avps[i].avp)) { - continue; - } - var AVP_Header hdr := pdu.avps[i].avp.avp_header; - if (match(hdr.avp_code, avp_code)) { - return pdu.avps[i].avp; - } - } - return omit; -} - function f_DIAMETER_get_imsi(PDU_DIAMETER pdu) return template (omit) IMSI { var template (omit) AVP imsi_avp; diff --git a/library/DIAMETER_Templates.ttcn b/library/DIAMETER_Templates.ttcn index 855358d..4b17ac5 100644 --- a/library/DIAMETER_Templates.ttcn +++ b/library/DIAMETER_Templates.ttcn @@ -11,6 +11,7 @@ import from DIAMETER_Types all; import from Osmocom_Types all; +import from Misc_Helpers all; /* https://www.iana.org/assignments/aaa-parameters/aaa-parameters.xhtml#aaa-pa… */ type enumerated DIAMETER_Resultcode { @@ -1611,4 +1612,100 @@ tr_AVP_OriginStateId(state_id) )); +function f_DIAMETER_get_avp(PDU_DIAMETER pdu, template (present) AVP_Code avp_code) +return template (omit) AVP +{ + var integer i; + + for (i := 0; i < lengthof(pdu.avps); i := i+1) { + if (not ispresent(pdu.avps[i].avp)) { + continue; + } + var AVP_Header hdr := pdu.avps[i].avp.avp_header; + if (match(hdr.avp_code, avp_code)) { + return pdu.avps[i].avp; + } + } + return omit; +} +function f_DIAMETER_get_avp_or_fail(PDU_DIAMETER pdu, template (present) AVP_Code avp_code) +return AVP +{ + var template (omit) AVP avp; + avp := f_DIAMETER_get_avp(pdu, avp_code); + if (istemplatekind(avp, "omit")) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("AVP ", avp_code, " not found in ", pdu)); + } + return valueof(avp); +} + +function f_AVP_Grouped_get_avp(AVP_Grouped avp_grp, template (present) AVP_Code avp_code) +return template (omit) AVP +{ + var integer i; + + for (i := 0; i < lengthof(avp_grp); i := i+1) { + if (not ispresent(avp_grp[i].avp)) { + continue; + } + var AVP_Header hdr := avp_grp[i].avp.avp_header; + if (match(hdr.avp_code, avp_code)) { + return avp_grp[i].avp; + } + } + return omit; +} +function f_AVP_Grouped_get_avp_or_fail(AVP_Grouped avp_grp, template (present) AVP_Code avp_code) +return AVP +{ + var template (omit) AVP avp; + avp := f_AVP_Grouped_get_avp(avp_grp, avp_code); + if (istemplatekind(avp, "omit")) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("AVP ", avp_code, " not found in ", avp_grp)); + } + return valueof(avp); +} + +function f_validate_gy_cc_report(PDU_DIAMETER rx_dia, template (present) DCA_3GPP_Reporting_Reason repreason_exp := ?, + template (present) integer cc_time_exp := ?, + template (present) integer cc_in_oct_exp := ?, + template (present) integer cc_out_oct_exp := ?) +{ + var AVP multi_services_cc, used_service_unit; + var AVP_Grouped multi_services_cc_data, used_service_unit_data; + var AVP repreason, cc_time, cc_in_oct, cc_out_oct; + + multi_services_cc := f_DIAMETER_get_avp_or_fail(rx_dia, c_AVP_Code_DCC_NONE_Multiple_Services_Credit_Control); + multi_services_cc_data := valueof(multi_services_cc.avp_data.avp_DCC_NONE_Multiple_Services_Credit_Control); + + repreason := f_AVP_Grouped_get_avp_or_fail(multi_services_cc_data, c_AVP_Code_DCA_3GPP_Reporting_Reason); + if (not match(repreason.avp_data.avp_DCA_3GPP_Reporting_Reason, repreason_exp)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("3GPP-Reporting-Reason mismatch ", repreason, " vs exp ", repreason_exp)); + } + + used_service_unit := f_AVP_Grouped_get_avp_or_fail(multi_services_cc_data, c_AVP_Code_DCC_NONE_Used_Service_Unit); + used_service_unit_data := valueof(used_service_unit.avp_data.avp_DCC_NONE_Used_Service_Unit); + + cc_time := f_AVP_Grouped_get_avp_or_fail(used_service_unit_data, c_AVP_Code_DCC_NONE_CC_Time); + if (not match(oct2int(cc_time.avp_data.avp_DCC_NONE_CC_Time), cc_time_exp)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("3GPP-CC-Time mismatch ", cc_time, " vs exp ", cc_time_exp)); + } + + cc_in_oct := f_AVP_Grouped_get_avp_or_fail(used_service_unit_data, c_AVP_Code_DCC_NONE_CC_Input_Octets); + if (not match(oct2int(cc_in_oct.avp_data.avp_DCC_NONE_CC_Input_Octets), cc_in_oct_exp)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("3GPP-CC-Input-Octets mismatch ", cc_in_oct, " vs exp ", cc_in_oct_exp)); + } + + cc_out_oct := f_AVP_Grouped_get_avp_or_fail(used_service_unit_data, c_AVP_Code_DCC_NONE_CC_Output_Octets); + if (not match(oct2int(cc_out_oct.avp_data.avp_DCC_NONE_CC_Output_Octets), cc_out_oct_exp)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("3GPP-CC-Output-Octets mismatch ", cc_out_oct, " vs exp ", cc_out_oct_exp)); + } +} + } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28172 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I497309bb0b30c61bdb00e0c08f18294ecd4dd485 Gerrit-Change-Number: 28172 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • ...
  • 135
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.