KR20200007133A - Method and apparatus for dinamically injecting fault for vehicle ecu software test - Google Patents

Method and apparatus for dinamically injecting fault for vehicle ecu software test Download PDF

Info

Publication number
KR20200007133A
KR20200007133A KR1020180080863A KR20180080863A KR20200007133A KR 20200007133 A KR20200007133 A KR 20200007133A KR 1020180080863 A KR1020180080863 A KR 1020180080863A KR 20180080863 A KR20180080863 A KR 20180080863A KR 20200007133 A KR20200007133 A KR 20200007133A
Authority
KR
South Korea
Prior art keywords
defect
software
information
module
injection code
Prior art date
Application number
KR1020180080863A
Other languages
Korean (ko)
Other versions
KR102537875B1 (en
Inventor
최병주
박지현
이시현
장승연
Original Assignee
현대자동차주식회사
이화여자대학교 산학협력단
기아자동차주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 현대자동차주식회사, 이화여자대학교 산학협력단, 기아자동차주식회사 filed Critical 현대자동차주식회사
Priority to KR1020180080863A priority Critical patent/KR102537875B1/en
Publication of KR20200007133A publication Critical patent/KR20200007133A/en
Application granted granted Critical
Publication of KR102537875B1 publication Critical patent/KR102537875B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/263Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The present invention relates to a method for dynamically injecting a defect for vehicle ECU software verification, an apparatus thereof, and a software verification system for a vehicle. According to one embodiment of the present invention, a host computer for verifying a software built in an electronic control device for a vehicle includes: an experimental model generation module configured to generate an experimental model for a verification target software built in the electronic control device; a call relationship analysis module configured to determine a function call relationship of the verification target software; a defect selection module configured to receive defect information to be injected into the verification target software from a user and generate defect selection information; a defect injection code generation module configured to generate a defect injection code based on the defect selection information and the determined function call relationship; and a first communication modem configured to transmit the defect selection information and the defect injection code to the electronic control device.

Description

차량 ECU 소프트웨어 검증을 위한 동적 결함 주입 방법 및 장치{METHOD AND APPARATUS FOR DINAMICALLY INJECTING FAULT FOR VEHICLE ECU SOFTWARE TEST}Dynamic defect injection method and apparatus for vehicle ECU software verification {METHOD AND APPARATUS FOR DINAMICALLY INJECTING FAULT FOR VEHICLE ECU SOFTWARE TEST}

본 발명은 소프트웨어 검증 방법에 관한 것으로서, 보다 상세하게 차량 ECU 소프트웨어 검증을 위한 동적 결함 주입 방법 및 장치와 차량용 소프트웨어 검증 시스템에 관한 것이다.The present invention relates to a software verification method, and more particularly, to a dynamic defect injection method and apparatus for vehicle ECU software verification and a vehicle software verification system.

차량 안정성에 대한 기대가 높아지면서 유럽 OEM들은 안전성 향상을 위해 자동차 분야의 기능 안전 표준인 ISO26262를 발표하였다.As expectations for vehicle stability are raised, European OEMs have released ISO26262, a functional safety standard for the automotive sector, to improve safety.

이는 기존 범용 전기/전자 분야의 기능 안전 표준인 IEC61508을 자동차에 적용하여 개발된 표준으로, 제품 개념 단계에서부터 폐기까지 전 수명주기에 걸쳐서 전자 장치의 고장으로 인한 자동차의 안전성을 저해할 수 있는 위험을 체계적으로 분석하고 그 위험에 대처하는 수단이 효과적임을 보장해야 함을 명시하고 있다.This standard was developed by applying IEC61508, a functional safety standard in the general-purpose electric / electronic field, to automobiles, and it is a risk that may impair the safety of the vehicle due to the failure of the electronic device over the entire life cycle from the product concept stage to disposal. It states that systematic analyzes and measures to address the risks should be effective.

ISO26262 Part6 소프트웨어 레벨(Software Level)에서는 단위/통합 단계별로 결함 주입 검증을 ASIL(Automotive Safety Integrity Level) C 이상의 제어기에 요구하고 있으며, 이에 따라 소프트웨어 레벨에서 결함을 주입하는 검증 방안이 요구되고 있다.The ISO26262 Part6 Software Level requires defect injection verification on a per unit / integration level for controllers above Automotive Safety Integrity Level (ASIL) C, which requires a verification method to inject defects at the software level.

결함 주입 검증(Fault Injection Test)이란 시스템에 인위적으로 결함을 주입하여 오류를 파악하고 시스템의 기능 안전상의 강건성을 검증하는 방법이다.Fault Injection Test is a method of artificially injecting faults into the system to identify faults and verify the robustness of the functional safety of the system.

종래에는 한정된 특정 결함에 대해서만 결함을 주입하거나, 외부 장치(디버거 등)를 이용하여 시스템에 결함을 주입하는 등의 결함 주입 방안이 개시되었으나 이러한 방법들은 해당 시스템의 효율적인 검증을 위해 요구되는 각종 오류를 발생시키기 어렵거나, 혹은 외부 장치를 사용함에 따라 해당 제어기에 대한 오류 검증의 실시간성을 확보하기 어려운 문제점이 있었다.Conventionally, defect injection methods such as injecting a defect only for a limited specific defect or injecting a defect into a system by using an external device (debugger, etc.) have been disclosed. However, these methods can detect various errors required for effective verification of the system. It is difficult to generate or use of an external device has a problem that it is difficult to secure the real-time of error verification for the controller.

한국공개특허 10-2009-0068259("동적 결함 삽입 장치, 동적 결함 삽입 방법 및 동적 결함 삽입 시스템")은 하드웨어 장치(회로 디바이스)에 동적으로 결함을 주입하는 방안을 제시하고 있으나, 소프트웨어 결함 주입에는 적합하지 않은 문제점이 있었다.Korean Patent Laid-Open Publication No. 10-2009-0068259 ("Dynamic Defect Insertion Device, Dynamic Defect Insertion Method, and Dynamic Defect Insertion System") proposes a method of dynamically injecting a defect into a hardware device (circuit device). There was an unsuitable problem.

또한, 한국공개특허 10-2014-0008547("오류 기반 소프트웨어 시험 방법 및 오류 기반 소프트웨어 시험 시스템")은 오류 기반 소프트웨어 시험 방법 및 오류 기반 소프트웨어 시험 시스템에 관한 것이나, 결함 주입을 위해 복수의 결함 주입 프로그램을 생성되어야 하는 문제점이 있었다.In addition, Korean Patent Publication No. 10-2014-0008547 ("Error-based software test method and error-based software test system") relates to the error-based software test method and error-based software test system, but a plurality of defect injection program for defect injection There was a problem that should be generated.

본 발명은 상술한 종래 기술의 문제점을 해결하기 위해 고안된 것으로, 본 발명의 목적은 차량 ECU(Electronic Control Unit) 소프트웨어 검증을 위한 동적 결함 주입 방법 및 장치를 제공하는 것이다.The present invention has been devised to solve the above-mentioned problems of the prior art, and an object of the present invention is to provide a method and apparatus for dynamic defect injection for vehicle electronic control unit (ECU) software verification.

본 발명의 다른 목적은 하나의 결함 주입 프로그램을 통해 차량 소프트웨어에 대한 소프트웨어 레벨에서의 효과적이고 효율적인 동적 결함 주입 방법 및 장치를 제공하는 것이다.It is another object of the present invention to provide an effective and efficient dynamic defect injection method and apparatus at the software level for vehicle software through one defect injection program.

본 발명에서 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급하지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.Technical problems to be achieved in the present invention are not limited to the above-mentioned technical problems, and other technical problems not mentioned above will be clearly understood by those skilled in the art from the following description. Could be.

본 발명은 차량 ECU 소프트웨어 검증을 위한 동적 결함 주입 방법 및 장치, 그리고 차량용 소프트웨어 검증 시스템을 제공한다.The present invention provides a dynamic defect injection method and apparatus for vehicle ECU software verification, and a vehicle software verification system.

본 발명의 일 실시 예에 따른 차량용 전자 제어 장치에 탑재되는 소프트웨어를 검증하는 호스트 컴퓨터는 상기 전자 제어 장치에 탑재되는 검증 대상 소프트웨어에 대한 실험 모델을 생성하는 실험 모델 생성 모듈과 상기 검증 대상 소프트웨어의 함수 호출 관계를 확정하는 호출 관계 분석 모듈과 사용자로부터 상기 검증 대상 소프트웨어에 주입할 결함 정보를 입력 받아 결함 선택 정보를 생성하는 결함 선택 모듈과 상기 결함 선택 정보 및 상기 확정된 함수 호출 관계에 기반하여 결함 주입 코드를 생성하는 결함 주입 코드 생성 모듈과 상기 결함 선택 정보 및 상기 결함 주입 코드를 상기 전자 제어 장치로 전송하는 제1 통신 모뎀을 포함할 수 있다.According to an embodiment of the present disclosure, a host computer for verifying software mounted on an electronic control apparatus for a vehicle may include an experiment model generation module for generating an experimental model for verification software mounted on the electronic control apparatus and a function of the verification target software. A defect selection module that receives defect information to be injected into the verification target software from a user and a call relationship analysis module which determines a call relationship, and generates defect selection information based on the defect selection information and the determined function call relationship It may include a defect injection code generation module for generating a code, and a first communication modem for transmitting the defect selection information and the defect injection code to the electronic control device.

여기서, 상기 실험 모델 생성 모듈은 결함 주입 위치를 추출하는 수단과 상기 추출된 결함 주입 위치에 결함 유형을 적용하는 수단과 결함 주입 테스트가 자동화되도록 설정하는 수단과 상기 결함 유형 별 자동화 가능 여부를 판단하는 수단과 상기 판단 결과에 따라 상기 자동화가 불가능한 결함 유형을 제외하여 결함 주입 시나리오를 설정하는 수단을 포함할 수 있다.Here, the experimental model generation module determines a means for extracting a defect injection position, a means for applying a defect type to the extracted defect injection position, a means for setting a defect injection test to be automated, and determining whether the defect type can be automated. Means and means for setting a defect injection scenario according to a result of the determination and excluding the defect type that cannot be automated.

또한, 상기 결함 주입 위치는 상기 검증 대상 소프트웨어의 단위 및 통합 테스트 단계 별로 뮤테이션(Mutation) 연산자를 적용하여 추출될 수 있다.In addition, the defect injection position may be extracted by applying a mutation operator for each unit and integration test step of the verification target software.

또한, 상기 오류 유형은 데이터 오류(Data Error), 프로그램 흐름 오류(Program Flow Error), 접근 오류(Access Error), 타이밍 오류(Timing Error) 및 비대칭 오류(Asymmetric Error)를 포함할 수 있다.The error type may include a data error, a program flow error, an access error, a timing error, and an asymmetric error.

또한, 상기 결함 선택 정보는 결함이 주입될 위치를 식별하기 위한 정보, 주입될 결함 유형을 식별하기 위한 정보, 결함 주입 횟수에 관한 정보, 변경될 파라메터, 레지스터 및(또는) 변수의 값에 관한 정보 중 적어도 하나를 포함할 수 있다.In addition, the defect selection information may include information for identifying a position at which a defect is to be injected, information for identifying a type of defect to be injected, information about a number of defect injections, information about a parameter to be changed, a value of a register, and / or a variable. It may include at least one of.

또한, 상기 결함 주입 코드는 상기 결함 선택 정보에 따라 단위 테스트를 위한 결함 주입 코드 및 통합 테스트를 위한 결함 주입 코드 중 적어도 하나를 포함할 수 있다.The defect injection code may include at least one of a defect injection code for unit testing and a defect injection code for integration testing according to the defect selection information.

또한, 상기 호출 관계 분석 모듈은 프로젝트 생성을 위한 사용자 인터페이스 화면을 구성하는 제1 사용자 인터페이스 제공부와 상기 검증 대상 소프트웨어를 구성하는 파일, 태스크(Task) 및 함수 등의 계층 구조를 분석하는 구조 분석부와 상기 분석된 계층 구조에 기반하여 호출함수(Caller)와 피호출함수(Callee)의 관계를 분석하는 호출 관계 분석부를 포함할 수 있다.The call relationship analysis module may include a first user interface providing unit constituting a user interface screen for generating a project and a structure analysis unit analyzing a hierarchical structure such as files, tasks, and functions constituting the verification target software. And a call relationship analysis unit that analyzes a relationship between a call function and a call function based on the analyzed hierarchical structure.

또한, 상기 결함 선택 모듈은 소프트웨어 단위 테스트 단계와 소프트웨어 통합 테스트 단계 별 결함 주입 코드 생성에 필요한 정보를 사용자로부터 입력 받기 위한 소정 결함 주입 사용자 인터페이스 화면을 구성하는 제2 사용자 인터페이스 제공부와 상기 단위 테스트를 위한 결함 주입 코드의 생성에 필요한 제1 정보를 수집하는 단위 테스트 정보 수집부와 상기 통합 테스트를 위한 결함 주입 코드의 생성에 필요한 제2 정보를 수집하는 통합 테스트 정보 수집부를 포함할 수 있다.In addition, the defect selection module may perform the unit test with a second user interface providing unit constituting a predetermined defect injection user interface screen for receiving input of information necessary for generating a defect injection code for each software unit test step and software integration test step from a user. It may include a unit test information collection unit for collecting the first information required for generating the defect injection code for the integrated test information collection unit for collecting the second information required for generating the defect injection code for the integration test.

또한, 상기 제1 정보는 결함을 주입할 단위 함수 또는 전역 변수에 관한 정보, 주입할 결함 유형에 관한 정보 및 결함 주입 횟수에 관한 정보, 변경될 파라메터, 레지스터 및(또는) 변수의 값에 관한 정보 중 적어도 하나를 포함할 수 있다.Further, the first information may include information about a unit function or a global variable to inject a defect, information about a defect type to be injected and information about the number of defect injections, information about a parameter to be changed, a register, and / or a variable value. It may include at least one of.

또한, 상기 제2 정보는 상기 통합 테스트에 포함되는 일련의 상기 단위 테스트 및 그것들의 실행 순서에 관한 정보, 결함을 주입할 위치에 관한 정보, 주입할 결함 유형에 관한 정보 및 결함 주입 횟수에 관한 정보, 변경될 파라메터, 레지스터 및(또는) 변수의 값에 관한 정보 중 적어도 하나를 포함할 수 있다.Further, the second information may include information about the series of unit tests included in the integration test and their execution order, information about a location to inject defects, information about a type of defect to be injected, and information about the number of defect injections. It may include at least one of information about a value of a parameter, a register, and / or a variable to be changed.

본 발명의 다른 실시 예에 따른 호스트 컴퓨터와 연동하여 내부 탑재된 소프트웨어를 검증하는 차량용 전자 제어 장치는 상기 호스트 컴퓨터로부터 결함 선택 정보 및 상기 결함 선택 정보에 기초하여 생성된 결합 주입 코드를 수신하는 진단 모듈과 상기 결함 선택 정보에 기초하여 검증 대상 소프트웨어를 식별하고, 상기 식별된 검증 대상 소프트웨어 내 결함을 주입할 태스크와 함수를 식별하는 제2 제어기와 상기 식별된 태스크 호출을 모니터링하는 태스크 호출 모니터링 모듈과 상기 식별된 태스크 호출이 감지되면, 상기 식별된 함수의 호출을 모니터링하는 함수 호출 모니터링 모듈과 상기 식별된 함수의 호출이 감지되면, 상기 결합 주입 코드를 실행시키는 결함 주입 코드 실행 모듈을 포함할 수 있다.An on-vehicle electronic control apparatus for verifying internally mounted software in connection with a host computer according to another embodiment of the present invention is a diagnostic module that receives a defect selection information and a combined injection code generated based on the defect selection information from the host computer. And a second controller for identifying the verification target software based on the defect selection information, for identifying a task and a function to inject a defect in the identified verification target software, and the task call monitoring module for monitoring the identified task call. The function call monitoring module may be configured to monitor a call of the identified function when the identified task call is detected, and a defect injection code execution module to execute the combined injection code when the call of the identified function is detected.

여기서, 상기 차량용 전자 장치에 탑재된 소프트웨어는 AUTOSAR(AUTomotive Open System Architecture) 표준 플랫폼에서 실행되는 소프트웨어일 수 있다.Here, the software mounted on the vehicle electronic device may be software executed on an AUTOSAR (AUTomotive Open System Architecture) standard platform.

또한, 상기 AUTOSAR 표준 플랫폼은 실시간 환경 계층과 하드웨어 계층 사이에 배치되는 기본 소프트웨어 계층을 포함하고, 상기 진단 모듈, 상기 태스크 호출 모니터링 모듈, 상기 함수 호출 모니터링 모듈 및 결함 주입 코드 실행 모듈은 상기 기본 소프트웨어 계층에 탑재될 수 있다.In addition, the AUTOSAR standard platform includes a basic software layer disposed between a real-time environment layer and a hardware layer, wherein the diagnostic module, the task call monitoring module, the function call monitoring module and the fault injection code execution module are the basic software layer. It can be mounted on.

또한, 상기 진단 모듈은 CAN 통신을 통해 상기 결함 선택 정보 및 상기 결함 주입 코드를 수신할 수 있다.In addition, the diagnostic module may receive the defect selection information and the defect injection code through CAN communication.

또한, 상기 결함 주입 코드는 상기 결함 선택 정보에 따라 단위 테스트를 위한 결함 주입 코드 및 통합 테스트를 위한 결함 주입 코드 중 적어도 하나를 포함할 수 있다.The defect injection code may include at least one of a defect injection code for unit testing and a defect injection code for integration testing according to the defect selection information.

본 발명의 또 다른 실시 예에 따른 차량용 소프트웨어 검증 시스템은 검증 대상 소프트웨어의 함수 호출 관계를 분석하고, 사용자로부터 입력 받은 결함 선택 정보 및 상기 분석된 함수 호출 관계에 기초하여 결함 주입 코드를 생성하는 호스트 컴퓨터와 상기 호스트 컴퓨터로부터 CAN 통신을 통해 상기 결함 선택 정보 및 상기 결함 주입 코드를 수신하고, 상기 검증 대상 소프트웨어 실행 시 상기 결함 선택 정보에 기반하여 식별된 태스크 및 함수를 모니터링하여 상기 결함 주입 코드를 실행시키는 차량용 전자 제어 장치를 포함할 수 있다.The vehicle software verification system according to another exemplary embodiment of the present disclosure analyzes a function call relationship of the software to be verified and generates a defect injection code based on defect selection information received from a user and the analyzed function call relationship. And receiving the defect selection information and the defect injection code through CAN communication from the host computer, and executing the defect injection code by monitoring the identified tasks and functions based on the defect selection information when executing the verification target software. It may include a vehicle electronic control device.

여기서, 상기 차량용 전자 제어 장치는 상기 호스트 컴퓨터로부터 상기 결함 선택 정보 및 상기 결합 주입 코드를 수신하는 진단 모듈과 상기 결함 선택 정보에 기초하여 식별된 태스크 및 함수의 호출을 모니터링하는 모니터링 모듈과 상기 식별된 태스크 및 함수의 호출이 감지되면, 상기 결합 주입 코드를 실행시키는 결함 주입 코드 실행 모듈을 포함할 수 있다.Here, the on-vehicle electronic control device includes a diagnostic module for receiving the defect selection information and the combined injection code from the host computer and a monitoring module for monitoring the invocation of the identified task and function based on the defect selection information and the identified module. When a call of a task and a function is detected, the module may include a defect injection code execution module that executes the combined injection code.

또한, 상기 검증 대상 소프트웨어는 AUTOSAR(AUTomotive Open System Architecture) 표준 플랫폼에서 실행되는 소프트웨어일 수 있다.In addition, the verification target software may be software running on an AUTOSAR (AUTomotive Open System Architecture) standard platform.

또한, 상기 AUTOSAR 표준 플랫폼은 실시간 환경 계층과 하드웨어 계층 사이에 배치되는 기본 소프트웨어 계층을 포함하고, 상기 진단 모듈, 상기 모니터링 모듈 및 상기 결함 주입 코드 실행 모듈은 상기 기본 소프트웨어 계층에 탑재될 수 있다.In addition, the AUTOSAR standard platform may include a basic software layer disposed between a real-time environment layer and a hardware layer, and the diagnostic module, the monitoring module and the defect injection code execution module may be mounted in the basic software layer.

또한, 상기 호스트 컴퓨터는 상기 차량용 전자 제어 장치에 탑재되는 상기 검증 대상 소프트웨어에 대한 실험 모델을 생성하는 실험 모델 생성 모듈과 상기 검증 대상 소프트웨어의 함수 호출 관계를 확정하는 호출 관계 분석 모듈과 상기 사용자로부터 상기 검증 대상 소프트웨어에 주입할 결함 정보를 입력 받아 상기 결함 선택 정보를 생성하는 결함 선택 모듈과 상기 결함 선택 정보 및 상기 확정된 함수 호출 관계에 기반하여 상기 결함 주입 코드를 생성하는 결함 주입 코드 생성 모듈과 상기 결함 선택 정보 및 상기 결함 주입 코드를 상기 CAN 통신을 통해 상기 차량용 전자 제어 장치로 전송하는 제1 통신 모뎀을 포함할 수 있다.The host computer may further include an experimental model generation module for generating an experimental model for the verification target software mounted on the vehicle electronic control device, a call relationship analysis module for determining a function call relationship between the verification target software, and the user. A defect selection module that receives defect information to be injected into a verification target software and generates the defect selection information and a defect injection code generation module that generates the defect injection code based on the defect selection information and the determined function call relationship; It may include a first communication modem for transmitting the defect selection information and the defect injection code to the vehicle electronic control device through the CAN communication.

상기 본 발명의 양태들은 본 발명의 바람직한 실시예들 중 일부에 불과하며, 본원 발명의 기술적 특징들이 반영된 다양한 실시예들이 당해 기술분야의 통상적인 지식을 가진 자에 의해 이하 상술할 본 발명의 상세한 설명을 기반으로 도출되고 이해될 수 있다.The above aspects of the present invention are merely some of the preferred embodiments of the present invention, and various embodiments in which the technical features of the present invention are reflected will be described in detail below by those skilled in the art. Can be derived and understood.

본 발명에 따른 방법 및 장치에 대한 효과에 대해 설명하면 다음과 같다.The effects on the method and apparatus according to the present invention are described as follows.

본 발명은 AUTOSAR 기반의 차량용 소프트웨어 검증을 위한 동적 결함 주입 방법 및 장치를 제공하는 장점이 있다.The present invention has the advantage of providing a dynamic defect injection method and apparatus for AUTOSAR-based vehicle software verification.

또한, 본 발명은 하나의 결함 주입 프로그램을 통해 차량 소프트웨어에 대한 소프트웨어 레벨에서의 효과적이고 효율적인 동적 결함 주입 방법 및 장치를 제공하는 장점이 있다.In addition, the present invention has the advantage of providing an effective and efficient dynamic defect injection method and apparatus at the software level for vehicle software through one defect injection program.

또한 본 발명은 차량 전장품에 대한 높은 신뢰성을 확보하는 것이 가능한 동적 결함 주입 방법 및 장치를 제공하는 장점이 있다.In addition, the present invention has the advantage of providing a dynamic defect injection method and apparatus capable of ensuring a high reliability for vehicle electronics.

또한, 본 발명은 동적 결함 주입 방법 및 장치를 제공하는 장점이 있다.In addition, the present invention has the advantage of providing a dynamic defect injection method and apparatus.

본 발명에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.Effects obtained in the present invention are not limited to the above-mentioned effects, and other effects not mentioned above may be clearly understood by those skilled in the art from the following description. will be.

도 1은 본 발명의 일 실시 예에 따른 차량용 소프트웨어 검증 시스템 구조를 설명하기 위한 도면이다.
도 2는 본 발명의 일 실시 예에 따른 호스트 컴퓨터의 구조를 설명하기 위한 블록도이다.
도 3은 본 발명의 일 실시 예에 따른 실험 모델 정의 모듈에서의 실험 모델 정의 절차를 설명하기 위한 도면이다.
도 4는 본 발명의 일 실시 예에 따른 호출 관계 분석 모듈의 내부 구조를 설명하기 위한 도면이다.
도 5는 본 발명의 일 실시 예에 따른 결함 선택 모듈의 내부 구조를 설명하기 위한 도면이다.
도 6은 본 발명의 일 실시 예에 따른 차량용 전자 제어 장치의 구조를 설명하기 위한 도면이다.
도 7은 본 발명의 실시 예에 따른 차량용 전자 제어 장치에 구현되는 AUTOSAR 표준 플랫폼의 계층 구조를 도시한다.
도 8은 본 발명의 일 실시 예에 따른 차량용 전자 제어 장치에 탑재되는 소프트웨어의 검증을 위한 동적 결함 주입 방법을 설명하기 위한 순서도이다.
1 is a view for explaining a vehicle software verification system structure according to an embodiment of the present invention.
2 is a block diagram illustrating a structure of a host computer according to an exemplary embodiment.
3 is a view for explaining an experimental model definition procedure in an experimental model definition module according to an embodiment of the present invention.
4 is a diagram illustrating an internal structure of a call relationship analysis module according to an embodiment of the present invention.
5 is a view for explaining the internal structure of a defect selection module according to an embodiment of the present invention.
6 is a view for explaining the structure of a vehicle electronic control apparatus according to an embodiment of the present invention.
7 illustrates a hierarchical structure of an AUTOSAR standard platform implemented in an electronic control apparatus for a vehicle according to an embodiment of the present disclosure.
8 is a flowchart illustrating a dynamic defect injection method for verifying software mounted on an electronic control apparatus for a vehicle according to an embodiment of the present disclosure.

이하, 본 발명의 실시예들이 적용되는 장치 및 다양한 방법들에 대하여 도면을 참조하여 보다 상세하게 설명한다. 이하의 설명에서 사용되는 구성요소에 대한 접미사 "모듈" 및 "부"는 명세서 작성의 용이함만이 고려되어 부여되거나 혼용되는 것으로서, 그 자체로 서로 구별되는 의미 또는 역할을 갖는 것은 아니다. 이상에서, 본 발명의 실시예를 구성하는 모든 구성 요소들이 하나로 결함되거나 결함되어 동작하는 것으로 설명되었다고 해서, 본 발명이 반드시 이러한 실시예에 한정되는 것은 아니다. 즉, 본 발명의 목적 범위 안에서라면, 그 모든 구성 요소들이 하나 이상으로 선택적으로 결함하여 동작할 수도 있다. 또한, 그 모든 구성 요소들이 각각 하나의 독립적인 하드웨어로 구현될 수 있지만, 각 구성 요소들의 그 일부 또는 전부가 선택적으로 조합되어 하나 또는 복수 개의 하드웨어에서 조합된 일부 또는 전부의 기능을 수행하는 프로그램 모듈을 갖는 컴퓨터 프로그램으로서 구현될 수도 있다. 그 컴퓨터 프로그램을 구성하는 코드들 및 코드 세그먼트들은 본 발명의 기술 분야의 당업자에 의해 용이하게 추론될 수 있을 것이다. 이러한 컴퓨터 프로그램은 컴퓨터가 읽을 수 있는 저장매체(Computer Readable Media)에 저장되어 컴퓨터에 의하여 읽혀지고 실행됨으로써, 본 발명의 실시예를 구현할 수 있다. 컴퓨터 프로그램의 저장매체로서는 자기 기록매체, 광 기록매체 등이 포함될 수 있다.Hereinafter, an apparatus and various methods to which embodiments of the present invention are applied will be described in more detail with reference to the accompanying drawings. The suffixes "module" and "unit" for components used in the following description are given or mixed in consideration of ease of specification, and do not have distinct meanings or roles. In the above description, all the components constituting the embodiments of the present invention are described as defective or defective in one operation, but the present invention is not necessarily limited to these embodiments. That is, within the scope of the present invention, all of the components may be selectively defectively operated. In addition, although all of the components may be implemented in one independent hardware, each or all of the components are selectively combined to perform some or all of the functions combined in one or a plurality of hardware. It may be implemented as a computer program having a. Codes and code segments constituting the computer program may be easily inferred by those skilled in the art. Such a computer program may be stored in a computer readable storage medium and read and executed by a computer, thereby implementing embodiments of the present invention. The storage medium of the computer program may include a magnetic recording medium, an optical recording medium, and the like.

또한, 이상에서 기재된 "포함하다", "구성하다" 또는 "가지다" 등의 용어는, 특별히 반대되는 기재가 없는 한, 해당 구성 요소가 내재될 수 있음을 의미하는 것이므로, 다른 구성 요소를 제외하는 것이 아니라 다른 구성 요소를 더 포함할 수 있는 것으로 해석되어야 한다. 기술적이거나 과학적인 용어를 포함한 모든 용어들은, 다르게 정의되지 않는 한, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 사전에 정의된 용어와 같이 일반적으로 사용되는 용어들은 관련 기술의 문맥 상의 의미와 일치하는 것으로 해석되어야 하며, 본 발명에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.In addition, the terms "comprise", "comprise", or "having" described above mean that the corresponding component may be included unless otherwise stated, and thus, other components are excluded. It should be construed that it may further include other components instead. All terms, including technical and scientific terms, have the same meanings as commonly understood by one of ordinary skill in the art unless otherwise defined. Terms commonly used, such as terms defined in a dictionary, should be interpreted to coincide with the contextual meaning of the related art, and shall not be interpreted in an ideal or excessively formal sense unless explicitly defined in the present invention.

또한, 본 발명의 구성 요소를 설명하는 데 있어서, 제 1, 제 2, A, B, (a), (b) 등의 용어를 사용할 수 있다. 이러한 용어는 그 구성 요소를 다른 구성 요소와 구별하기 위한 것일 뿐, 그 용어에 의해 해당 구성 요소의 본질이나 차례 또는 순서 등이 한정되지 않는다. 어떤 구성 요소가 다른 구성 요소에 "연결", "결함" 또는 "접속"된다고 기재된 경우, 그 구성 요소는 그 다른 구성 요소에 직접적으로 연결되거나 또는 접속될 수 있지만, 각 구성 요소 사이에 또 다른 구성 요소가 "연결", "결함" 또는 "접속"될 수도 있다고 이해되어야 할 것이다.In addition, in describing the component of this invention, terms, such as 1st, 2nd, A, B, (a), (b), can be used. These terms are only for distinguishing the components from other components, and the nature, order or order of the components are not limited by the terms. If a component is described as being "connected", "defective" or "connected" to another component, that component may be directly connected to or connected to that other component, but there is another configuration between each component. It is to be understood that an element may be "connected", "faulted" or "connected".

도 1은 본 발명의 일 실시 예에 따른 차량용 소프트웨어 검증 시스템 구조를 설명하기 위한 도면이다.1 is a view for explaining a vehicle software verification system structure according to an embodiment of the present invention.

상세하게, 도 1은 차량용 전자 제어 장치에 탑재된 소프트웨어에 동적으로 결함을 주입함으로써, 해당 소프트웨어의 오류 처리 로직이 정상인지 여부를 검증하는 것이 가능한 차량용 소프트웨어 검증 시스템 구조를 설명하기 위한 도면이다.In detail, FIG. 1 is a view for explaining a vehicle software verification system structure capable of verifying whether error processing logic of the corresponding software is normal by dynamically injecting a defect into software mounted in the vehicle electronic control apparatus.

도 1을 참조하면, 차량용 소프트웨어 검증 시스템은 크게 호스트 컴퓨터(10)와 차량용 전자 제어 장치(20)를 포함하여 구성될 수 있다. 이하 설명의 편의를 위해, 차량용 전자 제어 장치(20)는 ECU(Electrical Control Unit)과 혼용하여 사용하기로 한다.Referring to FIG. 1, a vehicle software verification system may largely include a host computer 10 and a vehicle electronic control apparatus 20. For convenience of description below, the vehicle electronic control device 20 will be used in combination with an ECU (Electric Control Unit).

호스트 컴퓨터(10)와 차량용 전자 제어 장치(20)는 CAN(Controller Area Network) 통신을 통해 상호 정보를 교환할 수 있다.The host computer 10 and the vehicle electronic control apparatus 20 may exchange information with each other through controller area network (CAN) communication.

여기서, 차량용 전자 제어 장치(20)에 탑재되는 소프트웨어는 AUTOSAR(AUTomotive Open System Architecture) 표준 기반의 소프트웨어일 수 있다.Here, the software mounted on the vehicle electronic control apparatus 20 may be software based on the AUTOSAR (AUTomotive Open System Architecture) standard.

호스트 컴퓨터(10)는 차량용 전자 제어 장치(20)에 탑재되는 소프트웨어를 개발하는 환경을 제공하며, 사용자로부터 입력 받은 결함 선택 정보를 CAN 통신을 통해 차량용 전자 제어 장치(20)로 전달할 수 있다. 여기서, 결함 선택 정보는 검증 대상 소프트웨어 식별 정보, 함수 호출 관계에 의해 결정되는 결함이 주입될 위치에 관한 정보, 주입될 결함의 유형에 관한 정보, 결함 주입 횟수에 관한 정보, 변경될 파라메터, 레지스터 및 데이터 값에 관한 정보 중 적어도 하나를 포함할 수 있으나, 이에 한정되지는 않는다.The host computer 10 may provide an environment for developing software mounted on the vehicle electronic control apparatus 20, and may transmit defect selection information received from a user to the vehicle electronic control apparatus 20 through CAN communication. Here, the defect selection information includes information about the software to be verified, information about a position to be injected into a defect determined by a function call relationship, information about a type of a defect to be injected, information about a number of defect injections, a parameter to be changed, a register, and It may include at least one of information about a data value, but is not limited thereto.

또한, 호스트 컴퓨터(10)는 CAN 통신을 통해 현재 차량용 전자 제어 장치(20)로부터 실시간 소프트웨어 실행 상태 정보를 수집하여 구비된 화면에 출력할 수도 있다.In addition, the host computer 10 may collect real-time software execution status information from the electronic control device for a vehicle 20 through CAN communication and output the real-time software execution status on the screen.

상기한 도 1의 실시 예에서는 호스트 컴퓨터(10)가 하나의 차량용 전자 제어 장치(20)와 연결된 것으로 도시되어 있으나, 이는 하나의 실시 예에 불과하며, 다른 실시 예에 따른 호스트 컴퓨터(10)는 CAN 통신망을 통해 다수의 차량용 전자 제어 장치(20)와 연결될 수도 있다.In the above-described embodiment of FIG. 1, the host computer 10 is illustrated as being connected to one vehicle electronic control apparatus 20, but this is only one embodiment, and the host computer 10 according to another embodiment may be It may be connected to a plurality of vehicle electronic control device 20 via a CAN communication network.

사용자-즉, TESTER-는 구현된 오류-안전(Fail-Safety) 로직의 검증 및 평가를 위해 호스트 컴퓨터(10)를 통해 검증 대상 소프트웨어, 검증 대상 소프트웨어상에서의 결함 위치 및 결함 데이터, 결함 주입 시점, 결함 주입 방법 등을 선정하여 실험 모델(Test Model)를 정의하여 유지할 수 있다.The user—that is, TESTER—is verified by the host computer 10 for verification and evaluation of the implemented fail-safety logic, the defect location and defect data on the verified software, the time of defect injection, By selecting a defect injection method, a test model can be defined and maintained.

호스트 컴퓨터(10)에는 결함 주입 테스트 관리기(Fault Injection Test Manager)가 탑재되며, 사용자는 결함 주입 테스트 관리기를 통해 검증 대상 ECU의 소프트웨어 관련 정보-예를 들면, ELF(Executable and Linkable Format) 파일 및 MAP 파일 등을 포함함-를 분석할 수 있다.The host computer 10 is equipped with a fault injection test manager, and the user can use the fault injection test manager to provide software-related information of the ECU to be verified, for example, an executable and linkable format (ELF) file and a MAP. File, etc.).

