Change in libosmocore[master]: Refactor ns2_nsvc_create_ip*
daniel has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22235 ) Change subject: Refactor ns2_nsvc_create_ip* .. Refactor ns2_nsvc_create_ip* Move code common in ipv4/6 into a separate function and call that function. Change-Id: I076d53bee2e67e1cb3ad6ee5cd05c63ebe3359fb Related: OS#4948 --- M src/gb/gprs_ns2_sns.c 1 file changed, 27 insertions(+), 38 deletions(-) Approvals: Jenkins Builder: Verified daniel: Looks good to me, approved diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c index 1958477..ceff115 100644 --- a/src/gb/gprs_ns2_sns.c +++ b/src/gb/gprs_ns2_sns.c @@ -255,66 +255,55 @@ } } -static void ns2_nsvc_create_ip4(struct osmo_fsm_inst *fi, -struct gprs_ns2_nse *nse, -const struct gprs_ns_ie_ip4_elem *ip4) +static void ns2_vc_create_ip(struct osmo_fsm_inst *fi, struct gprs_ns2_nse *nse, const struct osmo_sockaddr *remote, +uint8_t sig_weight, uint8_t data_weight) { struct gprs_ns2_inst *nsi = nse->nsi; struct gprs_ns2_vc *nsvc; struct gprs_ns2_vc_bind *bind; + + /* for every bind, create a connection if bind type == IP */ + llist_for_each_entry(bind, >binding, list) { + if (bind->ll != GPRS_NS2_LL_UDP) + continue; + /* ignore failed connection */ + nsvc = gprs_ns2_ip_connect_inactive(bind, + remote, + nse, 0); + if (!nsvc) { + LOGPFSML(fi, LOGL_ERROR, "SNS-CONFIG: Failed to create NSVC\n"); + continue; + } + + nsvc->sig_weight = sig_weight; + nsvc->data_weight = data_weight; + } +} + +static void ns2_nsvc_create_ip4(struct osmo_fsm_inst *fi, +struct gprs_ns2_nse *nse, +const struct gprs_ns_ie_ip4_elem *ip4) +{ struct osmo_sockaddr remote = { }; /* copy over. Both data structures use network byte order */ remote.u.sin.sin_family = AF_INET; remote.u.sin.sin_addr.s_addr = ip4->ip_addr; remote.u.sin.sin_port = ip4->udp_port; - /* for every bind, create a connection if bind type == IP */ - llist_for_each_entry(bind, >binding, list) { - if (bind->ll != GPRS_NS2_LL_UDP) - continue; - /* ignore failed connection */ - nsvc = gprs_ns2_ip_connect_inactive(bind, - , - nse, 0); - if (!nsvc) { - LOGPFSML(fi, LOGL_ERROR, "SNS-CONFIG: Failed to create NSVC\n"); - continue; - } - - nsvc->sig_weight = ip4->sig_weight; - nsvc->data_weight = ip4->data_weight; - } + ns2_vc_create_ip(fi, nse, , ip4->sig_weight, ip4->data_weight); } static void ns2_nsvc_create_ip6(struct osmo_fsm_inst *fi, struct gprs_ns2_nse *nse, const struct gprs_ns_ie_ip6_elem *ip6) { - struct gprs_ns2_inst *nsi = nse->nsi; - struct gprs_ns2_vc *nsvc; - struct gprs_ns2_vc_bind *bind; struct osmo_sockaddr remote = {}; /* copy over. Both data structures use network byte order */ remote.u.sin6.sin6_family = AF_INET6; remote.u.sin6.sin6_addr = ip6->ip_addr; remote.u.sin6.sin6_port = ip6->udp_port; - /* for every bind, create a connection if bind type == IP */ - llist_for_each_entry(bind, >binding, list) { - if (bind->ll != GPRS_NS2_LL_UDP) - continue; - /* ignore failed connection */ - nsvc = gprs_ns2_ip_connect_inactive(bind, - , - nse, 0); - if (!nsvc) { - LOGPFSML(fi, LOGL_ERROR, "SNS-CONFIG: Failed to create NSVC\n"); - continue; - } - - nsvc->sig_weight = ip6->sig_weight; - nsvc->data_weight = ip6->data_weight; - } + ns2_vc_create_ip(fi, nse, , ip6->sig_weight, ip6->data_weight); } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I076d53bee2e67e1cb3ad6ee5cd05c63ebe3359fb Gerrit-Change-Number: 22235 Gerrit-PatchSet: 3 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in libosmocore[master]: Refactor ns2_nsvc_create_ip*
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22235 ) Change subject: Refactor ns2_nsvc_create_ip* .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I076d53bee2e67e1cb3ad6ee5cd05c63ebe3359fb Gerrit-Change-Number: 22235 Gerrit-PatchSet: 3 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 17 Jan 2021 07:41:56 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: Refactor ns2_nsvc_create_ip*
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22235 ) Change subject: Refactor ns2_nsvc_create_ip* .. Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/22235/2/src/gb/gprs_ns2_sns.c File src/gb/gprs_ns2_sns.c: https://gerrit.osmocom.org/c/libosmocore/+/22235/2/src/gb/gprs_ns2_sns.c@258 PS2, Line 258: static void ns2_vc_create_ip(struct osmo_fsm_inst *fi, struct gprs_ns2_nse *nse, struct osmo_sockaddr *remote, > 'remote' could probably be 'const', but not critical. Done -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I076d53bee2e67e1cb3ad6ee5cd05c63ebe3359fb Gerrit-Change-Number: 22235 Gerrit-PatchSet: 3 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 17 Jan 2021 07:33:38 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Gerrit-MessageType: comment
Change in libosmocore[master]: Refactor ns2_nsvc_create_ip*
Hello Jenkins Builder, laforge, pespin, lynxis lazus, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/22235 to look at the new patch set (#3). Change subject: Refactor ns2_nsvc_create_ip* .. Refactor ns2_nsvc_create_ip* Move code common in ipv4/6 into a separate function and call that function. Change-Id: I076d53bee2e67e1cb3ad6ee5cd05c63ebe3359fb Related: OS#4948 --- M src/gb/gprs_ns2_sns.c 1 file changed, 27 insertions(+), 38 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/35/22235/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I076d53bee2e67e1cb3ad6ee5cd05c63ebe3359fb Gerrit-Change-Number: 22235 Gerrit-PatchSet: 3 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Build failure of network:osmocom:nightly/osmo-sgsn in Debian_9.0/aarch64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-sgsn failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-sgsn Last lines of build log: getoldpackages: connect to back-other-opensuse:5253: Connection timed out (worker was obs-arm-9:16) -- Configure notifications at https://build.opensuse.org/my/subscriptions openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/simtrace2 in xUbuntu_20.04/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/xUbuntu_20.04/x86_64 Package network:osmocom:nightly/simtrace2 failed to build in xUbuntu_20.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly simtrace2 Last lines of build log: [ 166s] [COMPILING libboard/qmod/source/wwan_perst.c] [ 166s] [COMPILING libboard/qmod/source/card_pres.c] [ 166s] [COMPILING libboard/qmod/source/wwan_led.c] [ 166s] [COMPILING libboard/qmod/source/i2c.c] [ 166s] [COMPILING libboard/qmod/source/board_qmod.c] [ 166s] [COMPILING apps/dfu/main.c] [ 167s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu.c] [ 167s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c] [ 167s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c] [ 167s] Memory region Used Size Region Size %age Used [ 167s] rom: 16588 B16 KB101.25% [ 167s] ram: 11672 B48 KB 23.75/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: bin/qmod-dfu-flash.elf section `.text' will not fit in region `rom' [ 167s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: region `rom' overflowed by 204 bytes [ 167s] collect2: error: ld returned 1 exit status [ 167s] % [ 167s] make[2]: *** [Makefile:234: flash] Error 1 [ 167s] make[2]: Leaving directory '/usr/src/packages/BUILD/firmware' [ 167s] make[1]: *** [Makefile:13: fw-qmod-dfu] Error 2 [ 167s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 167s] dh_auto_build: error: make -j1 returned exit code 2 [ 167s] make: *** [debian/rules:16: build] Error 25 [ 167s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 167s] ### VM INTERACTION START ### [ 170s] [ 155.267101] sysrq: Power Off [ 170s] [ 155.271398] reboot: Power down [ 170s] ### VM INTERACTION END ### [ 170s] [ 170s] cloud126 failed "build simtrace2_0.7.0.69.aadd.dsc" at Sun Jan 17 01:49:10 UTC 2021. [ 170s] -- Configure notifications at https://build.opensuse.org/my/subscriptions openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/simtrace2 in xUbuntu_20.10/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/xUbuntu_20.10/x86_64 Package network:osmocom:nightly/simtrace2 failed to build in xUbuntu_20.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly simtrace2 Last lines of build log: [ 116s] [COMPILING apps/dfu/main.c] [ 117s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu.c] [ 117s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c] [ 117s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c] [ 117s] Memory region Used Size Region Size %age Used [ 117s] rom: 16580 B16 KB101.20% [ 117s] ram: 11672 B48 KB 23.75/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: warning: changing start of section .stack by 4 bytes [ 117s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: warning: changing start of section .stack by 4 bytes [ 117s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: bin/qmod-dfu-flash.elf section `.text' will not fit in region `rom' [ 117s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: warning: changing start of section .stack by 4 bytes [ 117s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: warning: changing start of section .stack by 4 bytes [ 117s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: warning: changing start of section .stack by 4 bytes [ 117s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: region `rom' overflowed by 196 bytes [ 117s] collect2: error: ld returned 1 exit status [ 117s] % [ 117s] make[2]: *** [Makefile:234: flash] Error 1 [ 117s] make[2]: Leaving directory '/usr/src/packages/BUILD/firmware' [ 117s] make[1]: *** [Makefile:13: fw-qmod-dfu] Error 2 [ 117s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 117s] dh_auto_build: error: make -j1 returned exit code 2 [ 117s] make: *** [debian/rules:16: build] Error 25 [ 117s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 117s] ### VM INTERACTION START ### [ 120s] [ 110.478986] sysrq: Power Off [ 120s] [ 110.488052] reboot: Power down [ 120s] ### VM INTERACTION END ### [ 120s] [ 120s] sheep81 failed "build simtrace2_0.7.0.69.aadd.dsc" at Sun Jan 17 01:48:34 UTC 2021. [ 120s] -- Configure notifications at https://build.opensuse.org/my/subscriptions openSUSE Build Service (https://build.opensuse.org/)
Change in libosmocore[master]: gprs_ns2_sns: clear local and remote entries when SNS failed
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22206 ) Change subject: gprs_ns2_sns: clear local and remote entries when SNS failed .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22206 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie4db81acdd5f8ddf1a1f5dc7645d1144545d9c73 Gerrit-Change-Number: 22206 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 22:11:51 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-bts[master]: paging: refactor and optimize fill_paging_type_1()
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/4 ) Change subject: paging: refactor and optimize fill_paging_type_1() .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/4 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I90473356b396e5dd9326598aca025afacca4afc8 Gerrit-Change-Number: 4 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 22:10:56 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: Refactor ns2_nsvc_create_ip*
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22235 ) Change subject: Refactor ns2_nsvc_create_ip* .. Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/22235/2/src/gb/gprs_ns2_sns.c File src/gb/gprs_ns2_sns.c: https://gerrit.osmocom.org/c/libosmocore/+/22235/2/src/gb/gprs_ns2_sns.c@258 PS2, Line 258: static void ns2_vc_create_ip(struct osmo_fsm_inst *fi, struct gprs_ns2_nse *nse, struct osmo_sockaddr *remote, 'remote' could probably be 'const', but not critical. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I076d53bee2e67e1cb3ad6ee5cd05c63ebe3359fb Gerrit-Change-Number: 22235 Gerrit-PatchSet: 2 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 22:09:04 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: ns2: Add sanity check
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22234 ) Change subject: ns2: Add sanity check .. ns2: Add sanity check Prevent memory corruption or segfaults by asserting that NSE and bind link layer match. A mismatch should never happen and might cause the bind to access invalid memory when sending because nsvc->priv doesn't match what it expects. Change-Id: I7ca4cd1c5dac8b5e44ffc4825b9373b2d04911ab Related: OS#4948 --- M src/gb/gprs_ns2.c 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c index e43b636..3ca87a4 100644 --- a/src/gb/gprs_ns2.c +++ b/src/gb/gprs_ns2.c @@ -490,6 +490,9 @@ struct gprs_ns2_vc *ns2_vc_alloc(struct gprs_ns2_vc_bind *bind, struct gprs_ns2_nse *nse, bool initiater, enum gprs_ns2_vc_mode vc_mode) { + /* Sanity check */ + OSMO_ASSERT(bind->ll == nse->ll); + struct gprs_ns2_vc *nsvc = talloc_zero(bind, struct gprs_ns2_vc); if (!nsvc) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I7ca4cd1c5dac8b5e44ffc4825b9373b2d04911ab Gerrit-Change-Number: 22234 Gerrit-PatchSet: 2 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in libosmocore[master]: ns2: Add sanity check
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22234 ) Change subject: ns2: Add sanity check .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I7ca4cd1c5dac8b5e44ffc4825b9373b2d04911ab Gerrit-Change-Number: 22234 Gerrit-PatchSet: 2 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 22:08:05 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Add testcase for MS-REGISTRATION ENQUIRY
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22245 ) Change subject: gbproxy: Add testcase for MS-REGISTRATION ENQUIRY .. gbproxy: Add testcase for MS-REGISTRATION ENQUIRY The test case fails with current master, as osmo-gbproxy doesn't handle this yet. Change-Id: I158dfa729315a9678a7fbb33ed465b73dfc9ec4b --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 15 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified daniel: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index ad95bff..dc5756c 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -2565,7 +2565,21 @@ f_cleanup(); } +/*** + * MS-REGISTRATION ENQUIRY procedure + ***/ +private function f_TC_ms_reg_enq(charstring id) runs on BSSGP_ConnHdlr +{ + f_pcu2sgsn(ts_BSSGP_MS_REG_ENQ(g_pars.imsi), tr_BSSGP_MS_REG_ENQ(g_pars.imsi), use_sig := true); + f_sgsn2pcu(ts_BSSGP_MS_REW_ENQ_RESP(g_pars.imsi, omit), tr_BSSGP_MS_REW_ENQ_RESP(g_pars.imsi, omit), use_sig := true); +} +testcase TC_ms_reg_enq() runs on test_CT +{ + f_init(); + f_start_handlers(refers(f_TC_ms_reg_enq), testcasename(), 22); + f_cleanup(); +} control { execute( TC_BVC_bringup() ); @@ -2638,6 +2652,7 @@ execute( TC_flush_ll() ); execute( TC_fc_bvc() ); execute( TC_fc_ms() ); + execute( TC_ms_reg_enq() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22245 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: I158dfa729315a9678a7fbb33ed465b73dfc9ec4b Gerrit-Change-Number: 22245 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-ttcn3-hacks[master]: gbproxy: Add test case for PAGING-PS-REJECT
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22243 ) Change subject: gbproxy: Add test case for PAGING-PS-REJECT .. gbproxy: Add test case for PAGING-PS-REJECT The test fail with current osmo-gbproxy master, as the related implementation is missing. Related: OS#4951 Change-Id: I19a36dfef8f33f278a54b938a5daccce08de6fe0 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 93 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified daniel: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 0513c02..0767331 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -1468,6 +1468,26 @@ f_cleanup(); } +/* Rejected PS-PAGING on PTP-BVC for BVCI (one cell) */ +testcase TC_paging_ps_reject_ptp_bvci() runs on test_CT { + f_init(); + f_start_handlers(refers(f_TC_paging_ps_reject_ptp_bvci), testcasename(), 16); + f_cleanup(); +} + +/* Rejected PS-PAGING on PTP-BVC for BVCI (one cell) using IMSI only (no P-TMSI allocated) */ +private function f_TC_paging_ps_reject_ptp_bvci(charstring id) runs on BSSGP_ConnHdlr +{ + /* first send the PS-PAGING from SGSN -> PCU */ + f_send_paging_ps_exp_one_bss(ts_BssgpP4Bvci(pcu_bvc_cfg[0].bvci), 0, false, 0); + /* then simulate the PS-PAGING-REJECT from the PCU */ + f_send_paging_ps_rej(use_sig:=false); +} +testcase TC_paging_ps_reject_ptp_bvci_imsi() runs on test_CT { + f_init(); + f_start_handlers(refers(f_TC_paging_ps_reject_ptp_bvci), testcasename(), 16, have_ptmsi:=false); + f_cleanup(); +} /* PS-PAGING on PTP-BVC for unknown BVCI */ private function f_TC_paging_ps_ptp_bvci_unknown(charstring id) runs on BSSGP_ConnHdlr @@ -1536,6 +1556,53 @@ setverdict(pass); } +/* Send PAGING-PS-REJECT on SIG BVC, expect it to arrive on the "right" SGSN */ +private function f_send_paging_ps_rej(boolean use_sig := true, integer pcu_idx := 0) runs on BSSGP_ConnHdlr +{ + var template (value) PDU_BSSGP pdu_tx; + var template (present) PDU_BSSGP exp_rx; + var PDU_BSSGP pdu_rx; + timer T := 5.0; + var template (omit) GsmTmsi tmsi_int := omit; + + if (ispresent(g_pars.p_tmsi)) { + tmsi_int := oct2int(g_pars.p_tmsi); + } + + pdu_tx := ts_BSSGP_PAGING_PS_REJ(g_pars.imsi, 23, 42, tmsi_int); + exp_rx := tr_BSSGP_PAGING_PS_REJ(g_pars.imsi, 23, 42, tmsi_int); + + if (use_sig) { + PCU_SIG[pcu_idx].send(pdu_tx); + } else { + PCU_PTP[pcu_idx].send(pdu_tx); + } + T.start; + alt { + [use_sig] SGSN_SIG[g_pars.sgsn_idx].receive(exp_rx) -> value pdu_rx { + setverdict(pass); + } + [use_sig] SGSN_SIG[g_pars.sgsn_idx].receive { + setverdict(fail, "Unexpected PDU on SGSN"); + } + [use_sig] any from SGSN_SIG.receive(exp_rx) -> value pdu_rx { + setverdict(fail, "PAGING-PS-REJECT arrived on wrong SGSN"); + } + [not use_sig] SGSN_PTP[g_pars.sgsn_idx].receive(exp_rx) -> value pdu_rx { + setverdict(pass); + } + [not use_sig] SGSN_PTP[g_pars.sgsn_idx].receive { + setverdict(fail, "Unexpected PDU on SGSN"); + } + [not use_sig] any from SGSN_PTP.receive(exp_rx) -> value pdu_rx { + setverdict(fail, "PAGING-PS-REJECT arrived on wrong SGSN"); + } + [] T.timeout { + setverdict(fail, "Timeout waiting for PAGING-PS-REJECT"); + } + } +} + /* PS-PAGING on SIG-BVC for BSS Area */ private function f_TC_paging_ps_sig_bss(charstring id) runs on BSSGP_ConnHdlr { @@ -1635,6 +1702,28 @@ f_cleanup(); } +/* Rejected PS-PAGING on SIG-BVC for BVCI (one cell) */ +private function f_TC_paging_ps_reject_sig_bvci(charstring id) runs on BSSGP_ConnHdlr +{ + /* first send the PS-PAGING from SGSN -> PCU */ + f_send_paging_ps_exp_multi(ts_BssgpP4Bvci(pcu_bvc_cfg[0].bvci), 0, {0}); + /* then simulate the PS-PAGING-REJECT from the PCU */ + f_send_paging_ps_rej(use_sig:=true); + +} +testcase TC_paging_ps_reject_sig_bvci() runs on test_CT { + f_init(); + f_start_handlers(refers(f_TC_paging_ps_reject_sig_bvci), testcasename(), 16); + f_cleanup(); +} + +/* Rejected PS-PAGING on SIG-BVC for BVCI (one cell) using IMSI only (no P-TMSI allocated) */ +testcase TC_paging_ps_reject_sig_bvci_imsi() runs on test_CT { + f_init(); + f_start_handlers(refers(f_TC_paging_ps_reject_sig_bvci), testcasename(), 16, have_ptmsi:=false); + f_cleanup(); +} + /* PS-PAGING on SIG-BVC for unknown BVCI */ private function f_TC_paging_ps_sig_bvci_unknown(charstring id) runs on BSSGP_ConnHdlr { @@ -2482,6
Change in osmo-ttcn3-hacks[master]: gbproxy: Test cases for DUMMY-PAGING-PS
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22244 ) Change subject: gbproxy: Test cases for DUMMY-PAGING-PS .. gbproxy: Test cases for DUMMY-PAGING-PS The test case fails with current master, as osmo-gbproxy doesn't handle this yet. Change-Id: Ie67f36502d18e9a62373973b09e758a7d0d0f3a5 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 30 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified daniel: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 0767331..ad95bff 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -1501,6 +1501,20 @@ f_cleanup(); } +/* DUMMY PAGING PS on PTP BVC */ +private function f_TC_dummy_paging_ps_ptp(charstring id) runs on BSSGP_ConnHdlr +{ + f_sgsn2pcu(ts_BSSGP_DUMMY_PAGING_PS(g_pars.imsi, omit), + tr_BSSGP_DUMMY_PAGING_PS(g_pars.imsi, omit), use_sig := false); + f_pcu2sgsn(ts_BSSGP_DUMMY_PAGING_PS_RESP(g_pars.imsi, 1, 5), + tr_BSSGP_DUMMY_PAGING_PS_RESP(g_pars.imsi, 1, 5), use_sig := false) +} +testcase TC_dummy_paging_ps_ptp() runs on test_CT { + f_init(); + f_start_handlers(refers(f_TC_dummy_paging_ps_ptp), testcasename(), 11); + f_cleanup(); +} + /* altstep for expecting BSSGP PDU on signaling BVC of given pcu_idx + storing in 'roi' */ private altstep as_paging_sig_pcu(integer pcu_idx, template (present) PDU_BSSGP exp_rx, inout ro_integer roi) runs on BSSGP_ConnHdlr { @@ -1735,6 +1749,20 @@ f_cleanup(); } +/* DUMMY PAGING PS on SIG BVC */ +private function f_TC_dummy_paging_ps_sig(charstring id) runs on BSSGP_ConnHdlr +{ + f_sgsn2pcu(ts_BSSGP_DUMMY_PAGING_PS(g_pars.imsi, omit), + tr_BSSGP_DUMMY_PAGING_PS(g_pars.imsi, omit), use_sig := true); + f_pcu2sgsn(ts_BSSGP_DUMMY_PAGING_PS_RESP(g_pars.imsi, 1, 5), + tr_BSSGP_DUMMY_PAGING_PS_RESP(g_pars.imsi, 1, 5), use_sig := true) +} +testcase TC_dummy_paging_ps_sig() runs on test_CT { + f_init(); + f_start_handlers(refers(f_TC_dummy_paging_ps_sig), testcasename(), 11); + f_cleanup(); +} + /*** @@ -2573,6 +2601,7 @@ execute( TC_paging_ps_ptp_bvci_unknown() ); execute( TC_paging_ps_reject_ptp_bvci() ); execute( TC_paging_ps_reject_ptp_bvci_imsi() ); + execute( TC_dummy_paging_ps_ptp() ); /* PAGING-PS over SIG BVC */ execute( TC_paging_ps_sig_bss() ); @@ -2585,6 +2614,7 @@ execute( TC_paging_ps_sig_bvci_unknown() ); execute( TC_paging_ps_reject_sig_bvci() ); execute( TC_paging_ps_reject_sig_bvci_imsi() ); + execute( TC_dummy_paging_ps_sig() ); /* PAGING-CS over PTP BVC */ execute( TC_paging_cs_ptp_bss() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22244 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: Ie67f36502d18e9a62373973b09e758a7d0d0f3a5 Gerrit-Change-Number: 22244 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-ttcn3-hacks[master]: Osmocom_Gb_Types: Add templates for various BSSGP PDU types
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242 ) Change subject: Osmocom_Gb_Types: Add templates for various BSSGP PDU types .. Osmocom_Gb_Types: Add templates for various BSSGP PDU types Related: OS#4951 Change-Id: I89044bf8e736cc1997dff1a550b3e194f8ac1b9d --- M library/Osmocom_Gb_Types.ttcn 1 file changed, 204 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn index 9054785..b82ca32 100644 --- a/library/Osmocom_Gb_Types.ttcn +++ b/library/Osmocom_Gb_Types.ttcn @@ -946,6 +946,24 @@ lengthIndicator := { length1 := 4 }, tMSI_Value := int2oct(tmsi, 4) } + private function f_ts_BSSGP_TMSI(template (omit) GsmTmsi tmsi) return template (omit) TMSI_BSSGP { + if (istemplatekind(tmsi, "omit")) { + return omit; + } else { + return ts_BSSGP_TMSI(valueof(tmsi)); + } + } + private function f_tr_BSSGP_TMSI(template GsmTmsi tmsi) return template TMSI_BSSGP { + if (istemplatekind(tmsi, "omit")) { + return omit; + } else if (istemplatekind(tmsi, "*")) { + return *; + } else if (istemplatekind(tmsi, "?")) { + return ?; + } else { + return tr_BSSGP_TMSI(valueof(tmsi)); + } + } function f_bssgp_length_ind(integer len) return LIN2_2a { var LIN2_2a ret; @@ -1828,6 +1846,28 @@ rac := int2oct(input.rac, 1) } + private function f_ts_BSSGP_RA_ID(template (omit) GSM_Types.RoutingAreaIdentification input) + return template (omit) Routeing_Area { + if (istemplatekind(input, "omit")) { + return omit; + } else { + return ts_BSSGP_RA_ID(valueof(input)); + } + } + + private function f_tr_BSSGP_RA_ID(template GSM_Types.RoutingAreaIdentification input) + return template Routeing_Area { + if (istemplatekind(input, "omit")) { + return omit; + } else if (istemplatekind(input, "*")) { + return *; + } else if (istemplatekind(input, "?")) { + return ?; + } else { + return ts_BSSGP_RA_ID(valueof(input)); + } + } + /* 10.3.6 */ template (value) PDU_BSSGP ts_BSSGP_SUSPEND(GprsTlli tlli, RoutingAreaIdentification ra_id) := { pDU_BSSGP_SUSPEND := { @@ -1944,6 +1984,170 @@ } } + /* 10.3.12 */ + template (value) PDU_BSSGP ts_BSSGP_DUMMY_PAGING_PS(hexstring imsi, + template (omit) RoutingAreaIdentification ra) := { + pDU_BSSGP_DUMMY_PAGING_PS := { + bssgpPduType := '12'O, + iMSI := ts_BSSGP_IMSI(imsi), + routeing_Area := f_ts_BSSGP_RA_ID(ra), + eDRX_Paremeters := omit + } + } + template (present) PDU_BSSGP tr_BSSGP_DUMMY_PAGING_PS(hexstring imsi, + template RoutingAreaIdentification ra) := { + pDU_BSSGP_DUMMY_PAGING_PS := { + bssgpPduType := '12'O, + iMSI := tr_BSSGP_IMSI(imsi), + routeing_Area := f_tr_BSSGP_RA_ID(ra), + eDRX_Paremeters := omit + } + } + + template (value) Time_Until_Next_Paging_Occasion ts_TimeNextPag(uint8_t mins, uint8_t secs) := { + iEI := '93'O, + ext := '1'B, + lengthIndicator := { + length1 := 2 + }, + minutes := mins, + spare := '00'B, + seconds := secs, + spare2 := '00'B + } + template (present) Time_Until_Next_Paging_Occasion tr_TimeNextPag(template (present) uint8_t mins, + template (present) uint8_t secs) := { + iEI := '93'O, + ext := '1'B, + lengthIndicator := { + length1 := 2 + }, + minutes := mins, + spare := ?, + seconds := secs, + spare2 := ? + } + + /* 10.3.13 */ + template (value) PDU_BSSGP ts_BSSGP_DUMMY_PAGING_PS_RESP(hexstring imsi, uint8_t mins, uint8_t secs) := { + pDU_BSSGP_DUMMY_PAGING_PS_RESPONSE := { +
Change in osmo-ttcn3-hacks[master]: Osmocom_Gb_Types: Add 3GPP spec chapters; unify formatting
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22241 ) Change subject: Osmocom_Gb_Types: Add 3GPP spec chapters; unify formatting .. Osmocom_Gb_Types: Add 3GPP spec chapters; unify formatting Change-Id: I9c3e5458ba7637a1e85f7bb3b32e16a90fad7bc5 --- M library/Osmocom_Gb_Types.ttcn 1 file changed, 21 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified daniel: Looks good to me, approved diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn index 8ca0cd5..9054785 100644 --- a/library/Osmocom_Gb_Types.ttcn +++ b/library/Osmocom_Gb_Types.ttcn @@ -1076,7 +1076,7 @@ rA_CAP_UPD_Cause_value := cause } - + /* 10.4.12 */ template PDU_BSSGP ts_BVC_RESET(BssgpCause cause, BssgpBvci bvci, template BssgpCellId cell_id) := { pDU_BSSGP_BVC_RESET := { @@ -1088,7 +1088,6 @@ extended_Feature_Bitmap := omit } } - template PDU_BSSGP tr_BVC_RESET(template BssgpCause cause, template BssgpBvci bvci, template BssgpCellId cell_id) := { pDU_BSSGP_BVC_RESET := { @@ -1101,6 +1100,7 @@ } } + /* 10.4.13 */ template PDU_BSSGP ts_BVC_RESET_ACK(BssgpBvci bvci, template BssgpCellId cell_id) := { pDU_BSSGP_BVC_RESET_ACK := { bssgpPduType := '23'O, @@ -1110,7 +1110,6 @@ extended_Feature_Bitmap := omit } } - template PDU_BSSGP tr_BVC_RESET_ACK(template BssgpBvci bvci, template BssgpCellId cell_id) := { pDU_BSSGP_BVC_RESET_ACK := { bssgpPduType := '23'O, @@ -1122,6 +1121,7 @@ } + /* 10.4.10 */ template PDU_BSSGP t_BVC_UNBLOCK(template BssgpBvci bvci) := { pDU_BSSGP_BVC_UNBLOCK := { bssgpPduType := '24'O, @@ -1129,6 +1129,7 @@ } } + /* 10.4.11 */ template PDU_BSSGP t_BVC_UNBLOCK_ACK(template BssgpBvci bvci) := { pDU_BSSGP_BVC_UNBLOCK_ACK := { bssgpPduType := '25'O, @@ -1136,6 +1137,7 @@ } } + /* 10.4.8 */ template PDU_BSSGP t_BVC_BLOCK(template BssgpBvci bvci, template BssgpCause cause) := { pDU_BSSGP_BVC_BLOCK := { bssgpPduType := '20'O, @@ -1144,6 +1146,7 @@ } } + /* 10.4.9 */ template PDU_BSSGP t_BVC_BLOCK_ACK(template BssgpBvci bvci) := { pDU_BSSGP_BVC_BLOCK_ACK := { bssgpPduType := '21'O, @@ -1151,6 +1154,7 @@ } } + /* 10.4.4 */ template PDU_BSSGP t_BVC_FC_BVC(uint16_t bmax, uint16_t bucket_leak_rate, uint16_t bmax_default_ms, uint16_t r_default_ms, OCT1 tag) := { pDU_BSSGP_FLOW_CONTROL_BVC := { @@ -1253,6 +1257,7 @@ } } + /* 10.4.5 */ template PDU_BSSGP t_BVC_FC_BVC_ACK(template OCT1 tag) := { pDU_BSSGP_FLOW_CONTROL_BVC_ACK := { bssgpPduType := '27'O, @@ -1267,6 +1272,7 @@ } } + /* 10.4.6 */ template (value) PDU_BSSGP ts_BVC_FC_MS(GprsTlli tlli, uint16_t bmax, uint16_t bucket_leak_rate, OCT1 tag) := { pDU_BSSGP_FLOW_CONTROL_MS := { @@ -1336,6 +1342,7 @@ } } + /* 10.4.7 */ template (value) PDU_BSSGP ts_BVC_FC_MS_ACK(template (value) GprsTlli tlli, template (value) OCT1 tag) := { @@ -1369,6 +1376,7 @@ } } + /* 10.4.14 */ template PDU_BSSGP ts_BSSGP_STATUS(template BssgpBvci bvci, template BssgpCause cause, PDU_BSSGP pdu) := { pDU_BSSGP_STATUS := { @@ -1385,7 +1393,6 @@ } } } - template PDU_BSSGP tr_BSSGP_STATUS(template BVCI bvci := ?, template BssgpCause cause := ?, template octetstring pdu := ?) := { pDU_BSSGP_STATUS := { @@ -1571,6 +1578,7 @@ } } + /* 10.2.1 */ template PDU_BSSGP ts_BSSGP_DL_UD(GprsTlli tlli, octetstring pdu, template (omit) MSRadioAccessCapabilityV_BSSGP racap := omit, template (omit) IMSI_BSSGP imsi := omit) := { @@ -1602,7 +1610,6 @@ initialLLC_PDU := omit } } - template PDU_BSSGP tr_BSSGP_DL_UD(template (present) GprsTlli tlli, template
Change in osmo-ttcn3-hacks[master]: gbproxy: Test PS-PAGING by IMSI (without P-TMSI)
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22240 ) Change subject: gbproxy: Test PS-PAGING by IMSI (without P-TMSI) .. gbproxy: Test PS-PAGING by IMSI (without P-TMSI) Related: OS#4951 Change-Id: I1bdc09712790d4b69df147ed9c7bea15c48e8dea --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 18 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved daniel: Looks good to me, but someone else must approve diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index f1e8749..0513c02 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -1460,6 +1460,15 @@ f_cleanup(); } + +/* PS-PAGING on PTP-BVC for BVCI (one cell) using IMSI only (no P-TMSI allocated) */ +testcase TC_paging_ps_ptp_bvci_imsi() runs on test_CT { + f_init(); + f_start_handlers(refers(f_TC_paging_ps_ptp_bvci), testcasename(), 12, have_ptmsi:=false); + f_cleanup(); +} + + /* PS-PAGING on PTP-BVC for unknown BVCI */ private function f_TC_paging_ps_ptp_bvci_unknown(charstring id) runs on BSSGP_ConnHdlr { @@ -1619,6 +1628,13 @@ f_cleanup(); } +/* PS-PAGING on SIG-BVC for BVCI (one cell) using IMSI only (no P-TMSI allocated) */ +testcase TC_paging_ps_sig_bvci_imsi() runs on test_CT { + f_init(); + f_start_handlers(refers(f_TC_paging_ps_sig_bvci), testcasename(), 16, have_ptmsi:=false); + f_cleanup(); +} + /* PS-PAGING on SIG-BVC for unknown BVCI */ private function f_TC_paging_ps_sig_bvci_unknown(charstring id) runs on BSSGP_ConnHdlr { @@ -2464,6 +2480,7 @@ execute( TC_paging_ps_ptp_rac() ); execute( TC_paging_ps_ptp_rac_unknown() ); execute( TC_paging_ps_ptp_bvci() ); + execute( TC_paging_ps_ptp_bvci_imsi() ); execute( TC_paging_ps_ptp_bvci_unknown() ); /* PAGING-PS over SIG BVC */ @@ -2473,6 +2490,7 @@ execute( TC_paging_ps_sig_rac() ); execute( TC_paging_ps_sig_rac_unknown() ); execute( TC_paging_ps_sig_bvci() ); + execute( TC_paging_ps_sig_bvci_imsi() ); execute( TC_paging_ps_sig_bvci_unknown() ); /* PAGING-CS over PTP BVC */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22240 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: I1bdc09712790d4b69df147ed9c7bea15c48e8dea Gerrit-Change-Number: 22240 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-MessageType: merged
Change in osmo-ttcn3-hacks[master]: Osmocom_Gb_Types: Add templates for various BSSGP PDU types
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242 ) Change subject: Osmocom_Gb_Types: Add templates for various BSSGP PDU types .. Patch Set 3: Code-Review+2 (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242/2/library/Osmocom_Gb_Types.ttcn File library/Osmocom_Gb_Types.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242/2/library/Osmocom_Gb_Types.ttcn@2097 PS2, Line 2097: mncDigit3 := mccmnc[5], > PLMN_Identity is a 'record', and I don't think you are permitted to re-order > the initialization of f […] Osmocom_Gb_Types.ttcn:2099.3-24: error: Field `mncDigit3' cannot appear after field `mncDigit2' in a template for record type `@BSSGP_Types.PLMN_Identity' -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242 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: I89044bf8e736cc1997dff1a550b3e194f8ac1b9d Gerrit-Change-Number: 22242 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 16 Jan 2021 22:06:14 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: laforge Comment-In-Reply-To: daniel Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Allow creating ConnHdlr without a P-TMSI
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22239 ) Change subject: gbproxy: Allow creating ConnHdlr without a P-TMSI .. gbproxy: Allow creating ConnHdlr without a P-TMSI This will be useful for testing paging cases where no P-TMSI is allocated. Change-Id: Icd780c750c77e723e545ed5a5b52ef26e442b4f2 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 10 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified daniel: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 6141f6a..f1e8749 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -1,6 +1,7 @@ module GBProxy_Tests { /* Osmocom GBProxy test suite in TTCN-3 + * (C) 2020-2021 Harald Welte * (C) 2020 sysmocom - s.f.m.c. GmbH * All rights reserved. * @@ -601,8 +602,8 @@ type function void_fn(charstring id) runs on BSSGP_ConnHdlr; /* helper function to create, connect and start a BSSGP_ConnHdlr component */ -function f_start_handler(void_fn fn, charstring id, integer imsi_suffix, -float t_guard := 30.0, integer sgsn_idx := 0, integer nri_idx := 0) +function f_start_handler(void_fn fn, charstring id, integer imsi_suffix, float t_guard := 30.0, +integer sgsn_idx := 0, integer nri_idx := 0, boolean have_ptmsi := true) runs on test_CT return BSSGP_ConnHdlr { var BSSGP_ConnHdlr vc_conn; var integer nri := mp_sgsn_nri[sgsn_idx][nri_idx]; @@ -622,6 +623,9 @@ sgsn_idx := sgsn_idx, t_guard := t_guard }; + if (not have_ptmsi) { + pars.p_tmsi := omit; + } vc_conn := BSSGP_ConnHdlr.create(id); @@ -629,7 +633,8 @@ return vc_conn; } -function f_start_handlers(void_fn fn, charstring id, integer imsi_suffix, float t_guard := 30.0) +function f_start_handlers(void_fn fn, charstring id, integer imsi_suffix, float t_guard := 30.0, + boolean have_ptmsi := true) runs on test_CT { var integer sgsn_idx, nri_idx; @@ -637,8 +642,8 @@ for (nri_idx := 0; nri_idx < lengthof(mp_sgsn_nri[sgsn_idx]); nri_idx:=nri_idx+1) { var integer extd_imsi_suffix := 1000*sgsn_idx + 100*nri_idx; var BSSGP_ConnHdlr vc_conn; - vc_conn := f_start_handler(fn, id, extd_imsi_suffix, t_guard, - sgsn_idx, nri_idx); + vc_conn := f_start_handler(fn, id, extd_imsi_suffix, t_guard, sgsn_idx, nri_idx, + have_ptmsi); /* Idea: we could also run them in parallel ? */ vc_conn.done; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22239 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: Icd780c750c77e723e545ed5a5b52ef26e442b4f2 Gerrit-Change-Number: 22239 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-ttcn3-hacks[master]: gbproxy: Unregister IMSI from BSSGP before termination of ConnHdlr
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22238 ) Change subject: gbproxy: Unregister IMSI from BSSGP before termination of ConnHdlr .. gbproxy: Unregister IMSI from BSSGP before termination of ConnHdlr Otherwise we may run into problems where the BSSGP_Emulation still has references to longer existing components in its ClientTable. Change-Id: Iee54e93e6ae1b3e40f502d5ba2499e9eb03bf203 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved daniel: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index caf4c66..6141f6a 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -713,6 +713,18 @@ /* call the user-supplied test case function */ fn.apply(id); + + for (i := 0; i < NUM_SGSN; i := i+1) { + if (SGSN_PROC[i].checkstate("Connected")) { + f_client_unregister(g_pars.imsi, SGSN_PROC[i]) + } + } + + for (i := 0; i < NUM_PCU; i := i+1) { + if (PCU_PROC[i].checkstate("Connected")) { + f_client_unregister(g_pars.imsi, PCU_PROC[i]) + } + } } private function f_client_register(hexstring imsi, OCT4 tlli, BSSGP_PROC_PT PT) -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22238 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: Iee54e93e6ae1b3e40f502d5ba2499e9eb03bf203 Gerrit-Change-Number: 22238 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-MessageType: merged
Change in osmo-ttcn3-hacks[master]: gbproxy: Don't pass global (component) variables as function arguments
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22237 ) Change subject: gbproxy: Don't pass global (component) variables as function arguments .. gbproxy: Don't pass global (component) variables as function arguments The point of global (component) variables is that we don't have to pass them around as extra function arguments everywhere. So don't do it. Change-Id: I0754d5db7e797a51be3a0b601b0533de80bc246d --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 43 insertions(+), 44 deletions(-) Approvals: Jenkins Builder: Verified daniel: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index f0175c2..caf4c66 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -601,7 +601,7 @@ type function void_fn(charstring id) runs on BSSGP_ConnHdlr; /* helper function to create, connect and start a BSSGP_ConnHdlr component */ -function f_start_handler(void_fn fn, charstring id, GbInstances pcu, GbInstances sgsn, integer imsi_suffix, +function f_start_handler(void_fn fn, charstring id, integer imsi_suffix, float t_guard := 30.0, integer sgsn_idx := 0, integer nri_idx := 0) runs on test_CT return BSSGP_ConnHdlr { var BSSGP_ConnHdlr vc_conn; @@ -617,8 +617,8 @@ tlli := f_gprs_tlli_from_tmsi(p_tmsi, TLLI_LOCAL), tlli_old := omit, ra := omit, - pcu := pcu, - sgsn := sgsn, + pcu := g_pcu, + sgsn := g_sgsn, sgsn_idx := sgsn_idx, t_guard := t_guard }; @@ -629,8 +629,7 @@ return vc_conn; } -function f_start_handlers(void_fn fn, charstring id, GbInstances pcu, GbInstances sgsn, - integer imsi_suffix, float t_guard := 30.0) +function f_start_handlers(void_fn fn, charstring id, integer imsi_suffix, float t_guard := 30.0) runs on test_CT { var integer sgsn_idx, nri_idx; @@ -638,7 +637,7 @@ for (nri_idx := 0; nri_idx < lengthof(mp_sgsn_nri[sgsn_idx]); nri_idx:=nri_idx+1) { var integer extd_imsi_suffix := 1000*sgsn_idx + 100*nri_idx; var BSSGP_ConnHdlr vc_conn; - vc_conn := f_start_handler(fn, id, pcu, sgsn, extd_imsi_suffix, t_guard, + vc_conn := f_start_handler(fn, id, extd_imsi_suffix, t_guard, sgsn_idx, nri_idx); /* Idea: we could also run them in parallel ? */ vc_conn.done; @@ -901,7 +900,7 @@ testcase TC_BVC_bringup() runs on test_CT { f_init(); - f_start_handlers(refers(f_TC_BVC_bringup), testcasename(), g_pcu, g_sgsn, 51); + f_start_handlers(refers(f_TC_BVC_bringup), testcasename(), 51); f_cleanup(); } @@ -967,7 +966,7 @@ testcase TC_ul_unitdata() runs on test_CT { f_init(); - f_start_handlers(refers(f_TC_ul_unitdata), testcasename(), g_pcu, g_sgsn, 1); + f_start_handlers(refers(f_TC_ul_unitdata), testcasename(), 1); /* TODO: start multiple handlers (UEs) on various cells on same and other NSEs */ f_cleanup(); } @@ -993,7 +992,7 @@ testcase TC_dl_unitdata() runs on test_CT { f_init(); - f_start_handlers(refers(f_TC_dl_unitdata), testcasename(), g_pcu, g_sgsn, 2); + f_start_handlers(refers(f_TC_dl_unitdata), testcasename(), 2); /* TODO: start multiple handlers (UEs) on various cells on same and other NSEs */ f_cleanup(); } @@ -1013,7 +1012,7 @@ testcase TC_ra_capability() runs on test_CT { f_init(); - f_start_handlers(refers(f_TC_ra_capability), testcasename(), g_pcu, g_sgsn, 3); + f_start_handlers(refers(f_TC_ra_capability), testcasename(), 3); /* TODO: start multiple handlers (UEs) on various cells on same and other NSEs */ f_cleanup(); } @@ -1040,7 +1039,7 @@ testcase TC_ra_capability_upd() runs on test_CT { f_init(); - f_start_handlers(refers(f_TC_ra_capability_upd), testcasename(), g_pcu, g_sgsn, 4); + f_start_handlers(refers(f_TC_ra_capability_upd), testcasename(), 4); /* TODO: start multiple handlers (UEs) on various cells on same and other NSEs */ f_cleanup(); } @@ -1060,7 +1059,7 @@ testcase TC_radio_status() runs on test_CT { f_init(); - f_start_handlers(refers(f_TC_radio_status), testcasename(), g_pcu, g_sgsn, 5); + f_start_handlers(refers(f_TC_radio_status), testcasename(), 5); /* TODO: start multiple handlers (UEs) on various cells on same and other NSEs */ f_cleanup(); } @@ -1198,7 +1197,7 @@ /* start parallel components generating DL-UNITDATA from the SGSN side */ for (var integer i:= 0; i <
Change in osmo-ttcn3-hacks[master]: WIP: multiple sgsn-side NS-VCs
laforge has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21697 ) Change subject: WIP: multiple sgsn-side NS-VCs .. Abandoned superseded by master. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21697 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: I088276578643cc5a52d0e00d16ec23cf7ab8cd8a Gerrit-Change-Number: 21697 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: abandon
Change in osmo-ttcn3-hacks[master]: gbproxy: Execute TC_load_sharing_dl() for each SGSN in pool
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22236 ) Change subject: gbproxy: Execute TC_load_sharing_dl() for each SGSN in pool .. gbproxy: Execute TC_load_sharing_dl() for each SGSN in pool Change-Id: I4ad822d3bbf5eb6181f6811c3b2267a50bb533a4 Related: OS#4951 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 14 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 4b7d246..f0175c2 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -1177,16 +1177,15 @@ var octetstring payload := f_rnd_octstring(i); var template (value) PDU_BSSGP pdu_tx := ts_BSSGP_DL_UD(g_pars.tlli, payload, omit, ts_BSSGP_IMSI(g_pars.imsi)); - SGSN_PTP[0].send(pdu_tx); + SGSN_PTP[g_pars.sgsn_idx].send(pdu_tx); } setverdict(pass); } -testcase TC_load_sharing_dl() runs on test_CT_NS + +private function f_TC_load_sharing_dl(integer sgsn_idx) runs on test_CT_NS { const integer num_ue := 10; var BSSGP_ConnHdlr vc_conn[num_ue]; - f_init(); - /* all BVC are now fully brought up. We disconnect BSSGP from NS on the BSS * side so we get the raw NsUnitdataIndication and hence observe different * NSVCI */ @@ -1199,7 +1198,8 @@ /* start parallel components generating DL-UNITDATA from the SGSN side */ for (var integer i:= 0; i < num_ue; i := i+1) { - vc_conn[i] := f_start_handler(refers(f_TC_dl_ud_unidir), testcasename(), g_pcu, g_sgsn, 5+i); + vc_conn[i] := f_start_handler(refers(f_TC_dl_ud_unidir), testcasename(), g_pcu, g_sgsn, + 5+i, 30.0, sgsn_idx); } /* now start counting all the messages that were queued before */ @@ -1227,6 +1227,15 @@ setverdict(fail, "Data not shared over all NSVC"); } } +} + +testcase TC_load_sharing_dl() runs on test_CT_NS +{ + var integer sgsn_idx, nri_idx; + f_init(); + for (sgsn_idx:=0; sgsn_idx < NUM_SGSN; sgsn_idx:=sgsn_idx+1) { + f_TC_load_sharing_dl(sgsn_idx); + } setverdict(pass); } private altstep as_NsUdiCount(integer nsvc_idx, inout ro_integer roi) runs on test_CT_NS { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22236 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: I4ad822d3bbf5eb6181f6811c3b2267a50bb533a4 Gerrit-Change-Number: 22236 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-MessageType: merged
Change in osmo-ttcn3-hacks[master]: gbproxy: Execute each ConnHdlr test on each NRI of each SGSN configured
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22233 ) Change subject: gbproxy: Execute each ConnHdlr test on each NRI of each SGSN configured .. gbproxy: Execute each ConnHdlr test on each NRI of each SGSN configured This helps us to get proper test coverage for SGSN pool situations. Change-Id: Ie22d3fd786ff8fefe919ecc3a96f974675057e29 Related: OS#4951 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 66 insertions(+), 191 deletions(-) Approvals: laforge: Looks good to me, approved daniel: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index aa334ec..4b7d246 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -353,6 +353,8 @@ RoutingAreaIdentificationV ra optional, GbInstances pcu, GbInstances sgsn, + /* The SGSN index to be used within the test */ + integer sgsn_idx, float t_guard }; @@ -600,9 +602,10 @@ /* helper function to create, connect and start a BSSGP_ConnHdlr component */ function f_start_handler(void_fn fn, charstring id, GbInstances pcu, GbInstances sgsn, integer imsi_suffix, -float t_guard := 30.0, integer nri := mp_sgsn_nri[0][0]) +float t_guard := 30.0, integer sgsn_idx := 0, integer nri_idx := 0) runs on test_CT return BSSGP_ConnHdlr { var BSSGP_ConnHdlr vc_conn; + var integer nri := mp_sgsn_nri[sgsn_idx][nri_idx]; var OCT4 p_tmsi := f_gen_tmsi(imsi_suffix, nri_v := nri, nri_bitlen := mp_nri_bitlength); var BSSGP_ConnHdlrPars pars := { @@ -616,6 +619,7 @@ ra := omit, pcu := pcu, sgsn := sgsn, + sgsn_idx := sgsn_idx, t_guard := t_guard }; @@ -625,6 +629,23 @@ return vc_conn; } +function f_start_handlers(void_fn fn, charstring id, GbInstances pcu, GbInstances sgsn, + integer imsi_suffix, float t_guard := 30.0) +runs on test_CT +{ + var integer sgsn_idx, nri_idx; + for (sgsn_idx := 0; sgsn_idx < NUM_SGSN; sgsn_idx:=sgsn_idx+1) { + for (nri_idx := 0; nri_idx < lengthof(mp_sgsn_nri[sgsn_idx]); nri_idx:=nri_idx+1) { + var integer extd_imsi_suffix := 1000*sgsn_idx + 100*nri_idx; + var BSSGP_ConnHdlr vc_conn; + vc_conn := f_start_handler(fn, id, pcu, sgsn, extd_imsi_suffix, t_guard, + sgsn_idx, nri_idx); + /* Idea: we could also run them in parallel ? */ + vc_conn.done; + } + } +} + /* Connect the PCU-side per-BVC ports (PCU/PCU_SIG/PCU_PROC) array slot 'port_idx' to specified per-BVC component */ private function f_connect_to_pcu_bvc(integer port_idx, integer nse_idx, integer bvc_idx) runs on BSSGP_ConnHdlr { @@ -711,7 +732,8 @@ /* Send 'tx' on PTP-BVCI from PCU; expect 'rx' on SGSN */ friend function f_pcu2sgsn(template (value) PDU_BSSGP tx, template (present) PDU_BSSGP exp_rx, - integer pcu_idx := 0, integer sgsn_idx := 0, boolean use_sig := false) runs on BSSGP_ConnHdlr { + integer pcu_idx := 0, boolean use_sig := false) runs on BSSGP_ConnHdlr { + var integer sgsn_idx := g_pars.sgsn_idx; var PDU_BSSGP rx; timer T := 1.0; @@ -730,15 +752,15 @@ setverdict(pass); } [] SGSN_PTP[sgsn_idx].receive(PDU_BSSGP:?) -> value rx { - setverdict(fail, "Unexpected BSSGP on SGSN side: ", rx); + setverdict(fail, "Unexpected BSSGP on SGSN[", sgsn_idx, "] side: ", rx); mtc.stop; } [] SGSN_SIG[sgsn_idx].receive(PDU_BSSGP:?) -> value rx { - setverdict(fail, "Unexpected SIG BSSGP on SGSN side: ", rx); + setverdict(fail, "Unexpected SIG BSSGP on SGSN[", sgsn_idx, "] side: ", rx); mtc.stop; } [] T.timeout { - setverdict(fail, "Timeout waiting for BSSGP on SGSN side: ", exp_rx); + setverdict(fail, "Timeout waiting for BSSGP on SGSN[", sgsn_idx, "] side: ", exp_rx); mtc.stop; } } @@ -746,7 +768,8 @@ /* Send 'tx' on PTP-BVCI from SGSN; expect 'rx' on PCU */ friend function f_sgsn2pcu(template (value) PDU_BSSGP tx, template (present) PDU_BSSGP exp_rx, - integer sgsn_idx:= 0, integer pcu_idx := 0, boolean use_sig := false) runs on BSSGP_ConnHdlr { + integer pcu_idx := 0, boolean use_sig := false) runs on BSSGP_ConnHdlr { + var integer sgsn_idx := g_pars.sgsn_idx; var PDU_BSSGP rx; timer T := 1.0; @@ -877,12 +900,8 @@ }
Change in osmo-ttcn3-hacks[master]: gbproxy: Test suspend + resume for each NRI on each SGSN
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22231 ) Change subject: gbproxy: Test suspend + resume for each NRI on each SGSN .. gbproxy: Test suspend + resume for each NRI on each SGSN The test now tests with 10 TLLIs of each configured NRI of each configured SGSN. Change-Id: Iccd649165acd99b3d2d1ecc8fba7015fa27f57ec --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 18 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve daniel: Looks good to me, approved diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index a0e6d1d..aa334ec 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -1096,20 +1096,25 @@ f_global_sgsn2pcu(pdu_tx, pdu_rx, sgsn_idx, pcu_idx); } -private function f_TC_suspend() runs on GlobalTest_CT { +private function f_TC_suspend(integer sgsn_idx, integer nri_idx, integer pcu_idx, integer bvc_idx) +runs on GlobalTest_CT { var integer i; - /* TODO: Generate RA ID for each ConnHdlr */ for (i := 0; i < 10; i := i+1) { - f_suspend_one(sgsn_idx := 0, nri_idx := 0, pcu_idx := 0, bvc_idx := 0, suffix := i); + f_suspend_one(sgsn_idx, nri_idx, pcu_idx, bvc_idx, suffix := i); } setverdict(pass); } testcase TC_suspend() runs on GlobalTest_CT { + var integer sgsn_idx, nri_idx; f_init(); f_global_init(); - f_TC_suspend(); + for (sgsn_idx := 0; sgsn_idx < NUM_SGSN; sgsn_idx := sgsn_idx+1) { + for (nri_idx := 0; nri_idx < lengthof(mp_sgsn_nri[sgsn_idx]); nri_idx := nri_idx+1) { + f_TC_suspend(sgsn_idx, nri_idx, pcu_idx:=0, bvc_idx:=0); + } + } f_cleanup(); } @@ -1143,19 +1148,25 @@ f_global_sgsn2pcu(pdu_tx, pdu_rx, sgsn_idx, pcu_idx); } -private function f_TC_resume() runs on GlobalTest_CT { +private function f_TC_resume(integer sgsn_idx, integer nri_idx, integer pcu_idx, integer bvc_idx) +runs on GlobalTest_CT { var integer i; for (i := 0; i < 10; i := i+1) { - f_resume_one(sgsn_idx := 0, nri_idx := 0, pcu_idx := 0, bvc_idx := 0, suffix := i); + f_resume_one(sgsn_idx, nri_idx, pcu_idx, bvc_idx, suffix := i); } setverdict(pass); } testcase TC_resume() runs on GlobalTest_CT { + var integer sgsn_idx, nri_idx; f_init(); f_global_init(); - f_TC_resume(); + for (sgsn_idx := 0; sgsn_idx < NUM_SGSN; sgsn_idx := sgsn_idx+1) { + for (nri_idx := 0; nri_idx < lengthof(mp_sgsn_nri[sgsn_idx]); nri_idx := nri_idx+1) { + f_TC_resume(sgsn_idx, nri_idx, pcu_idx:=0, bvc_idx:=0); + } + } f_cleanup(); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22231 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: Iccd649165acd99b3d2d1ecc8fba7015fa27f57ec Gerrit-Change-Number: 22231 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-ttcn3-hacks[master]: gbproxy: Use correct NRI in suspend/resume
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22230 ) Change subject: gbproxy: Use correct NRI in suspend/resume .. gbproxy: Use correct NRI in suspend/resume We cannot choose a random TLLI anymore, as this will obviously end up at a random SGSN, and not the one we're targeting. Change-Id: I665eda9e04cbf505f55abc9bcd414d6cbd6a36dd --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 12 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve daniel: Looks good to me, approved diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 6f5b326..a0e6d1d 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -1066,11 +1066,14 @@ f_cleanup(); } -private function f_suspend_one(integer sgsn_idx, integer pcu_idx, integer bvc_idx, integer suffix) +private function f_suspend_one(integer sgsn_idx, integer nri_idx, integer pcu_idx, integer bvc_idx, + integer suffix) runs on GlobalTest_CT { var RoutingAreaIdentification ra_id := g_pcu[pcu_idx].cfg.bvc[bvc_idx].cell_id.ra_id; - var OCT4 tlli := f_gprs_tlli_random(); + var OCT4 p_tmsi := f_gen_tmsi(suffix, nri_v := mp_sgsn_nri[sgsn_idx][nri_idx], + nri_bitlen := mp_nri_bitlength); + var OCT4 tlli := f_gprs_tlli_from_tmsi(p_tmsi, TLLI_LOCAL); var template (value) PDU_BSSGP pdu_tx := ts_BSSGP_SUSPEND(tlli, ra_id); /* we cannot use pdu_tx as there are some subtle differences in the length field :/ */ var template (present) PDU_BSSGP pdu_rx := tr_BSSGP_SUSPEND(tlli, ra_id); @@ -1098,7 +1101,7 @@ /* TODO: Generate RA ID for each ConnHdlr */ for (i := 0; i < 10; i := i+1) { - f_suspend_one(0, 0, 0, i); + f_suspend_one(sgsn_idx := 0, nri_idx := 0, pcu_idx := 0, bvc_idx := 0, suffix := i); } setverdict(pass); } @@ -1110,11 +1113,14 @@ f_cleanup(); } -private function f_resume_one(integer sgsn_idx, integer pcu_idx, integer bvc_idx, integer suffix) +private function f_resume_one(integer sgsn_idx, integer nri_idx, integer pcu_idx, integer bvc_idx, + integer suffix) runs on GlobalTest_CT { var RoutingAreaIdentification ra_id := g_pcu[pcu_idx].cfg.bvc[bvc_idx].cell_id.ra_id; - var OCT4 tlli := f_gprs_tlli_random(); + var OCT4 p_tmsi := f_gen_tmsi(suffix, nri_v := mp_sgsn_nri[sgsn_idx][nri_idx], + nri_bitlen := mp_nri_bitlength); + var OCT4 tlli := f_gprs_tlli_from_tmsi(p_tmsi, TLLI_LOCAL); var template (value) PDU_BSSGP pdu_tx := ts_BSSGP_RESUME(tlli, ra_id, int2oct(suffix, 1)); /* we cannot use pdu_tx as there are some subtle differences in the length field :/ */ var template (present) PDU_BSSGP pdu_rx := tr_BSSGP_RESUME(tlli, ra_id, int2oct(suffix, 1)); @@ -1141,7 +1147,7 @@ var integer i; for (i := 0; i < 10; i := i+1) { - f_resume_one(0, 0, 0, i); + f_resume_one(sgsn_idx := 0, nri_idx := 0, pcu_idx := 0, bvc_idx := 0, suffix := i); } setverdict(pass); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22230 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: I665eda9e04cbf505f55abc9bcd414d6cbd6a36dd Gerrit-Change-Number: 22230 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-ttcn3-hacks[master]: gbproxy: Refactor f_TC_{suspend, resume}
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/9 ) Change subject: gbproxy: Refactor f_TC_{suspend,resume} .. gbproxy: Refactor f_TC_{suspend,resume} Move the entire body inside the loop to a separate function. This will be useful when adding pooling support next. Change-Id: Ia0f9d9128754c2196ab026623f1b6a254a958d2f --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 56 insertions(+), 53 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve daniel: Looks good to me, approved diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 9168fa3..6f5b326 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -1066,37 +1066,39 @@ f_cleanup(); } +private function f_suspend_one(integer sgsn_idx, integer pcu_idx, integer bvc_idx, integer suffix) +runs on GlobalTest_CT +{ + var RoutingAreaIdentification ra_id := g_pcu[pcu_idx].cfg.bvc[bvc_idx].cell_id.ra_id; + var OCT4 tlli := f_gprs_tlli_random(); + var template (value) PDU_BSSGP pdu_tx := ts_BSSGP_SUSPEND(tlli, ra_id); + /* we cannot use pdu_tx as there are some subtle differences in the length field :/ */ + var template (present) PDU_BSSGP pdu_rx := tr_BSSGP_SUSPEND(tlli, ra_id); + f_global_pcu2sgsn(pdu_tx, pdu_rx, pcu_idx, sgsn_idx); + + pdu_tx := ts_BSSGP_SUSPEND_ACK(tlli, ra_id, int2oct(suffix, 1)); + /* we cannot use pdu_tx as there are some subtle differences in the length field :/ */ + pdu_rx := tr_BSSGP_SUSPEND_ACK(tlli, ra_id, int2oct(suffix, 1)); + f_global_sgsn2pcu(pdu_tx, pdu_rx, sgsn_idx, pcu_idx); + + pdu_tx := ts_BSSGP_SUSPEND(tlli, ra_id); + /* we cannot use pdu_tx as there are some subtle differences in the length field :/ */ + pdu_rx := tr_BSSGP_SUSPEND(tlli, ra_id); + f_global_pcu2sgsn(pdu_tx, pdu_rx, pcu_idx, sgsn_idx); + + /* These messages are simple passed through so just also test sending NACK */ + pdu_tx := ts_BSSGP_SUSPEND_NACK(tlli, ra_id, BSSGP_CAUSE_UNKNOWN_MS); + /* we cannot use pdu_tx as there are some subtle differences in the length field :/ */ + pdu_rx := tr_BSSGP_SUSPEND_NACK(tlli, ra_id, BSSGP_CAUSE_UNKNOWN_MS); + f_global_sgsn2pcu(pdu_tx, pdu_rx, sgsn_idx, pcu_idx); +} + private function f_TC_suspend() runs on GlobalTest_CT { var integer i; /* TODO: Generate RA ID for each ConnHdlr */ - var RoutingAreaIdentification ra_id := g_pcu[0].cfg.bvc[0].cell_id.ra_id; for (i := 0; i < 10; i := i+1) { - var OCT4 tlli := f_gprs_tlli_random(); - var template (value) PDU_BSSGP pdu_tx := ts_BSSGP_SUSPEND(tlli, ra_id); - /* we cannot use pdu_tx as there are some subtle differences in the length field :/ */ - var template (present) PDU_BSSGP pdu_rx := tr_BSSGP_SUSPEND(tlli, ra_id); - - f_global_pcu2sgsn(pdu_tx, pdu_rx); - - pdu_tx := ts_BSSGP_SUSPEND_ACK(tlli, ra_id, int2oct(i, 1)); - /* we cannot use pdu_tx as there are some subtle differences in the length field :/ */ - pdu_rx := tr_BSSGP_SUSPEND_ACK(tlli, ra_id, int2oct(i, 1)); - - f_global_sgsn2pcu(pdu_tx, pdu_rx); - - pdu_tx := ts_BSSGP_SUSPEND(tlli, ra_id); - /* we cannot use pdu_tx as there are some subtle differences in the length field :/ */ - pdu_rx := tr_BSSGP_SUSPEND(tlli, ra_id); - - f_global_pcu2sgsn(pdu_tx, pdu_rx); - - /* These messages are simple passed through so just also test sending NACK */ - pdu_tx := ts_BSSGP_SUSPEND_NACK(tlli, ra_id, BSSGP_CAUSE_UNKNOWN_MS); - /* we cannot use pdu_tx as there are some subtle differences in the length field :/ */ - pdu_rx := tr_BSSGP_SUSPEND_NACK(tlli, ra_id, BSSGP_CAUSE_UNKNOWN_MS); - - f_global_sgsn2pcu(pdu_tx, pdu_rx); + f_suspend_one(0, 0, 0, i); } setverdict(pass); } @@ -1108,37 +1110,38 @@ f_cleanup(); } +private function f_resume_one(integer sgsn_idx, integer pcu_idx, integer bvc_idx, integer suffix) +runs on GlobalTest_CT +{ + var RoutingAreaIdentification ra_id := g_pcu[pcu_idx].cfg.bvc[bvc_idx].cell_id.ra_id; + var OCT4 tlli := f_gprs_tlli_random(); + var template (value) PDU_BSSGP pdu_tx := ts_BSSGP_RESUME(tlli, ra_id, int2oct(suffix, 1)); + /* we cannot use pdu_tx as there are some subtle differences in the length field :/ */ + var template (present) PDU_BSSGP pdu_rx := tr_BSSGP_RESUME(tlli, ra_id, int2oct(suffix, 1)); + f_global_pcu2sgsn(pdu_tx, pdu_rx, pcu_idx, sgsn_idx); + + pdu_tx := ts_BSSGP_RESUME_ACK(tlli, ra_id); + /* we cannot use pdu_tx as there are some subtle differences in the length
Change in osmo-ttcn3-hacks[master]: gbproxy: Configure a Second SGSN
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698 ) Change subject: gbproxy: Configure a Second SGSN .. gbproxy: Configure a Second SGSN This adds the required code changes and minimal configuration to both osmo-gbproxy.cfg and GBProxy_Tests to have osmo-gbproxy connect to two SGSNs. No NRI mappings are configured and hence the second SGSN isn't really used for anything except for bringing the NS-VCs and BVCs up. Related: OS#4472, SYS#5002 Change-Id: Ib70f7c1a29f089957f882df0e9b05ee526224611 --- M gbproxy/GBProxy_Tests.cfg M gbproxy/GBProxy_Tests.ttcn M gbproxy/osmo-gbproxy.cfg M gbproxy/osmo-gbproxy.fr.cfg 4 files changed, 83 insertions(+), 21 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/gbproxy/GBProxy_Tests.cfg b/gbproxy/GBProxy_Tests.cfg index 0e442d1..e1e1eff 100644 --- a/gbproxy/GBProxy_Tests.cfg +++ b/gbproxy/GBProxy_Tests.cfg @@ -15,7 +15,10 @@ GBProxy_Tests.mp_nsconfig_sgsn := { { handle_sns := true + }, { + handle_sns := true } + } GBProxy_Tests.mp_nsconfig_pcu := { diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 62daaf4..44b2ac9 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -66,6 +66,24 @@ nsvci := 101 } } + }, { + nsei := 102, + role_sgsn := true, + handle_sns := false, + nsvc := { + { + provider := { + ip := { + address_family := AF_INET, + local_udp_port := , + local_ip := "127.0.0.1", + remote_udp_port := 23000, + remote_ip := "127.0.0.1" + } + }, + nsvci := 102 + } + } } }; /* BSS NSEI start at 2000 + x @@ -263,7 +281,7 @@ type record of NSConfiguration NSConfigurations; type record of BssgpCellId BssgpCellIds; -const integer NUM_SGSN := 1; +const integer NUM_SGSN := 2; type component test_CT { var GbInstances g_pcu; @@ -370,11 +388,14 @@ gb.vc_BSSGP.start(BssgpStart(gb.cfg, bssgp_id)); for (var integer i := 0; i < lengthof(gb.cfg.bvc); i := i + 1) { + /* obtain the component reference of the BSSGP_BVC_CT for each PTP BVC */ connect(self:PROC, gb.vc_BSSGP:PROC); gb.vc_BSSGP_BVC[i] := f_bssgp_get_bvci_ct(gb.cfg.bvc[i].bvci, PROC); disconnect(self:PROC, gb.vc_BSSGP:PROC); + /* connect all of the per-BVC MGMT ports to our PCU_MGMT port (1:N) */ connect(self:PCU_MGMT, gb.vc_BSSGP_BVC[i]:MGMT); } + /* connect all of the BSSGP/NSE global MGMT port to our PCU_MGMT port (1:N) */ connect(self:PCU_MGMT, gb.vc_BSSGP:MGMT); } @@ -390,11 +411,14 @@ gb.vc_BSSGP.start(BssgpStart(gb.cfg, bssgp_id)); for (var integer i := 0; i < lengthof(gb.cfg.bvc); i := i + 1) { + /* obtain the component reference of the BSSGP_BVC_CT for each PTP BVC */ connect(self:PROC, gb.vc_BSSGP:PROC); gb.vc_BSSGP_BVC[i] := f_bssgp_get_bvci_ct(gb.cfg.bvc[i].bvci, PROC); disconnect(self:PROC, gb.vc_BSSGP:PROC); + /* connect all of the per-BVC MGMT ports to our SGSN_MGMT port (1:N) */ connect(self:SGSN_MGMT, gb.vc_BSSGP_BVC[i]:MGMT); } + /* connect all of the BSSGP/NSE global MGMT port to our SGSN_MGMT port (1:N) */ connect(self:SGSN_MGMT, gb.vc_BSSGP:MGMT); } @@ -425,8 +449,25 @@ return false; } +private type record of ro_integer roro_integer; + +/* count the number of unblocked BVCI for each SGSN NSE */ +private altstep as_count_unblocked4nse(integer sgsn_idx, inout roro_integer bvci_unblocked) +runs on test_CT { + var BssgpStatusIndication bsi; + [] SGSN_MGMT.receive(BssgpStatusIndication:{g_sgsn[sgsn_idx].cfg.nsei, ?, BVC_S_UNBLOCKED}) -> value bsi { + bvci_unblocked[sgsn_idx] := bvci_unblocked[sgsn_idx] & { bsi.bvci }; + /* 'repeat' until sufficient number of BVC-rest has been received on all SGSNs */ + for (var integer i := 0; i < lengthof(bvci_unblocked); i := i+1) { + if
Change in osmo-ttcn3-hacks[master]: gbproxy: Move away from random TLLI
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/6 ) Change subject: gbproxy: Move away from random TLLI .. gbproxy: Move away from random TLLI We used to generate a random TLLI for each ConnHldr. Instead, use a deterministic function to generate the P-TMSI (just like we do for the IMSI) and derive a local TLLI from that P-TMSI. Related: OS#4472, SYS#5002 Change-Id: Ic1eaa1d298fe998ca97432769953bfc5a5333ae4 --- M gbproxy/GBProxy_Tests.ttcn M library/Osmocom_Gb_Types.ttcn 2 files changed, 22 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved daniel: Looks good to me, but someone else must approve diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 44b2ac9..6daad53 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -597,14 +597,15 @@ float t_guard := 30.0) runs on test_CT return BSSGP_ConnHdlr { var BSSGP_ConnHdlr vc_conn; + var OCT4 p_tmsi := f_gen_tmsi(imsi_suffix); var BSSGP_ConnHdlrPars pars := { imei := f_gen_imei(imsi_suffix), imsi := f_gen_imsi(imsi_suffix), msisdn := f_gen_msisdn(imsi_suffix), - p_tmsi := omit, + p_tmsi := p_tmsi, p_tmsi_sig := omit, - tlli := f_gprs_tlli_random(), + tlli := f_gprs_tlli_from_tmsi(p_tmsi, TLLI_LOCAL), tlli_old := omit, ra := omit, pcu := g_pcu, diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn index 518d619..8ca0cd5 100644 --- a/library/Osmocom_Gb_Types.ttcn +++ b/library/Osmocom_Gb_Types.ttcn @@ -3252,6 +3252,25 @@ } } + /* build a TLLI of specified type from the given (P)TMSI */ + function f_gprs_tlli_from_tmsi(OCT4 tmsi, TlliType tlli_type) return OCT4 { + var bitstring tmsi_bits := oct2bit(tmsi); + var bitstring prefix; + select (tlli_type) { + case (TLLI_LOCAL) { prefix := '11'B } + case (TLLI_FOREIGN) { prefix := '0'B } + case (TLLI_RANDOM) { prefix := '0110'B } + case (TLLI_RESERVED){ prefix := '010'B } + case (TLLI_G_RNTI) { prefix := ''B } + case (TLLI_RAND_G_RNTI) { prefix := '0001'B } + case else { + setverdict(fail, "Unknonw TLLI Type ", tlli_type); + mtc.stop; + } + } + return bit2oct(prefix & substr(tmsi_bits, lengthof(prefix), 32-lengthof(prefix))); + } + function f_gprs_tlli_random() return OCT4 { var OCT4 tlli := f_rnd_octstring(4); return tlli or4b 'c000'O; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/6 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: Ic1eaa1d298fe998ca97432769953bfc5a5333ae4 Gerrit-Change-Number: 6 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-CC: pespin Gerrit-MessageType: merged
Change in osmo-ttcn3-hacks[master]: gbproxy: Start to allocate NRIs to SGSNs
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/7 ) Change subject: gbproxy: Start to allocate NRIs to SGSNs .. gbproxy: Start to allocate NRIs to SGSNs We change the osmo-gbproxy.cfg to use NRI 3 for SGSN-0 (NSEI 101) and NRI 4 for SGSN-1 (NSEI 102). We also add the capability to GBProxy_Tests to allocate P-TMSI with a specific NRI and default to the first NRI of SGSN-0 so all tests written still for a single-SGSN-non-pool scenario pass without any modification. Related: OS#4472, SYS#5002 Change-Id: I15f78dca5ac31a1c71f086d3e92a70e900eae250 --- M gbproxy/GBProxy_Tests.ttcn M gbproxy/osmo-gbproxy.cfg M gbproxy/osmo-gbproxy.fr.cfg 3 files changed, 16 insertions(+), 4 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 4857515..9168fa3 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -45,6 +45,12 @@ const integer max_fr_info_size := 1600; modulepar { + /* NRI bit-length. 0 for no pooling */ + integer mp_nri_bitlength := 5; + roro_integer mp_sgsn_nri := { + { 3 }, /* list of NRIs of first SGSN */ + { 4 } /* list of NRIs of second SGSN */ + }; boolean mp_enable_bss_load_sharing := false; /* SGSN NS configuration */ NSConfigurations mp_nsconfig_sgsn := { @@ -594,10 +600,10 @@ /* helper function to create, connect and start a BSSGP_ConnHdlr component */ function f_start_handler(void_fn fn, charstring id, GbInstances pcu, GbInstances sgsn, integer imsi_suffix, -float t_guard := 30.0) +float t_guard := 30.0, integer nri := mp_sgsn_nri[0][0]) runs on test_CT return BSSGP_ConnHdlr { var BSSGP_ConnHdlr vc_conn; - var OCT4 p_tmsi := f_gen_tmsi(imsi_suffix); + var OCT4 p_tmsi := f_gen_tmsi(imsi_suffix, nri_v := nri, nri_bitlen := mp_nri_bitlength); var BSSGP_ConnHdlrPars pars := { imei := f_gen_imei(imsi_suffix), @@ -608,8 +614,8 @@ tlli := f_gprs_tlli_from_tmsi(p_tmsi, TLLI_LOCAL), tlli_old := omit, ra := omit, - pcu := g_pcu, - sgsn := g_sgsn, + pcu := pcu, + sgsn := sgsn, t_guard := t_guard }; diff --git a/gbproxy/osmo-gbproxy.cfg b/gbproxy/osmo-gbproxy.cfg index 1c6caa9..5789e3a 100644 --- a/gbproxy/osmo-gbproxy.cfg +++ b/gbproxy/osmo-gbproxy.cfg @@ -6,10 +6,13 @@ no login ! gbproxy + nri bitlen 5 sgsn nsei 101 name first + nri add 3 sgsn nsei 102 name second + nri add 4 ns bind udp local listen 127.0.0.1 23000 diff --git a/gbproxy/osmo-gbproxy.fr.cfg b/gbproxy/osmo-gbproxy.fr.cfg index e350526..11ab84b 100644 --- a/gbproxy/osmo-gbproxy.fr.cfg +++ b/gbproxy/osmo-gbproxy.fr.cfg @@ -49,7 +49,10 @@ nsvc fr hdlcnet7 dlci 22 nsvci 7 nsvc fr hdlcnet8 dlci 23 nsvci 8 gbproxy + nri bitlen 5 sgsn nsei 101 name first + nri add 3 sgsn nsei 102 name second + nri add 4 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/7 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: I15f78dca5ac31a1c71f086d3e92a70e900eae250 Gerrit-Change-Number: 7 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-ttcn3-hacks[master]: Add f_gen_tmsi() to generate a TMSI similar to f_gen_{imsi, imei}()
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/5 ) Change subject: Add f_gen_tmsi() to generate a TMSI similar to f_gen_{imsi,imei}() .. Add f_gen_tmsi() to generate a TMSI similar to f_gen_{imsi,imei}() ... and start to use it from BSC_Tests.ttcn Related: OS#4472, SYS#5002 Change-Id: Iacba62bb740374c28cbcf50d54ba1814c5b4e1c2 --- M bsc/BSC_Tests.ttcn M library/Osmocom_Types.ttcn 2 files changed, 17 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve daniel: Looks good to me, approved diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 2c02e36..52b4906 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -6383,14 +6383,8 @@ * MSC Pooling ***/ -function f_tmsi_nri(integer nri_v, octetstring base_tmsi := '4223'O, integer nri_bitlen := 10) return octetstring -{ - return int2oct( oct2int(base_tmsi) + bit2int( (int2bit(nri_v, 32) << ( 24 - nri_bitlen)) ), - 4); -} - template MobileIdentityLV ts_MI_TMSI_NRI_LV(integer nri_v, integer nri_bitlen := 10) := - ts_MI_TMSI_LV(tmsi := f_tmsi_nri(nri_v, nri_bitlen := nri_bitlen)); + ts_MI_TMSI_LV(tmsi := f_gen_tmsi(suffix := 0, nri_v := nri_v, nri_bitlen := nri_bitlen)); private function f_expect_lchan_rel(RSL_DCHAN_PT rsl) runs on MSC_ConnHdlr { interleave { @@ -6949,7 +6943,7 @@ var RSL_ChanNeeded rsl_chneed := RSL_CHANNEED_SDCCH; var template BSSMAP_IE_ChannelNeeded bssmap_chneed := ts_BSSMAP_IE_ChanNeeded(int2bit(enum2int(valueof(rsl_chneed)),2)); var integer nri_v := 300; /* <-- second MSC's NRI */ - var octetstring tmsi := f_tmsi_nri(nri_v); + var octetstring tmsi := f_gen_tmsi(suffix := 0, nri_v := nri_v); var BSSAP_N_UNITDATA_req paging; f_MscConnHdlr_init(g_pars.media_nr, "127.0.0.2", "127.0.0.3", FR_AMR); diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn index 862509b..1cba168 100644 --- a/library/Osmocom_Types.ttcn +++ b/library/Osmocom_Types.ttcn @@ -267,6 +267,21 @@ return f_concat_pad(12, '49123'H, suffix); } +function f_gen_tmsi(integer suffix, integer nri_v := 0, integer nri_bitlen := 10, + OCT4 base_tmsi := '4223'O) return OCT4 { + var integer tmsi_int := oct2int(base_tmsi) + suffix; + var bitstring base_tmsi_bits := int2bit(tmsi_int, 32); + var bitstring prefix_bits := substr(base_tmsi_bits, 0, 8); + var bitstring suffix_bits := substr(base_tmsi_bits, 8 + nri_bitlen, 24 - nri_bitlen); + var bitstring total_bits := prefix_bits & int2bit(nri_v, nri_bitlen) & suffix_bits; + var OCT4 tmsi := bit2oct(total_bits); + + log("f_gen_tmsi(suffix:=", suffix, ", nri_v:=", nri_v, ", nri_bitlen:=", nri_bitlen, + ", base_tmsi:=", base_tmsi, ") -> prefix:=", prefix_bits, ", suffix:=", suffix_bits, + "total_bits:=", total_bits, " == ", tmsi); + + return tmsi; +} } with { encode "RAW"; variant "FIELDORDER(msb)" } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/5 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: Iacba62bb740374c28cbcf50d54ba1814c5b4e1c2 Gerrit-Change-Number: 5 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-ttcn3-hacks[master]: gbproxy: Fix TC_fc_bvc() with more than one SGSN
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/8 ) Change subject: gbproxy: Fix TC_fc_bvc() with more than one SGSN .. gbproxy: Fix TC_fc_bvc() with more than one SGSN The altstep was missing the "repeat" at the end, causing it to abort early and reporting a test failure which actually didn't exist. Change-Id: I0ec9aa06fa9ec25b2047c1e795e28eeefd6bc7d2 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve daniel: Looks good to me, approved diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 6daad53..4857515 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -2430,6 +2430,7 @@ if (ispresent(tx_reply)) { G_SGSN[sgsn_idx].send(tx_reply); } + repeat; } } /* Send FC-BVC from simulated PCU; expect each SGSN to receive it; expect PCU to receive ACK */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/8 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: I0ec9aa06fa9ec25b2047c1e795e28eeefd6bc7d2 Gerrit-Change-Number: 8 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-ttcn3-hacks[master]: gbproxy: Unregister IMSI from BSSGP before termination of ConnHdlr
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22238 ) Change subject: gbproxy: Unregister IMSI from BSSGP before termination of ConnHdlr .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22238 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: Iee54e93e6ae1b3e40f502d5ba2499e9eb03bf203 Gerrit-Change-Number: 22238 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 16 Jan 2021 22:00:32 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Unregister IMSI from BSSGP before termination of ConnHdlr
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22238 ) Change subject: gbproxy: Unregister IMSI from BSSGP before termination of ConnHdlr .. Patch Set 2: > Patch Set 1: Code-Review+1 > > Is this one source of the DTEs we sometimes encounter? I don't think so, as it would only be visible if we start multiple components in one testcase (which we probably usually don't so far), and then we'd also have to receive a "broadcast" type PDU after one of the components/handlers has died. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22238 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: Iee54e93e6ae1b3e40f502d5ba2499e9eb03bf203 Gerrit-Change-Number: 22238 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 16 Jan 2021 22:00:23 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Execute TC_load_sharing_dl() for each SGSN in pool
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22236 ) Change subject: gbproxy: Execute TC_load_sharing_dl() for each SGSN in pool .. Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22236/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22236/1//COMMIT_MSG@7 PS1, Line 7: gpbroxy: Execute TC_load_sharing_dl() for each SGSNH in pool > SGSN Done -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22236 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: I4ad822d3bbf5eb6181f6811c3b2267a50bb533a4 Gerrit-Change-Number: 22236 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 16 Jan 2021 21:59:06 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: daniel Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Execute each ConnHdlr test on each NRI of each SGSN configured
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22233 ) Change subject: gbproxy: Execute each ConnHdlr test on each NRI of each SGSN configured .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22233 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: Ie22d3fd786ff8fefe919ecc3a96f974675057e29 Gerrit-Change-Number: 22233 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 21:58:57 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Start to allocate NRIs to SGSNs
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/7 ) Change subject: gbproxy: Start to allocate NRIs to SGSNs .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/7 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: I15f78dca5ac31a1c71f086d3e92a70e900eae250 Gerrit-Change-Number: 7 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 21:58:40 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Move away from random TLLI
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/6 ) Change subject: gbproxy: Move away from random TLLI .. Patch Set 2: Code-Review+2 > Patch Set 1: > > What about using this in f_gen_tlli() from GSM_Types.ttcn? Then it's also > used in pcu-tests. It would make GSM_Types depend on GSM_Gb_Types, which is the wrong way around. Also, I tried not to change existing code outside of the gbproxy tests suite unless neccessarry. I'll see if a separate patch makes sense. That function should probably never have been in GSM_Types. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/6 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: Ic1eaa1d298fe998ca97432769953bfc5a5333ae4 Gerrit-Change-Number: 6 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-CC: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 21:58:26 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Configure a Second SGSN
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698 ) Change subject: gbproxy: Configure a Second SGSN .. Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698 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: Ib70f7c1a29f089957f882df0e9b05ee526224611 Gerrit-Change-Number: 21698 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 21:56:42 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Execute TC_load_sharing_dl() for each SGSN in pool
Hello Jenkins Builder, daniel, lynxis lazus, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22236 to look at the new patch set (#2). Change subject: gbproxy: Execute TC_load_sharing_dl() for each SGSN in pool .. gbproxy: Execute TC_load_sharing_dl() for each SGSN in pool Change-Id: I4ad822d3bbf5eb6181f6811c3b2267a50bb533a4 Related: OS#4951 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 14 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/36/22236/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22236 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: I4ad822d3bbf5eb6181f6811c3b2267a50bb533a4 Gerrit-Change-Number: 22236 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: gbproxy: Start to allocate NRIs to SGSNs
Hello Jenkins Builder, pespin, daniel, lynxis lazus, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/7 to look at the new patch set (#3). Change subject: gbproxy: Start to allocate NRIs to SGSNs .. gbproxy: Start to allocate NRIs to SGSNs We change the osmo-gbproxy.cfg to use NRI 3 for SGSN-0 (NSEI 101) and NRI 4 for SGSN-1 (NSEI 102). We also add the capability to GBProxy_Tests to allocate P-TMSI with a specific NRI and default to the first NRI of SGSN-0 so all tests written still for a single-SGSN-non-pool scenario pass without any modification. Related: OS#4472, SYS#5002 Change-Id: I15f78dca5ac31a1c71f086d3e92a70e900eae250 --- M gbproxy/GBProxy_Tests.ttcn M gbproxy/osmo-gbproxy.cfg M gbproxy/osmo-gbproxy.fr.cfg 3 files changed, 16 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/27/7/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/7 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: I15f78dca5ac31a1c71f086d3e92a70e900eae250 Gerrit-Change-Number: 7 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: gbproxy: Configure a Second SGSN
Hello Jenkins Builder, pespin, daniel, lynxis lazus, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698 to look at the new patch set (#4). Change subject: gbproxy: Configure a Second SGSN .. gbproxy: Configure a Second SGSN This adds the required code changes and minimal configuration to both osmo-gbproxy.cfg and GBProxy_Tests to have osmo-gbproxy connect to two SGSNs. No NRI mappings are configured and hence the second SGSN isn't really used for anything except for bringing the NS-VCs and BVCs up. Related: OS#4472, SYS#5002 Change-Id: Ib70f7c1a29f089957f882df0e9b05ee526224611 --- M gbproxy/GBProxy_Tests.cfg M gbproxy/GBProxy_Tests.ttcn M gbproxy/osmo-gbproxy.cfg M gbproxy/osmo-gbproxy.fr.cfg 4 files changed, 83 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/98/21698/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698 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: Ib70f7c1a29f089957f882df0e9b05ee526224611 Gerrit-Change-Number: 21698 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: Osmocom_Gb_Types: Add templates for various BSSGP PDU types
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242 ) Change subject: Osmocom_Gb_Types: Add templates for various BSSGP PDU types .. Patch Set 2: (2 comments) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242/2/library/Osmocom_Gb_Types.ttcn File library/Osmocom_Gb_Types.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242/2/library/Osmocom_Gb_Types.ttcn@2097 PS2, Line 2097: mncDigit3 := mccmnc[5], > Move this line to the end PLMN_Identity is a 'record', and I don't think you are permitted to re-order the initialization of fields compared to the record definition. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242/2/library/Osmocom_Gb_Types.ttcn@2110 PS2, Line 2110: mncDigit3 := mccmnc[5], > Same PLMN_Identity is a 'record', and I don't think you are permitted to re-order the initialization of fields compared to the record definition. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242 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: I89044bf8e736cc1997dff1a550b3e194f8ac1b9d Gerrit-Change-Number: 22242 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 16 Jan 2021 21:56:11 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: daniel Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Execute each ConnHdlr test on each NRI of each SGSN configured
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22233 ) Change subject: gbproxy: Execute each ConnHdlr test on each NRI of each SGSN configured .. Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22233/2/gbproxy/GBProxy_Tests.ttcn File gbproxy/GBProxy_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22233/2/gbproxy/GBProxy_Tests.ttcn@643 PS2, Line 643: /* Idea: we could also run them in parallel ? */ > Apart from time savings testing multiple connections to different SGSNs in > parallel seems desirable. yes, we can always change that later. We can simply create a "record of" the component references, start all of them, and then collect the results. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22233 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: Ie22d3fd786ff8fefe919ecc3a96f974675057e29 Gerrit-Change-Number: 22233 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 21:53:48 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: daniel Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproy: Configure a Second SGSN
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698 ) Change subject: gbproy: Configure a Second SGSN .. Patch Set 3: (2 comments) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698/3//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698/3//COMMIT_MSG@7 PS3, Line 7: gbproy: Configure a Second SGSN > If you touch it anyway: gbproxy Done https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698/3/gbproxy/osmo-gbproxy.cfg File gbproxy/osmo-gbproxy.cfg: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698/3/gbproxy/osmo-gbproxy.cfg@10 PS3, Line 10: sgsn nsei 102 > You could also give both a name here, otherwise I'll add a commit later. […] Done -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698 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: Ib70f7c1a29f089957f882df0e9b05ee526224611 Gerrit-Change-Number: 21698 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 21:52:17 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: daniel Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproy: Configure a Second SGSN
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698 ) Change subject: gbproy: Configure a Second SGSN .. Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698/3/gbproxy/GBProxy_Tests.ttcn File gbproxy/GBProxy_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698/3/gbproxy/GBProxy_Tests.ttcn@525 PS3, Line 525: * unfortunately doesn't work as we want to access the local variable bvci_unblocked. */ > cannot you pass it as an "out" variable to it? No, I think I tried that at first. The problem is that altsteps can remain active even when you exit the function on whose stack the local variable is allocated. So TITAN (or maybe even the TTCN3 spec) mandates that altsteps always only reference component variables, abut no local variables from function stacks. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698 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: Ib70f7c1a29f089957f882df0e9b05ee526224611 Gerrit-Change-Number: 21698 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 21:47:44 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Add suite of RIM tests
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22246 to look at the new patch set (#3). Change subject: gbproxy: Add suite of RIM tests .. gbproxy: Add suite of RIM tests They all fail with current gbproxy master as it doesn't yet implement routing of RIM messages. Related: OS#4896 Change-Id: I0fec6fd4a5a6559f596b9006ae437323da6f05d7 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 327 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/46/22246/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22246 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: I0fec6fd4a5a6559f596b9006ae437323da6f05d7 Gerrit-Change-Number: 22246 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: gbproxy: Add suite of RIM tests
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22246 to look at the new patch set (#2). Change subject: gbproxy: Add suite of RIM tests .. gbproxy: Add suite of RIM tests They all fail with current gbproxy master as it doesn't yet implement routing of RIM messages. Related: OS#4896 Change-Id: I0fec6fd4a5a6559f596b9006ae437323da6f05d7 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 316 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/46/22246/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22246 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: I0fec6fd4a5a6559f596b9006ae437323da6f05d7 Gerrit-Change-Number: 22246 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: gbproxy: Add suite of RIM tests
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22246 ) Change subject: gbproxy: Add suite of RIM tests .. gbproxy: Add suite of RIM tests They all fail with current gbproxy master as it doesn't yet implement routing of RIM messages. Change-Id: I0fec6fd4a5a6559f596b9006ae437323da6f05d7 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 316 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/46/22246/1 diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index dc5756c..5343ba5 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -825,6 +825,8 @@ type component GlobalTest_CT extends test_CT { port BSSGP_PT G_PCU[NUM_PCU]; port BSSGP_PT G_SGSN[NUM_SGSN]; + port BSSGP_PT RIM_PCU[NUM_PCU]; + port BSSGP_PT RIM_SGSN[NUM_SGSN]; }; /* connect the signaling BVC of each NSE to the G_PCU / G_SGSN ports */ @@ -832,9 +834,11 @@ var integer i; for (i := 0; i < lengthof(g_sgsn); i := i+1) { connect(self:G_SGSN[i], g_sgsn[i].vc_BSSGP:GLOBAL); + connect(self:RIM_SGSN[i], g_sgsn[i].vc_BSSGP:RIM); } for (i := 0; i < lengthof(g_pcu); i := i+1) { connect(self:G_PCU[i], g_pcu[i].vc_BSSGP:GLOBAL); + connect(self:RIM_PCU[i], g_pcu[i].vc_BSSGP:RIM); } } @@ -2581,6 +2585,310 @@ f_cleanup(); } +/*** + * RIM (RAN Information Management) + ***/ + +/* Our tests here are rather synthetic, as they don't reflect normal message flows + as they would be observed in a live network. However, for testing gbproxy, this shouldn't + matter as gbproxy is not concerned with anything but the source / destination routing + information */ + +const BssgpCellId cell_id_sgsn := { + ra_id := { + lai := { + mcc_mnc := c_mcc_mnc, + lac := 65534 + }, + rac := 0 + }, + cell_id := 65533 +}; + +/* Send 'tx' on PTP-BVCI from PCU; expect 'rx' on any of our SGSN (RIM can be routed anywhere) */ +friend function f_rim_pcu2sgsn(template (value) PDU_BSSGP tx, template (present) PDU_BSSGP exp_rx, + integer pcu_idx := 0) runs on GlobalTest_CT { + var PDU_BSSGP rx; + timer T := 1.0; + + RIM_PCU[pcu_idx].send(tx); + T.start; + alt { + [] any from RIM_SGSN.receive(exp_rx) { + setverdict(pass); + } + [] any from RIM_SGSN.receive(PDU_BSSGP:?) -> value rx { + setverdict(fail, "Unexpected BSSGP on SGSN side: ", rx); + mtc.stop; + } + [] T.timeout { + setverdict(fail, "Timeout waiting for BSSGP on SGSN side: ", exp_rx); + mtc.stop; + } + } +} + +/* Send 'tx' on PTP-BVCI from SGSN; expect 'rx' on PCU */ +friend function f_rim_sgsn2pcu(template (value) PDU_BSSGP tx, template (present) PDU_BSSGP exp_rx, + integer sgsn_idx := 0, integer pcu_idx := 0) runs on GlobalTest_CT { + var PDU_BSSGP rx; + timer T := 1.0; + + RIM_SGSN[sgsn_idx].send(tx); + T.start; + alt { + [] RIM_PCU[pcu_idx].receive(exp_rx) { + setverdict(pass); + } + [] RIM_PCU[pcu_idx].receive(PDU_BSSGP:?) -> value rx { + setverdict(fail, "Unexpected BSSGP on PCU side: ", rx); + mtc.stop; + } + [] T.timeout { + setverdict(fail, "Timeout waiting for BSSGP on PCU side: ", exp_rx); + mtc.stop; + } + } +} + +/* Send 'tx' on PTP-BVCI from SRC-PCU; expect 'rx' on DST-PCU */ +friend function f_rim_pcu2pcu(template (value) PDU_BSSGP tx, template (present) PDU_BSSGP exp_rx, + integer src_pcu_idx, integer dst_pcu_idx) runs on GlobalTest_CT { + var integer rx_idx; + var PDU_BSSGP rx; + timer T := 1.0; + + RIM_PCU[src_pcu_idx].send(tx); + T.start; + alt { + [] RIM_PCU[dst_pcu_idx].receive(exp_rx) -> value rx{ + setverdict(pass); + } + [] any from RIM_PCU.receive(exp_rx) -> @index value rx_idx { + setverdict(fail, "Received RIM on wrong PCU[", rx_idx ,"], expected on PCU[", dst_pcu_idx, "]"); + } + [] any from RIM_SGSN.receive(exp_rx) { + setverdict(fail, "Received RIM on SGSN but expected it on other PCU"); + } + [] any from RIM_SGSN.receive(PDU_BSSGP:?) -> value rx { + setverdict(fail, "Unexpected BSSGP on SGSN side: ", rx); + mtc.stop; +
Change in libosmocore[master]: ns2: Add sanity check
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22234 ) Change subject: ns2: Add sanity check .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I7ca4cd1c5dac8b5e44ffc4825b9373b2d04911ab Gerrit-Change-Number: 22234 Gerrit-PatchSet: 2 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 18:56:19 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Add testcase for MS-REGISTRATION ENQUIRY
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22245 ) Change subject: gbproxy: Add testcase for MS-REGISTRATION ENQUIRY .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22245 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: I158dfa729315a9678a7fbb33ed465b73dfc9ec4b Gerrit-Change-Number: 22245 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 18:55:32 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Test cases for DUMMY-PAGING-PS
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22244 ) Change subject: gbproxy: Test cases for DUMMY-PAGING-PS .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22244 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: Ie67f36502d18e9a62373973b09e758a7d0d0f3a5 Gerrit-Change-Number: 22244 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 18:55:09 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Add test case for PAGING-PS-REJECT
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22243 ) Change subject: gbproxy: Add test case for PAGING-PS-REJECT .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22243 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: I19a36dfef8f33f278a54b938a5daccce08de6fe0 Gerrit-Change-Number: 22243 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 18:54:37 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Allow creating ConnHdlr without a P-TMSI
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22239 ) Change subject: gbproxy: Allow creating ConnHdlr without a P-TMSI .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22239 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: Icd780c750c77e723e545ed5a5b52ef26e442b4f2 Gerrit-Change-Number: 22239 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 18:52:46 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: Refactor ns2_nsvc_create_ip*
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22235 ) Change subject: Refactor ns2_nsvc_create_ip* .. Patch Set 2: Code-Review+2 "Eins und eins zusammenzählen" -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I076d53bee2e67e1cb3ad6ee5cd05c63ebe3359fb Gerrit-Change-Number: 22235 Gerrit-PatchSet: 2 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 18:49:54 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: ns2: Add sanity check
Hello Jenkins Builder, pespin, lynxis lazus, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/22234 to look at the new patch set (#2). Change subject: ns2: Add sanity check .. ns2: Add sanity check Prevent memory corruption or segfaults by asserting that NSE and bind link layer match. A mismatch should never happen and might cause the bind to access invalid memory when sending because nsvc->priv doesn't match what it expects. Change-Id: I7ca4cd1c5dac8b5e44ffc4825b9373b2d04911ab Related: OS#4948 --- M src/gb/gprs_ns2.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/34/22234/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I7ca4cd1c5dac8b5e44ffc4825b9373b2d04911ab Gerrit-Change-Number: 22234 Gerrit-PatchSet: 2 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in libosmocore[master]: Refactor ns2_nsvc_create_ip*
lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22235 ) Change subject: Refactor ns2_nsvc_create_ip* .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I076d53bee2e67e1cb3ad6ee5cd05c63ebe3359fb Gerrit-Change-Number: 22235 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 18:46:54 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: ns2: Add sanity checks
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22234 ) Change subject: ns2: Add sanity checks .. Patch Set 1: > Patch Set 1: > > I would not include it in the tx_/hot path. Just add it when doing management > e.g. vc_alloc. Okay, I'll change it. Was unsure about that myself. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I7ca4cd1c5dac8b5e44ffc4825b9373b2d04911ab Gerrit-Change-Number: 22234 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 18:46:45 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Don't pass global (component) variables as function arguments
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22237 ) Change subject: gbproxy: Don't pass global (component) variables as function arguments .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22237 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: I0754d5db7e797a51be3a0b601b0533de80bc246d Gerrit-Change-Number: 22237 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 18:46:14 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: ns2: Add sanity checks
lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22234 ) Change subject: ns2: Add sanity checks .. Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I7ca4cd1c5dac8b5e44ffc4825b9373b2d04911ab Gerrit-Change-Number: 22234 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 18:45:17 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: ns2: Add sanity checks
lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22234 ) Change subject: ns2: Add sanity checks .. Patch Set 1: I would not include it in the tx_/hot path. Just add it when doing management e.g. vc_alloc. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I7ca4cd1c5dac8b5e44ffc4825b9373b2d04911ab Gerrit-Change-Number: 22234 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 18:45:09 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in libosmocore[master]: Refactor ns2_nsvc_create_ip*
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22235 ) Change subject: Refactor ns2_nsvc_create_ip* .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I076d53bee2e67e1cb3ad6ee5cd05c63ebe3359fb Gerrit-Change-Number: 22235 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 18:44:39 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: ns2: Add sanity checks
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22234 ) Change subject: ns2: Add sanity checks .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I7ca4cd1c5dac8b5e44ffc4825b9373b2d04911ab Gerrit-Change-Number: 22234 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 18:43:17 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Add testcase for MS-REGISTRATION ENQUIRY
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22245 ) Change subject: gbproxy: Add testcase for MS-REGISTRATION ENQUIRY .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22245 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: I158dfa729315a9678a7fbb33ed465b73dfc9ec4b Gerrit-Change-Number: 22245 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 16 Jan 2021 18:41:57 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Test cases for DUMMY-PAGING-PS
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22244 ) Change subject: gbproxy: Test cases for DUMMY-PAGING-PS .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22244 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: Ie67f36502d18e9a62373973b09e758a7d0d0f3a5 Gerrit-Change-Number: 22244 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 16 Jan 2021 18:41:35 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Add test case for PAGING-PS-REJECT
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22243 ) Change subject: gbproxy: Add test case for PAGING-PS-REJECT .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22243 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: I19a36dfef8f33f278a54b938a5daccce08de6fe0 Gerrit-Change-Number: 22243 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 16 Jan 2021 18:40:46 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: Osmocom_Gb_Types: Add templates for various BSSGP PDU types
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242 ) Change subject: Osmocom_Gb_Types: Add templates for various BSSGP PDU types .. Patch Set 2: (2 comments) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242/2/library/Osmocom_Gb_Types.ttcn File library/Osmocom_Gb_Types.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242/2/library/Osmocom_Gb_Types.ttcn@2097 PS2, Line 2097: mncDigit3 := mccmnc[5], Move this line to the end https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242/2/library/Osmocom_Gb_Types.ttcn@2110 PS2, Line 2110: mncDigit3 := mccmnc[5], Same -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242 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: I89044bf8e736cc1997dff1a550b3e194f8ac1b9d Gerrit-Change-Number: 22242 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 16 Jan 2021 18:39:30 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-bsc[master]: gsm_data: return early if MS Power class remains the same
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/22232 ) Change subject: gsm_data: return early if MS Power class remains the same .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/22232 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I519d2d1575cbb5352cc381a60513db8e0e2cb0a0 Gerrit-Change-Number: 22232 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 18:38:11 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: Osmocom_Gb_Types: Add 3GPP spec chapters; unify formatting
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22241 ) Change subject: Osmocom_Gb_Types: Add 3GPP spec chapters; unify formatting .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22241 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: I9c3e5458ba7637a1e85f7bb3b32e16a90fad7bc5 Gerrit-Change-Number: 22241 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 16 Jan 2021 18:36:08 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Test PS-PAGING by IMSI (without P-TMSI)
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22240 ) Change subject: gbproxy: Test PS-PAGING by IMSI (without P-TMSI) .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22240 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: I1bdc09712790d4b69df147ed9c7bea15c48e8dea Gerrit-Change-Number: 22240 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 16 Jan 2021 18:35:21 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Allow creating ConnHdlr without a P-TMSI
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22239 ) Change subject: gbproxy: Allow creating ConnHdlr without a P-TMSI .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22239 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: Icd780c750c77e723e545ed5a5b52ef26e442b4f2 Gerrit-Change-Number: 22239 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 16 Jan 2021 18:35:04 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Unregister IMSI from BSSGP before termination of ConnHdlr
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22238 ) Change subject: gbproxy: Unregister IMSI from BSSGP before termination of ConnHdlr .. Patch Set 1: Code-Review+1 Is this one source of the DTEs we sometimes encounter? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22238 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: Iee54e93e6ae1b3e40f502d5ba2499e9eb03bf203 Gerrit-Change-Number: 22238 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 16 Jan 2021 18:31:13 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Don't pass global (component) variables as function arguments
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22237 ) Change subject: gbproxy: Don't pass global (component) variables as function arguments .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22237 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: I0754d5db7e797a51be3a0b601b0533de80bc246d Gerrit-Change-Number: 22237 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 16 Jan 2021 18:29:49 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gpbroxy: Execute TC_load_sharing_dl() for each SGSNH in pool
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22236 ) Change subject: gpbroxy: Execute TC_load_sharing_dl() for each SGSNH in pool .. Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22236/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22236/1//COMMIT_MSG@7 PS1, Line 7: gpbroxy: Execute TC_load_sharing_dl() for each SGSNH in pool SGSN -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22236 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: I4ad822d3bbf5eb6181f6811c3b2267a50bb533a4 Gerrit-Change-Number: 22236 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Sat, 16 Jan 2021 18:28:35 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Execute each ConnHdlr test on each NRI of each SGSN configured
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22233 ) Change subject: gbproxy: Execute each ConnHdlr test on each NRI of each SGSN configured .. Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22233/2/gbproxy/GBProxy_Tests.ttcn File gbproxy/GBProxy_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22233/2/gbproxy/GBProxy_Tests.ttcn@643 PS2, Line 643: /* Idea: we could also run them in parallel ? */ Apart from time savings testing multiple connections to different SGSNs in parallel seems desirable. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22233 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: Ie22d3fd786ff8fefe919ecc3a96f974675057e29 Gerrit-Change-Number: 22233 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 18:27:08 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: gbproxy: Add testcase for MS-REGISTRATION ENQUIRY
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22245 ) Change subject: gbproxy: Add testcase for MS-REGISTRATION ENQUIRY .. gbproxy: Add testcase for MS-REGISTRATION ENQUIRY The test case fails with current master, as osmo-gbproxy doesn't handle this yet. Change-Id: I158dfa729315a9678a7fbb33ed465b73dfc9ec4b --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/45/22245/1 diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index ad95bff..dc5756c 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -2565,7 +2565,21 @@ f_cleanup(); } +/*** + * MS-REGISTRATION ENQUIRY procedure + ***/ +private function f_TC_ms_reg_enq(charstring id) runs on BSSGP_ConnHdlr +{ + f_pcu2sgsn(ts_BSSGP_MS_REG_ENQ(g_pars.imsi), tr_BSSGP_MS_REG_ENQ(g_pars.imsi), use_sig := true); + f_sgsn2pcu(ts_BSSGP_MS_REW_ENQ_RESP(g_pars.imsi, omit), tr_BSSGP_MS_REW_ENQ_RESP(g_pars.imsi, omit), use_sig := true); +} +testcase TC_ms_reg_enq() runs on test_CT +{ + f_init(); + f_start_handlers(refers(f_TC_ms_reg_enq), testcasename(), 22); + f_cleanup(); +} control { execute( TC_BVC_bringup() ); @@ -2638,6 +2652,7 @@ execute( TC_flush_ll() ); execute( TC_fc_bvc() ); execute( TC_fc_ms() ); + execute( TC_ms_reg_enq() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22245 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: I158dfa729315a9678a7fbb33ed465b73dfc9ec4b Gerrit-Change-Number: 22245 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
Change in osmo-ttcn3-hacks[master]: gbproxy: Test cases for DUMMY-PAGING-PS
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22244 ) Change subject: gbproxy: Test cases for DUMMY-PAGING-PS .. gbproxy: Test cases for DUMMY-PAGING-PS The test case fails with current master, as osmo-gbproxy doesn't handle this yet. Change-Id: Ie67f36502d18e9a62373973b09e758a7d0d0f3a5 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 30 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/44/22244/1 diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 0767331..ad95bff 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -1501,6 +1501,20 @@ f_cleanup(); } +/* DUMMY PAGING PS on PTP BVC */ +private function f_TC_dummy_paging_ps_ptp(charstring id) runs on BSSGP_ConnHdlr +{ + f_sgsn2pcu(ts_BSSGP_DUMMY_PAGING_PS(g_pars.imsi, omit), + tr_BSSGP_DUMMY_PAGING_PS(g_pars.imsi, omit), use_sig := false); + f_pcu2sgsn(ts_BSSGP_DUMMY_PAGING_PS_RESP(g_pars.imsi, 1, 5), + tr_BSSGP_DUMMY_PAGING_PS_RESP(g_pars.imsi, 1, 5), use_sig := false) +} +testcase TC_dummy_paging_ps_ptp() runs on test_CT { + f_init(); + f_start_handlers(refers(f_TC_dummy_paging_ps_ptp), testcasename(), 11); + f_cleanup(); +} + /* altstep for expecting BSSGP PDU on signaling BVC of given pcu_idx + storing in 'roi' */ private altstep as_paging_sig_pcu(integer pcu_idx, template (present) PDU_BSSGP exp_rx, inout ro_integer roi) runs on BSSGP_ConnHdlr { @@ -1735,6 +1749,20 @@ f_cleanup(); } +/* DUMMY PAGING PS on SIG BVC */ +private function f_TC_dummy_paging_ps_sig(charstring id) runs on BSSGP_ConnHdlr +{ + f_sgsn2pcu(ts_BSSGP_DUMMY_PAGING_PS(g_pars.imsi, omit), + tr_BSSGP_DUMMY_PAGING_PS(g_pars.imsi, omit), use_sig := true); + f_pcu2sgsn(ts_BSSGP_DUMMY_PAGING_PS_RESP(g_pars.imsi, 1, 5), + tr_BSSGP_DUMMY_PAGING_PS_RESP(g_pars.imsi, 1, 5), use_sig := true) +} +testcase TC_dummy_paging_ps_sig() runs on test_CT { + f_init(); + f_start_handlers(refers(f_TC_dummy_paging_ps_sig), testcasename(), 11); + f_cleanup(); +} + /*** @@ -2573,6 +2601,7 @@ execute( TC_paging_ps_ptp_bvci_unknown() ); execute( TC_paging_ps_reject_ptp_bvci() ); execute( TC_paging_ps_reject_ptp_bvci_imsi() ); + execute( TC_dummy_paging_ps_ptp() ); /* PAGING-PS over SIG BVC */ execute( TC_paging_ps_sig_bss() ); @@ -2585,6 +2614,7 @@ execute( TC_paging_ps_sig_bvci_unknown() ); execute( TC_paging_ps_reject_sig_bvci() ); execute( TC_paging_ps_reject_sig_bvci_imsi() ); + execute( TC_dummy_paging_ps_sig() ); /* PAGING-CS over PTP BVC */ execute( TC_paging_cs_ptp_bss() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22244 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: Ie67f36502d18e9a62373973b09e758a7d0d0f3a5 Gerrit-Change-Number: 22244 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
Change in osmo-ttcn3-hacks[master]: gbproxy: Test PS-PAGING by IMSI (without P-TMSI)
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22240 ) Change subject: gbproxy: Test PS-PAGING by IMSI (without P-TMSI) .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22240 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: I1bdc09712790d4b69df147ed9c7bea15c48e8dea Gerrit-Change-Number: 22240 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 16 Jan 2021 17:46:17 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: Osmocom_Gb_Types: Add 3GPP spec chapters; unify formatting
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22241 to look at the new patch set (#2). Change subject: Osmocom_Gb_Types: Add 3GPP spec chapters; unify formatting .. Osmocom_Gb_Types: Add 3GPP spec chapters; unify formatting Change-Id: I9c3e5458ba7637a1e85f7bb3b32e16a90fad7bc5 --- M library/Osmocom_Gb_Types.ttcn 1 file changed, 21 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/41/22241/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22241 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: I9c3e5458ba7637a1e85f7bb3b32e16a90fad7bc5 Gerrit-Change-Number: 22241 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: gbproxy: Add test case for PAGING-PS-REJECT
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22243 to look at the new patch set (#2). Change subject: gbproxy: Add test case for PAGING-PS-REJECT .. gbproxy: Add test case for PAGING-PS-REJECT The test fail with current osmo-gbproxy master, as the related implementation is missing. Related: OS#4951 Change-Id: I19a36dfef8f33f278a54b938a5daccce08de6fe0 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 93 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/43/22243/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22243 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: I19a36dfef8f33f278a54b938a5daccce08de6fe0 Gerrit-Change-Number: 22243 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: gbproxy: Test PS-PAGING by IMSI (without P-TMSI)
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22240 to look at the new patch set (#2). Change subject: gbproxy: Test PS-PAGING by IMSI (without P-TMSI) .. gbproxy: Test PS-PAGING by IMSI (without P-TMSI) Related: OS#4951 Change-Id: I1bdc09712790d4b69df147ed9c7bea15c48e8dea --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/40/22240/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22240 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: I1bdc09712790d4b69df147ed9c7bea15c48e8dea Gerrit-Change-Number: 22240 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: Osmocom_Gb_Types: Add templates for various BSSGP PDU types
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242 to look at the new patch set (#2). Change subject: Osmocom_Gb_Types: Add templates for various BSSGP PDU types .. Osmocom_Gb_Types: Add templates for various BSSGP PDU types Related: OS#4951 Change-Id: I89044bf8e736cc1997dff1a550b3e194f8ac1b9d --- M library/Osmocom_Gb_Types.ttcn 1 file changed, 204 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/42/22242/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242 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: I89044bf8e736cc1997dff1a550b3e194f8ac1b9d Gerrit-Change-Number: 22242 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: gbproxy: Test PS-PAGING by IMSI (without P-TMSI)
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22240 ) Change subject: gbproxy: Test PS-PAGING by IMSI (without P-TMSI) .. gbproxy: Test PS-PAGING by IMSI (without P-TMSI) Change-Id: I1bdc09712790d4b69df147ed9c7bea15c48e8dea --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/40/22240/1 diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index f1e8749..0513c02 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -1460,6 +1460,15 @@ f_cleanup(); } + +/* PS-PAGING on PTP-BVC for BVCI (one cell) using IMSI only (no P-TMSI allocated) */ +testcase TC_paging_ps_ptp_bvci_imsi() runs on test_CT { + f_init(); + f_start_handlers(refers(f_TC_paging_ps_ptp_bvci), testcasename(), 12, have_ptmsi:=false); + f_cleanup(); +} + + /* PS-PAGING on PTP-BVC for unknown BVCI */ private function f_TC_paging_ps_ptp_bvci_unknown(charstring id) runs on BSSGP_ConnHdlr { @@ -1619,6 +1628,13 @@ f_cleanup(); } +/* PS-PAGING on SIG-BVC for BVCI (one cell) using IMSI only (no P-TMSI allocated) */ +testcase TC_paging_ps_sig_bvci_imsi() runs on test_CT { + f_init(); + f_start_handlers(refers(f_TC_paging_ps_sig_bvci), testcasename(), 16, have_ptmsi:=false); + f_cleanup(); +} + /* PS-PAGING on SIG-BVC for unknown BVCI */ private function f_TC_paging_ps_sig_bvci_unknown(charstring id) runs on BSSGP_ConnHdlr { @@ -2464,6 +2480,7 @@ execute( TC_paging_ps_ptp_rac() ); execute( TC_paging_ps_ptp_rac_unknown() ); execute( TC_paging_ps_ptp_bvci() ); + execute( TC_paging_ps_ptp_bvci_imsi() ); execute( TC_paging_ps_ptp_bvci_unknown() ); /* PAGING-PS over SIG BVC */ @@ -2473,6 +2490,7 @@ execute( TC_paging_ps_sig_rac() ); execute( TC_paging_ps_sig_rac_unknown() ); execute( TC_paging_ps_sig_bvci() ); + execute( TC_paging_ps_sig_bvci_imsi() ); execute( TC_paging_ps_sig_bvci_unknown() ); /* PAGING-CS over PTP BVC */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22240 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: I1bdc09712790d4b69df147ed9c7bea15c48e8dea Gerrit-Change-Number: 22240 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
Change in osmo-ttcn3-hacks[master]: gbproxy: Unregister IMSI from BSSGP before termination of ConnHdlr
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22238 ) Change subject: gbproxy: Unregister IMSI from BSSGP before termination of ConnHdlr .. gbproxy: Unregister IMSI from BSSGP before termination of ConnHdlr Otherwise we may run into problems where the BSSGP_Emulation still has references to longer existing components in its ClientTable. Change-Id: Iee54e93e6ae1b3e40f502d5ba2499e9eb03bf203 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/38/22238/1 diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index caf4c66..6141f6a 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -713,6 +713,18 @@ /* call the user-supplied test case function */ fn.apply(id); + + for (i := 0; i < NUM_SGSN; i := i+1) { + if (SGSN_PROC[i].checkstate("Connected")) { + f_client_unregister(g_pars.imsi, SGSN_PROC[i]) + } + } + + for (i := 0; i < NUM_PCU; i := i+1) { + if (PCU_PROC[i].checkstate("Connected")) { + f_client_unregister(g_pars.imsi, PCU_PROC[i]) + } + } } private function f_client_register(hexstring imsi, OCT4 tlli, BSSGP_PROC_PT PT) -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22238 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: Iee54e93e6ae1b3e40f502d5ba2499e9eb03bf203 Gerrit-Change-Number: 22238 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
Change in osmo-ttcn3-hacks[master]: Osmocom_Gb_Types: Add 3GPP spec chapters; unify formatting
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22241 ) Change subject: Osmocom_Gb_Types: Add 3GPP spec chapters; unify formatting .. Osmocom_Gb_Types: Add 3GPP spec chapters; unify formatting Change-Id: I9c3e5458ba7637a1e85f7bb3b32e16a90fad7bc5 --- M library/Osmocom_Gb_Types.ttcn 1 file changed, 21 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/41/22241/1 diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn index 8ca0cd5..9054785 100644 --- a/library/Osmocom_Gb_Types.ttcn +++ b/library/Osmocom_Gb_Types.ttcn @@ -1076,7 +1076,7 @@ rA_CAP_UPD_Cause_value := cause } - + /* 10.4.12 */ template PDU_BSSGP ts_BVC_RESET(BssgpCause cause, BssgpBvci bvci, template BssgpCellId cell_id) := { pDU_BSSGP_BVC_RESET := { @@ -1088,7 +1088,6 @@ extended_Feature_Bitmap := omit } } - template PDU_BSSGP tr_BVC_RESET(template BssgpCause cause, template BssgpBvci bvci, template BssgpCellId cell_id) := { pDU_BSSGP_BVC_RESET := { @@ -1101,6 +1100,7 @@ } } + /* 10.4.13 */ template PDU_BSSGP ts_BVC_RESET_ACK(BssgpBvci bvci, template BssgpCellId cell_id) := { pDU_BSSGP_BVC_RESET_ACK := { bssgpPduType := '23'O, @@ -1110,7 +1110,6 @@ extended_Feature_Bitmap := omit } } - template PDU_BSSGP tr_BVC_RESET_ACK(template BssgpBvci bvci, template BssgpCellId cell_id) := { pDU_BSSGP_BVC_RESET_ACK := { bssgpPduType := '23'O, @@ -1122,6 +1121,7 @@ } + /* 10.4.10 */ template PDU_BSSGP t_BVC_UNBLOCK(template BssgpBvci bvci) := { pDU_BSSGP_BVC_UNBLOCK := { bssgpPduType := '24'O, @@ -1129,6 +1129,7 @@ } } + /* 10.4.11 */ template PDU_BSSGP t_BVC_UNBLOCK_ACK(template BssgpBvci bvci) := { pDU_BSSGP_BVC_UNBLOCK_ACK := { bssgpPduType := '25'O, @@ -1136,6 +1137,7 @@ } } + /* 10.4.8 */ template PDU_BSSGP t_BVC_BLOCK(template BssgpBvci bvci, template BssgpCause cause) := { pDU_BSSGP_BVC_BLOCK := { bssgpPduType := '20'O, @@ -1144,6 +1146,7 @@ } } + /* 10.4.9 */ template PDU_BSSGP t_BVC_BLOCK_ACK(template BssgpBvci bvci) := { pDU_BSSGP_BVC_BLOCK_ACK := { bssgpPduType := '21'O, @@ -1151,6 +1154,7 @@ } } + /* 10.4.4 */ template PDU_BSSGP t_BVC_FC_BVC(uint16_t bmax, uint16_t bucket_leak_rate, uint16_t bmax_default_ms, uint16_t r_default_ms, OCT1 tag) := { pDU_BSSGP_FLOW_CONTROL_BVC := { @@ -1253,6 +1257,7 @@ } } + /* 10.4.5 */ template PDU_BSSGP t_BVC_FC_BVC_ACK(template OCT1 tag) := { pDU_BSSGP_FLOW_CONTROL_BVC_ACK := { bssgpPduType := '27'O, @@ -1267,6 +1272,7 @@ } } + /* 10.4.6 */ template (value) PDU_BSSGP ts_BVC_FC_MS(GprsTlli tlli, uint16_t bmax, uint16_t bucket_leak_rate, OCT1 tag) := { pDU_BSSGP_FLOW_CONTROL_MS := { @@ -1336,6 +1342,7 @@ } } + /* 10.4.7 */ template (value) PDU_BSSGP ts_BVC_FC_MS_ACK(template (value) GprsTlli tlli, template (value) OCT1 tag) := { @@ -1369,6 +1376,7 @@ } } + /* 10.4.14 */ template PDU_BSSGP ts_BSSGP_STATUS(template BssgpBvci bvci, template BssgpCause cause, PDU_BSSGP pdu) := { pDU_BSSGP_STATUS := { @@ -1385,7 +1393,6 @@ } } } - template PDU_BSSGP tr_BSSGP_STATUS(template BVCI bvci := ?, template BssgpCause cause := ?, template octetstring pdu := ?) := { pDU_BSSGP_STATUS := { @@ -1571,6 +1578,7 @@ } } + /* 10.2.1 */ template PDU_BSSGP ts_BSSGP_DL_UD(GprsTlli tlli, octetstring pdu, template (omit) MSRadioAccessCapabilityV_BSSGP racap := omit, template (omit) IMSI_BSSGP imsi := omit) := { @@ -1602,7 +1610,6 @@ initialLLC_PDU := omit } } - template PDU_BSSGP tr_BSSGP_DL_UD(template (present)
Change in osmo-ttcn3-hacks[master]: gbproxy: Add test case for PAGING-PS-REJECT
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22243 ) Change subject: gbproxy: Add test case for PAGING-PS-REJECT .. gbproxy: Add test case for PAGING-PS-REJECT The test fail with current osmo-gbproxy master, as the related implementation is missing. Change-Id: I19a36dfef8f33f278a54b938a5daccce08de6fe0 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 56 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/43/22243/1 diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 0513c02..6f1f87b 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -1536,6 +1536,40 @@ setverdict(pass); } +/* Send PAGING-PS-REJECT on SIG BVC, expect it to arrive on the "right" SGSN */ +private function f_send_paging_ps_rej(integer pcu_idx := 0) runs on BSSGP_ConnHdlr +{ + var template (value) PDU_BSSGP pdu_tx; + var template (present) PDU_BSSGP exp_rx; + var PDU_BSSGP pdu_rx; + timer T := 5.0; + var template (omit) GsmTmsi tmsi_int := omit; + + if (ispresent(g_pars.p_tmsi)) { + tmsi_int := oct2int(g_pars.p_tmsi); + } + + pdu_tx := ts_BSSGP_PAGING_PS_REJ(g_pars.imsi, 23, 42, tmsi_int); + exp_rx := tr_BSSGP_PAGING_PS_REJ(g_pars.imsi, 23, 42, tmsi_int); + + PCU_SIG[pcu_idx].send(pdu_tx); + T.start; + alt { + [] SGSN_SIG[g_pars.sgsn_idx].receive(exp_rx) -> value pdu_rx { + setverdict(pass); + } + [] SGSN_SIG[g_pars.sgsn_idx].receive { + setverdict(fail, "Unexpected PDU on SGSN"); + } + [] any from SGSN_SIG.receive(exp_rx) -> value pdu_rx { + setverdict(fail, "PAGING-PS-REJECT arrived on wrong SGSN"); + } + [] T.timeout { + setverdict(fail, "Timeout waiting for PAGING-PS-REJECT"); + } + } +} + /* PS-PAGING on SIG-BVC for BSS Area */ private function f_TC_paging_ps_sig_bss(charstring id) runs on BSSGP_ConnHdlr { @@ -1635,6 +1669,28 @@ f_cleanup(); } +/* Rejected PS-PAGING on SIG-BVC for BVCI (one cell) */ +private function f_TC_paging_ps_reject_sig_bvci(charstring id) runs on BSSGP_ConnHdlr +{ + /* first send the PS-PAGING from SGSN -> PCU */ + f_send_paging_ps_exp_multi(ts_BssgpP4Bvci(pcu_bvc_cfg[0].bvci), 0, {0}); + /* then simulate the PS-PAGING-REJECT from the PCU */ + f_send_paging_ps_rej(); + +} +testcase TC_paging_ps_reject_sig_bvci() runs on test_CT { + f_init(); + f_start_handlers(refers(f_TC_paging_ps_reject_sig_bvci), testcasename(), 16); + f_cleanup(); +} + +/* Rejected PS-PAGING on SIG-BVC for BVCI (one cell) using IMSI only (no P-TMSI allocated) */ +testcase TC_paging_ps_reject_sig_bvci_imsi() runs on test_CT { + f_init(); + f_start_handlers(refers(f_TC_paging_ps_reject_sig_bvci), testcasename(), 16, have_ptmsi:=false); + f_cleanup(); +} + /* PS-PAGING on SIG-BVC for unknown BVCI */ private function f_TC_paging_ps_sig_bvci_unknown(charstring id) runs on BSSGP_ConnHdlr { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22243 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: I19a36dfef8f33f278a54b938a5daccce08de6fe0 Gerrit-Change-Number: 22243 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
Change in osmo-ttcn3-hacks[master]: gbproxy: Don't pass global (component) variables as function arguments
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22237 ) Change subject: gbproxy: Don't pass global (component) variables as function arguments .. gbproxy: Don't pass global (component) variables as function arguments The point of global (component) variables is that we don't have to pass them around as extra function arguments everywhere. So don't do it. Change-Id: I0754d5db7e797a51be3a0b601b0533de80bc246d --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 43 insertions(+), 44 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/37/22237/1 diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index f0175c2..caf4c66 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -601,7 +601,7 @@ type function void_fn(charstring id) runs on BSSGP_ConnHdlr; /* helper function to create, connect and start a BSSGP_ConnHdlr component */ -function f_start_handler(void_fn fn, charstring id, GbInstances pcu, GbInstances sgsn, integer imsi_suffix, +function f_start_handler(void_fn fn, charstring id, integer imsi_suffix, float t_guard := 30.0, integer sgsn_idx := 0, integer nri_idx := 0) runs on test_CT return BSSGP_ConnHdlr { var BSSGP_ConnHdlr vc_conn; @@ -617,8 +617,8 @@ tlli := f_gprs_tlli_from_tmsi(p_tmsi, TLLI_LOCAL), tlli_old := omit, ra := omit, - pcu := pcu, - sgsn := sgsn, + pcu := g_pcu, + sgsn := g_sgsn, sgsn_idx := sgsn_idx, t_guard := t_guard }; @@ -629,8 +629,7 @@ return vc_conn; } -function f_start_handlers(void_fn fn, charstring id, GbInstances pcu, GbInstances sgsn, - integer imsi_suffix, float t_guard := 30.0) +function f_start_handlers(void_fn fn, charstring id, integer imsi_suffix, float t_guard := 30.0) runs on test_CT { var integer sgsn_idx, nri_idx; @@ -638,7 +637,7 @@ for (nri_idx := 0; nri_idx < lengthof(mp_sgsn_nri[sgsn_idx]); nri_idx:=nri_idx+1) { var integer extd_imsi_suffix := 1000*sgsn_idx + 100*nri_idx; var BSSGP_ConnHdlr vc_conn; - vc_conn := f_start_handler(fn, id, pcu, sgsn, extd_imsi_suffix, t_guard, + vc_conn := f_start_handler(fn, id, extd_imsi_suffix, t_guard, sgsn_idx, nri_idx); /* Idea: we could also run them in parallel ? */ vc_conn.done; @@ -901,7 +900,7 @@ testcase TC_BVC_bringup() runs on test_CT { f_init(); - f_start_handlers(refers(f_TC_BVC_bringup), testcasename(), g_pcu, g_sgsn, 51); + f_start_handlers(refers(f_TC_BVC_bringup), testcasename(), 51); f_cleanup(); } @@ -967,7 +966,7 @@ testcase TC_ul_unitdata() runs on test_CT { f_init(); - f_start_handlers(refers(f_TC_ul_unitdata), testcasename(), g_pcu, g_sgsn, 1); + f_start_handlers(refers(f_TC_ul_unitdata), testcasename(), 1); /* TODO: start multiple handlers (UEs) on various cells on same and other NSEs */ f_cleanup(); } @@ -993,7 +992,7 @@ testcase TC_dl_unitdata() runs on test_CT { f_init(); - f_start_handlers(refers(f_TC_dl_unitdata), testcasename(), g_pcu, g_sgsn, 2); + f_start_handlers(refers(f_TC_dl_unitdata), testcasename(), 2); /* TODO: start multiple handlers (UEs) on various cells on same and other NSEs */ f_cleanup(); } @@ -1013,7 +1012,7 @@ testcase TC_ra_capability() runs on test_CT { f_init(); - f_start_handlers(refers(f_TC_ra_capability), testcasename(), g_pcu, g_sgsn, 3); + f_start_handlers(refers(f_TC_ra_capability), testcasename(), 3); /* TODO: start multiple handlers (UEs) on various cells on same and other NSEs */ f_cleanup(); } @@ -1040,7 +1039,7 @@ testcase TC_ra_capability_upd() runs on test_CT { f_init(); - f_start_handlers(refers(f_TC_ra_capability_upd), testcasename(), g_pcu, g_sgsn, 4); + f_start_handlers(refers(f_TC_ra_capability_upd), testcasename(), 4); /* TODO: start multiple handlers (UEs) on various cells on same and other NSEs */ f_cleanup(); } @@ -1060,7 +1059,7 @@ testcase TC_radio_status() runs on test_CT { f_init(); - f_start_handlers(refers(f_TC_radio_status), testcasename(), g_pcu, g_sgsn, 5); + f_start_handlers(refers(f_TC_radio_status), testcasename(), 5); /* TODO: start multiple handlers (UEs) on various cells on same and other NSEs */ f_cleanup(); } @@ -1198,7 +1197,7 @@ /* start parallel components generating DL-UNITDATA from the SGSN side */ for (var integer i:= 0; i < num_ue; i := i+1) { -
Change in osmo-ttcn3-hacks[master]: Osmocom_Gb_Types: Add templates for various BSSGP PDU types
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242 ) Change subject: Osmocom_Gb_Types: Add templates for various BSSGP PDU types .. Osmocom_Gb_Types: Add templates for various BSSGP PDU types Change-Id: I89044bf8e736cc1997dff1a550b3e194f8ac1b9d --- M library/Osmocom_Gb_Types.ttcn 1 file changed, 204 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/42/22242/1 diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn index 9054785..b82ca32 100644 --- a/library/Osmocom_Gb_Types.ttcn +++ b/library/Osmocom_Gb_Types.ttcn @@ -946,6 +946,24 @@ lengthIndicator := { length1 := 4 }, tMSI_Value := int2oct(tmsi, 4) } + private function f_ts_BSSGP_TMSI(template (omit) GsmTmsi tmsi) return template (omit) TMSI_BSSGP { + if (istemplatekind(tmsi, "omit")) { + return omit; + } else { + return ts_BSSGP_TMSI(valueof(tmsi)); + } + } + private function f_tr_BSSGP_TMSI(template GsmTmsi tmsi) return template TMSI_BSSGP { + if (istemplatekind(tmsi, "omit")) { + return omit; + } else if (istemplatekind(tmsi, "*")) { + return *; + } else if (istemplatekind(tmsi, "?")) { + return ?; + } else { + return tr_BSSGP_TMSI(valueof(tmsi)); + } + } function f_bssgp_length_ind(integer len) return LIN2_2a { var LIN2_2a ret; @@ -1828,6 +1846,28 @@ rac := int2oct(input.rac, 1) } + private function f_ts_BSSGP_RA_ID(template (omit) GSM_Types.RoutingAreaIdentification input) + return template (omit) Routeing_Area { + if (istemplatekind(input, "omit")) { + return omit; + } else { + return ts_BSSGP_RA_ID(valueof(input)); + } + } + + private function f_tr_BSSGP_RA_ID(template GSM_Types.RoutingAreaIdentification input) + return template Routeing_Area { + if (istemplatekind(input, "omit")) { + return omit; + } else if (istemplatekind(input, "*")) { + return *; + } else if (istemplatekind(input, "?")) { + return ?; + } else { + return ts_BSSGP_RA_ID(valueof(input)); + } + } + /* 10.3.6 */ template (value) PDU_BSSGP ts_BSSGP_SUSPEND(GprsTlli tlli, RoutingAreaIdentification ra_id) := { pDU_BSSGP_SUSPEND := { @@ -1944,6 +1984,170 @@ } } + /* 10.3.12 */ + template (value) PDU_BSSGP ts_BSSGP_DUMMY_PAGING_PS(hexstring imsi, + template (omit) RoutingAreaIdentification ra) := { + pDU_BSSGP_DUMMY_PAGING_PS := { + bssgpPduType := '12'O, + iMSI := ts_BSSGP_IMSI(imsi), + routeing_Area := f_ts_BSSGP_RA_ID(ra), + eDRX_Paremeters := omit + } + } + template (present) PDU_BSSGP tr_BSSGP_DUMMY_PAGING_PS(hexstring imsi, + template RoutingAreaIdentification ra) := { + pDU_BSSGP_DUMMY_PAGING_PS := { + bssgpPduType := '12'O, + iMSI := tr_BSSGP_IMSI(imsi), + routeing_Area := f_tr_BSSGP_RA_ID(ra), + eDRX_Paremeters := omit + } + } + + template (value) Time_Until_Next_Paging_Occasion ts_TimeNextPag(uint8_t mins, uint8_t secs) := { + iEI := '93'O, + ext := '1'B, + lengthIndicator := { + length1 := 2 + }, + minutes := mins, + spare := '00'B, + seconds := secs, + spare2 := '00'B + } + template (present) Time_Until_Next_Paging_Occasion tr_TimeNextPag(template (present) uint8_t mins, + template (present) uint8_t secs) := { + iEI := '93'O, + ext := '1'B, + lengthIndicator := { + length1 := 2 + }, + minutes := mins, + spare := ?, + seconds := secs, + spare2 := ? + } + + /* 10.3.13 */ + template (value) PDU_BSSGP ts_BSSGP_DUMMY_PAGING_PS_RESP(hexstring imsi, uint8_t mins, uint8_t secs) := { + pDU_BSSGP_DUMMY_PAGING_PS_RESPONSE := { +
Change in osmo-ttcn3-hacks[master]: gbproxy: Allow creating ConnHdlr without a P-TMSI
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22239 ) Change subject: gbproxy: Allow creating ConnHdlr without a P-TMSI .. gbproxy: Allow creating ConnHdlr without a P-TMSI This will be useful for testing paging cases where no P-TMSI is allocated. Change-Id: Icd780c750c77e723e545ed5a5b52ef26e442b4f2 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 10 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/39/22239/1 diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 6141f6a..f1e8749 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -1,6 +1,7 @@ module GBProxy_Tests { /* Osmocom GBProxy test suite in TTCN-3 + * (C) 2020-2021 Harald Welte * (C) 2020 sysmocom - s.f.m.c. GmbH * All rights reserved. * @@ -601,8 +602,8 @@ type function void_fn(charstring id) runs on BSSGP_ConnHdlr; /* helper function to create, connect and start a BSSGP_ConnHdlr component */ -function f_start_handler(void_fn fn, charstring id, integer imsi_suffix, -float t_guard := 30.0, integer sgsn_idx := 0, integer nri_idx := 0) +function f_start_handler(void_fn fn, charstring id, integer imsi_suffix, float t_guard := 30.0, +integer sgsn_idx := 0, integer nri_idx := 0, boolean have_ptmsi := true) runs on test_CT return BSSGP_ConnHdlr { var BSSGP_ConnHdlr vc_conn; var integer nri := mp_sgsn_nri[sgsn_idx][nri_idx]; @@ -622,6 +623,9 @@ sgsn_idx := sgsn_idx, t_guard := t_guard }; + if (not have_ptmsi) { + pars.p_tmsi := omit; + } vc_conn := BSSGP_ConnHdlr.create(id); @@ -629,7 +633,8 @@ return vc_conn; } -function f_start_handlers(void_fn fn, charstring id, integer imsi_suffix, float t_guard := 30.0) +function f_start_handlers(void_fn fn, charstring id, integer imsi_suffix, float t_guard := 30.0, + boolean have_ptmsi := true) runs on test_CT { var integer sgsn_idx, nri_idx; @@ -637,8 +642,8 @@ for (nri_idx := 0; nri_idx < lengthof(mp_sgsn_nri[sgsn_idx]); nri_idx:=nri_idx+1) { var integer extd_imsi_suffix := 1000*sgsn_idx + 100*nri_idx; var BSSGP_ConnHdlr vc_conn; - vc_conn := f_start_handler(fn, id, extd_imsi_suffix, t_guard, - sgsn_idx, nri_idx); + vc_conn := f_start_handler(fn, id, extd_imsi_suffix, t_guard, sgsn_idx, nri_idx, + have_ptmsi); /* Idea: we could also run them in parallel ? */ vc_conn.done; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22239 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: Icd780c750c77e723e545ed5a5b52ef26e442b4f2 Gerrit-Change-Number: 22239 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
Change in osmo-ttcn3-hacks[master]: gpbroxy: Execute TC_load_sharing_dl() for each SGSNH in pool
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22236 ) Change subject: gpbroxy: Execute TC_load_sharing_dl() for each SGSNH in pool .. gpbroxy: Execute TC_load_sharing_dl() for each SGSNH in pool Change-Id: I4ad822d3bbf5eb6181f6811c3b2267a50bb533a4 Related: OS#4951 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 14 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/36/22236/1 diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 4b7d246..f0175c2 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -1177,16 +1177,15 @@ var octetstring payload := f_rnd_octstring(i); var template (value) PDU_BSSGP pdu_tx := ts_BSSGP_DL_UD(g_pars.tlli, payload, omit, ts_BSSGP_IMSI(g_pars.imsi)); - SGSN_PTP[0].send(pdu_tx); + SGSN_PTP[g_pars.sgsn_idx].send(pdu_tx); } setverdict(pass); } -testcase TC_load_sharing_dl() runs on test_CT_NS + +private function f_TC_load_sharing_dl(integer sgsn_idx) runs on test_CT_NS { const integer num_ue := 10; var BSSGP_ConnHdlr vc_conn[num_ue]; - f_init(); - /* all BVC are now fully brought up. We disconnect BSSGP from NS on the BSS * side so we get the raw NsUnitdataIndication and hence observe different * NSVCI */ @@ -1199,7 +1198,8 @@ /* start parallel components generating DL-UNITDATA from the SGSN side */ for (var integer i:= 0; i < num_ue; i := i+1) { - vc_conn[i] := f_start_handler(refers(f_TC_dl_ud_unidir), testcasename(), g_pcu, g_sgsn, 5+i); + vc_conn[i] := f_start_handler(refers(f_TC_dl_ud_unidir), testcasename(), g_pcu, g_sgsn, + 5+i, 30.0, sgsn_idx); } /* now start counting all the messages that were queued before */ @@ -1227,6 +1227,15 @@ setverdict(fail, "Data not shared over all NSVC"); } } +} + +testcase TC_load_sharing_dl() runs on test_CT_NS +{ + var integer sgsn_idx, nri_idx; + f_init(); + for (sgsn_idx:=0; sgsn_idx < NUM_SGSN; sgsn_idx:=sgsn_idx+1) { + f_TC_load_sharing_dl(sgsn_idx); + } setverdict(pass); } private altstep as_NsUdiCount(integer nsvc_idx, inout ro_integer roi) runs on test_CT_NS { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22236 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: I4ad822d3bbf5eb6181f6811c3b2267a50bb533a4 Gerrit-Change-Number: 22236 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
Change in osmo-ttcn3-hacks[master]: gbproy: Configure a Second SGSN
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698 ) Change subject: gbproy: Configure a Second SGSN .. Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698/3//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698/3//COMMIT_MSG@7 PS3, Line 7: gbproy: Configure a Second SGSN If you touch it anyway: gbproxy -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21698 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: Ib70f7c1a29f089957f882df0e9b05ee526224611 Gerrit-Change-Number: 21698 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 14:19:41 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in libosmocore[master]: Refactor ns2_nsvc_create_ip*
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/22235 ) Change subject: Refactor ns2_nsvc_create_ip* .. Refactor ns2_nsvc_create_ip* Move code common in ipv4/6 into a separate function and call that function. Change-Id: I076d53bee2e67e1cb3ad6ee5cd05c63ebe3359fb Related: OS#4948 --- M src/gb/gprs_ns2_sns.c 1 file changed, 27 insertions(+), 38 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/35/22235/1 diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c index 1958477..90688af 100644 --- a/src/gb/gprs_ns2_sns.c +++ b/src/gb/gprs_ns2_sns.c @@ -255,66 +255,55 @@ } } -static void ns2_nsvc_create_ip4(struct osmo_fsm_inst *fi, -struct gprs_ns2_nse *nse, -const struct gprs_ns_ie_ip4_elem *ip4) +static void ns2_vc_create_ip(struct osmo_fsm_inst *fi, struct gprs_ns2_nse *nse, struct osmo_sockaddr *remote, +uint8_t sig_weight, uint8_t data_weight) { struct gprs_ns2_inst *nsi = nse->nsi; struct gprs_ns2_vc *nsvc; struct gprs_ns2_vc_bind *bind; + + /* for every bind, create a connection if bind type == IP */ + llist_for_each_entry(bind, >binding, list) { + if (bind->ll != GPRS_NS2_LL_UDP) + continue; + /* ignore failed connection */ + nsvc = gprs_ns2_ip_connect_inactive(bind, + remote, + nse, 0); + if (!nsvc) { + LOGPFSML(fi, LOGL_ERROR, "SNS-CONFIG: Failed to create NSVC\n"); + continue; + } + + nsvc->sig_weight = sig_weight; + nsvc->data_weight = data_weight; + } +} + +static void ns2_nsvc_create_ip4(struct osmo_fsm_inst *fi, +struct gprs_ns2_nse *nse, +const struct gprs_ns_ie_ip4_elem *ip4) +{ struct osmo_sockaddr remote = { }; /* copy over. Both data structures use network byte order */ remote.u.sin.sin_family = AF_INET; remote.u.sin.sin_addr.s_addr = ip4->ip_addr; remote.u.sin.sin_port = ip4->udp_port; - /* for every bind, create a connection if bind type == IP */ - llist_for_each_entry(bind, >binding, list) { - if (bind->ll != GPRS_NS2_LL_UDP) - continue; - /* ignore failed connection */ - nsvc = gprs_ns2_ip_connect_inactive(bind, - , - nse, 0); - if (!nsvc) { - LOGPFSML(fi, LOGL_ERROR, "SNS-CONFIG: Failed to create NSVC\n"); - continue; - } - - nsvc->sig_weight = ip4->sig_weight; - nsvc->data_weight = ip4->data_weight; - } + ns2_vc_create_ip(fi, nse, , ip4->sig_weight, ip4->data_weight); } static void ns2_nsvc_create_ip6(struct osmo_fsm_inst *fi, struct gprs_ns2_nse *nse, const struct gprs_ns_ie_ip6_elem *ip6) { - struct gprs_ns2_inst *nsi = nse->nsi; - struct gprs_ns2_vc *nsvc; - struct gprs_ns2_vc_bind *bind; struct osmo_sockaddr remote = {}; /* copy over. Both data structures use network byte order */ remote.u.sin6.sin6_family = AF_INET6; remote.u.sin6.sin6_addr = ip6->ip_addr; remote.u.sin6.sin6_port = ip6->udp_port; - /* for every bind, create a connection if bind type == IP */ - llist_for_each_entry(bind, >binding, list) { - if (bind->ll != GPRS_NS2_LL_UDP) - continue; - /* ignore failed connection */ - nsvc = gprs_ns2_ip_connect_inactive(bind, - , - nse, 0); - if (!nsvc) { - LOGPFSML(fi, LOGL_ERROR, "SNS-CONFIG: Failed to create NSVC\n"); - continue; - } - - nsvc->sig_weight = ip6->sig_weight; - nsvc->data_weight = ip6->data_weight; - } + ns2_vc_create_ip(fi, nse, , ip6->sig_weight, ip6->data_weight); } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I076d53bee2e67e1cb3ad6ee5cd05c63ebe3359fb Gerrit-Change-Number: 22235 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-MessageType: newchange
Change in libosmocore[master]: ns2: Add sanity checks
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/22234 ) Change subject: ns2: Add sanity checks .. ns2: Add sanity checks Prevent memory corruption or segfaults by asserting that NSE and bind link layer match. A mismatch should never happen and might cause the bind to access invalid memory when sending because nsvc->priv doesn't match what it expects. Change-Id: I7ca4cd1c5dac8b5e44ffc4825b9373b2d04911ab Related: OS#4948 --- M src/gb/gprs_ns2.c M src/gb/gprs_ns2_message.c 2 files changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/34/22234/1 diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c index e43b636..3ca87a4 100644 --- a/src/gb/gprs_ns2.c +++ b/src/gb/gprs_ns2.c @@ -490,6 +490,9 @@ struct gprs_ns2_vc *ns2_vc_alloc(struct gprs_ns2_vc_bind *bind, struct gprs_ns2_nse *nse, bool initiater, enum gprs_ns2_vc_mode vc_mode) { + /* Sanity check */ + OSMO_ASSERT(bind->ll == nse->ll); + struct gprs_ns2_vc *nsvc = talloc_zero(bind, struct gprs_ns2_vc); if (!nsvc) diff --git a/src/gb/gprs_ns2_message.c b/src/gb/gprs_ns2_message.c index eb9a198..35d3ba7 100644 --- a/src/gb/gprs_ns2_message.c +++ b/src/gb/gprs_ns2_message.c @@ -187,6 +187,7 @@ /* transmit functions */ static int ns2_tx_simple(struct gprs_ns2_vc *nsvc, uint8_t pdu_type) { + OSMO_ASSERT(nsvc->bind->ll == nsvc->nse->ll); struct msgb *msg = gprs_ns2_msgb_alloc(); struct gprs_ns_hdr *nsh; @@ -210,6 +211,7 @@ * \returns 0 in case of success */ int ns2_tx_block(struct gprs_ns2_vc *nsvc, uint8_t cause) { + OSMO_ASSERT(nsvc->bind->ll == nsvc->nse->ll); struct msgb *msg; struct gprs_ns_hdr *nsh; uint16_t nsvci = osmo_htons(nsvc->nsvci); @@ -243,6 +245,7 @@ * \returns 0 in case of success */ int ns2_tx_block_ack(struct gprs_ns2_vc *nsvc) { + OSMO_ASSERT(nsvc->bind->ll == nsvc->nse->ll); struct msgb *msg; struct gprs_ns_hdr *nsh; uint16_t nsvci = osmo_htons(nsvc->nsvci); @@ -274,6 +277,7 @@ * \returns 0 in case of success */ int ns2_tx_reset(struct gprs_ns2_vc *nsvc, uint8_t cause) { + OSMO_ASSERT(nsvc->bind->ll == nsvc->nse->ll); struct msgb *msg; struct gprs_ns_hdr *nsh; uint16_t nsvci = osmo_htons(nsvc->nsvci); @@ -307,6 +311,7 @@ * \returns 0 in case of success */ int ns2_tx_reset_ack(struct gprs_ns2_vc *nsvc) { + OSMO_ASSERT(nsvc->bind->ll == nsvc->nse->ll); struct msgb *msg; struct gprs_ns_hdr *nsh; uint16_t nsvci, nsei; @@ -407,6 +412,7 @@ uint16_t bvci, uint8_t sducontrol, struct msgb *msg) { + OSMO_ASSERT(nsvc->bind->ll == nsvc->nse->ll); struct gprs_ns_hdr *nsh; log_set_context(LOG_CTX_GB_NSE, nsvc->nse); @@ -437,6 +443,7 @@ int ns2_tx_status(struct gprs_ns2_vc *nsvc, uint8_t cause, uint16_t bvci, struct msgb *orig_msg) { + OSMO_ASSERT(nsvc->bind->ll == nsvc->nse->ll); struct msgb *msg = gprs_ns2_msgb_alloc(); struct gprs_ns_hdr *nsh; uint16_t nsvci = osmo_htons(nsvc->nsvci); @@ -498,6 +505,7 @@ const struct gprs_ns_ie_ip6_elem *ip6_elems, unsigned int num_ip6_elems) { + OSMO_ASSERT(nsvc->bind->ll == nsvc->nse->ll); struct msgb *msg = gprs_ns2_msgb_alloc(); struct gprs_ns_hdr *nsh; uint16_t nsei; @@ -557,6 +565,7 @@ const struct gprs_ns_ie_ip6_elem *ip6_elems, unsigned int num_ip6_elems) { + OSMO_ASSERT(nsvc->bind->ll == nsvc->nse->ll); struct msgb *msg; struct gprs_ns_hdr *nsh; uint16_t nsei; @@ -607,6 +616,7 @@ * \returns 0 on success; negative in case of error */ int ns2_tx_sns_config_ack(struct gprs_ns2_vc *nsvc, uint8_t *cause) { + OSMO_ASSERT(nsvc->bind->ll == nsvc->nse->ll); struct msgb *msg; struct gprs_ns_hdr *nsh; uint16_t nsei; @@ -652,6 +662,7 @@ int ns2_tx_sns_size(struct gprs_ns2_vc *nsvc, bool reset_flag, uint16_t max_nr_nsvc, int ip4_ep_nr, int ip6_ep_nr) { + OSMO_ASSERT(nsvc->bind->ll == nsvc->nse->ll); struct msgb *msg = gprs_ns2_msgb_alloc(); struct gprs_ns_hdr *nsh; uint16_t nsei; @@ -697,6 +708,7 @@ * \returns 0 on success; negative in case of error */ int ns2_tx_sns_size_ack(struct gprs_ns2_vc *nsvc, uint8_t *cause) { + OSMO_ASSERT(nsvc->bind->ll == nsvc->nse->ll); struct msgb *msg = gprs_ns2_msgb_alloc(); struct gprs_ns_hdr *nsh; uint16_t nsei; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project:
Change in osmo-ttcn3-hacks[master]: gbproxy: Execute each ConnHdlr test on each NRI of each SGSN configured
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22233 to look at the new patch set (#2). Change subject: gbproxy: Execute each ConnHdlr test on each NRI of each SGSN configured .. gbproxy: Execute each ConnHdlr test on each NRI of each SGSN configured This helps us to get proper test coverage for SGSN pool situations. Change-Id: Ie22d3fd786ff8fefe919ecc3a96f974675057e29 Related: OS#4951 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 66 insertions(+), 191 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/33/22233/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22233 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: Ie22d3fd786ff8fefe919ecc3a96f974675057e29 Gerrit-Change-Number: 22233 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: gbproxy: Execute each ConnHdlr test on each NRI of each SGSN configured
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22233 ) Change subject: gbproxy: Execute each ConnHdlr test on each NRI of each SGSN configured .. gbproxy: Execute each ConnHdlr test on each NRI of each SGSN configured This helps us to get proper test coverage for SGSN pool situations. Change-Id: Ie22d3fd786ff8fefe919ecc3a96f974675057e29 Related: OS#4951 --- M gbproxy/GBProxy_Tests.ttcn 1 file changed, 66 insertions(+), 179 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/33/22233/1 diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index aa334ec..f56a4b0 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -353,6 +353,8 @@ RoutingAreaIdentificationV ra optional, GbInstances pcu, GbInstances sgsn, + /* The SGSN index to be used within the test */ + integer sgsn_idx, float t_guard }; @@ -600,9 +602,10 @@ /* helper function to create, connect and start a BSSGP_ConnHdlr component */ function f_start_handler(void_fn fn, charstring id, GbInstances pcu, GbInstances sgsn, integer imsi_suffix, -float t_guard := 30.0, integer nri := mp_sgsn_nri[0][0]) +float t_guard := 30.0, integer sgsn_idx := 0, integer nri_idx := 0) runs on test_CT return BSSGP_ConnHdlr { var BSSGP_ConnHdlr vc_conn; + var integer nri := mp_sgsn_nri[sgsn_idx][nri_idx]; var OCT4 p_tmsi := f_gen_tmsi(imsi_suffix, nri_v := nri, nri_bitlen := mp_nri_bitlength); var BSSGP_ConnHdlrPars pars := { @@ -616,6 +619,7 @@ ra := omit, pcu := pcu, sgsn := sgsn, + sgsn_idx := sgsn_idx, t_guard := t_guard }; @@ -625,6 +629,23 @@ return vc_conn; } +function f_start_handlers(void_fn fn, charstring id, GbInstances pcu, GbInstances sgsn, + integer imsi_suffix, float t_guard := 30.0) +runs on test_CT +{ + var integer sgsn_idx, nri_idx; + for (sgsn_idx := 0; sgsn_idx < NUM_SGSN; sgsn_idx:=sgsn_idx+1) { + for (nri_idx := 0; nri_idx < lengthof(mp_sgsn_nri[sgsn_idx]); nri_idx:=nri_idx+1) { + var integer extd_imsi_suffix := 1000*sgsn_idx + 100*nri_idx; + var BSSGP_ConnHdlr vc_conn; + vc_conn := f_start_handler(fn, id, pcu, sgsn, extd_imsi_suffix, t_guard, + sgsn_idx, nri_idx); + /* Idea: we could also run them in parallel ? */ + vc_conn.done; + } + } +} + /* Connect the PCU-side per-BVC ports (PCU/PCU_SIG/PCU_PROC) array slot 'port_idx' to specified per-BVC component */ private function f_connect_to_pcu_bvc(integer port_idx, integer nse_idx, integer bvc_idx) runs on BSSGP_ConnHdlr { @@ -711,7 +732,8 @@ /* Send 'tx' on PTP-BVCI from PCU; expect 'rx' on SGSN */ friend function f_pcu2sgsn(template (value) PDU_BSSGP tx, template (present) PDU_BSSGP exp_rx, - integer pcu_idx := 0, integer sgsn_idx := 0, boolean use_sig := false) runs on BSSGP_ConnHdlr { + integer pcu_idx := 0, boolean use_sig := false) runs on BSSGP_ConnHdlr { + var integer sgsn_idx := g_pars.sgsn_idx; var PDU_BSSGP rx; timer T := 1.0; @@ -730,15 +752,15 @@ setverdict(pass); } [] SGSN_PTP[sgsn_idx].receive(PDU_BSSGP:?) -> value rx { - setverdict(fail, "Unexpected BSSGP on SGSN side: ", rx); + setverdict(fail, "Unexpected BSSGP on SGSN[", sgsn_idx, "] side: ", rx); mtc.stop; } [] SGSN_SIG[sgsn_idx].receive(PDU_BSSGP:?) -> value rx { - setverdict(fail, "Unexpected SIG BSSGP on SGSN side: ", rx); + setverdict(fail, "Unexpected SIG BSSGP on SGSN[", sgsn_idx, "] side: ", rx); mtc.stop; } [] T.timeout { - setverdict(fail, "Timeout waiting for BSSGP on SGSN side: ", exp_rx); + setverdict(fail, "Timeout waiting for BSSGP on SGSN[", sgsn_idx, "] side: ", exp_rx); mtc.stop; } } @@ -746,7 +768,8 @@ /* Send 'tx' on PTP-BVCI from SGSN; expect 'rx' on PCU */ friend function f_sgsn2pcu(template (value) PDU_BSSGP tx, template (present) PDU_BSSGP exp_rx, - integer sgsn_idx:= 0, integer pcu_idx := 0, boolean use_sig := false) runs on BSSGP_ConnHdlr { + integer pcu_idx := 0, boolean use_sig := false) runs on BSSGP_ConnHdlr { + var integer sgsn_idx := g_pars.sgsn_idx; var PDU_BSSGP rx; timer T := 1.0; @@ -877,11 +900,9 @@ } testcase TC_BVC_bringup() runs on test_CT { -
Change in osmo-ttcn3-hacks[master]: gbproxy: Move away from random TLLI
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/6 ) Change subject: gbproxy: Move away from random TLLI .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/6 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: Ic1eaa1d298fe998ca97432769953bfc5a5333ae4 Gerrit-Change-Number: 6 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-CC: pespin Gerrit-Comment-Date: Sat, 16 Jan 2021 08:03:15 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment