Loading ttcn/Ats6RD/Ats6RD_TestCases.ttcn3 +22 −35 Original line number Diff line number Diff line Loading @@ -754,7 +754,7 @@ module Ats6RD_TestCases { } // End of 'for' statement // Start all components vc_brComponent.start(f_TC_6RD_CPE_MSSC_BV_001_br(v_hostBrDataMsgs)); vc_brComponent.start(f_TC_6RD_CPE_MSSC_BV_001_br()); for (v_host := 0; v_host < v_hostNum; v_host := v_host + 1) { vc_hostComponents[v_host].start(f_TC_6RD_CPE_MSSC_BV_001_host(v_hostBrDataMsgs[v_host])); } // End of 'for' statement Loading @@ -774,13 +774,9 @@ module Ats6RD_TestCases { group f_TC_6RD_CPE_MSSC_BV_001 { function f_TC_6RD_CPE_MSSC_BV_001_br(in HostBrDataMsgs p_hostBrDataMsgs) runs on BRComponent { function f_TC_6RD_CPE_MSSC_BV_001_br() runs on BRComponent { // Local variables var integer v_hostNum := lengthof(PX_MSSC_HOST_V6_LIST_CPE); /** Expected number of IPv6 packets to be forwarded */ var Ipv6Packet v_ipv6Packet; /** Received IPv6 packet */ var ResultsList v_results; /** List of flags indicating the linked IPv4 packet was forwarded */ var integer v_host; /** 'for' statement counter */ // Preamble // Clause 'Initial conditions' Loading @@ -804,34 +800,9 @@ module Ats6RD_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_error); log("*** " & __SCOPE__ & ": INCONC: The IUT shall drop the packet due to segment size greater than the IUT MSS value. ***"); } [] ipPort.receive( // the IUT returns a packet-too-big message to the originator mw_packetTooBig_noExtHdr_code( ?, ?, c_icmpCode0) ) -> value v_ipv6Packet { tc_ac.stop; for (v_host := 0; v_host < v_hostNum; v_host := v_host + 1) { if ( (v_ipv6Packet.ipv6Hdr.sourceAddress == p_hostBrDataMsgs[v_host].payload.ipv6Packet.ipv6Hdr.destinationAddress) and (v_ipv6Packet.ipv6Hdr.destinationAddress == p_hostBrDataMsgs[v_host].payload.ipv6Packet.ipv6Hdr.sourceAddress) ) { log("*** " & __SCOPE__ & ": INFO: Receives 'packet-too-big' message for host #", v_host, ". ***"); v_results[v_host] := true; break; } } // End of 'for' statement if (lengthof(v_results) == v_hostNum) { // Check current result log("*** " & __SCOPE__ & ": PASS: The IUT drops the packet & returns a packet-too-big message to the originator. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } else { tc_ac.start; repeat; } } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": INCONC: The IUT drops the packets. ***"); } } // End of 'altstep' statement Loading @@ -856,8 +827,24 @@ module Ats6RD_TestCases { // Clause 'when': the IUT receives multiple HTML IPv6 packets ipv6Port.send(p_host.payload.ipv6Packet); // Clause 'then': Nothing to do // Clause 'then': the IUT returns a packet-too-big message to the originator tc_ac.start; alt { [] ipv6Port.receive( // the IUT returns a packet-too-big message to the originator mw_packetTooBig_noExtHdr_code( p_host.payload.ipv6Packet.ipv6Hdr.destinationAddress, // Source is the SUT p_host.payload.ipv6Packet.ipv6Hdr.sourceAddress, // Destination is the host c_icmpCode0) ) { tc_ac.stop; log("*** " & __SCOPE__ & ": PASS: The IUT drops the packet & returns a packet-too-big message to the originator. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***"); } } // End of 'altstep' statement // Postamble f_postamble_host(); Loading Loading
ttcn/Ats6RD/Ats6RD_TestCases.ttcn3 +22 −35 Original line number Diff line number Diff line Loading @@ -754,7 +754,7 @@ module Ats6RD_TestCases { } // End of 'for' statement // Start all components vc_brComponent.start(f_TC_6RD_CPE_MSSC_BV_001_br(v_hostBrDataMsgs)); vc_brComponent.start(f_TC_6RD_CPE_MSSC_BV_001_br()); for (v_host := 0; v_host < v_hostNum; v_host := v_host + 1) { vc_hostComponents[v_host].start(f_TC_6RD_CPE_MSSC_BV_001_host(v_hostBrDataMsgs[v_host])); } // End of 'for' statement Loading @@ -774,13 +774,9 @@ module Ats6RD_TestCases { group f_TC_6RD_CPE_MSSC_BV_001 { function f_TC_6RD_CPE_MSSC_BV_001_br(in HostBrDataMsgs p_hostBrDataMsgs) runs on BRComponent { function f_TC_6RD_CPE_MSSC_BV_001_br() runs on BRComponent { // Local variables var integer v_hostNum := lengthof(PX_MSSC_HOST_V6_LIST_CPE); /** Expected number of IPv6 packets to be forwarded */ var Ipv6Packet v_ipv6Packet; /** Received IPv6 packet */ var ResultsList v_results; /** List of flags indicating the linked IPv4 packet was forwarded */ var integer v_host; /** 'for' statement counter */ // Preamble // Clause 'Initial conditions' Loading @@ -804,34 +800,9 @@ module Ats6RD_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_error); log("*** " & __SCOPE__ & ": INCONC: The IUT shall drop the packet due to segment size greater than the IUT MSS value. ***"); } [] ipPort.receive( // the IUT returns a packet-too-big message to the originator mw_packetTooBig_noExtHdr_code( ?, ?, c_icmpCode0) ) -> value v_ipv6Packet { tc_ac.stop; for (v_host := 0; v_host < v_hostNum; v_host := v_host + 1) { if ( (v_ipv6Packet.ipv6Hdr.sourceAddress == p_hostBrDataMsgs[v_host].payload.ipv6Packet.ipv6Hdr.destinationAddress) and (v_ipv6Packet.ipv6Hdr.destinationAddress == p_hostBrDataMsgs[v_host].payload.ipv6Packet.ipv6Hdr.sourceAddress) ) { log("*** " & __SCOPE__ & ": INFO: Receives 'packet-too-big' message for host #", v_host, ". ***"); v_results[v_host] := true; break; } } // End of 'for' statement if (lengthof(v_results) == v_hostNum) { // Check current result log("*** " & __SCOPE__ & ": PASS: The IUT drops the packet & returns a packet-too-big message to the originator. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } else { tc_ac.start; repeat; } } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": INCONC: The IUT drops the packets. ***"); } } // End of 'altstep' statement Loading @@ -856,8 +827,24 @@ module Ats6RD_TestCases { // Clause 'when': the IUT receives multiple HTML IPv6 packets ipv6Port.send(p_host.payload.ipv6Packet); // Clause 'then': Nothing to do // Clause 'then': the IUT returns a packet-too-big message to the originator tc_ac.start; alt { [] ipv6Port.receive( // the IUT returns a packet-too-big message to the originator mw_packetTooBig_noExtHdr_code( p_host.payload.ipv6Packet.ipv6Hdr.destinationAddress, // Source is the SUT p_host.payload.ipv6Packet.ipv6Hdr.sourceAddress, // Destination is the host c_icmpCode0) ) { tc_ac.stop; log("*** " & __SCOPE__ & ": PASS: The IUT drops the packet & returns a packet-too-big message to the originator. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***"); } } // End of 'altstep' statement // Postamble f_postamble_host(); Loading