여기서, ELF은 실행 및 링크가 가능한 바이너리 또는 오브젝트 파일 등의 형식을 규정한 것으로서, ELF 파일은 ELF 헤더가 맨 앞에 위치하고, 프로그램 헤더 테이블과 섹션(Section) 헤더 테이블이 그 뒤에 위치할 수 있다. 오브젝트 파일은 코드와 데이터가 다른 오브젝트 파일과 링킹될 수 있도록 하는 재배치 가능한 파일(relocatable file), 코드와 데이터가 타겟 운영 체제에서 실행될 수 있도록 하는 실행 파일(executable file) 및 재할당 가능한 데이터를 정적 또는 동적으로 다른 공유 오브젝트들과 공유할 수 있도록 하는 공유 오브젝트 파일(shared object file)을 포함할 수 있다.Herein, the ELF defines a format of a binary or object file that can be executed and linked. The ELF file may include an ELF header at the front and a program header table and a section header table at the back. An object file is a relocatable file that allows code and data to be linked with other object files, an executable file that allows code and data to run on the target operating system, and static or reassignable data. It can include a shared object file that allows you to dynamically share with other shared objects.

또한, 호스트 컴퓨터(10)는 ELF(Executable and Linkable Format) 파일 및 MAP 파일 등을 이용하여 검증 대상 소프트웨어의 함수 호출 관계를 분석할 수 있다. 여기서, 분석 결과는 호스트 컴퓨터(10)의 내부 메모리에 유지될 수 있다.In addition, the host computer 10 may analyze the function call relationship of the verification target software using an Executable and Linkable Format (ELF) file, a MAP file, and the like. Here, the analysis result may be maintained in the internal memory of the host computer 10.

