PCU_Tests_NS: allow an UNBLOCK message to arrive before ALIVE
The ALIVE PDU does not have to be sent before an UNBLOCK message.
Ignore UNBLOCK messages in cases a single ALIVE is expected.
According to TS 48.016 v5.2.0, 7.4:
"Upon successful completion of an NS-VC reset procedure,
a BSS (or SGSN) shall start timer Tns-test, then [..]"
The ALIVE should arive Tns-test after the reset procedure (typ. 1s-60s).
Change-Id: I11d77b7477981998082967e5123b61636af2b980
diff --git a/pcu/PCU_Tests_NS.ttcn b/pcu/PCU_Tests_NS.ttcn
index ce2560f..f953be4 100644
--- a/pcu/PCU_Tests_NS.ttcn
+++ b/pcu/PCU_Tests_NS.ttcn
@@ -109,9 +109,11 @@
/* Expect inbound NS-RESET procedure */
as_rx_ns_reset_ack(oneshot := true);
+ alt {
/* wait for one ALIVE cycle, then ACK any further ALIVE in the background */
- as_rx_alive_tx_ack(oneshot := true);
- setverdict(pass);
+ [] NSCP[0].receive(t_NS_RecvFrom(t_NS_ALIVE)) { setverdict(pass); };
+ [] NSCP[0].receive(t_NS_RecvFrom(t_NS_UNBLOCK)) { repeat; }
+ }
}
/* Test for NS-RESET after NS-ALIVE timeout */
@@ -123,12 +125,16 @@
as_rx_ns_reset_ack(oneshot := true);
/* wait for at least one NS-ALIVE */
- NSCP[0].receive(t_NS_RecvFrom(t_NS_ALIVE));
+ alt {
+ [] as_rx_alive_tx_ack(oneshot := true) { };
+ [] NSCP[0].receive(t_NS_RecvFrom(t_NS_UNBLOCK)) { repeat; }
+ }
/* wait for NS-RESET to re-appear, ignoring any NS-ALIVE until then */
alt {
[] as_rx_ns_reset_ack(oneshot := true) { setverdict(pass); }
[] NSCP[0].receive(t_NS_RecvFrom(t_NS_ALIVE)) { repeat; }
+ [] NSCP[0].receive(t_NS_RecvFrom(t_NS_UNBLOCK)) { repeat; }
}
}
@@ -140,8 +146,7 @@
/* Expect inbound NS-RESET procedure */
as_rx_ns_reset_ack(oneshot := true);
- /* wait for one ALIVE cycle, then ACK any further ALIVE in the background */
- as_rx_alive_tx_ack(oneshot := true);
+ /* keep it alive */
activate(as_rx_alive_tx_ack());
as_rx_ns_unblock_ack(oneshot := true);
@@ -156,8 +161,7 @@
/* Expect inbound NS-RESET procedure */
as_rx_ns_reset_ack(oneshot := true);
- /* wait for one ALIVE cycle, then ACK any further ALIVE in the background */
- as_rx_alive_tx_ack(oneshot := true);
+ /* keep it alive */
activate(as_rx_alive_tx_ack());
/* wait for first NS-UNBLOCK, don't respond */
@@ -176,8 +180,7 @@
/* Expect inbound NS-RESET procedure */
as_rx_ns_reset_ack(oneshot := true);
- /* wait for one ALIVE cycle, then ACK any further ALIVE in the background */
- as_rx_alive_tx_ack(oneshot := true);
+ /* keep it alive */
activate(as_rx_alive_tx_ack());
as_rx_ns_unblock_ack(oneshot := true);
@@ -203,8 +206,7 @@
/* Expect inbound NS-RESET procedure */
as_rx_ns_reset_ack(oneshot := true);
- /* wait for one ALIVE cycle, then ACK any further ALIVE in the background */
- as_rx_alive_tx_ack(oneshot := true);
+ /* keep it alive */
activate(as_rx_alive_tx_ack());
as_rx_ns_unblock_ack(oneshot := true);