General computing module resource configuration test method
By automatically generating test cases, the high manpower cost of testing general computing module configuration files is solved, enabling low-cost, flexible automated testing that can adapt to changes in complex configuration files.
Patent Information
- Application Number
- CN202210110343.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-29
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-01-29
AI Technical Summary
In existing technologies, testing the configuration files for general computing modules requires extensive manual writing, resulting in high labor costs and inflexibility, making it difficult to adapt to frequently changing configuration files.
The tool reads resource configuration files and automatically generates test cases, including format and content validation. It uses XML Schema and XSD to validate the format and uses wildcard replacement to generate test cases, performing automatic testing of the Arinc664 terminal and Arinc653 configuration.
It enables low-cost, flexible configuration testing of general-purpose computing modules, reduces labor costs, simplifies environment deployment, and possesses excellent versatility and automated testing capabilities.
Smart Images

Figure CN114443487B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of general computing module resource configuration test, in particular to a general computing module resource configuration test method. BACKGROUND
[0002] With the increasing informationization scale of avionics software, the connection information between systems is more and more, and the configuration information inside the system is more and more complex. As the core of data processing in IMA system, the general computing module controls the allocation of computing resources, space resources and interface resources of the system, and these controls are realized by loading different configuration files. These configuration files are numerous and the configuration contents are complicated, so it is necessary to verify the correctness of these configuration files through test programs. At present, although the test programs can be manually written to realize the verification function, in the face of a large number of configuration files which are frequently modified and changed, manual writing requires a large amount of manpower and repeated labor, so there is an urgent need for a general computing module configuration test method which can automatically generate test cases according to the content of the configuration file through simple configuration to test the configuration file. SUMMARY
[0003] In view of the problems existing in the present general computing module configuration test, the present application aims to provide a general computing module resource configuration test method. For the general computing module under different configurations, the corresponding test cases are generated by reading the resource configuration information in the resource configuration file of the general computing module. The test application is loaded in the general computing module partition in a loadable manner, and the test and the Arinc 653 configuration time and space resource test of the Arinc 664 terminal configuration on the general computing module are realized by the simulation excitation and monitoring of the external tool end, thereby providing a general, flexible, convenient and low-cost way for the general computing module configuration test.
[0004] The application aims to realize the following technical solutions:
[0005] A general computing module resource configuration test method, comprising the following steps:
[0006] Step 1), reading the resource configuration file of the general computing module by the tool end, and verifying the resource configuration file;
[0007] Step 2), automatically generating test cases according to the resource configuration file, wherein the test cases include the test application of the general computing module end and the test program of the tool end, and the generated test program includes test environment configuration, test excitation and data monitoring;
[0008] Step 3), loading the test application to the general computing module;
[0009] Step 4), initialization of the test tool side;
[0010] Step 5), configuration test of the general computing module;
[0011] Step 6), test result display.
[0012] Preferably, the checking of the resource configuration file comprises format checking and content checking. The format checking is checked by the syntax specification of XML Schema. The principle of checking is to read and analyze XML by setting the checking XSD and the checking error processor, so as to achieve the purpose of checking. The content checking is to check the rationality of the content of the resource configuration file.
[0013] Preferably, the test case automatic generation is to prepare a test case template according to the test function, and to dynamically generate according to different resource configuration files by a wildcard substitution mode.
[0014] Preferably, in the Arinc664 terminal sending port configuration test, the test program on the tool side needs to read all the ports of the general computing module in the resource configuration file of the general computing module, select the partition name to be tested, and write all the ports under these partitions into the tool side board card resource configuration file. The test type in the written data is set to 255, indicating that the sending port test is executed. When the test application of the general computing module receives the data 255, all the sending ports send data to wait for the tool side to receive and save the data, and generate a sending port test report.
[0015] Preferably, in the Arinc664 terminal receiving port configuration test, the tool side test program traverses the ports to send test data, and the test application on the general computing module side receives the test data and returns the received data to the tool side, waits for the tool side to receive and save the data, and generates a receiving port test report.
[0016] Preferably, in the Arinc653 memory test, the test application on the general computing module performs out-of-bound access test on the address outside the application address allocation. The out-of-bound access is divided into left out-of-bound and right out-of-bound. The left out-of-bound is to access the left shift of the application address, and the right out-of-bound is to access the right shift of the application address. Then, the value of the shifted address is changed to determine whether it is out of bound. If the access is not wrong, a message of no out-of-bound access is returned. If the access is wrong, no message is returned, prompting the connection general computing module side to obtain the system health monitoring captured exception, and view the detailed information of the captured exception.
[0017] Preferably, in the Arinc653 timing test, the test application on the general computing module performs the following operations:
[0018] a. Create a non-periodic Task, record t1, t2, t3 as the current time, and start the total loop;
[0019] b. repeatedly acquire the current time, and set t2=t3, t3 is the current time, compare whether t3-t2 is greater than a small value, if yes, it is considered that the system allocated time has been exceeded, at this time, t2-t1 is the system allocated time;
[0020] c. repeatedly test the set total cycle times, send out the recorded t1, t2 and corresponding partition number;
[0021] d. go to apply corresponding processing, compare whether the partition allocated time corresponds to the above.
[0022] Preferably, the test configuration comprises the following steps:
[0023] The first step: the tool end sends an excitation message, and the general computing module end is in a listening state to receive port data;
[0024] The second step: the general computing module end sends a test start message, and the tool end is in a listening state to receive port data;
[0025] The third step: if the tool end receives the test start message, it waits for a test result message, and if the test start message is not received, a test error is displayed;
[0026] The fourth step: the general computing module end performs a test, and after the test is completed, a test result message is sent;
[0027] The fifth step: if the tool end receives the test result, the result is displayed; if the test result is not received, a test error is displayed.
[0028] Beneficial effects: the application provides a general computing module configuration test method, and provides configuration verification, test case generation, automatic testing and the like. A large test environment is not needed, only one host computer and one AFDX board card are needed to form a tool end, communication between the general computing module and the tool end can be realized, human cost is greatly reduced, the environment is simple to deploy, and the application has excellent universality and can greatly save cost. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1 A configuration file verification schematic diagram;
[0030] Figure 2 A test case automatic generation flowchart;
[0031] Figure 3 A sending port test flowchart;
[0032] Figure 4 A receiving port test flowchart;
[0033] Figure 5 Memory test flow chart;
[0034] Figure 6 Timing test flow chart;
[0035] Figure 7 Test result schematic diagram;
[0036] Figure 8 The total flow chart of the general computing module resource configuration test method is shown in the figure. DETAILED DESCRIPTION
[0037] The application will be further described in detail below in combination with the drawings and examples.
[0038] Referring to Figure 8 The general computing module resource configuration test method shown in the embodiment includes the following steps:
[0039] Step 1), the tool end reads the resource configuration file of the general computing module (GPM for short), and verifies the resource configuration file according to Schema.
[0040] As an example, the resource configuration file in the embodiment contains Arinc664 terminal configuration and Arinc653 OS configuration, and the verification content is as shown in the figure. Figure 1 As shown in the figure, the format and content of the resource configuration file can be preliminarily checked and the checking results can be prompted and saved. The format verification of the resource configuration file is verified through the syntax specification of XML Schema, and the principle of verification is to set the verification XSD and error handler when reading and analyzing XML to achieve the purpose of verification. The configuration content verification mainly verifies the rationality of the content of the resource configuration file.
[0041] Step 2), automatically generate test cases according to the resource configuration file, the test cases contain test applications of the general computing module end and test programs of the tool end, and the generated test programs contain test environment configuration, test excitation and data monitoring.
[0042] As an example, the test case automatic generation in the embodiment is to prepare a test case template according to the test function, and dynamically generate according to different resource configuration files through wildcard substitution. The test case automatic generation is shown in the figure. Figure 2 .
[0043] Arinc664 terminal configuration test: Arinc664 terminal configuration test includes sending port configuration test and receiving port configuration test.
[0044] In the sending port configuration test, the test program on the tool side first needs to read all the ports of the general computing module in the resource configuration file of the general computing module, select the partition name to be tested, and write all the ports under these partitions to the tool side board resource configuration file. The test type in the written data is set to 255, indicating that the sending port test is performed. When the test application of the general computing module receives data 255, it traverses all the sending ports to send data and waits for the tool side to receive and save the data, and generate a sending port test report. The test process is shown in the following figure: Figure 3 .
[0045] The sending port test application fragment is as follows:
[0046]
[0047]
[0048] In the receiving port configuration test, the tool side test program traverses the port to send test data, and the general computing module side test application receives the test data and returns the received data to the tool side, waits for the tool side to receive and save the data, and generates a receiving port test report. The test process is shown in the following figure: Figure 4 .
[0049] The receiving port test application fragment is as follows:
[0050]
[0051]
[0052] Arinc653 configuration test: Arinc653 configuration test includes memory test and timing test.
[0053] Memory test: Application addresses outside the address allocation cannot be accessed, and we need to do out-of-bound access test. Out-of-bound access is divided into left out-of-bound and right out-of-bound. Left out-of-bound is to access the left shift of the application address, and right out-of-bound is to access the right shift of the application address. Then change the value of the address after the shift to judge whether it is out of bound. If the access is correct, return the message that the access is not out of bound; if the access is incorrect, do not return the message, prompt the general computing module side to get the system health monitoring captured exception, and view the detailed information of the captured exception. The test process is shown in the following figure: Figure 5 .
[0054] The memory test application part code is as follows:
[0055]
[0056]
[0057] Timing test: 1. Create a non-periodic task, record t1, t2, t3 as the current time, start the total loop; 2. Repeat to get the current time, and set t2=t3, t3 as the current time, compare whether t3-t2 is greater than a small value, such as 1μs, if it is true, it means that the system has allocated time, at this time t2-t1 is the system allocated time; 3. Repeat the test of the set total loop times, and send out the recorded t1, t2 and the corresponding partition number; 4. Go to the application to do the corresponding processing, and compare whether the partition allocation time corresponds. The test flow is shown in the attached Figure 6 .
[0058] Timing test application part code:
[0059]
[0060]
[0061] Step 3), load the test application to the general computing module;
[0062] Step 4), initialize the test tool end;
[0063] Step 5), test the general computing module.
[0064] In this embodiment, as an example, Arinc664 terminal configuration test and Arinc653 OS configuration test are carried out, as shown in the attached Figure 3 , 4, 5, 6, the configuration test specific steps are as follows:
[0065] First step: the tool end sends the excitation message, and the general computing module application end is in a listening state to receive the port data;
[0066] Second step: the general computing module end sends the test start message, and the tool end is in a listening state to receive the port data;
[0067] Third step: if the tool end receives the test start message, it waits for the test result message, and if it does not receive the test start message, it displays a test error;
[0068] Fourth step: the general computing module end carries out the test, and then sends the test result message after the end;
[0069] Fifth step: if the tool end receives the test result, it displays the result; if it does not receive the test result, it displays a test error.
[0070] Step 6), test result display
[0071] The present application provides a template for displaying the test result, so that the result is clear and visible. The test result schematic diagram is shown in the attached Figure 7When the port test is completed, the test result is divided into port test brief result and port test detailed result. The brief result is mainly a brief description of all port tests, and the detailed result is the specific pass or fail condition of all port tests.
[0072] When the timing test is completed, the test result is divided into ScheduleId and test time. ScheduleId describes the scheduling time of each partition, and test time describes the scheduling start time and scheduling time of each partition.
[0073] When the memory test is completed, the test result mainly includes whether each partition can access various memory test types.
Claims
1. A method for testing general computing module resource configuration, characterized in that The method comprises the following steps: Step 1), reading the resource configuration file of the general computing module by the tool end, and checking the resource configuration file; Step 2), automatically generating a test case according to the resource configuration file, wherein the test case comprises a test application at the general computing module end and a test program at the tool end, and the generated test program comprises test environment configuration, test excitation and data monitoring; wherein, In the Arinc664 terminal sending port configuration test case, first, the test program on the tool end needs to read all the ports of the general computing module in the resource configuration file of the general computing module, select the partition name to be tested, and write all the ports under the partition to the tool end board card resource configuration file, and set the test type in the written data to 255, indicating that the sending port test is executed; when the test application of the general computing module receives the data 255, all the sending ports send data to wait for the tool end to receive and save the data, and generate a sending port test report; In the Arinc664 terminal receiving port configuration test case, the tool end test program traverses the test data of the port, and the test application at the general computing module end receives the test data and returns the received data to the tool end, waits for the tool end to receive and save the data, and generates a receiving port test report; In the Arinc653 memory test case: the test application on the general computing module performs out-of-bound access test on the address outside the application address allocation, and the out-of-bound access is divided into left out-of-bound and right out-of-bound, the left out-of-bound is to access the left shift of the application address, and the right out-of-bound is to access the right shift of the application address, then the value of the shifted address is changed to judge whether it is out of bound, if the access is correct, a message of no out-of-bound access is returned; if the access is incorrect, no message is returned, prompting the connection general computing module end to obtain the exception captured by the system health monitoring, and the detailed information of the captured exception is viewed; In the Arinc653 timing test case, the test application on the general computing module performs the following operations: a. creating a non-periodic Task, recording t1, t2, t3 as the current time, and starting the total loop; b. repeatedly obtaining the current time, setting t2=t3, and t3 as the current time, if t3-t2 is greater than one, it means that the system allocated time has been exceeded, and t2-t1 is the system allocated time; c. repeatedly testing the set total loop times, and sending out the recorded t1, t2 and the corresponding partition number; d. going to the application to perform corresponding processing, and comparing whether the partition allocation time corresponds to the upper; Step 3), loading the test application to the general computing module; Step 4), initializing the test tool end; Step 5), configuring and testing the general computing module; Step 6), displaying the test result.
2. The method of claim 1, wherein The checking of the resource configuration file comprises format checking and content checking, the format checking is checked by the syntax specification of XML Schema, the principle of checking is to set the checking XSD and error handler when parsing XML, and the purpose of checking is achieved; the content checking is to check the rationality of the content of the resource configuration file.
3. The method of claim 1, wherein The test case automatic generation is to prepare a test case template according to a test function and to dynamically generate according to different resource configuration files through a wildcard replacement mode.
4. The method of claim 1, wherein The configuration test comprises the following steps: Step 1: the tool end sends an excitation message, the general computing module end is in a listening state, and port data is received; Step 2: the general computing module end sends a test start message, the tool end is in a listening state, and port data is received; Step 3: if the tool end receives the test start message, the tool end waits for a test result message, and if the tool end does not receive the test start message, a test error is displayed; Step 4: the general computing module end performs a test, and after the test is finished, a test result message is sent; Step 5: if the tool end receives the test result, the tool end displays the result; and if the tool end does not receive the test result, a test error is displayed.
Citation Information
Patent Citations
Method and device for generating test cases
CN103235759A
IMA software simulation test system
CN111813671A