또한, 호스트 컴퓨터(10)는 사용자로부터 입력 받은 결함 선택 정보에 기초하여 결함 주입 코드를 생성할 수 있다.In addition, the host computer 10 may generate a defect injection code based on defect selection information received from a user.

호스트 컴퓨터(10)는 함수 호출 관계에 대한 분석 결과, 결함 선택 정보 및 생성된 결함 주입 코드 중 적어도 하나를 CAN 통신을 통해 차량용 전자 제어 장치(20)에 전송할 수 있다.The host computer 10 may transmit at least one of the analysis result of the function call relationship, the defect selection information, and the generated defect injection code to the vehicle electronic control apparatus 20 through CAN communication.

또한, 차량용 전자 제어 장치(20)는 실행 중인 소프트웨어를 모니터링하여 함수의 호출 관계를 추적하고, 추적 결과에 따라 동적으로 결함 주입 코드를 실행시킬 수 있다.In addition, the vehicle electronic control apparatus 20 may monitor running software to track the call relationship of functions, and dynamically execute the defect injection code according to the tracking result.

이때, 차량용 전자 제어 장치(20)는 함수의 호출 관계에 대한 추적 결과 및 결함 주입 코드 실행 결과에 관한 정보는 CAN 통신을 통해 호스트 컴퓨터(10)로 전달할 수도 있다.In this case, the vehicle electronic control apparatus 20 may transfer the tracking result of the call relation of the function and the information on the execution result of the defect injection code to the host computer 10 through CAN communication.

이상의 설명에서는 호스트 컴퓨터(10)가 결함 선택 정보에 기초하여 결함 주입 코드를 생성하는 것으로 설명되고 있으나, 이는 하나의 실시 예에 불과하며, 차량용 전자 제어 장치(20)는 호스트 컴퓨터(10)로부터 검증 대상 소프트웨어의 함수 호출 관계 분석 결과와 결함 선택 정보에 기초하여 결합 주입 코드를 생성할 수도 있다. 이때, 결합 주입 코드는 단위 테스트를 위한 결함 주입 코드와 통합 테스트를 위한 결함 주입 코드 중 적어도 하나를 포함할 수 있다.In the above description, the host computer 10 generates the defect injection code based on the defect selection information. However, this is only an example, and the vehicle electronic control apparatus 20 may verify the host computer 10 from the host computer 10. The joint injection code may be generated based on the result of the function call relationship analysis of the target software and the defect selection information. In this case, the combined injection code may include at least one of a defect injection code for a unit test and a defect injection code for an integrated test.

도 2는 본 발명의 일 실시 예에 따른 호스트 컴퓨터의 구조를 설명하기 위한 블록도이다.2 is a block diagram illustrating a structure of a host computer according to an exemplary embodiment.

