Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/13766


Change subject: sgsn: Add test cases to verify SABM handling on LLGMM + LL5
......................................................................

sgsn: Add test cases to verify SABM handling on LLGMM + LL5

As OsmoSGSN doesn't implement ABM, the correct resposne to any SABM
is DM.

Change-Id: Ib0d371a3356d6cb481b794945476ab40f5e0f02a
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 36 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/66/13766/1

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 78bee58..889a16f 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -2174,6 +2174,40 @@
        vc_conn.done;
 }

+/* Send LLC SABM to see if the SGSN rejects it properly with DM */
+private function f_TC_llc_sabm_dm_llgmm(charstring id) runs on BSSGP_ConnHdlr {
+       f_gmm_attach(false, false);
+       f_sleep(1.0);
+       f_send_llc(ts_LLC_SABM({}, '1'B, c_LLC_SAPI_LLGMM, LLC_CR_UL_CMD));
+       BSSGP[0].receive(tr_BD_LLC(tr_LLC_DM(?, c_LLC_SAPI_LLGMM, 
LLC_CR_DL_RSP)));
+       setverdict(pass);
+}
+testcase TC_llc_sabm_dm_llgmm() runs on test_CT {
+       var BSSGP_ConnHdlr vc_conn;
+       f_init();
+       f_sleep(1.0);
+       vc_conn := f_start_handler(refers(f_TC_llc_sabm_dm_llgmm), 
testcasename(), g_gb, 42);
+       vc_conn.done;
+}
+
+/* Send LLC SABM to see if the SGSN rejects it properly with DM */
+private function f_TC_llc_sabm_dm_ll5(charstring id) runs on BSSGP_ConnHdlr {
+       f_gmm_attach(false, false);
+       f_sleep(1.0);
+       f_send_llc(ts_LLC_SABM({}, '1'B, c_LLC_SAPI_LL5, LLC_CR_UL_CMD));
+       BSSGP[0].receive(tr_BD_LLC(tr_LLC_DM(?, c_LLC_SAPI_LL5, 
LLC_CR_DL_RSP)));
+       setverdict(pass);
+}
+testcase TC_llc_sabm_dm_ll5() runs on test_CT {
+       var BSSGP_ConnHdlr vc_conn;
+       f_init();
+       f_sleep(1.0);
+       vc_conn := f_start_handler(refers(f_TC_llc_sabm_dm_ll5), 
testcasename(), g_gb, 43);
+       vc_conn.done;
+}
+
+
+
 control {
        execute( TC_attach() );
        execute( TC_attach_mnc3() );
@@ -2220,6 +2254,8 @@
        execute( TC_attach_gmm_attach_req_while_gmm_attach() );

        execute( TC_llc_null() );
+       execute( TC_llc_sabm_dm_llgmm() );
+       execute( TC_llc_sabm_dm_ll5() );
 }



--
To view, visit https://gerrit.osmocom.org/13766
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0d371a3356d6cb481b794945476ab40f5e0f02a
Gerrit-Change-Number: 13766
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <[email protected]>

Reply via email to