| module PCU_Tests_RAW_SNS { |
| |
| import from Osmocom_Types all; |
| import from PCU_Tests all; |
| import from PCU_Tests_RAW all; |
| |
| /********************************************************************************** |
| * Modern Gb/IP bring-up test cases using IP Sub-Network Service (SNS) |
| **********************************************************************************/ |
| |
| /* PCU-originated SNS-SIZE: successful case */ |
| testcase TC_sns_po_size_success() runs on RAW_NS_CT { |
| f_init_ns_codec(); |
| f_init_pcuif(); |
| f_incoming_sns_size(); |
| f_sleep(1.0); |
| setverdict(pass); |
| } |
| |
| /* PCU-originated SNS-SIZE: NACK from our side */ |
| testcase TC_sns_po_size_nack() runs on RAW_NS_CT { |
| f_init_ns_codec(); |
| f_init_pcuif(); |
| f_incoming_sns_size(NS_CAUSE_PROTOCOL_ERROR_UNSPEIFIED); |
| /* FIXME: ensure we don't get a SNS-CONFIG */ |
| /* FIXME: ensure we get re-transmitted SNS-SIZE attempts */ |
| f_sleep(10.0); |
| setverdict(pass); |
| } |
| |
| /* PCU-originated SNS-CONFIG: successful case */ |
| testcase TC_sns_po_config_success() runs on RAW_NS_CT { |
| f_init_ns_codec(); |
| f_init_pcuif(); |
| f_incoming_sns_size(); |
| f_incoming_sns_config(); |
| f_sleep(1.0); |
| setverdict(pass); |
| } |
| |
| /* PCU-originated SNS-CONFIG: successful case */ |
| testcase TC_sns_po_config_nack() runs on RAW_NS_CT { |
| f_init_ns_codec(); |
| f_init_pcuif(); |
| f_incoming_sns_size(); |
| f_incoming_sns_config(NS_CAUSE_PROTOCOL_ERROR_UNSPEIFIED); |
| /* FIXME: ensure we get re-transmitted SNS-CONFIG attempts */ |
| f_sleep(10.0); |
| setverdict(pass); |
| } |
| |
| |
| /* SGSN-originated SNS-SIZE: successful case */ |
| testcase TC_sns_so_config_success() runs on RAW_NS_CT { |
| f_init_ns_codec(); |
| f_init_pcuif(); |
| f_incoming_sns_size(); |
| f_incoming_sns_config(); |
| f_outgoing_sns_config(); |
| |
| /* wait for one ALIVE cycle, then ACK any further ALIVE in the background */ |
| as_rx_alive_tx_ack(oneshot := true); |
| activate(as_rx_alive_tx_ack()); |
| |
| f_outgoing_ns_alive(); |
| |
| /* Expect BVC-RESET for signaling (0) and ptp BVCI */ |
| as_rx_bvc_reset_tx_ack(0, oneshot := true); |
| as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, oneshot := true); |
| as_rx_bvc_unblock_tx_ack(mp_gb_cfg.bvci, oneshot := true); |
| |
| /* wait for one FLOW-CONTROL BVC and then ACK any further in the future */ |
| as_rx_bvc_fc_tx_ack(mp_gb_cfg.bvci, oneshot := true); |
| activate(as_rx_bvc_fc_tx_ack(mp_gb_cfg.bvci)); |
| setverdict(pass); |
| } |
| |
| control { |
| execute( TC_sns_po_size_success() ); |
| execute( TC_sns_po_size_nack() ); |
| execute( TC_sns_po_config_success() ); |
| execute( TC_sns_po_config_nack() ); |
| execute( TC_sns_so_config_success() ); |
| } |
| |
| } |