Commit eeafb8de authored by Yann Garcia's avatar Yann Garcia
Browse files

Terminate SSEM generation implementation of TCs

parent c132ad9f
Loading
Loading
Loading
Loading
+676 −0

File changed.

Preview size limit exceeded, changes collapsed.

+77 −1
Original line number Original line Diff line number Diff line
@@ -1304,6 +1304,10 @@ module ItsSrem_TestCases {
            
            
        } // End of group sseMessageRate
        } // End of group sseMessageRate
        
        
    } // End of group ssemGeneration
    
    group ssemReception {
        
        group sseMessageProcessing {
        group sseMessageProcessing {
            
            
            /**
            /**
@@ -1338,6 +1342,78 @@ module ItsSrem_TestCases {
            
            
        } // End of group sseMessageProcessing
        } // End of group sseMessageProcessing
        
        
    } // End of group ssemGeneration
        group sseSecurity {
            
            /**
             * @desc Check that the IUT accepts the SSEM message permitted by the signing certificate 
             * <pre>
             * Pics Selection: PICS_SSEM_RECEPTION AND PICS_IS_IUT_SECURED 
             * Initial conditions: 
             *   with {
             *        the IUT being in the "initial state"
             *        the IUT having send a valid SREM
             *        and the IUT is operating in secured mode
             *    }
             * Expected behaviour:
             *    ensure that {
             *        when { 
             *            the IUT receives a SSEM
             *                signed with the certificate
             *                    containing appPermission item
             *                        containing psid
             *                            indicating ITS_AID_SSEM 
             *        }
             *        then {
             *            the IUT accepts the received SSEM
             *        }
             *    }
             * </pre>
             * 
             * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLCS_RCV_SSP_BV_05
             * @reference ETSI TS 103 301 v1.1.1 Clause 4.5.1
             */
            testcase TC_IS_TLCS_RCV_SSP_BV_05() runs on ItsSremSsem system ItsSremSsemSystem {
                
                f_IS_TLCS_RCV_SSP_BV_05();
                
            } // End of testcase TC_IS_TLCS_RCV_SSP_BV_05
            
            /**
             * @desc Check that the IUT discards the SSEM message not permitted by the signing certificate 
             * <pre>
             * Pics Selection: PICS_SSEM_RECEPTION AND PICS_IS_IUT_SECURED 
             * Initial conditions: 
             *   with {
             *        the IUT being in the "initial state"
             *        the IUT having send a valid SREM
             *        and the IUT is operating in secured mode
             *    }
             * Expected behaviour:
             *    ensure that {
             *        when { 
             *            the IUT receives a SSEM
             *                signed with the certificate CERT_NONE
             *                    not containing appPermission item
             *                    containing psid
             *                        indicating ITS_AID_SSEM 
             *        }
             *        then {
             *            the IUT discards the received SSEM 
             *        }
             *    }
             * </pre>
             * 
             * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLCS_RCV_SSP_SO_05
             * @reference ETSI TS 103 301 v1.1.1 Clause 4.5.1
             */
            testcase TC_IS_TLCS_RCV_SSP_SO_05() runs on ItsSremSsem system ItsSremSsemSystem {
                
                f_IS_TLCS_RCV_SSP_SO_05();
                
            } // End of testcase TC_IS_TLCS_RCV_SSP_SO_05
            
        } // End of group sseSecurity
        
    } // End of group ssemReception
    
    
} // End of module ItsSrem_TestCases
} // End of module ItsSrem_TestCases
 No newline at end of file
