test: Add a DoubleRelease for something seen on a Rhizomatica deployment
The combination of SAPI=3 not being established, the T200 expiring and a general SACCH Connection Failure is apparently leading to the NITB releasing a channel twice!
This commit is contained in:
parent
a3fc28999f
commit
f453b4cc48
|
@ -0,0 +1,91 @@
|
|||
"
|
||||
(C) 2014 by Holger Hans Peter Freyther
|
||||
All Rights Reserved
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"
|
||||
|
||||
PackageLoader fileInPackage: #FakeBTS.
|
||||
|
||||
FakeBTS.RSLEstablishRequest extend [
|
||||
trxDispatchOn: aTrx with: lchan [
|
||||
| msg |
|
||||
<category: '*-BTS-Core'>
|
||||
|
||||
'Got an establish request.' printNl.
|
||||
msg := FakeBTS.RSLConnectionFailure new
|
||||
channelNumber: self channelNumber;
|
||||
cause: #[1] asRSLAttributeData;
|
||||
yourself.
|
||||
aTrx mainBts sendRSL: msg toMessage on: aTrx.
|
||||
|
||||
msg := FakeBTS.RSLReleaseIndication new
|
||||
channelNumber: self channelNumber;
|
||||
linkIdentifier: self linkIdentifier;
|
||||
yourself.
|
||||
aTrx mainBts sendRSL: msg toMessage on: aTrx.
|
||||
|
||||
msg := FakeBTS.RSLErrorIndication new
|
||||
channelNumber: self channelNumber;
|
||||
linkIdentifier: self linkIdentifier;
|
||||
rlmCause: #[1] asRSLAttributeData;
|
||||
yourself.
|
||||
aTrx mainBts sendRSL: msg toMessage on: aTrx.
|
||||
]
|
||||
|
||||
trxDispatchOn: aTrx [
|
||||
<category: '*-BTS-Core'>
|
||||
self trxChannelDispatch: aTrx.
|
||||
]
|
||||
]
|
||||
|
||||
FakeBTS.OpenBSCTest subclass: DoubleRelease [
|
||||
| tmsi |
|
||||
|
||||
IMSI := '901010000001111'.
|
||||
|
||||
startTest [
|
||||
self createAndConnectBTS: '1234/0/0'.
|
||||
|
||||
bts onPaging: [:id | self handlePaging: id].
|
||||
tmsi := self allocateTmsi: IMSI.
|
||||
]
|
||||
|
||||
handlePaging: id [
|
||||
"Handle paging for TMSI2"
|
||||
id tmsi = tmsi ifFalse: [^self].
|
||||
|
||||
"Run it on another process"
|
||||
[self handlePagingResponse] fork.
|
||||
]
|
||||
|
||||
handlePagingResponse [
|
||||
| lchan msg ti |
|
||||
"Handle paging response..."
|
||||
lchan := self requireAnyChannel.
|
||||
msg := GSM48RRPagingResponse new.
|
||||
msg mi tmsi: tmsi.
|
||||
lchan sendGSM: msg toMessage.
|
||||
|
||||
Semaphore new wait.
|
||||
]
|
||||
]
|
||||
|
||||
Eval [
|
||||
DoubleRelease new
|
||||
startTest.
|
||||
|
||||
'Waiting to the end' printNl.
|
||||
Semaphore new wait.
|
||||
]
|
|
@ -0,0 +1,35 @@
|
|||
This tests some odd LAPDm and MS behavior that leads to a double
|
||||
RF Channel Release by the BSC/NITB.
|
||||
|
||||
It is a manual test right now. After the LU a SMS needs to be
|
||||
queued through the VTY and then the error/failure sequence will
|
||||
be sent to the BSC.
|
||||
|
||||
The test is passed when no exceptions like the below are raised
|
||||
|
||||
An instance of SystemExceptions.NotFound
|
||||
creator: Dictionary (
|
||||
)
|
||||
tag: an Object
|
||||
messageText: 'key not found'
|
||||
resumeBlock: a BlockClosure
|
||||
onDoBlock: a BlockClosure
|
||||
handlerBlock: a BlockClosure
|
||||
context: BlockClosure>>on:do: (BlkClosure.st:196)
|
||||
isNested: nil
|
||||
previousState: 0
|
||||
value: 0
|
||||
With data: ByteArray (2 7 1 32 2 0 20 1 )
|
||||
RSL Parsing failed with
|
||||
An instance of Error
|
||||
creator: a LogicalChannel
|
||||
tag: an Object
|
||||
messageText: 'Lchan was not allocated.'
|
||||
resumeBlock: a BlockClosure
|
||||
onDoBlock: a BlockClosure
|
||||
handlerBlock: a BlockClosure
|
||||
context: BlockClosure>>on:do: (BlkClosure.st:196)
|
||||
isNested: nil
|
||||
previousState: 0
|
||||
With data: ByteArray (8 46 1 32 )
|
||||
|
Reference in New Issue