도 2를 참조하면, 호스트 컴퓨터(10)는 실험 모델 생성 모듈(210), 호출 관계 분석 모듈(220), 결함 선택 모듈(230), 결함 주입 코드 생성 모듈(240), 제1 메모리(250), 입력 장치(260), 출력 장치(270), 제1 통신 모뎀(280) 및 제1 제어기(290)를 포함하여 구성될 수 있다.Referring to FIG. 2, the host computer 10 may include an experimental model generation module 210, a call relationship analysis module 220, a defect selection module 230, a defect injection code generation module 240, and a first memory 250. It may be configured to include an input device 260, an output device 270, a first communication modem 280, and a first controller 290.

실험 모델 생성 모듈(210)은 실험 모델을 정의하기 위한 프로젝트 생성 사용자 인터페이스를 제공할 수 있다.The experiment model generation module 210 may provide a project generation user interface for defining an experiment model.

실험 모델 생성 모듈(210)은 검증 대상 ECU 내 검증 대상 소프트웨어를 확정하고, 확정된 검증 대상 소프트웨어의 태스크/파일 등의 계층화된 구조를 분석하여 잠정적으로 결함이 발생될 수 있는 위치 및 결함이 발생될 수 있는 파라메터 및(또는) 변수 및(또는) 레지스터 등을 선정하고, 선정 결과에 기초하여 해당 ECU를 위한 실험 모델을 정의 및 생성할 수 있다. 여기서, 생성된 실험 모델에 관한 정보는 제1 메모리(250)에 저장될 수 있다.The experimental model generation module 210 determines the verification target software in the verification target ECU and analyzes a layered structure of a task / file of the determined verification target software to generate a location and a defect in which a defect may be tentatively generated. The number of parameters and / or variables and / or registers can be selected, and an experimental model for the ECU can be defined and generated based on the selection result. Here, the information about the generated experimental model may be stored in the first memory 250.

호출 관계 분석 모듈(220)은 검증 대상 ECU에 탑재된 소프트웨어와 관련된 정보-예를 들면, ELF 파일, MAP 파일 및 헤더 파일 등을 포함함-를 분석하여 검증 대상 소프트웨어상에서의 함수 호출 관계를 확정할 수 있다.The call relationship analysis module 220 analyzes information related to the software mounted in the ECU to be verified, including, for example, an ELF file, a MAP file, a header file, and the like, to determine a function call relationship on the software to be verified. Can be.

결함 선택 모듈(230)은 태스크 기반으로 사용자로부터 주입할 결함을 선택 받아 결함 선택 정보를 생성할 수 있다. 여기서, 결함 선택 정보는 태스크 식별 정보, 결함이 주입될 위치를 식별하기 위한 정보 및 주입될 결함의 유형을 식별하기 위한 정보, 변경될 파라메터, 레지스터 및(또는) 변수의 값에 관한 정보 등을 포함할 수 있으며, 제1 제어기(280)로 전달될 수 있다.The defect selection module 230 may select defects to be injected from a user based on a task and generate defect selection information. Here, the defect selection information includes task identification information, information for identifying a location where a defect is to be injected, information for identifying a type of a defect to be injected, information about a parameter to be changed, a value of a register and / or a variable, and the like. May be transferred to the first controller 280.

사용자는 호스트 컴퓨터(10)에 탑재된 결함 주입 테스트 관리기를 실행시킨 후 소정 사용자 인터페이스 화면을 통해 주입할 결함을 선택할 수 있다. 여기서, 선택 가능한 결함 위치 및 유형은 상기 정의된 실험 모델에 기반하여 결정될 수 있다.A user may execute a defect injection test manager mounted in the host computer 10 and select a defect to be injected through a predetermined user interface screen. Here, the selectable defect location and type can be determined based on the experimental model defined above.

제1 제어기(290)는 결함 선택 모듈(230)로부터 수신된 결함 선택 정보를 제1 통신 모뎀(270)을 통해 차량용 전자 제어 장치(20)로 전송할 수 있다.The first controller 290 may transmit the defect selection information received from the defect selection module 230 to the vehicle electronic control apparatus 20 through the first communication modem 270.

제1 메모리(250)에는 호스트 컴퓨터(10)의 구동에 필요한 소프트웨어, 정의된 실험 모델에 관한 정보 및 분석된 함수 호출 관계에 관한 정보 등이 기록될 수 있다.The first memory 250 may store software necessary for driving the host computer 10, information about a defined experimental model, information about an analysis of a function call relationship, and the like.

제1 제어기(290)는 사용자의 선택에 따라 정의된 실험 모델에 관한 정보 및 분석된 함수 호출 관계에 관한 정보를 상기 제1 메모리(250)로부터 독출하여 해당 ECU로 전송할 수도 있다.The first controller 290 may read information about the experimental model defined according to the user's selection and information about the analyzed function call relation from the first memory 250 and transmit the information to the ECU.

결함 주입 코드 생성 모듈(240)은 결함 선택 정보에 기초하여 결함 주입 코드를 생성할 수 있다. 여기서, 생성되는 결함 주입 코드는 단위 테스트 결함 주입 코드와 통합 테스트 결함 주입 코드를 포함할 수 있다.The defect injection code generation module 240 may generate a defect injection code based on the defect selection information. Here, the generated defect injection code may include a unit test defect injection code and an integrated test defect injection code.

생성된 결함 주입 코드는 제1 메모리(250)에 저장될 수 있다.The generated defect injection code may be stored in the first memory 250.

제1 제어기(290)는 해당 ECU가 구동되면, 제1 메모리(250)로부터 해당 ECU에 상응하는 결함 주입 코드를 읽어 들여, 제1 통신 모뎀(280)을 통해 해당 ECU로 전송할 수 있다.When the ECU is driven, the first controller 290 may read a defect injection code corresponding to the ECU from the first memory 250 and transmit the defective injection code to the ECU through the first communication modem 280.

입력 장치(260)는 키보드, 터치 스크린, 마우스 등의 사용자 입력 수단을 포함할 수 있다.The input device 260 may include user input means such as a keyboard, a touch screen, a mouse, and the like.

출력 장치(270)는 디스플레이 화면, 스피커 등을 포함할 수 있으나, 이에 한정되지는 않는다.The output device 270 may include a display screen, a speaker, and the like, but is not limited thereto.

제1 통신 모뎀(280)은 차량 내 구비된 ECU와의 CAN 통신을 수행할 수 있다.The first communication modem 280 may perform CAN communication with the ECU provided in the vehicle.

도 3은 본 발명의 일 실시 예에 따른 실험 모델 정의 모듈에서의 실험 모델 정의 절차를 설명하기 위한 도면이다.3 is a view for explaining an experimental model definition procedure in an experimental model definition module according to an embodiment of the present invention.

도 3을 참조하면, 실험 모델 생성 모듈(210)은 차량용 소프트웨어의 단위/통합 테스트 단계별로 AUTOSAR 기반 차량용 소프트웨어 어플리케이션이 호출할 수 있는 계층에 소스 코드를 변경하여 테스트하는 기법인 소프트웨어 단위 및 통합 뮤테이션(Mutation) 연산자를 적용하여 결함 주입 위치를 추출할 수 있다(S310).Referring to FIG. 3, the experimental model generation module 210 is a software unit and integrated muting technique, which is a technique for changing and testing a source code in a layer that can be called by an AUTOSAR-based vehicle software application in a unit / integration test step of vehicle software. The defect injection position may be extracted by applying a (Mutation) operator (S310).

실험 모델 생성 모듈(210)은 AUTOSAR 어플리케이션에서 발생할 수 있는 오류 유형을 기반으로 결함 유형을 도출하고, 추출된 결함 주입 위치 별 도출된 결함 유형을 적용할 수 있다(S320).The experimental model generation module 210 may derive a defect type based on an error type that may occur in an AUTOSAR application, and apply the derived defect type for each extracted defect injection position (S320).

일 예로, AUTOSAR 어플리케이션에서 발생할 수 있는 오류 유형은 크게 데이터 오류(Data Error), 프로그램 흐름 오류(Program Flow Error), 접근 오류(Access Error), 타이밍 오류(Timing Error) 및 비대칭 오류(Asymmetric Error)를 포함할 수 있다.For example, the types of errors that can occur in AUTOSAR applications include data errors, program flow errors, access errors, timing errors, and asymmetric errors. It may include.

데이터 오류의 세부 오류 유형은 “Invalid Value” 1개이고, 프로그램 흐름 오류의 세부 오류 유형은 “Uncalled Function”, “Bypass Function Call” 및 “Illegal Instruction” 3개이고, 접근 오류의 세부 오류 유형은 “Invalid Address” 및 “Invalid Register” 2개이고, 타이밍 오류의 세부 오류 유형은 “Data Delay”, “Data Loss”, “No Response” 및 “CPU Clock Corruption” 4개이고, 비대칭 오류의 세부 결함 유형은 “Asymmetric Valure” 1개로 구분될 수 있다.The detailed error type of data error is 1 “Invalid Value”, the detailed error type of program flow error is 3 “Uncalled Function”, “Bypass Function Call” and “Illegal Instruction”, and the detailed error type of access error is “Invalid Address”. ”And“ Invalid Register ”, detailed error types of timing error are“ Data Delay ”,“ Data Loss ”,“ No Response ”and“ CPU Clock Corruption ”, and detailed defect types of asymmetric error are“ Asymmetric Valure ” It can be divided into one.

상기한 310 단계 내지 320 단계가 종료되면, 결함 주입 테스트를 위한 결함 유형이 정의된다.Upon completion of steps 310 to 320, a defect type for a defect injection test is defined.

실험 모델 생성 모듈(210)은 결함 주입 테스트가 자동화되도록 설정할 수 있다(S330).The experimental model generation module 210 may set the defect injection test to be automated (S330).

일 예로, AUTOSAR 기반의 차량용 ECU 소프트웨어에 결함을 주입하는 방법은 해당 ECU의 AUTOSAR 계층 중 기본 소프트웨어 계층(BSW(Basic SoftWare) Layer)에 태스크 및 함수의 호출을 모니터링하는 모니터링 모듈을 탑재하고, 테스트 대상 어플리케이션이 실행된 후 결함 주입 대상 함수의 호출이 모니터링 모듈에 의해 감지되면 호출된 원본 함수 대신 결함 코드가 삽입된 함수-이하 설명의 편의를 위해, ‘결함 코드 주입 함수’라 명함-를 실행시키는 결함 주입 테스트 자동화 방법이 사용될 수 있다.For example, a method of injecting a fault into an AUTOSAR-based vehicle ECU software includes a monitoring module that monitors the invocation of tasks and functions in a basic software layer (BSW (Basic SoftWare) Layer) of the AUTOSAR layer of the ECU, and After the application is executed, if the call of the function to be injected is detected by the monitoring module, a function that executes a function with a defect code inserted instead of the original function called-for the convenience of explanation below, a business card called a defect code injection function. Injection test automation methods can be used.

즉, 본 발명의 일 실시 예는 기본 소프트웨어 계층에 래퍼 함수(Wrapper Function)와 래퍼 함수를 후킹할 수 있는 모듈을 탑재함으로써, 결함 주입 테스트를 자동화시킬 수 있다. 여기서, 래퍼는 특정 함수를 자신의 함수로 덮어쓰는 것을 의미한다.That is, an embodiment of the present invention can automate a defect injection test by mounting a wrapper function and a module that can hook a wrapper function in a basic software layer. Here, a wrapper means overwriting a specific function with its own function.

실험 모델 생성 모듈(210)은 결함 유형 별 상기 자동화 설정이 가능한지 여부를 판단할 수 있다(S340).The experimental model generation module 210 may determine whether the automation setting for each defect type is possible (S340).

즉, 실험 모델 생성 모듈(210)은 상기 320 단계의 결과로 도출된 결함 유형에 상기 330 단계의 자동화 방법이 적용될 수 있는지 여부를 판단할 수 있다. 판단 결과, 적용이 불가하면, 실험 모델 생성 모듈(210)은 해당 결함 유형을 테스트 대상에서 제외시킬 수 있다.That is, the experiment model generation module 210 may determine whether the automation method of step 330 can be applied to the defect type derived as a result of step 320. As a result of determination, if it is not applicable, the experimental model generation module 210 may exclude the corresponding defect type from the test target.

실험 모델 생성 모듈(210)은 상기 도출된 결함 유형과 AUTOSAR 플랫폼을 분석하여 결함이 발생하는 시나리오 및 결함 주입 방법을 설정할 수 있다(S350).The experimental model generation module 210 may set a scenario in which a defect occurs and a defect injection method by analyzing the derived defect type and the AUTOSAR platform (S350).

도 4는 본 발명의 일 실시 예에 따른 호출 관계 분석 모듈의 내부 구조를 설명하기 위한 도면이다.4 is a diagram illustrating an internal structure of a call relationship analysis module according to an embodiment of the present invention.

도 4를 참조하면, 호출 관계 분석 모듈(220)은 제1 사용자 인터페이스 제공부(410), 구조 분석부(420) 및 호출 관계 분석부(430)를 포함하여 구성될 수 있다.Referring to FIG. 4, the call relationship analysis module 220 may include a first user interface provider 410, a structure analyzer 420, and a call relationship analyzer 430.

제1 사용자 인터페이스 제공부(410)는 프로젝트 생성을 위한 사용자 인터페이스 화면-이하, 설명의 편의를 위해 프로젝트 생성 UI라 명함-을 구성할 수 있다.The first user interface providing unit 410 may configure a user interface screen for creating a project-a project generation UI, a business card, for convenience of description.

