Commit f474db81 authored by YannGarcia's avatar YannGarcia
Browse files

Update TestControl

parent 8f7cdd71
Loading
Loading
Loading
Loading
+9 −4
Original line number Original line Diff line number Diff line
@@ -94,7 +94,6 @@ module ItsMbr_TestCases {
          // Local variables
          // Local variables
          
          
          // Test component configuration
          // Test component configuration
          vc_hashedId8ToBeUsed := ""; // No certificates //PX_IUT_DEFAULT_CERTIFICATE
          f_cfUp_itss();
          f_cfUp_itss();
          
          
          // Test adapter configuration
          // Test adapter configuration
@@ -118,17 +117,17 @@ module ItsMbr_TestCases {
                                         ))) {
                                         ))) {
              log("*** " & testcasename() & "INFO: CA message received ***");
              log("*** " & testcasename() & "INFO: CA message received ***");
              f_sendUtMbrTrigger(c_CamTgt_SpeedCommon, c_ObsSpeed_ValueTooLarge_VehicleType);
              f_sendUtMbrTrigger(c_CamTgt_SpeedCommon, c_ObsSpeed_ValueTooLarge_VehicleType);
              f_selfOrClientSyncAndVerdict(c_prDone, e_error);
              f_selfOrClientSyncAndVerdict(c_prDone, e_success);
            }
            }
            [] tc_ac.timeout {
            [] tc_ac.timeout {
              log("*** " & testcasename() & ": INCONC: No CA message received ***");
              log("*** " & testcasename() & ": INCONC: No CA message received ***");
              f_selfOrClientSyncAndVerdict(c_prDone, e_success);
              f_selfOrClientSyncAndVerdict(c_prDone, e_error);
            }
            }
          } // End of 'alt' statement
          } // End of 'alt' statement
          
          
          // Test Body
          // Test Body
          // TODO Send CAM message with incosistent speed value
          // TODO Send CAM message with incosistent speed value
          log("*** " & testcasename() & ": PASS: MR triggerd ***");
          log("*** " & testcasename() & ": PASS: MR triggered ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
          
          
          // Postamble
          // Postamble
@@ -178,6 +177,12 @@ module ItsMbr_TestCases {
              } else { // Send HTTP error 500
              } else { // Send HTTP error 500
                f_send_500_Internal_Error(v_headers);
                f_send_500_Internal_Error(v_headers);
              }
              }
              // Validate MR content
              log("Validate MR content :", match(v_etsiTs103759_data.report, mw_cam_specific_report));
              if (not(match(v_etsiTs103759_data.report, mw_cam_specific_report))) { // FIXME To be continued
                log("*** " & testcasename() & ": FAIL: MR content mismatch ***");
                f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
              }
              // Set verdict
              // Set verdict
              if (v_result == 0) {
              if (v_result == 0) {
                log("*** " & testcasename() & ": PASS: MR received ***");
                log("*** " & testcasename() & ": PASS: MR received ***");
+12 −1
Original line number Original line Diff line number Diff line
module ItsMbr_TestControl {
module ItsMbr_TestControl {
    
    
    // Ats Its
    // LibItsMbr
    import from LibItsMbr_Pics all;

    // AtsMBR
    import from ItsMbr_TestCases all;
    import from ItsMbr_TestCases all;


    control {
    control {


        if (PICS_IUT_ITS_S) {

            if (PICS_DETECTOR_CAM_SPEED) {
                execute(TC_MRS_ITSS_MESSAGES_CLASS1_CAM_001());
            } // PICS_DETECTOR_CAM_SPEED

        } // PICS_IUT_ITS_S

    } // End of 'control' statement
    } // End of 'control' statement


} // End of module ItsMbr_TestControl
} // End of module ItsMbr_TestControl
Compare 0a0d4ca5 to 9c63e59a
Original line number Original line Diff line number Diff line
Subproject commit 0a0d4ca5e8390372d8b9e48a829420659cc86248
Subproject commit 9c63e59a2de8563f63453a54638fe617abf2f024
+26 −18
Original line number Original line Diff line number Diff line
@@ -247,13 +247,6 @@ module LibItsMbr_Functions {
          // Set verdict
          // Set verdict
          p_result := -1;
          p_result := -1;
        } else {
        } else {
          log("f_verify_http_mbr_request_from_iut_itss: p_etsiTs103759_data: ", p_etsiTs103759_data);
          log("f_verify_http_mbr_request_from_iut_itss: match ", match(p_etsiTs103759_data, mw_etsiTs103759Data)); // TODO In TITAN, this is the only way to get the unmatching in log





          v_response := m_http_response(m_http_response_ok_no_body(p_headers));
          v_response := m_http_response(m_http_response_ok_no_body(p_headers));
          // Set verdict
          // Set verdict
          p_result := 0;
          p_result := 0;
@@ -289,6 +282,8 @@ module LibItsMbr_Functions {
      var Ieee1609Dot2Data v_ieee1609dot2_signed_data;
      var Ieee1609Dot2Data v_ieee1609dot2_signed_data;
      var Certificate      v_certificate;
      var Certificate      v_certificate;
      var charstring       v_certificate_id;
      var charstring       v_certificate_id;
      var Time64           v_curTime;
      const integer        c_timeLimit := 2 * 60 * 1000000; // us


      log(">>> f_verify_mbr_request_message: p_private_enc_key= ", p_private_enc_key);
      log(">>> f_verify_mbr_request_message: p_private_enc_key= ", p_private_enc_key);
      log(">>> f_verify_mbr_request_message: p_salt= ", p_salt);
      log(">>> f_verify_mbr_request_message: p_salt= ", p_salt);
@@ -340,7 +335,7 @@ module LibItsMbr_Functions {
        return false;
        return false;
      }
      }
      
      
      // 4. Return the PKI message
      // 4. Return the MBR message
      log("f_verify_mbr_request_message: v_ieee1609dot2_signed_data.content.signedData.tbsData.payload.data.content.unsecuredData= ", v_ieee1609dot2_signed_data.content.signedData.tbsData.payload.data.content.unsecuredData);
      log("f_verify_mbr_request_message: v_ieee1609dot2_signed_data.content.signedData.tbsData.payload.data.content.unsecuredData= ", v_ieee1609dot2_signed_data.content.signedData.tbsData.payload.data.content.unsecuredData);
      v_msg_bit := oct2bit(v_ieee1609dot2_signed_data.content.signedData.tbsData.payload.data.content.unsecuredData);
      v_msg_bit := oct2bit(v_ieee1609dot2_signed_data.content.signedData.tbsData.payload.data.content.unsecuredData);
      if (decvalue(v_msg_bit, p_etsiTs103759_data) != 0) {
      if (decvalue(v_msg_bit, p_etsiTs103759_data) != 0) {
@@ -350,6 +345,19 @@ module LibItsMbr_Functions {
        return false;
        return false;
      }
      }


      // 5. Basic checks of the MR
      // Check generationTime
      v_curTime := f_getCurrentTime();
      v_curTime := v_curTime * 1000; // Time64 is in microseconds 
      log("valid interval=", Time64:(v_curTime - c_timeLimit .. v_curTime + c_timeLimit));
      // Check generation time
      if (not match(p_etsiTs103759_data.generationTime, Time64:(v_curTime - c_timeLimit .. v_curTime + c_timeLimit))) {
        log("f_verify_mbr_request_message: Wrong generationTime value: ", p_etsiTs103759_data.generationTime, "compared to ", Time64:(v_curTime - c_timeLimit .. v_curTime + c_timeLimit));
        return false;
      }

      // FIXME Check observationLocation
 
      log("<<< f_verify_mbr_request_message: true");
      log("<<< f_verify_mbr_request_message: true");
      return true;
      return true;
    } // End of function f_verify_mbr_request_message
    } // End of function f_verify_mbr_request_message
+8 −8

File changed.

Contains only whitespace changes.