Commit c9b4a194 authored by tepelmann's avatar tepelmann
Browse files

Added initial version of TC_464XLAT_CLATB4_MSSC_BV_001.

parent b7cd54d7
Loading
Loading
Loading
Loading
+25 −4
Original line number Diff line number Diff line
@@ -42,10 +42,6 @@ module Ats464XLat_Functions {
                connect(vc_dhcpv6Component:dhcpv6Port, self:dhcpv6Port);
            } 
            
            // Map ports
            map(self:ipPort, system:ipPort);
            map(self:ipv4Port, system:ipv4Port);
            
            // Connect synchronisation ports
            f_connect4SelfOrClientSync();
            
@@ -70,6 +66,22 @@ module Ats464XLat_Functions {
    
    group preambleFunctions {
        
        /**
         * @desc Preamble processing for LSNComponent
         * @verdict Unchanged
         * @see LSNComponent
         */
        function f_preamble_b4(Ipv4Address p_ip4Address) runs on LSNComponent system TestAdapter {
            // Connect synchronisation ports
            f_connect4SelfOrClientSync();
            
            // Map ports
            map(self:ipv4Port, system:ipv4Port) param (p_ip4Address);
            map(self:utPort, system:utPort);
            
            activate(a_default_lsn());
        } // End of function f_preamble_b4
        
        /**
         * @desc Preamble processing for LSNComponent
         * @verdict Unchanged
@@ -226,6 +238,15 @@ module Ats464XLat_Functions {
    
    group postambleFunctions {
        
        /**
         * @desc Postamble processing for LSNComponent
         * @verdict Unchanged
         * @see LSNComponent
         */
        function f_postamble_b4() runs on LSNComponent {
            // Nothing to do
        } // End of function f_postamble_b4
        
        /**
         * @desc Postamble processing for LSNComponent
         * @verdict Unchanged
+149 −0
Original line number Diff line number Diff line
@@ -197,6 +197,155 @@ module Ats464XLat_TestCases {
            
            group validBehaviour {
                
                /**
                 * @desc Check that the IUT functions with MSS clamping
                 * @verdict pass on success, inconc on timeout, fail otherwise
                 * <pre>        
                 * PICS Selection: none 
                 * Initial conditions:
                 *  with {
                 *      the physical MTU (Phy-MTU) size being equal or greater than the IPv6 packet between all devices
                 *      and the MTU (IPv6-MTU) being lower than the originating IPv6 packet
                 *      and the MSS value is below that of the TCP segment size of the incoming packet
                 *  }
                 * Expected behaviour:
                 *  ensure that {
                 *      when {
                 *          the IUT receives an HTML IPv4 packet
                 *              containing source address
                 *                  indicating a private IPv4 address
                 *          with a segment size greater than the IUT MSS value
                 *      }
                 *      then {
                 *          the IUT drops the packet and returns a packet-too-big message to the originator
                 *      }
                 *  }
                 * </pre>
                 * 
                 * @version 0.0.1
                 * @reference ETSI TS 101 569-1 Clause 6.6 464XLAT Technology Summary
                 * @see     ETSI TS xxx xxx-x V0.0.1.5a-draft (2013-07) TP/464XLAT/CLAT-B4/MSSC/VB/01
                 */
                testcase TC_464XLAT_CLATB4_MSSC_BV_001() runs on FourSixFourXLatComponent system TestAdapter {
                    
                    // Local variables
                    var Ipv4Packet v_ipv4Packet;                                /** IPv4 packets */
                    
                    // Test control
                    
                    // Test component configuration
                    vc_lsnComponents[0] := LSNComponent.create(c_COMP_LSN);
                    vc_hostComponents[0] := HostComponent.create(c_COMP_HOST);
                    f_cf01Up_CLAT_B4();
                    
                    // Test adapter configuration
                    
                    // Test Body
                    // Start all components
                    f_finalyzeIpv4Packet(
                        m_ipv4Packet_df(
                            1,
                            PX_IPV4_DESTINATION_INFORMATION.iutAddress,
                            PX_464XLAT_MAPPING_TABLE_1_TO_N.ip4Address,
                            m_tcp_packet(
                                PX_IPV4_DESTINATION_INFORMATION.iutPort,
                                PX_464XLAT_MAPPING_TABLE_1_TO_N.portInfos[0].srcPort,
                                m_tcpRawPayload(int2oct(42, PX_464XLAT_MSS_SIZE)),
                                m_tcp_flags_syn
                            )
                        ),
                        v_ipv4Packet
                    );
                    
                    vc_lsnComponents[0].start(f_TC_464XLAT_CLATB4_MSSC_BV_001_b4(v_ipv4Packet));
                    vc_hostComponents[0].start(f_TC_464XLAT_CLATB4_MSSC_BV_001_host());
                    
                    f_serverSyncNClientsAndStop(2, { c_prDone, c_tbDone, c_poDone });
                    
                    // Postamble
                    f_down();
                    
                } // End of testcase TC_464XLAT_CLATB4_MSSC_BV_001
                
                group f_TC_464XLAT_CLATB4_MSSC_BV_001 {
                    
                    /**
                     * @desc Simulates LSN side
                     * @verdict 'pass' on success, 'inconc' on 'timeout', fail otherwise
                     */
                    function f_TC_464XLAT_CLATB4_MSSC_BV_001_b4(Ipv4Packet p_ipv4Packet) runs on LSNComponent {
                        
                        // Local variables
                         
                        // Preamble
                        // Clause 'Initial conditions'
                        f_preamble_b4(p_ipv4Packet.ipv4Hdr.destinationAddress);
                        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                        log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");
                        
                        // Test Body
                        ipv4Port.send(p_ipv4Packet);
                        tc_ac.start;
                        alt {
                            [] ipv4Port.receive(mw_ipv4DestinationUnreachable(
                                p_ipv4Packet.ipv4Hdr.destinationAddress,
                                p_ipv4Packet.ipv4Hdr.sourceAddress,
                                c_ipv4IcmpCode4 //fragmentation needed and DF set
                            )) {
                                tc_ac.stop;
                                log("*** " & __SCOPE__ & ": PASS: A 'packet-too-big' was returned. ***");
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                            }
                            [] tc_ac.timeout {
                                log("*** " & __SCOPE__ & ": PASS: NO 'packet-too-big' was returned. ***");
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                            }
                        }
                        
                        // Postamble
                        f_postamble_lsn();
                        f_selfOrClientSyncAndVerdict(c_poDone, e_success);
                        log("*** " & __SCOPE__ & ": INFO: Postamble done. ***");
                        
                    } // End of function f_TC_464XLAT_CLATB4_MSSC_BV_001_b4
                    
                    /**
                     * @desc Simulates client side
                     * @verdict 'pass' on success, 'inconc' on 'timeout', fail otherwise
                     */
                    function f_TC_464XLAT_CLATB4_MSSC_BV_001_host() runs on HostComponent {
                        
                        // Local variables
                         
                        // Preamble
                        // Clause 'Initial conditions'
                        f_preamble_host();
                        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                        log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");
                        
                        // Test Body
                        tc_ac.start;
                        alt {
                            [] ipPort.receive(Ipv6Packet:?) { 
                                tc_ac.stop;
                                log("*** " & __SCOPE__ & ": FAIL: The packet was not dropped. ***");
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                            }
                            [] tc_ac.timeout {
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                                log("*** " & __SCOPE__ & ": PASS: The packet was dropped. ***");
                            }
                        } // End of 'altstep' statement
                        
                        // Postamble
                        f_postamble_host();
                        f_selfOrClientSyncAndVerdict(c_poDone, e_success);
                        log("*** " & __SCOPE__ & ": INFO: Postamble done. ***");
                        
                    } // End of function f_TC_464XLAT_CLATB4_MSSC_BV_001_host
                    
                } // End of group f_TC_464XLAT_CLATB4_MSSC_BV_001 
                
            } // End of group validBehaviour
            
        } // End of group mssClamping
+35 −0
Original line number Diff line number Diff line
@@ -9,6 +9,41 @@ module Ats464XLat_TestControl {
    
    control {
        
        // CLAT CPE
        execute(TC_464XLAT_CLAT_B4_BF_BV_001());
        
        execute(TC_464XLAT_CLATB4_MSSC_BV_001());
        
        // PLAT LSN
        execute(TC_464XLAT_PLATLSN_BF_BV_001());
        execute(TC_464XLAT_PLATLSN_BF_BV_002());
        
        execute(TC_464XLAT_PLATLSN_NP_BV_001());
        
        execute(TC_464XLAT_PLATLSN_AW_BV_001());
        execute(TC_464XLAT_PLATLSN_AW_BV_002());
        execute(TC_464XLAT_PLATLSN_AW_BV_003());
        
        execute(TC_464XLAT_PLATLSN_SPR_BV_001());
        
        execute(TC_464XLAT_PLATLSN_PF_BV_001());
        
        execute(TC_464XLAT_PLATLSN_MSSC_BV_001());
        
        execute(TC_464XLAT_PLATLSN_NT_BV_001());
        
        execute(TC_464XLAT_PLATLSN_ALG_BV_001());
        execute(TC_464XLAT_PLATLSN_ALG_BV_002());
        execute(TC_464XLAT_PLATLSN_ALG_BV_003());
        execute(TC_464XLAT_PLATLSN_ALG_BV_004());
        execute(TC_464XLAT_PLATLSN_ALG_BV_005());
        
        execute(TC_464XLAT_PLATLSN_LSN_RT_BV_001());
        execute(TC_464XLAT_PLATLSN_LSN_RT_BV_002());
        
        execute(TC_464XLAT_PLATLSN_AA_BV_001());
        
        execute(TC_464XLAT_PLATLSN_RED_BV_001());
        
    } // End of 'control' statement