사용자는 프로젝트 생성 UI를 통해 검증 대상 ECU를 선택할 수 있다. 또한, 사용자는 프로젝트 생성 UI를 통해 선택된 ECU에 탑재된 소프트웨어 컴포넌트들 중 검증 대상 소프트웨어 컴포넌트을 선택할 수도 있다.The user can select the ECU to be verified through the project creation UI. In addition, the user may select a verification target software component among software components mounted in the selected ECU through the project generation UI.

구조 분석부(420)는 검증 대상 소프트웨어 컴포넌트의 ELF 파일 및 MAP 파일에 기초하여 검증 대상 소프트웨어의 파일/태스크(또는 모듈)/함수의 계층 구조를 분석할 수 있다.The structure analyzer 420 may analyze a hierarchical structure of a file / task (or module) / function of the software to be verified based on the ELF file and the MAP file of the software component to be verified.

호출 관계 분석부(430)는 구조 분석부(420)에 의해 분석된 계층 구조에 기초하여 함수 별 호출 관계-즉, 호출함수(Caller)-피호출함수(Callee) 관계-를 분석할 수 있다.The call relationship analyzer 430 may analyze a call relationship for each function, that is, a caller-caller relationship based on the hierarchical structure analyzed by the structure analyzer 420.

도 5는 본 발명의 일 실시 예에 따른 결함 선택 모듈의 내부 구조를 설명하기 위한 도면이다.5 is a view for explaining the internal structure of a defect selection module according to an embodiment of the present invention.

도 5를 참조하면, 결함 선택 모듈(230)은 제2 사용자 인터페이스 제공부(510), 단위 테스트 정보 수집부(520) 및 통합 테스트 정보 수집부(530)를 포함하여 구성될 수 있다.Referring to FIG. 5, the defect selection module 230 may include a second user interface providing unit 510, a unit test information collecting unit 520, and an integrated test information collecting unit 530.

제2 사용자 인터페이스 제공부(510)는 소프트웨어 단위 테스트 단계와 소프트웨어 통합 테스트 단계 별 결함 주입 코드 생성에 필요한 정보를 사용자로부터 입력 받기 위한 소정 결함 주입 사용자 인터페이스 화면을 구성할 수 있다.The second user interface providing unit 510 may configure a predetermined defect injection user interface screen for receiving input from the user of information necessary for generating a defect injection code for each software unit test step and software integration test step.

단위 테스트 정보 수집부(520)는 단위 테스트를 위한 결함 주입 코드 생성에 필요한 정보를 수집할 수 있다. 일 예로, 단위 테스트 정보 수집부(520)는 결함을 주입할 단위 함수 또는 전역 변수에 관한 정보, 주입할 결함 유형에 관한 정보 및 결함 주입 횟수에 관한 정보, 변경될 파라메터, 레지스터 및(또는) 변수의 값에 관한 정보 등을 수집할 수 있다.The unit test information collection unit 520 may collect information necessary for generating a defect injection code for unit testing. For example, the unit test information collection unit 520 may include information about a unit function or a global variable to inject a defect, information about a defect type to be injected, information about the number of defect injections, parameters to be changed, a register, and / or a variable. Information about the value of can be collected.

통합 테스트 정보 수집부(530)는 통합 테스트를 위한 결함 주입 코드 생성에 필요한 정보를 수집할 수 있다. 일 예로, 통합 테스트 정보 수집부(530)는 통합 테스트에 포함되는 일련의 단위 테스트 및 그것들의 실행 순서에 관한 정보, 결함을 주입할 위치에 관한 정보-예를 들면, Caller와 Callee의 호출 관계에 관한 정보-, 주입할 결함 유형에 관한 정보, 결함 주입 횟수에 관한 정보, 변경될 파라메터, 레지스터 및(또는) 변수의 값에 관한 정보 등을 수집할 수 있다.The integrated test information collecting unit 530 may collect information necessary for generating a defect injection code for the integrated test. For example, the integrated test information collecting unit 530 may include information about a series of unit tests included in the integrated test and their execution order, information about a location to inject defects, for example, a caller-callee call relationship. Information about the type of defects to be injected, information about the number of defect injections, parameters to be changed, information about the values of registers and / or variables, and the like.

결함 주입 코드 생성 모듈(240)은 단위 테스트 정보 수집부(520) 및(또는) 통합 테스트 정보 수집부(530)에 의해 수집된 결함 선택 정보에 기초하여 단위 테스트를 위한 결함 주입 코드 및 통합 테스트를 위한 결함 주입 코드 중 적어도 하나를 생성하여 제1 메모리(250)에 저장할 수 있다.The defect injection code generation module 240 performs the defect injection code and the integration test for the unit test based on the defect selection information collected by the unit test information collecting unit 520 and / or the integrated test information collecting unit 530. At least one of the defect injection codes may be generated and stored in the first memory 250.

도 6은 본 발명의 일 실시 예에 따른 차량용 전자 제어 장치의 구조를 설명하기 위한 도면이다.6 is a view for explaining the structure of a vehicle electronic control apparatus according to an embodiment of the present invention.

도 6을 참조하면, 차량용 전자 제어 장치(20)는 태스크 호출 모니터링 모듈(610), 함수 호출 모니터링 모듈(620), 결함 주입 코드 실행 모듈(630), 제2 메모리(640), 진단 모듈(650), 제2 CAN 통신 모듈(660) 및 제2 제어기(670)을 포함하여 구성될 수 있다.Referring to FIG. 6, the vehicle electronic control apparatus 20 may include a task call monitoring module 610, a function call monitoring module 620, a defect injection code execution module 630, a second memory 640, and a diagnostic module 650. ), A second CAN communication module 660, and a second controller 670.

태스크 호출 모니터링 모듈(610)은 차량용 전자 제어 장치(20) 구동 중 특정 태스크의 호출 여부를 모니터링할 수 있다. 즉, 태스크 호출 모니터링 모듈(610)은 검증 대상 태스크의 호출 여부를 실시간 모니터링하고, 모니터링 결과를 제2 제어기(670)에 제공할 수 있다.The task call monitoring module 610 may monitor whether a specific task is called while driving the vehicle electronic control apparatus 20. That is, the task call monitoring module 610 may monitor whether the task to be verified is called in real time and provide the monitoring result to the second controller 670.

여기서, 태스크는 소프트웨어 컴포넌트 단위로 구분될 수 있으나, 이는 하나의 실시 예에 불과하며, 다른 실시 예에 따른 태스크는 소프트웨어 컴포넌트 내 특정 기능 모듈로 구분될 수 있다. 일 예로, 차량용 전자 제어 장치가 공조기인 경우, 태스크는 공조 소프트웨어 전체일 수 있다. 다른 일 예로, 차량용 전자 제어 장치가 공조기인 경우, 태스크는 공조 소프트웨어 중 난방 기능 모듈, 냉방 기능 모듈, 환기 기능 모듈 등을 포함할 수 있다.Here, the task may be divided into software component units, but this is only one embodiment, and the task according to another embodiment may be divided into specific function modules within the software component. For example, when the vehicle electronic control apparatus is an air conditioner, the task may be the entire air conditioning software. As another example, when the vehicle electronic control apparatus is an air conditioner, the task may include a heating function module, a cooling function module, a ventilation function module, and the like among the air conditioning software.

제2 제어기(670)는 태스크 호출 모니터링 모듈(610)의 모니터링 결과에 기초하여 함수 호출 모니터링 모듈(620)이 특정 함수의 호출을 모니터링하도록 제어할 수 있다.The second controller 670 may control the function call monitoring module 620 to monitor the call of a specific function based on the monitoring result of the task call monitoring module 610.

함수 호출 모니터링 모듈(610)은 제2 제어기(670)의 제어 신호에 따라 해당 태스크 내 특정 함수의 호출 여부를 모니터링하고, 모니터링 결과를 제2 제어기(670)에 제공할 수 있다. 여기서, 특정 함수는 결함 주입 코드가 주입되어야 하는 함수-즉, 결함 주입 코드 주입 대상 함수-일 수 있다.The function call monitoring module 610 may monitor whether a specific function in a corresponding task is called according to a control signal of the second controller 670 and provide a monitoring result to the second controller 670. Here, the specific function may be a function to which a defect injection code is to be injected, that is, a function to be injected with a defect injection code.

결함 주입 코드 실행 모듈(630)은 제2 제어기(670)의 제어 신호에 따라 결함 주입 코드 주입 대상 함수가 호출되었음을 감지하면, 제2 메모리(640)에 저장된 해당 결함 주입 코드 독출하여 실행시킬 수 있다. 즉, 결함 주입 코드 실행 모듈(630)은 결함이 없는 원래 코드로 구성된 제1 함수의 실행 대신에 결함 주입 코드가 주입된 제2 함수가 실행시킬 수 있다. 여기서, 제1 함수와 제2 함수는 동일한 이름의 동일 변수 타입을 가지는 함수임을 주의해야 한다.When the defect injection code execution module 630 detects that a defect injection code injection target function is called according to a control signal of the second controller 670, the defect injection code execution module 630 may read and execute the corresponding defect injection code stored in the second memory 640. . That is, the defect injection code execution module 630 may be executed by the second function injected with the defect injection code instead of the execution of the first function composed of the original code without the defect. Here, it should be noted that the first function and the second function are functions having the same variable type with the same name.

진단 모듈(650)은 제2 CAN 통신 모뎀(660)을 통해 사용자로부터 입력 받은 결함 선택 정보를 호스트 컴퓨터(10)로부터 수신하여 제2 제어기(670)에 제공할 수 있다.The diagnostic module 650 may receive the defect selection information received from the user through the second CAN communication modem 660 from the host computer 10 and provide it to the second controller 670.

제2 제어기(670)는 결함 선택 정보가 호스트 컴퓨터(10)로부터 수신된 경우, 결함 선택 정보에 기반하여 검증 대상 소프트웨어/태스크/함수를 식별할 수 있다.When the defect selection information is received from the host computer 10, the second controller 670 may identify the verification target software / task / function based on the defect selection information.

제2 제어기(670)는 식별 결과에 따라 태스크 호출 모니터링 모듈(610) 및 함수 호출 모니터링 모듈(620)의 동작을 제어할 수 있다.The second controller 670 may control operations of the task call monitoring module 610 and the function call monitoring module 620 according to the identification result.

또한, 제2 제어기(670)는 제2 통신 모뎀(660) 및 진단 모듈(650)을 통해 결함 주입 코드-즉, 결함 주입 코드가 주입된 함수 코드-를 호스트 컴퓨터(10)로부터 수신할 수 있다. 제2 제어기(670)는 수신된 결함 주입 코드를 제2 메모리(640)에 저장할 수 있다.In addition, the second controller 670 may receive a defect injection code, that is, a function code into which the defect injection code has been injected, from the host computer 10 via the second communication modem 660 and the diagnostic module 650. . The second controller 670 may store the received defect injection code in the second memory 640.

제2 통신 모뎀(660)은 호스트 컴퓨터(10)와 CAN 통신을 수행할 수 있다.The second communication modem 660 may perform CAN communication with the host computer 10.

제2 제어기(670)는 차량용 전자 제어 장치(20)의 내부 동작 및 입출력을 제어할 수 있다.The second controller 670 may control internal operations and input / output of the vehicle electronic control apparatus 20.

일 실시 예에 따른 차량용 전자 제어 장치(20)가 AUTOSAR 표준 플랫폼을 지원하는 경우, 태스크 호출 모니터링 모듈(610), 함수 호출 모니터링 모듈(620), 결함 주입 코드 실행 모듈(630) 및 진단 모듈(650)은 기본 소프트웨어 계층에 탑재될 수 있다. 상세한 내용은 후술할 도면의 설명을 통해 보다 명확해질 것이다.If the vehicle electronic control apparatus 20 according to an embodiment supports the AUTOSAR standard platform, the task call monitoring module 610, the function call monitoring module 620, the defect injection code execution module 630, and the diagnostic module 650 may be used. ) May be mounted on the base software layer. Details will be apparent from the following description of the drawings.

도 7은 본 발명의 실시 예에 따른 차량용 전자 제어 장치에 구현되는 AUTOSAR 표준 플랫폼의 계층 구조를 도시한다.7 illustrates a hierarchical structure of an AUTOSAR standard platform implemented in an electronic control apparatus for a vehicle according to an embodiment of the present disclosure.

도 7에 도시된 바와 같이, AUTOSAR 표준 플랫폼(700)은 크게 AUTOSAR 소프트웨어 컴포넌트가 탑재되는 응용 계층(Application Layer, 710), 하드웨어 계층(Hardware Layer, 740), 하드웨어와 관련된 기본 프로그램이 탑재되는 기본 소프트웨어 계층(BSW(Basic Software) Layer, 730) 및 응용 계층(710)과 기본 소프트웨어 계층(730)을 연결하는 실시간 환경 계층(RTE(Realtime Environment) Layer, 720)을 포함하여 구성된다.As shown in FIG. 7, the AUTOSAR standard platform 700 includes a basic software on which an application layer (710), a hardware layer (740), and basic programs related to hardware, on which an AUTOSAR software component is mounted. And a Real Time Environment (RTE) 720 connecting the application layer 710 to the application software 710 and the basic software layer 730.

AUTOSAR 소프트웨어 컴포넌트는 단일의 컴포넌트로 구성된 원자(Atomic) 컴포넌트와 두 개 이상의 원자 컴포넌트로 구성된 혼합(Composition) 컴포넌트로 구성된다.AUTOSAR software components consist of an atomic component consisting of a single component and a composition component consisting of two or more atomic components.

