From aa14a3833d242d84f46b6b5947e4f45bd7889eca Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Thu, 26 Jul 2018 08:29:45 +0200 Subject: msc: Fix random error of TC_cl3_rnd_payload The random length for that test could go out of bounds leading to a Dynamic test case error when sending the message. The limiting field here is the lengthIndicator of PDU_BSSAP which includes the length of the PDU_BSSMAP mesageType, cellId as well as the layer3 info IE and lenght indicator additionally to the l3info payload. So maximum length for the payload can only be 240 bytes (if the cell ID is encoded in the longest possible way as BSSMAP_FIELD_LAC_RNC_CI). Change-Id: I7be33e261a11f03a80a6b770b6acf0a4be49b85b --- msc/MSC_Tests.ttcn | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'msc/MSC_Tests.ttcn') diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 1427fd01..4a6b8228 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -1155,7 +1155,11 @@ testcase TC_cl3_no_payload() runs on MTC_CT { private function f_tc_cl3_rnd_payload(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); - var integer len := float2int(rnd() * 256.0); + /* length is limited by PDU_BSSAP length field which includes some + * other fields beside l3info payload. So payl can only be 240 bytes + * Since rnd() returns values < 1 multiply with 241 + */ + var integer len := float2int(rnd() * 241.0); var octetstring payl := f_rnd_octstring(len); /* Send Complete L3 Info with empty L3 frame */ -- cgit v1.2.3