+23 −10
Original line number Original line Diff line number Diff line
@@ -86,20 +86,33 @@ module ItsSrem_TestControl {
            
            
        }
        }
        
        
        if (PICS_SSEM_GENERATION and PICS_IS_IUT_SECURED) {
        if (PICS_SSEM_GENERATION) {
            
            if (PICS_IS_IUT_SECURED) {
                execute(TC_IS_TLCS_GEN_SEC_BV_01());
                execute(TC_IS_TLCS_GEN_SEC_BV_01());
                
                
                execute(TC_IS_TLCS_GEN_SSP_BV_01());
                execute(TC_IS_TLCS_GEN_SSP_BV_01());
            }
            }
            
            
        if (PICS_SSEM_GENERATION and PICS_SSEM_TRATEMENT_DELAY) {
            if (PICS_SSEM_TRATEMENT_DELAY) {
              execute(TC_IS_TLCS_GEN_RATE_TI_01());
              execute(TC_IS_TLCS_GEN_RATE_TI_01());
            }
            }
            
            
        if (PICS_SSEM_GENERATION and PICS_SSEM_TRANSMISSION_RATE) {
            if (PICS_SSEM_TRANSMISSION_RATE) {
              execute(TC_IS_TLCS_GEN_RATE_TI_02());
              execute(TC_IS_TLCS_GEN_RATE_TI_02());
            }
            }
            
            
        }
        }
        
        
        if (PICS_SSEM_GENERATION) {
            
            execute(TC_IS_TLCS_RCV_MSGF_BV_04());
            
            if (PICS_IS_IUT_SECURED) {
                execute(TC_IS_TLCS_RCV_SSP_BV_05());
                execute(TC_IS_TLCS_RCV_SSP_SO_05());
            }
        }
    }
    
} // End of module ItsSrem_TestControl 
} // End of module ItsSrem_TestControl 
 No newline at end of file