여기서, 원자 컴포넌트는 응용 소프트웨어 컴포넌트, 액츄에이터 소프트웨어 컴포넌트, 센서 소프트웨어 컴포넌트 등과 같은 다수의 소프트웨어 컴포넌트를 포함한다.Here, the atomic component includes a plurality of software components such as application software components, actuator software components, sensor software components, and the like.

응용 소프트웨어 컴포넌트는 해당 시스템의 제어 로직을 처리하고, 센서 컴포넌트는 입력부의 하드웨어 종속적인 인터페이스를 역할을 하며, 액추에이터 컴포넌트는 하드웨어 종속적인 출력부를 관장한다. 이에 따라, 각각의 소프트웨어 컴포넌트가 해당되는 응용 소프트웨어 기능을 구현하는 전자 제어 장치에 매핑되는 기본 단위로서 포트와 인터페이스를 통하여 상호 데이터를 교환한다.The application software component handles the control logic of the system, the sensor component acts as the hardware-dependent interface of the inputs, and the actuator component manages the hardware-dependent outputs. Accordingly, each software component exchanges data through a port and an interface as a basic unit that is mapped to an electronic control device that implements a corresponding application software function.

실시간 환경 계층(720)은 각 응용 소프트웨어 컴포넌트 사이 및 응용 계층(710)과 기본 소프트웨어 계층(730) 사이의 정보교환을 위한 역할을 수행한다.The real-time environment layer 720 serves for information exchange between each application software component and between the application layer 710 and the basic software layer 730.

실시간 환경 계층(720)은 하드웨어와 소프트웨어를 분리시키는 역할을 수행하는 것으로서, 응용 소프트웨어 컴포넌트로부터 하드웨어 독립성을 제어하기 위한 계층이며, 소프트웨어 컴포넌트 계층과 하부 소프트웨어 컴포넌트 모듈간의 통신 브릿지 역할과, 소프트웨어 컴포넌트의 요구로부터 해당 전자 제어 장치에 다양한 매핑 과정을 통해 소프트웨어 컴포넌트와 타 컴포넌트 사이의 통신을 담당한다.The real-time environment layer 720 serves to separate hardware and software. The real-time environment layer 720 is a layer for controlling hardware independence from application software components, and serves as a communication bridge between the software component layer and the underlying software component module and the requirements of the software component. It is responsible for the communication between software components and other components through various mapping processes from the corresponding electronic control device.

실시간 환경 계층(720) 하부에는 기본 소프트웨어 계층(730)이 있으며, 기본 소프트웨어 계층(730)에는 다시 서비스 영역과, EAL(ECU Abstraction Layer), MCAL(Microcontroller Abstraction Layer) 및 CDD(Complex Device Driver) 영역 등으로 구분될 수 있다.Under the real-time environment layer 720, there is a basic software layer 730, and the basic software layer 730 again includes a service area, an ECU abstraction layer (EAL), a microcontroller abstraction layer (MCAL), and a complex device driver (CDD) area. And the like.

본 발명에서 상술한 AUTOSAR 표준 플랫폼의 계층 구조에서 응용 소프트웨어 컴포넌트의 오류 처리를 검증하기 위한 결함 주입 테스트 자동화 시스템을 설계하기 위해, 소프트웨어 컴포넌트, 태스크, 함수의 상관 관계를 이해할 필요가 있다.In order to design a defect injection test automation system for verifying error handling of an application software component in the hierarchical structure of the AUTOSAR standard platform described above, it is necessary to understand the correlation between software components, tasks, and functions.

소프트웨어 컴포넌트는 해당 전자 제어 장치에 할당되는 최소의 프로그램 단위이며, 소프트웨어 컴포넌트는 태스크(Task) 단위로 구분되고, 태스크는 다시 최소 기능 단위인 다수개의 함수로 구성될 수 있다. 이에 따라, 소프트웨어 컴포넌트의 실제 실행은 함수 단위로 이루어지며, 결함 주입 관련 설정의 많은 부분이 함수 단위에서 이루어질 수 있다.The software component is a minimum program unit allocated to the corresponding electronic control apparatus, the software component is divided into task units, and the task may be composed of a plurality of functions that are minimum functional units. Accordingly, the actual execution of the software component is made in units of functions, and much of the defect injection related configuration can be made in units of functions.

함수의 실행은 실시간 환경 계층(RTE)에서 발생되는 각종 이벤트에 의해서 결정될 수 있다. 일 예로, 실시간 환경 계층에서 발생되는 이벤트는 설정된 타이머에 기반하여 주기적으로 발생되는 타이밍 이벤트, 특정 신호의 수신 시 발생되는 데이터 수신 이벤트, 클라이언트-서버 방식에서 사용되는 오퍼레이션 호출 이벤트 등을 포함할 수 있으나, 이에 한정되지는 않는다.Execution of the function may be determined by various events occurring in the real-time environment layer (RTE). For example, an event occurring in the real-time environment layer may include a timing event periodically generated based on a set timer, a data reception event generated when a specific signal is received, and an operation call event used in a client-server method. It is not limited to this.

본 발명의 실시 예에 따른 기본 소프트웨어 계층(730)은 도 7에 도시된 바와 같이, 테스트 대상 소프트웨어 컴포넌트의 태스크 및 함수의 호출을 모니터링하는 모니터링 모듈(731), CAN 통신을 통해 사용자에 의해 입력된 결함 선택 정보 및 결함 주입 코드를 수신하는 진단 모듈(732) 및 실제 결함이 주입된 코드를 실행하는 결함 주입 코드 실행 모듈(733)이 탑재될 수 있다.As illustrated in FIG. 7, the basic software layer 730 according to an embodiment of the present invention may include a monitoring module 731 for monitoring a call of tasks and functions of a software component under test, input by a user through CAN communication. The diagnostic module 732 for receiving the defect selection information and the defect injection code and the defect injection code execution module 733 for executing the code in which the actual defect is injected may be mounted.

여기서, 결함 선택 정보는 결함 주입 대상 소프트웨어 컴포넌트 정보, 결함 주입 태스크 정보, 결함 주입 함수 정보, 결함 주입 대상 파라메터 위치 정보, 결함 주입 대상 파라메터 혹은 변수의 크기 정보, 결함 유형에 관한 정보, 결함 주입을 위한 변경 값 정보, 결함 주입 횟수에 관한 정보 중 적어도 하나를 포함할 수 있다.Here, the defect selection information may include defect injection target software component information, defect injection task information, defect injection function information, defect injection target parameter position information, defect injection target parameter or variable size information, defect type information, defect injection information, and the like. It may include at least one of the change value information, the information on the number of defect injection.

모니터링 모듈(731)은 해당 전자 제어 장치에서의 검증 대상 소프트웨어 실행 중 결함 선택 정보에 기반하여 결함 주입 대상 태스크 및 함수 호출을 식별할 수 있다.The monitoring module 731 may identify the defect injection target task and the function call based on the defect selection information during the execution of the verification target software in the electronic control apparatus.

모니터링 모듈(731)은 결함 주입 대상 태스크 및 함수의 호출 여부를 모니터링하고, 모니터링 결과에 기반하여 결함 주입 대상 함수에 대응하여 미리 생성된 결함 주입 코드의 실행 여부를 판단할 수도 있다.The monitoring module 731 may monitor whether the defect injection target task and the function are called and determine whether to execute the pre-generated defect injection code corresponding to the defect injection target function based on the monitoring result.

모니터링 모듈(731)은 태스크 단위로 모니터링을 수행할 수 있다. 하나의 태스크는 여러 함수 호출이 시간 단위로 묶인 그룹이므로, 모니터링 모듈(731)은 태스크의 실행 전에 사용자가 해당 태스크에 대해 결함 주입을 선택하였는지 여부를 확인할 수 있다.The monitoring module 731 may perform monitoring on a task basis. Since one task is a group of several function calls grouped by time, the monitoring module 731 may check whether the user has selected a defect injection for the task before executing the task.

만약, 해당 태스크에 대한 결함 주입이 선택된 경우, 모니터링 모듈(731)은 해당 태스크 내에서의 함수의 호출 관계를 모니터링하여 사용자 입력된 결함 주입 위치를 식별할 수 있다. 즉, 모니터링 모듈(731)은 해당 태스크 내에서의 함수의 실행 흐름을 모니터링할 수 있다. 여기서, 모니터링 대상 함수는 피호출함수(Callee Function)이다. 모니터링 모듈(731)은 피호출함수의 스택을 추적하여 피호출함수를 호출한 호출함수(Caller Function)을 확인할 수 있다. 모니터링 모듈(731)은 호출함수와 피호출함수의 관계가 사용자로부터 입력된 결함 주입 위치에 대응되는지를 판단할 수 있다.If a defect injection for the task is selected, the monitoring module 731 may identify a user input defect injection position by monitoring a call relation of a function in the task. That is, the monitoring module 731 may monitor the execution flow of the function in the task. Here, the function to be monitored is a callee function. The monitoring module 731 may check the caller function calling the called function by tracing the stack of the called function. The monitoring module 731 may determine whether the relationship between the call function and the called function corresponds to a defect injection position input from the user.

결함 주입 코드 실행 모듈(733)은 결함 선택 정보에 기반하여 결함 주입 대상 태스크 및 함수를 식별할 수 있으며, 모니터링 모듈(731)에 의해 결함 주입 대상 함수의 호출이 감지되면, 감지된 함수의 해당 위치에서 해당 파라메터 또는 변수가 변경된 결함 주입 코드를 생성하여 실행시킬 수 있다.The defect injection code execution module 733 may identify the defect injection target task and the function based on the defect selection information. When the call of the defect injection target function is detected by the monitoring module 731, the corresponding position of the detected function is detected. You can generate and execute defect injection code with changed parameter or variable in.

다른 일 예로, 모니터링 모듈(731)에 의해 결함 주입 대상 태스크 및 함수의 호출이 확인된 경우, 결함 주입 코드 실행 모듈(733)은 미리 생성된 결함 주입 코드를 실행시킬 수도 있다. 여기서, 결함 주입 코드는 호스트 컴퓨터(10)로부터 사전 수신되어 소정 기록 영역에 유지될 수 있다.As another example, when the call of the defect injection target task and the function is confirmed by the monitoring module 731, the defect injection code execution module 733 may execute the previously generated defect injection code. Here, the defect injection code can be received in advance from the host computer 10 and held in a predetermined recording area.

즉, 결함 주입 코드 실행 모듈(733)은 모니터링 모듈(731)로부터 현재 호출된 함수가 결함 주입 대상임을 판정 받은 후 실제 결함이 주입된 코드를 실행시킬 수 있다.That is, the defect injection code execution module 733 may execute the code in which the actual defect is injected after it is determined by the monitoring module 731 that the function currently called is the target of defect injection.

사용자로부터 결함 선택 정보를 입력 받기 위해 결함 선택 정보를 저장하기 위한 특정 자료 구조가 진단 모듈(731)에 정의될 수 있다.A specific data structure for storing defect selection information for receiving input of defect selection information from a user may be defined in the diagnostic module 731.

기본 소프트웨어 계층(730)이 활성화되면, 결함 선택 정보를 저장하기 위한 자료 구조를 정의하고, 해당 자료 구조에 대한 읽기 함수와 쓰기 함수를 추가하는 CAN 진단 모듈 설정 과정이 수행될 수 있다.When the basic software layer 730 is activated, the CAN diagnostic module setting process of defining a data structure for storing defect selection information and adding a read function and a write function for the data structure may be performed.

도 8은 본 발명의 일 실시 예에 따른 차량용 전자 제어 장치에 탑재되는 소프트웨어의 검증을 위한 동적 결함 주입 방법을 설명하기 위한 순서도이다.8 is a flowchart illustrating a dynamic defect injection method for verifying software mounted on an electronic control apparatus for a vehicle according to an embodiment of the present disclosure.

도 8을 참조하면, 전자 제어 장치는 해당 전자 제어 장치의 검증 대상 소프트웨어를 실행시킬 수 있다(S810). 여기서, 검증 대상 소프트웨어는 해당 전자 제어 장치가 구동되면, 자동으로 실행될 수 있으나, 이는 하나의 실시 예에 불과하며, 다른 실시 예는 외부 호스트 컴퓨터 또는 외부 진단기의 제어 신호에 따라 해당 검증 대상 소프트웨어가 실행될 수도 있다.Referring to FIG. 8, the electronic control apparatus may execute the verification target software of the electronic control apparatus (S810). Here, the verification target software may be automatically executed when the electronic control apparatus is driven. However, this is only one embodiment. In another embodiment, the verification target software may be executed according to a control signal of an external host computer or an external diagnostic apparatus. It may be.

전자 제어 장치는 사용자로부터 결함 선택 정보가 입력되었는지 확인할 수 있다(S820). 여기서, 사용자로부터 입력 받은 결함 선택 정보는 CAN 통신을 통해 전자 제어 장치에 전달될 수 있다.The electronic control apparatus may check whether defect selection information is input from the user (S820). Here, the defect selection information input from the user may be transmitted to the electronic control apparatus through CAN communication.

확인 결과, 결함 선택 정보가 입력된 경우, 전자 제어 장치는 태스크 및 함수 호출 관계를 추적하여 결함 주입 대상을 모니터링할 수 있다(S830).As a result of the check, when the defect selection information is input, the electronic control apparatus may monitor the defect injection target by tracking a task and a function call relationship (S830).

