BSC_Tests: Fix TC_assignment_fr_a5_4
Don't expect the ASSIGNMENT to fail in case of unsupported A5/4,
but expect a CIPHERING MODE REJECT.
Change-Id: I15024f61e67795b7e5ce72e1b641db6ca92ff76d
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 4c88788..4cf418e 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1338,7 +1338,7 @@
private function f_tc_assignment_fr_a5_4(charstring id) runs on MSC_ConnHdlr {
var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
- var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail;
+ var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?);
var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla));
const OCT8 kc := '0001020304050607'O;
@@ -1346,9 +1346,9 @@
ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType);
ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));
+ f_establish_fully(pars, ass_cmd, exp_compl);
+ f_cipher_mode('10'O, kc, kc128, true);
/* TODO: expect GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED cause value */
- f_establish_fully(pars, ass_cmd, exp_fail);
- f_cipher_mode('10'O, kc, kc128);
}
testcase TC_assignment_fr_a5_4() runs on test_CT {
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 51ac650..f683ef4 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -104,7 +104,8 @@
RSL.send(ts_RSL_DATA_IND(chan_nr, link_id, enc_PDU_ML3_MS_NW(valueof(l3))));
}
-function f_cipher_mode(OCT1 alg, OCT8 key, template OCT16 kc128 := omit) runs on MSC_ConnHdlr {
+function f_cipher_mode(OCT1 alg, OCT8 key, template OCT16 kc128 := omit, boolean exp_fail := false)
+runs on MSC_ConnHdlr {
var PDU_BSSAP bssap;
var RSL_Message rsl;
@@ -125,10 +126,18 @@
}
[] BSSAP.receive(tr_BSSMAP_CipherModeCompl) -> value bssap {
// bssap.bssmap.cipherModeComplete.chosenEncryptionAlgorithm.algoritmhIdentifier
- setverdict(pass);
+ if (exp_fail == true) {
+ setverdict(fail, "Unexpected Cipher Mode Complete");
+ } else {
+ setverdict(pass);
+ }
}
[] BSSAP.receive(tr_BSSMAP_CipherModeRej) -> value bssap {
- setverdict(fail, "Ciphering Mode Reject");
+ if (exp_fail == false) {
+ setverdict(fail, "Ciphering Mode Reject");
+ } else {
+ setverdict(pass);
+ }
}
}
}