Loading ttcn/AtsDSlite/AtsDSLite_TestCases.ttcn3 +1 −0 Original line number Diff line number Diff line Loading @@ -2052,6 +2052,7 @@ module AtsDSLite_TestCases { log("*** " & __SCOPE__ & ": IPv4 packet was correctly forwarded. ***"); if (v_nbrReceived != p_noOfDataRequests) { v_nbrReceived := v_nbrReceived + 1; tc_ac.start; repeat; } } Loading ttcn/AtsMAPE/AtsMapE_TestCases.ttcn3 +78 −13 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ module AtsMapE_TestCases { import from LibIpv6_Interface_Functions all; import from LibIpv6_Rfc2463Icmpv6_Templates all; import from LibIpv6_Rfc792Icmpv4_Templates all; import from LibIpv6_Rfc2461NeighborDiscovery_Templates all; // AtsCommon import from AtsCommon_TypesAndValues all; Loading Loading @@ -1653,6 +1654,7 @@ module AtsMapE_TestCases { } // Test component configuration vc_brComponents[0] := BRComponent.create(c_COMP_AFTR); vc_dhcpv6Component := HostComponent.create(c_COMP_DHCP); vc_hostComponents[0] := HostComponent.create(c_COMP_HTTP); f_mtcUp(); Loading @@ -1660,6 +1662,7 @@ module AtsMapE_TestCases { // Test adapter configuration // Start all components vc_brComponents[0].start(f_TC_MAPE_CPE_GWA_BV_02_br()); vc_dhcpv6Component.start(f_TC_MAPE_CPE_GWA_BV_01_dhcpv6()); vc_hostComponents[0].start(f_TC_MAPE_CPE_GWA_BV_02_host_http( PX_MAPE_MAPPING_TABLE_A_PLUS_P.mapInfos[0].ip4Address, Loading @@ -1667,7 +1670,7 @@ module AtsMapE_TestCases { v_noOfDataRequests )); f_serverSyncNClientsAndStop(2, { c_prDone, c_startDefaultRouteCheck, c_tbDone, c_poDone }); f_serverSyncNClientsAndStop(3, { c_prDone, c_startDefaultRouteCheck, c_tbDone, c_poDone }); // Test Body action("the IUT goes online"); Loading @@ -1681,6 +1684,57 @@ module AtsMapE_TestCases { group f_TC_MAPE_CPE_GWA_BV_02 { /** * @desc Implements BR side behavior * @verdict pass on success, inconc on timeout, fail otherwise */ function f_TC_MAPE_CPE_GWA_BV_02_br() runs on BRComponent { // Local variables var FncRetCode v_result := e_success; // Preamble // Clause 'Initial conditions' f_preamble_br(c_4ZeroBytes/*Not used*/); f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); // Test Body tc_ac.start; alt { [] ipPort.receive( mw_rtAdv_noExtHdr( ?, // TODO Check the rtAdv values ? )) { tc_ac.stop; // Nothing to do log("*** " & __SCOPE__ & ": INFO: RA message was sent by the IUT. ***"); } [] ipPort.receive(Ipv6Packet:?) { tc_ac.stop; tc_ac.start; repeat; } [] tc_ac.timeout { v_result := e_timeout; log("*** " & __SCOPE__ & ": PASS: The IUT drops the packets. ***"); } } // End of 'altstep' statement // Check the default route configuration using v_ia_naAddress f_selfOrClientSyncAndVerdict(c_startDefaultRouteCheck, e_success); f_selfOrClientSyncAndVerdict(c_tbDone, v_result); log("*** " & __SCOPE__ & ": PASS: Successfully received DHCPv6 Reply from the DHCPv6 Server. ***"); // Postamble f_postamble_br(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_MAPE_CPE_GWA_BV_02 /** * @desc Implement DHCPv6 client/server protocol * @verdict 'pass' on success, 'inconc' on 'timeout', fail otherwise Loading @@ -1690,6 +1744,7 @@ module AtsMapE_TestCases { // Local variables var DHCPv6Msg v_dhcpMsg; var Ipv6Address v_ia_naAddress; var FncRetCode v_result := e_success; // Preamble // Clause 'Initial conditions' Loading @@ -1707,15 +1762,15 @@ module AtsMapE_TestCases { )) { tc_ac.stop; // Nothing to do log("*** " & __SCOPE__ & ": PASS: Solicit DHCPv6 Request was sent by the IUT. ***"); log("*** " & __SCOPE__ & ": INFO: Solicit DHCPv6 Request was sent by the IUT. ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); v_result := e_timeout; log("*** " & __SCOPE__ & ": INCONC: Message was not received in time. ***"); } } // End of 'altstep' statement // Clause 'when': the IUT adds the LSN GW IPv6 address to the default route configuration // Clause 'when': the IUT adds the GW IPv6 address to the default route configuration tc_ac.start; alt { [] dhcpv6Port.receive( // Await Reply DHCPv6 message to store IPv6 addresses Loading @@ -1723,9 +1778,9 @@ module AtsMapE_TestCases { mw_dhcpv6_options_dummy )) -> value v_dhcpMsg { tc_ac.stop; // Prepare data to be sent to the DNS component // Extract if (f_getDHCPv6RetrievedIpv6Address(v_dhcpMsg, v_ia_naAddress)==e_error) { f_selfOrClientSyncAndVerdict(c_tbDone, e_error); v_result := e_error; log("*** " & __SCOPE__ & ": FAIL: Message did not include IA_NA option. ***"); } } Loading @@ -1734,8 +1789,13 @@ module AtsMapE_TestCases { log("*** " & __SCOPE__ & ": INFO: Skip unprocessed DHCPv6 message. ***"); repeat; } [] dhcpv6Port.receive(DHCPv6Msg:?) { // Skip unprocessed DHCPv6 message // Do not re-start timer log("*** " & __SCOPE__ & ": INFO: Skip unprocessed DHCPv6 message. ***"); repeat; } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); v_result := e_timeout; log("*** " & __SCOPE__ & ": INCONC: Message was not received in time. ***"); } } // End of 'altstep' statement Loading @@ -1743,7 +1803,7 @@ module AtsMapE_TestCases { // Check the default route configuration using v_ia_naAddress f_selfOrClientSyncAndVerdict(c_startDefaultRouteCheck, e_success); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); f_selfOrClientSyncAndVerdict(c_tbDone, v_result); log("*** " & __SCOPE__ & ": PASS: Successfully received DHCPv6 Reply from the DHCPv6 Server. ***"); // Postamble Loading @@ -1764,7 +1824,7 @@ module AtsMapE_TestCases { // Local variables var Ipv4Packet v_ipv4Packet; /** Used to store received IPv4 messages */ var InterCompDataMsg v_data; /** Used to send received IPv4 messages to BRComponent */ var integer v_nbrReceived := 0; // Preamble // Clause 'Initial conditions' Loading @@ -1791,9 +1851,14 @@ module AtsMapE_TestCases { p_srcAddress, p_httpServerAddress )) -> value v_ipv4Packet { v_data.address_.ipv4Address := v_ipv4Packet.ipv4Hdr.sourceAddress; v_data.ipv4Packet := v_ipv4Packet; dataPort.send(v_data); tc_ac.stop; if (v_nbrReceived != p_noOfDataRequests) { v_nbrReceived := v_nbrReceived + 1; tc_ac.start; repeat; } else { f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_success); Loading Loading
ttcn/AtsDSlite/AtsDSLite_TestCases.ttcn3 +1 −0 Original line number Diff line number Diff line Loading @@ -2052,6 +2052,7 @@ module AtsDSLite_TestCases { log("*** " & __SCOPE__ & ": IPv4 packet was correctly forwarded. ***"); if (v_nbrReceived != p_noOfDataRequests) { v_nbrReceived := v_nbrReceived + 1; tc_ac.start; repeat; } } Loading
ttcn/AtsMAPE/AtsMapE_TestCases.ttcn3 +78 −13 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ module AtsMapE_TestCases { import from LibIpv6_Interface_Functions all; import from LibIpv6_Rfc2463Icmpv6_Templates all; import from LibIpv6_Rfc792Icmpv4_Templates all; import from LibIpv6_Rfc2461NeighborDiscovery_Templates all; // AtsCommon import from AtsCommon_TypesAndValues all; Loading Loading @@ -1653,6 +1654,7 @@ module AtsMapE_TestCases { } // Test component configuration vc_brComponents[0] := BRComponent.create(c_COMP_AFTR); vc_dhcpv6Component := HostComponent.create(c_COMP_DHCP); vc_hostComponents[0] := HostComponent.create(c_COMP_HTTP); f_mtcUp(); Loading @@ -1660,6 +1662,7 @@ module AtsMapE_TestCases { // Test adapter configuration // Start all components vc_brComponents[0].start(f_TC_MAPE_CPE_GWA_BV_02_br()); vc_dhcpv6Component.start(f_TC_MAPE_CPE_GWA_BV_01_dhcpv6()); vc_hostComponents[0].start(f_TC_MAPE_CPE_GWA_BV_02_host_http( PX_MAPE_MAPPING_TABLE_A_PLUS_P.mapInfos[0].ip4Address, Loading @@ -1667,7 +1670,7 @@ module AtsMapE_TestCases { v_noOfDataRequests )); f_serverSyncNClientsAndStop(2, { c_prDone, c_startDefaultRouteCheck, c_tbDone, c_poDone }); f_serverSyncNClientsAndStop(3, { c_prDone, c_startDefaultRouteCheck, c_tbDone, c_poDone }); // Test Body action("the IUT goes online"); Loading @@ -1681,6 +1684,57 @@ module AtsMapE_TestCases { group f_TC_MAPE_CPE_GWA_BV_02 { /** * @desc Implements BR side behavior * @verdict pass on success, inconc on timeout, fail otherwise */ function f_TC_MAPE_CPE_GWA_BV_02_br() runs on BRComponent { // Local variables var FncRetCode v_result := e_success; // Preamble // Clause 'Initial conditions' f_preamble_br(c_4ZeroBytes/*Not used*/); f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); // Test Body tc_ac.start; alt { [] ipPort.receive( mw_rtAdv_noExtHdr( ?, // TODO Check the rtAdv values ? )) { tc_ac.stop; // Nothing to do log("*** " & __SCOPE__ & ": INFO: RA message was sent by the IUT. ***"); } [] ipPort.receive(Ipv6Packet:?) { tc_ac.stop; tc_ac.start; repeat; } [] tc_ac.timeout { v_result := e_timeout; log("*** " & __SCOPE__ & ": PASS: The IUT drops the packets. ***"); } } // End of 'altstep' statement // Check the default route configuration using v_ia_naAddress f_selfOrClientSyncAndVerdict(c_startDefaultRouteCheck, e_success); f_selfOrClientSyncAndVerdict(c_tbDone, v_result); log("*** " & __SCOPE__ & ": PASS: Successfully received DHCPv6 Reply from the DHCPv6 Server. ***"); // Postamble f_postamble_br(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_MAPE_CPE_GWA_BV_02 /** * @desc Implement DHCPv6 client/server protocol * @verdict 'pass' on success, 'inconc' on 'timeout', fail otherwise Loading @@ -1690,6 +1744,7 @@ module AtsMapE_TestCases { // Local variables var DHCPv6Msg v_dhcpMsg; var Ipv6Address v_ia_naAddress; var FncRetCode v_result := e_success; // Preamble // Clause 'Initial conditions' Loading @@ -1707,15 +1762,15 @@ module AtsMapE_TestCases { )) { tc_ac.stop; // Nothing to do log("*** " & __SCOPE__ & ": PASS: Solicit DHCPv6 Request was sent by the IUT. ***"); log("*** " & __SCOPE__ & ": INFO: Solicit DHCPv6 Request was sent by the IUT. ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); v_result := e_timeout; log("*** " & __SCOPE__ & ": INCONC: Message was not received in time. ***"); } } // End of 'altstep' statement // Clause 'when': the IUT adds the LSN GW IPv6 address to the default route configuration // Clause 'when': the IUT adds the GW IPv6 address to the default route configuration tc_ac.start; alt { [] dhcpv6Port.receive( // Await Reply DHCPv6 message to store IPv6 addresses Loading @@ -1723,9 +1778,9 @@ module AtsMapE_TestCases { mw_dhcpv6_options_dummy )) -> value v_dhcpMsg { tc_ac.stop; // Prepare data to be sent to the DNS component // Extract if (f_getDHCPv6RetrievedIpv6Address(v_dhcpMsg, v_ia_naAddress)==e_error) { f_selfOrClientSyncAndVerdict(c_tbDone, e_error); v_result := e_error; log("*** " & __SCOPE__ & ": FAIL: Message did not include IA_NA option. ***"); } } Loading @@ -1734,8 +1789,13 @@ module AtsMapE_TestCases { log("*** " & __SCOPE__ & ": INFO: Skip unprocessed DHCPv6 message. ***"); repeat; } [] dhcpv6Port.receive(DHCPv6Msg:?) { // Skip unprocessed DHCPv6 message // Do not re-start timer log("*** " & __SCOPE__ & ": INFO: Skip unprocessed DHCPv6 message. ***"); repeat; } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); v_result := e_timeout; log("*** " & __SCOPE__ & ": INCONC: Message was not received in time. ***"); } } // End of 'altstep' statement Loading @@ -1743,7 +1803,7 @@ module AtsMapE_TestCases { // Check the default route configuration using v_ia_naAddress f_selfOrClientSyncAndVerdict(c_startDefaultRouteCheck, e_success); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); f_selfOrClientSyncAndVerdict(c_tbDone, v_result); log("*** " & __SCOPE__ & ": PASS: Successfully received DHCPv6 Reply from the DHCPv6 Server. ***"); // Postamble Loading @@ -1764,7 +1824,7 @@ module AtsMapE_TestCases { // Local variables var Ipv4Packet v_ipv4Packet; /** Used to store received IPv4 messages */ var InterCompDataMsg v_data; /** Used to send received IPv4 messages to BRComponent */ var integer v_nbrReceived := 0; // Preamble // Clause 'Initial conditions' Loading @@ -1791,9 +1851,14 @@ module AtsMapE_TestCases { p_srcAddress, p_httpServerAddress )) -> value v_ipv4Packet { v_data.address_.ipv4Address := v_ipv4Packet.ipv4Hdr.sourceAddress; v_data.ipv4Packet := v_ipv4Packet; dataPort.send(v_data); tc_ac.stop; if (v_nbrReceived != p_noOfDataRequests) { v_nbrReceived := v_nbrReceived + 1; tc_ac.start; repeat; } else { f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_success); Loading