전자 제어 장치는 상기 모니터링을 통해 결함 주입 대상을 감지할 수 있다(S840).The electronic control device may detect a defect injection target through the monitoring (S840).

감지 결과, 결함 주입 대상이 감지된 경우, 전자 제어 장치는 결함 주입 코드를 실행시킬 수 있다(S850). 여기서, 결함 주입 코드는 상기 결함 주입 정보의 입력에 따라 전자 제어 장치내에서 미리 생성되어 소정 기록 영역에 저장될 수 있다.As a result of detection, when a defect injection target is detected, the electronic control apparatus may execute a defect injection code (S850). Here, the defect injection code may be generated in advance in the electronic control apparatus according to the input of the defect injection information and stored in a predetermined recording area.

전자 제어 장치는 결함 선택 정보에 기반하여 결함 주입이 반복적인지 판단할 수 있다(S860).The electronic control apparatus may determine whether the defect injection is repetitive based on the defect selection information (S860).

판단 결과, 반복적이면, 전자 제어 장치는 상기한 850 단계로 회귀하여 결함 주입 코드를 반복 실행시킬 수 있다.As a result of the determination, if it is repetitive, the electronic control apparatus may return to step 850 to repeatedly execute the defect injection code.

상기한 840 단계의 판단 결과, 결함 주입 대상이 감지되지 않은 경우, 전자 제어 장치는 상기 830 단계를 수행할 수 있다.As a result of the determination of step 840, when the defect injection target is not detected, the electronic control apparatus may perform step 830.

또한, 상기한 820 단계의 판단 결과, 결함 선택 정보가 입력되지 않았거나, 상기한 860 단계의 판단 결과, 결함 주입이 반복적으로 설정되지 않은 경우, 상기한 810 단계로 회귀하여 결함이 주입되지 않은 원본 코드를 실행시킬 수 있다.In addition, if the defect selection information is not input as a result of the determination in step 820, or the defect injection is not set repeatedly as a result of the determination in step 860, the original is returned to the step 810, the defect is not injected. You can run your code.

이상에서 설명한 바와 같이, 본 발명은 ISO 26263 Part 6에 해당하는 차량용 소프트웨어의 단위 테스트 단계 및 통합 테스트 단계에서의 결함 주입 테스트를 지원할 수 있는 장점이 있다.As described above, the present invention has the advantage of supporting defect injection tests in the unit test step and the integrated test step of the vehicle software corresponding to ISO 26263 Part 6.

또한, 본 발명은 차량용 소프트웨어 단위/통합 테스트 단계에서 기능 안전을 검증하고자 할 때, 사용자가 결함 주입 대상 함수 및 함수 호출 관계, 결함 주입할 유형 및 결함 주입 반복 회수 등을 동적으로 선택 가능하게 함으로써, 다양한 기능 안전 시나리오에 대해 검증이 효율적으로 수행될 수 있다.In addition, the present invention, when the user wants to verify the functional safety in the vehicle software unit / integration test step, by allowing the user to dynamically select the defect injection target function and function call relationship, the type of defect injection and the number of defect injection iterations, Verification can be performed efficiently for various functional safety scenarios.

또한, 본 발명은 결함 유형에 대한 데이터를 고정시키지 않고, 외부 통신-예를 들면, CAN 통신-을 통해 사용자에 의해 선택된 다양한 결함 데이터를 동적으로 다양하게 주입할 수 있으므로, 다양한 결함 제어 기능을 테스트할 수 있는 장점이 있다.In addition, the present invention can dynamically inject various defect data selected by the user through external communication, for example, CAN communication, without fixing the data for the defect type, thereby testing various defect control functions. There is an advantage to this.

또한, 본 발명은 차량용 소프트웨어 검증을 위해 별도의 원본 소프트웨어의 코드 변경이 필요 없을 뿐만 아니라 주입하는 결함에 따라 결함 주입된 소프트웨어 이미지가 여러 개 생성되지 않고, 하나의 소프트웨어 이미지에서 서로 다른 종류의 결함 주입이 가능하므로 테스트 효율을 높일 수 있는 장점이 있다.In addition, the present invention not only does not need to change the code of the original software for vehicle software verification, but also generates a plurality of defect-injected software images according to the injecting defect, and injects different kinds of defects in one software image This is an advantage that can increase test efficiency.

상기와 같이 설명된 동적 결함 주입 방법은 컴퓨터로 읽을 수 있는 기록 매체에 컴퓨터가 읽을 수 있는 코드로서 구현되는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체로는 컴퓨터 시스템에 의하여 해독될 수 있는 데이터가 저장된 모든 종류의 기록 매체를 포함한다. 예를 들어, ROM(Read Only Memory), RAM(Random Access Memory), 자기 테이프, 자기 디스크, 플래쉬 메모리, 광 데이터 저장장치 등이 있을 수 있다. 또한, 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 통신망으로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 읽을 수 있는 코드로서 저장되고 해당 장치에 다운로드되어 실행될 수도 있다.The dynamic defect injection method described above can be embodied as computer readable code on a computer readable recording medium. Computer-readable recording media include all kinds of recording media having data stored thereon that can be decrypted by a computer system. For example, there may be a read only memory (ROM), a random access memory (RAM), a magnetic tape, a magnetic disk, a flash memory, an optical data storage device, or the like. The computer-readable recording medium can also be distributed over computer systems connected over a computer network, stored as readable code in a distributed fashion, and downloaded and executed on the device.

또한, 상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야에서 통상의 지식을 가진 자라면 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.In addition, while the above has been described with reference to a preferred embodiment of the present invention, those skilled in the art to which the present invention pertains without departing from the spirit and scope of the present invention as set forth in the claims below. It will be appreciated that various modifications and changes can be made.

Claims (20)

차량용 전자 제어 장치에 탑재되는 소프트웨어를 검증하는 호스트 컴퓨터에 있어서,
상기 전자 제어 장치에 탑재되는 검증 대상 소프트웨어에 대한 실험 모델을 생성하는 실험 모델 생성 모듈;
상기 검증 대상 소프트웨어의 함수 호출 관계를 확정하는 호출 관계 분석 모듈;
사용자로부터 상기 검증 대상 소프트웨어에 주입할 결함 정보를 입력 받아 결함 선택 정보를 생성하는 결함 선택 모듈;
상기 결함 선택 정보 및 상기 확정된 함수 호출 관계에 기반하여 결함 주입 코드를 생성하는 결함 주입 코드 생성 모듈; 및
상기 결함 선택 정보 및 상기 결함 주입 코드를 상기 전자 제어 장치로 전송하는 제1 통신 모뎀
을 포함하는 호스트 컴퓨터.
A host computer for verifying software mounted on a vehicle electronic control device,
An experimental model generation module for generating an experimental model for the verification target software mounted on the electronic control device;
A call relationship analysis module that determines a function call relationship of the verification target software;
A defect selection module receiving defect information to be injected into the verification target software from a user and generating defect selection information;
A defect injection code generation module generating a defect injection code based on the defect selection information and the determined function call relationship; And
A first communication modem for transmitting the defect selection information and the defect injection code to the electronic control apparatus
Host computer comprising a.
제1항에 있어서,
상기 실험 모델 생성 모듈은
결함 주입 위치를 추출하는 수단;
상기 추출된 결함 주입 위치에 결함 유형을 적용하는 수단;
결함 주입 테스트가 자동화되도록 설정하는 수단;
상기 결함 유형 별 자동화 가능 여부를 판단하는 수단; 및
상기 판단 결과에 따라 상기 자동화가 불가능한 결함 유형을 제외하여 결함 주입 시나리오를 설정하는 수단
을 포함하는 호스트 컴퓨터.
The method of claim 1,
The experimental model generation module
Means for extracting a defect injection position;
Means for applying a defect type to the extracted defect injection position;
Means for setting the defect injection test to be automated;
Means for determining whether to automate the defect types; And
Means for setting a defect injection scenario according to the determination result, excluding the defect type that cannot be automated
Host computer comprising a.
제2항에 있어서,
상기 결함 주입 위치는 상기 검증 대상 소프트웨어의 단위 및 통합 테스트 단계 별로 뮤테이션(Mutation) 연산자를 적용하여 추출되는 호스트 컴퓨터.
The method of claim 2,
The defect injection position is extracted by applying a mutation operator for each unit and integration test step of the verification target software.
제2항에 있어서,
상기 오류 유형은 데이터 오류(Data Error), 프로그램 흐름 오류(Program Flow Error), 접근 오류(Access Error), 타이밍 오류(Timing Error) 및 비대칭 오류(Asymmetric Error)를 포함하는 호스트 컴퓨터.
The method of claim 2,
The error type includes a data error, a program flow error, an access error, a timing error, and an asymmetric error.
제1항에 있어서,
상기 결함 선택 정보는 결함이 주입될 위치를 식별하기 위한 정보, 주입될 결함 유형을 식별하기 위한 정보, 결함 주입 횟수에 관한 정보, 변경될 파라메터, 레지스터 및(또는) 변수의 값에 관한 정보 중 적어도 하나를 포함하는 호스트 컴퓨터.
The method of claim 1,
The defect selection information includes at least one of information for identifying a location to be injected, information for identifying a type of defect to be injected, information about a number of defect injections, information about a parameter to be changed, a value of a register, and / or a variable. Host computer containing one.
제1항에 있어서,
상기 결함 주입 코드는 상기 결함 선택 정보에 따라 단위 테스트를 위한 결함 주입 코드 및 통합 테스트를 위한 결함 주입 코드 중 적어도 하나를 포함하는 호스트 컴퓨터.
The method of claim 1,
Wherein the defect injection code comprises at least one of a defect injection code for unit testing and a defect injection code for integration testing according to the defect selection information.
제1항에 있어서,
상기 호출 관계 분석 모듈은
프로젝트 생성을 위한 사용자 인터페이스 화면을 구성하는 제1 사용자 인터페이스 제공부;
상기 검증 대상 소프트웨어를 구성하는 파일, 태스크(Task) 및 함수 등의 계층 구조를 분석하는 구조 분석부; 및
상기 분석된 계층 구조에 기반하여 호출함수(Caller)와 피호출함수(Callee)의 관계를 분석하는 호출 관계 분석부
를 포함하는 호스트 컴퓨터.
The method of claim 1,
The call relationship analysis module
A first user interface providing unit constituting a user interface screen for generating a project;
A structure analyzer configured to analyze a hierarchical structure of a file, a task, and a function of the software to be verified; And
Call relationship analysis unit for analyzing the relationship between the call function (Caller) and the call function (Callee) based on the analyzed hierarchical structure
Host computer comprising a.
제1항에 있어서,
상기 결함 선택 모듈은
소프트웨어 단위 테스트 단계와 소프트웨어 통합 테스트 단계 별 결함 주입 코드 생성에 필요한 정보를 사용자로부터 입력 받기 위한 소정 결함 주입 사용자 인터페이스 화면을 구성하는 제2 사용자 인터페이스 제공부;
상기 단위 테스트를 위한 결함 주입 코드의 생성에 필요한 제1 정보를 수집하는 단위 테스트 정보 수집부; 및
상기 통합 테스트를 위한 결함 주입 코드의 생성에 필요한 제2 정보를 수집하는 통합 테스트 정보 수집부
를 포함하는 호스트 컴퓨터.
The method of claim 1,
The fault selection module
A second user interface providing unit constituting a predetermined defect injection user interface screen for receiving input from a user of information necessary for generating a defect injection code for each software unit test step and a software integration test step;
A unit test information collection unit collecting first information necessary for generating a defect injection code for the unit test; And
Integration test information collection unit for collecting the second information necessary for generating the defect injection code for the integration test
Host computer comprising a.
제8항에 있어서,
상기 제1 정보는 결함을 주입할 단위 함수 또는 전역 변수에 관한 정보, 주입할 결함 유형에 관한 정보 및 결함 주입 횟수에 관한 정보, 변경될 파라메터, 레지스터 및(또는) 변수의 값에 관한 정보 중 적어도 하나를 포함하는 호스트 컴퓨터.
The method of claim 8,
The first information includes at least one of information on a unit function or a global variable to inject a defect, information on a defect type to be injected and information on the number of defect injections, and information on a parameter to be changed, a value of a register and / or a variable. Host computer containing one.
제8항에 있어서,
상기 제2 정보는 상기 통합 테스트에 포함되는 일련의 상기 단위 테스트 및 그것들의 실행 순서에 관한 정보, 결함을 주입할 위치에 관한 정보, 주입할 결함 유형에 관한 정보 및 결함 주입 횟수에 관한 정보, 변경될 파라메터, 레지스터 및(또는) 변수의 값에 관한 정보 중 적어도 하나를 포함하는 호스트 컴퓨터.
The method of claim 8,
The second information includes a series of the unit tests included in the integration test and information about their execution order, information about a location to inject defects, information about a type of defect to be injected and information about the number of defect injections, and a change. A host computer comprising at least one of information about a parameter, a register, and / or a value of a variable to be.
호스트 컴퓨터와 연동하여 내부 탑재된 소프트웨어를 검증하는 차량용 전자 제어 장치에 있어서,
상기 호스트 컴퓨터로부터 결함 선택 정보 및 상기 결함 선택 정보에 기초하여 생성된 결합 주입 코드를 수신하는 진단 모듈;
상기 결함 선택 정보에 기초하여 검증 대상 소프트웨어를 식별하고, 상기 식별된 검증 대상 소프트웨어 내 결함을 주입할 태스크와 함수를 식별하는 제2 제어기;
상기 식별된 태스크 호출을 모니터링하는 태스크 호출 모니터링 모듈;
상기 식별된 태스크 호출이 감지되면, 상기 식별된 함수의 호출을 모니터링하는 함수 호출 모니터링 모듈; 및
상기 식별된 함수의 호출이 감지되면, 상기 결합 주입 코드를 실행시키는 결함 주입 코드 실행 모듈
을 포함하는 차량용 전자 제어 장치.
In the vehicle electronic control device for verifying the software mounted on-board in conjunction with a host computer,
A diagnostic module for receiving defect selection information and a combined injection code generated based on the defect selection information from the host computer;
A second controller identifying a software to be verified based on the defect selection information and identifying a task and a function to inject a defect in the identified software to be verified;
A task call monitoring module for monitoring the identified task call;
A function call monitoring module for monitoring a call of the identified function when the identified task call is detected; And
A fault injection code execution module that executes the joint injection code when a call of the identified function is detected
Vehicle electronic control device comprising a.
제11항에 있어서,
상기 차량용 전자 장치에 탑재된 소프트웨어는 AUTOSAR(AUTomotive Open System Architecture) 표준 플랫폼에서 실행되는 소프트웨어인 차량용 전자 제어 장치.
The method of claim 11,
The software mounted on the vehicle electronic device is software running on an AUTOSAR (AUTomotive Open System Architecture) standard platform.
제12항에 있어서,
상기 AUTOSAR 표준 플랫폼은 실시간 환경 계층과 하드웨어 계층 사이에 배치되는 기본 소프트웨어 계층을 포함하고,
상기 진단 모듈, 상기 태스크 호출 모니터링 모듈, 상기 함수 호출 모니터링 모듈 및 결함 주입 코드 실행 모듈은 상기 기본 소프트웨어 계층에 탑재되는 차량용 전자 제어 장치.
The method of claim 12,
The AUTOSAR standard platform includes a basic software layer disposed between the real-time environment layer and the hardware layer,
And the diagnostic module, the task call monitoring module, the function call monitoring module, and the fault injection code execution module are mounted in the basic software layer.
제12항에 있어서,
상기 진단 모듈은 CAN 통신을 통해 상기 결함 선택 정보 및 상기 결함 주입 코드를 수신하는 차량용 전자 제어 장치.
The method of claim 12,
And the diagnostic module receives the defect selection information and the defect injection code through CAN communication.
제12항에 있어서,
상기 결함 주입 코드는 상기 결함 선택 정보에 따라 단위 테스트를 위한 결함 주입 코드 및 통합 테스트를 위한 결함 주입 코드 중 적어도 하나를 포함하는 차량용 전자 제어 장치.
The method of claim 12,
And the defect injection code comprises at least one of a defect injection code for unit testing and a defect injection code for integration testing according to the defect selection information.
검증 대상 소프트웨어의 함수 호출 관계를 분석하고, 사용자로부터 입력 받은 결함 선택 정보 및 상기 분석된 함수 호출 관계에 기초하여 결함 주입 코드를 생성하는 호스트 컴퓨터; 및
상기 호스트 컴퓨터로부터 CAN 통신을 통해 상기 결함 선택 정보 및 상기 결함 주입 코드를 수신하고, 상기 검증 대상 소프트웨어 실행 시 상기 결함 선택 정보에 기반하여 식별된 태스크 및 함수를 모니터링하여 상기 결함 주입 코드를 실행시키는 차량용 전자 제어 장치
를 포함하는 차량용 소프트웨어 검증 시스템.
A host computer analyzing a function call relationship of the verification target software and generating a defect injection code based on the defect selection information received from a user and the analyzed function call relationship; And
Receiving the defect selection information and the defect injection code through the CAN communication from the host computer, and executing the defect injection code by monitoring the identified tasks and functions based on the defect selection information when executing the verification target software Electronic controller
Vehicle software verification system comprising a.
제16항에 있어서,
상기 차량용 전자 제어 장치는
상기 호스트 컴퓨터로부터 상기 결함 선택 정보 및 상기 결합 주입 코드를 수신하는 진단 모듈;
상기 결함 선택 정보에 기초하여 식별된 태스크 및 함수의 호출을 모니터링하는 모니터링 모듈; 및
상기 식별된 태스크 및 함수의 호출이 감지되면, 상기 결합 주입 코드를 실행시키는 결함 주입 코드 실행 모듈
을 포함하는 차량용 소프트웨어 검증 시스템.
The method of claim 16,
The vehicle electronic control device
A diagnostic module for receiving the defect selection information and the combined injection code from the host computer;
A monitoring module for monitoring invocation of identified tasks and functions based on the defect selection information; And
A fault injection code execution module that executes the joint injection code when a call of the identified task and function is detected
In-vehicle software verification system comprising a.
제17항에 있어서,
상기 검증 대상 소프트웨어는 AUTOSAR(AUTomotive Open System Architecture) 표준 플랫폼에서 실행되는 소프트웨어인 차량용 소프트웨어 검증 시스템.
The method of claim 17,
The verification software is a vehicle software verification system is software running on an AUTOSAR (AUTomotive Open System Architecture) standard platform.
제18항에 있어서,
상기 AUTOSAR 표준 플랫폼은 실시간 환경 계층과 하드웨어 계층 사이에 배치되는 기본 소프트웨어 계층을 포함하고,
상기 진단 모듈, 상기 모니터링 모듈 및 상기 결함 주입 코드 실행 모듈은 상기 기본 소프트웨어 계층에 탑재되는 차량용 소프트웨어 검증 시스템.
The method of claim 18,
The AUTOSAR standard platform includes a basic software layer disposed between the real-time environment layer and the hardware layer,
And the diagnostic module, the monitoring module and the defect injection code execution module are mounted in the basic software layer.
제16항에 있어서,
상기 호스트 컴퓨터는
상기 차량용 전자 제어 장치에 탑재되는 상기 검증 대상 소프트웨어에 대한 실험 모델을 생성하는 실험 모델 생성 모듈;
상기 검증 대상 소프트웨어의 함수 호출 관계를 확정하는 호출 관계 분석 모듈;
상기 사용자로부터 상기 검증 대상 소프트웨어에 주입할 결함 정보를 입력 받아 상기 결함 선택 정보를 생성하는 결함 선택 모듈;
상기 결함 선택 정보 및 상기 확정된 함수 호출 관계에 기반하여 상기 결함 주입 코드를 생성하는 결함 주입 코드 생성 모듈; 및
상기 결함 선택 정보 및 상기 결함 주입 코드를 상기 CAN 통신을 통해 상기 차량용 전자 제어 장치로 전송하는 제1 통신 모뎀
을 포함하는 차량용 소프트웨어 검증 시스템.
The method of claim 16,
The host computer
An experimental model generation module for generating an experimental model for the verification target software mounted on the vehicle electronic control apparatus;
A call relationship analysis module that determines a function call relationship of the verification target software;
A defect selection module receiving defect information to be injected into the verification target software from the user and generating the defect selection information;
A defect injection code generation module generating the defect injection code based on the defect selection information and the determined function call relationship; And
A first communication modem for transmitting the defect selection information and the defect injection code to the vehicle electronic control apparatus through the CAN communication
In-vehicle software verification system comprising a.
KR1020180080863A 2018-07-12 2018-07-12 Method and apparatus for dinamically injecting fault for vehicle ecu software test KR102537875B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180080863A KR102537875B1 (en) 2018-07-12 2018-07-12 Method and apparatus for dinamically injecting fault for vehicle ecu software test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180080863A KR102537875B1 (en) 2018-07-12 2018-07-12 Method and apparatus for dinamically injecting fault for vehicle ecu software test