+134 −3
Original line number Original line Diff line number Diff line
@@ -2275,6 +2275,10 @@ module ItsSrem_TpFunctions {
            
            
        } // End of group sseMessageRate
        } // End of group sseMessageRate
        
        
    } // End of group ssemGeneration {
    
    group ssemReception {
        
        group sseMessageProcessing {
        group sseMessageProcessing {
            
            
            /**
            /**
@@ -2321,7 +2325,7 @@ module ItsSrem_TpFunctions {
                
                
                // Test Body
                // Test Body
                f_sleep(PX_TAC);
                f_sleep(PX_TAC);
                for (i := 0; i < lengthof(vc_utSsemEvents) and not match (valueof(v_ssemReq.msgOut) , vc_utSsemEvents[i].sseMsg); i := i + 1) {
                for (i := 0; i < lengthof(vc_utSsemEvents) and not match (vc_utSsemEvents[i].sseMsg, mw_ssemPdu); i := i + 1) {
                    // empty on purpose 
                    // empty on purpose 
                }
                }
                if (i < lengthof(vc_utSsemEvents) ) {
                if (i < lengthof(vc_utSsemEvents) ) {
@@ -2335,11 +2339,138 @@ module ItsSrem_TpFunctions {
                // Postamble
                // Postamble
                f_poDefault();
                f_poDefault();
                f_cfDown();
                f_cfDown();
                    
            } // End of function f_IS_TLCS_RCV_MSGF_BV_04
            } // End of function f_IS_TLCS_RCV_MSGF_BV_04
            
            
        } // End of group sseMessageProcessing
        } // End of group sseMessageProcessing
        
        
    } // End of group ssemGeneration
        group sseSecurity {
            
            /**
             * @desc    TP Function for TC_IS_TLCS_RCV_SSP_BV_05
             */
            function f_IS_TLCS_RCV_SSP_BV_05 () runs on ItsSremSsem {
                
                // Local variables
                var SremInd   v_sremInd;
                var RequestID v_requestID;
                var SsemReq   v_ssemReq;
                var integer   i;
                    
                if (not PICS_SSEM_RECEPTION or not PICS_IS_IUT_SECURED) {
                    log("*** " & testcasename() & ": PICS_SSEM_RECEPTION and PICS_IS_IUT_SECURED required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                    
                // Test component configuration
                f_cfUp();
                    
                // Preamble
                f_prInitialState("CERT_SRM_SSP_REQ");
                f_utTriggerEvent(m_utTriggerEvent(PX_BASICVEHICLEROLE, PX_REQUESTIMPORTANCELEVEL, PX_INTERSECTION_ID));
                tc_ac.start;
                alt {
                    [] sremSsemPort.receive(
                                            mw_sremIndWithSecurityParameters(
                                                                                 mw_sremPdu,
                                                                                 -,
                                                                                 c_its_aid_TLC
                    )) -> value v_sremInd { 
                       tc_ac.stop;
                       v_requestID := v_sremInd.msgIn.srm.requests[0].request.requestID;
                       // Send SSEM
                       f_sendSseMessage(v_sremInd.msgIn.srm);
                       log("*** " & testcasename() & ": INFO: Successfully received SREM PDU header. ***");
                       f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
                        f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
                    }
                }
                
                // Test Body
                f_sleep(PX_TAC);
                for (i := 0; i < lengthof(vc_utSsemEvents) and not match (vc_utSsemEvents[i].sseMsg, mw_ssemPdu); i := i + 1) {
                    // empty on purpose 
                }
                if (i < lengthof(vc_utSsemEvents) ) {
                    log("*** " & testcasename() & ": PASS: SSEM was transmitted to upper layer***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                } else {
                    log("*** " & testcasename() & ": FAIL: SSEM was not transmitted to upper layer***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                }
                    
                // Postamble
                f_poDefault();
                f_cfDown();
            } // End of function f_IS_TLCS_RCV_SSP_BV_05
            
            /**
             * @desc    TP Function for TC_IS_TLCS_RCV_SSP_SO_05
             */
            function f_IS_TLCS_RCV_SSP_SO_05 () runs on ItsSremSsem {
                
                // Local variables
                var SremInd   v_sremInd;
                var RequestID v_requestID;
                var SsemReq   v_ssemReq;
                var integer   i;
                    
                if (not PICS_SSEM_RECEPTION or not PICS_IS_IUT_SECURED) {
                    log("*** " & testcasename() & ": PICS_SSEM_RECEPTION and PICS_IS_IUT_SECURED required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                    
                // Test component configuration
                f_cfUp();
                    
                // Preamble
                f_prInitialState("CERT_SRM_SSP_REQ");
                f_utTriggerEvent(m_utTriggerEvent(PX_BASICVEHICLEROLE, PX_REQUESTIMPORTANCELEVEL, PX_INTERSECTION_ID));
                tc_ac.start;
                alt {
                    [] sremSsemPort.receive(
                                            mw_sremIndWithSecurityParameters(
                                                                                 mw_sremPdu,
                                                                                 -,
                                                                                 c_its_aid_TLC
                    )) -> value v_sremInd { 
                       tc_ac.stop;
                       v_requestID := v_sremInd.msgIn.srm.requests[0].request.requestID;
                       // Send SSEM
                       f_sendSseMessage(v_sremInd.msgIn.srm);
                       log("*** " & testcasename() & ": INFO: Successfully received SREM PDU header. ***");
                       f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
                        f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
                    }
                }
                
                // Test Body
                f_sleep(PX_TAC);
                for (i := 0; i < lengthof(vc_utSsemEvents) and not match (vc_utSsemEvents[i].sseMsg, mw_ssemPdu); i := i + 1) {
                    // empty on purpose 
                }
                if (lengthof(vc_utSsemEvents) == 0) {
                    log("*** " & testcasename() & ": PASS: SSEM was discarded ***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                } else {
                    log("*** " & testcasename() & ": FAIL: SSEM was transmitted to upper layer***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                }
                    
                // Postamble
                f_poDefault();
                f_cfDown();
            } // End of function f_IS_TLCS_RCV_SSP_SO_05
            
        } // End of group sseSecurity
        
    } // End of group ssemReception
    
    
} // End of module ItsSrem_TpFunctions 
} // End of module ItsSrem_TpFunctions 
 No newline at end of file
Compare 1b8e2393 to 2ef2658e
Original line number Original line Diff line number Diff line
Subproject commit 1b8e23931c09c0bf0958681a54e47d007e75bdb6
Subproject commit 2ef2658e6294c799f4bee72537f90fe1f836e248