Publications (2)

Publication Number Publication Date
KR20200007133A true KR20200007133A (en) 2020-01-22
KR102537875B1 KR102537875B1 (en) 2023-05-30

Family

ID=69368080

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180080863A KR102537875B1 (en) 2018-07-12 2018-07-12 Method and apparatus for dinamically injecting fault for vehicle ecu software test

Country Status (1)

Country Link
KR (1) KR102537875B1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111666563A (en) * 2020-06-05 2020-09-15 北京百度网讯科技有限公司 Method and device for verifying application running state
CN111737142A (en) * 2020-06-30 2020-10-02 湖南国科微电子股份有限公司 Test method, test device and computer readable storage medium
CN112631847A (en) * 2020-12-28 2021-04-09 深圳市路畅科技股份有限公司 Intelligent vehicle machine automatic test system, method and application thereof
CN112783736A (en) * 2021-03-01 2021-05-11 苏州挚途科技有限公司 Method and device for monitoring running body time of software component and electronic equipment
KR102269546B1 (en) * 2020-02-26 2021-06-28 슈어소프트테크주식회사 Apparatus for fault injection
CN114690741A (en) * 2020-12-31 2022-07-01 观致汽车有限公司 Controller test system and method for vehicle, electronic device and readable storage medium
CN116881174A (en) * 2023-09-08 2023-10-13 富钛字节车载软件(长春)有限公司 ECU application software closed-loop test method, device, equipment and storage medium
KR20230161172A (en) 2022-05-18 2023-11-27 박영민 Agricultural hose guide device
CN112783736B (en) * 2021-03-01 2024-04-19 苏州挚途科技有限公司 Method and device for monitoring running body time of software component and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080095528A (en) * 2007-04-25 2008-10-29 삼성전자주식회사 Test device of embedded software using the emulator and method thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080095528A (en) * 2007-04-25 2008-10-29 삼성전자주식회사 Test device of embedded software using the emulator and method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JOHAN HARALDSSON외 1명, "Software implemented fault injection for AUTOSAR based systems", Master of Science Thesis Software Engineering and Technology Programme, pp.1-42,(2012.6.30.)* *
이상호외 1명, "ISO 26262 표준 기반의 소프트웨어 검증을 위한 소프트웨어 결함 주입 기법", Transactions of the Korean Society of Automotive Engineers Volume 22 Issue 3, pp.68-74,(2014.4.1.)* *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102269546B1 (en) * 2020-02-26 2021-06-28 슈어소프트테크주식회사 Apparatus for fault injection
CN111666563A (en) * 2020-06-05 2020-09-15 北京百度网讯科技有限公司 Method and device for verifying application running state
CN111666563B (en) * 2020-06-05 2023-07-18 北京百度网讯科技有限公司 Method and device for verifying application running state
US11709767B2 (en) 2020-06-05 2023-07-25 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for verifying operation state of application
CN111737142A (en) * 2020-06-30 2020-10-02 湖南国科微电子股份有限公司 Test method, test device and computer readable storage medium
CN112631847A (en) * 2020-12-28 2021-04-09 深圳市路畅科技股份有限公司 Intelligent vehicle machine automatic test system, method and application thereof
CN114690741A (en) * 2020-12-31 2022-07-01 观致汽车有限公司 Controller test system and method for vehicle, electronic device and readable storage medium
CN112783736A (en) * 2021-03-01 2021-05-11 苏州挚途科技有限公司 Method and device for monitoring running body time of software component and electronic equipment
CN112783736B (en) * 2021-03-01 2024-04-19 苏州挚途科技有限公司 Method and device for monitoring running body time of software component and electronic equipment
KR20230161172A (en) 2022-05-18 2023-11-27 박영민 Agricultural hose guide device
CN116881174A (en) * 2023-09-08 2023-10-13 富钛字节车载软件(长春)有限公司 ECU application software closed-loop test method, device, equipment and storage medium
CN116881174B (en) * 2023-09-08 2023-11-14 富钛字节车载软件(长春)有限公司 ECU application software closed-loop test method, device, equipment and storage medium

Also Published As

Publication number Publication date
KR102537875B1 (en) 2023-05-30

Similar Documents

Publication Publication Date Title
KR102537875B1 (en) Method and apparatus for dinamically injecting fault for vehicle ecu software test
KR101019210B1 (en) Test Device of Embedded Software using the emulator and Method thereof
US6002869A (en) System and method for automatically testing software programs
CN111756575B (en) Performance analysis method and device of storage server and electronic equipment
US9367427B2 (en) Embedding and executing trace functions in code to gather trace data
JP2014203314A (en) ECU simulation device
US20100162217A1 (en) Debugging System Using Static Analysis
CN104156311B (en) A kind of embedded type C language target code level unit test method based on CPU emulator
CN111290941A (en) Method and device for testing multiple interfaces, computing equipment and medium
CN111427792A (en) Test method, test device, electronic equipment and readable storage medium
CN107562621B (en) Method and device for determining incidence relation between manual test case and tested code
CN111026080A (en) Hardware-in-loop test method and device for controller
KR102141287B1 (en) Fault injection test method and system for vehicle software based on autosar
US7062753B1 (en) Method and apparatus for automated software unit testing
US20140278334A1 (en) Method to verify correctness of computer system software and hardware components and corresponding test environment
US11899561B2 (en) Method for operating a control unit when testing software of the control unit, and method for operating a test computer when testing software of a control unit
CN110737985A (en) Running data verification method and device, computer equipment and readable storage medium
US7546589B2 (en) Semi-automated desk checking system and method
CN111752823A (en) Method, device and equipment for testing vehicle-mounted power supply application software
CN113342649B (en) Method, medium and equipment for realizing unit test based on real target machine
US20090210746A1 (en) Generating test coverage bin based on simulation result
RU2817184C1 (en) Method of testing software of embedded control systems
Kurtz et al. Software based test automation approach using integrated signal simulation
KR20230014333A (en) Vehicle controller test device and method therefor
CN114490398A (en) Method, device and equipment for testing consumer object

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant