Code coverage rate determination method and device, computer equipment and storage medium
By acquiring and analyzing the source code files of the RAID card on the server host, the problem of lack of file system support of RAID card is solved, and the code coverage is obtained and the RAID card software code evaluation is achieved, which improves its security.
Patent Information
- Application Number
- CN202411336478.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2044-09-24
AI Technical Summary
RAID cards lack file system support and cannot generate and save coverage data files, resulting in the inability to obtain coverage of software code, which in turn reduces the security of RAID cards.
By obtaining the source code file of the firmware module of the RAID card on the server host side, compiling and inserting the processing to generate the basic block file, running the execution file to map it to the host cache area, obtaining and analyzing the execution information file to calculate the code coverage, Use the host-side file system to generate execution information files to achieve code coverage of RAID card.
It realizes the code coverage rate of RAID card, improves the evaluation and improvement of RAID card software code, and improves the security of RAID card.
Smart Images

Figure CN119322747A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software testing, and in particular to a method, device, computer equipment and storage medium for determining code coverage. Background Art
[0002] In the era of mass storage, users' demands for storage capacity and data importance are increasing, and the requirements for data reliability and availability are also getting higher and higher. Redundant Arrays of Independent Disks (RAID) cards are based on disk array technology and can help solve the problems faced by users. High-quality software code is the key to ensuring the high reliability and stability of RAID cards.
[0003] In the related art, the quality of software code can be determined by the code coverage rate. The higher the code coverage rate, the higher the quality of the software code. The coverage rate data is collected when the program is running, and the coverage rate data is output to a specific file system for processing by the coverage analysis tool to obtain the coverage rate of the software code.
[0004] However, for RAID cards, due to the lack of file system support, they are unable to generate and save coverage data files, unable to obtain the coverage of their software codes, and unable to solve possible problems in the software codes, resulting in low security of the RAID cards. Summary of the invention
[0005] In view of this, the present invention provides a code coverage determination method to solve the problem in the related art that due to the lack of file system support in the RAID card, it is unable to generate and save coverage data files, cannot obtain the coverage of its software code, cannot solve possible problems in the software code, and the security of the Winter Solstice RAID is low.
[0006] In a first aspect, the present invention provides a method for determining code coverage, which is applied to a server host, and the method comprises:
[0007] Obtain multiple source code files of the firmware module of the disk array card;
[0008] Compile multiple source code files into execution files, wherein, in the process of compiling the multiple source code files into execution files, perform stub processing on the multiple source code files so as to update execution information of each source code file when running the execution files; generate basic block files corresponding to the multiple source code files, wherein the basic block files include pointers to execution information of corresponding source code files;
[0009] Running the execution file so that the disk array card maps the execution information of the basic block file and the source code file to the host cache area;
[0010] After the execution file is finished running, the execution information of each source code file in the host buffer area is obtained, and the execution information is written into the corresponding execution information file;
[0011] The execution information file and the basic block file are analyzed to obtain the code coverage of each source code file.
[0012] The code coverage determination method provided in the present embodiment is as follows: when the execution file is run, the disk array card maps the execution information of the basic block file and the source code file to the host cache area; after the execution file is run, the execution information of each source code file in the host cache area is obtained, the execution information is written into the corresponding execution information file, the execution information file and the basic block file are analyzed, and the code coverage of each source code file is obtained; by mapping the execution information of the basic block file and the source code file to the host cache area, the execution information file corresponding to the execution information is generated by using the file system of the host side, and then the code coverage of each source code file of the disk array card is obtained, thereby achieving the acquisition of the code coverage of the RAID card, and then being able to achieve the evaluation and improvement of the software code of the RAID card, thereby improving the security of the RAID card.
[0013] In an optional implementation, in the process of compiling the multiple source code files into the execution files, performing the instrumentation process on the multiple source code files includes:
[0014] In the process of compiling multiple source code files into execution files, adding an update coverage code after each line of code in the source code file, wherein the update coverage code is a stub;
[0015] A static array is inserted into the source code file, the size of the static array is the number of stubs in the source code file, and the value corresponding to the static array is the execution times of each stub.
[0016] The code coverage determination method provided in this embodiment appends a coverage update code after each line of code in the source code file, inserts a static array in the source code file, and obtains the execution information, i.e., the coverage information, of each source code file when the execution file is run, thereby ensuring the accuracy of the code coverage of each source code file obtained.
[0017] In an optional implementation, generating a plurality of basic block files corresponding to the source code files includes:
[0018] For any source code file, a basic block file corresponding to the source code file is set to include a pointer to a static array corresponding to the source code file, the number of pile points included in the source code file and the name of the source code file, wherein the execution information of the source code file includes the static array corresponding to the source code file.
[0019] The code coverage determination method provided in this embodiment can obtain the correspondence between the source code file and the execution information of the source code file by generating a corresponding basic block file for each source code file, so that the statistics of the code coverage become clearer and independent, and the efficiency of obtaining the code coverage is improved.
[0020] In an optional implementation manner, the running of the execution file so that the disk array card maps the execution information of the basic block file and the source code file to the host cache area includes:
[0021] In the process of running the execution file, the basic block files corresponding to the plurality of source code files are linked to form a basic block file linked list, so that the disk array card maps the basic block file linked list and the execution information of the source code file to the host cache area.
[0022] The code coverage determination method provided in this embodiment links the basic block files corresponding to multiple source code files to form a basic block file linked list, so that the disk array card maps the basic block file linked list and the execution information of the source code file to the host cache area. The linked list structure provides an efficient and flexible access path, improves the efficiency of obtaining the execution information of the basic block files and the source code files, and further improves the efficiency of obtaining the code coverage of the software code of the RAID card.
[0023] In a second aspect, the present invention provides a method for determining code coverage, which is applied to a disk array card, and the method comprises:
[0024] When the execution file is run on the server host, the execution information of the basic block file and the source code file is mapped to the host cache area, so that after the execution file is run, the server host obtains the execution information of each source code file in the host cache area and writes the execution information into the corresponding execution information file; the execution information file and the basic block file are analyzed to obtain the code coverage of each source code file;
[0025] The server host obtains a plurality of source code files of a firmware module of a disk array card; compiles the plurality of source code files into execution files, wherein, in the process of compiling the plurality of source code files into execution files, inserts the plurality of source code files so as to update the execution information of each source code file when the execution files are run; generates basic block files corresponding to the plurality of source code files, wherein the basic block files include pointers to the execution information of the corresponding source code files.
[0026] The code coverage determination method provided in this embodiment maps the execution information of the basic block file and the source code file to the host cache area when the execution file is run on the server host side, so that the server host side obtains the execution information of each source code file in the host cache area after the execution file is run, writes the execution information into the corresponding execution information file, analyzes the execution information file and the basic block file, and obtains the code coverage of each source code file. By mapping the execution information of the basic block file and the source code file to the host cache area, the execution information file corresponding to the execution information is generated by using the file system of the host side, and then the code coverage of each source code file of the disk array card is obtained, thereby achieving the acquisition of the code coverage of the RAID card, and then being able to evaluate and improve the software code of the RAID card, thereby improving the security of the RAID card.
[0027] In an optional implementation manner, mapping the execution information of the basic block file and the source code file to the host cache area includes:
[0028] Acquire the address of the host buffer area sent by the server host end, wherein the server host end applies for the host buffer area in the memory during the initialization process of the disk array card, and sends the address of the host buffer area to the disk array card;
[0029] Get the number of basic block files in the basic block file linked list;
[0030] For any basic block file, obtaining the order of the basic block file in the basic block file linked list;
[0031] Based on the number of basic block files in the basic block file linked list, the order of the basic block files in the basic block file linked list, and the address of the host buffer area, a corresponding to-be-written address is allocated to the basic block file;
[0032] Based on the address to be written, mapping the basic block file to the host cache area;
[0033] Based on the link relationship of the basic block files in the basic block file linked list, setting the link relationship of the basic block files in the host cache area;
[0034] Obtain information of a static array of a source code file corresponding to the basic block file;
[0035] Based on the address to be written, mapping information of a static array of a source code file corresponding to the basic block file to a host cache area;
[0036] Based on the pointing relationship between the basic block file and the information of the static array of the source code file corresponding to the basic block file, a corresponding pointing relationship is set in the host cache area.
[0037] The code coverage determination method provided in this embodiment maps the execution information of the basic block file and the source code file to the host cache area requested from the memory, uses the host-side file system to generate an execution file corresponding to the execution information, and then obtains the code coverage of each source code file of the disk array card, thereby reducing the multiple copies of the execution information during the transmission process, improving the data transmission speed, and further improving the efficiency of obtaining the code coverage.
[0038] In a third aspect, the present invention provides a device for determining code coverage, which is applied to a server host, and the device comprises:
[0039] A first acquisition module is used to acquire multiple source code files of a firmware module of a disk array card;
[0040] A compiling module, used to compile multiple source code files into execution files, wherein, in the process of compiling the multiple source code files into execution files, the multiple source code files are subjected to instrumentation processing, so as to update the execution information of each source code file when the execution files are run; and generate basic block files corresponding to the multiple source code files, wherein the basic block files include pointers to the execution information of the corresponding source code files;
[0041] An operation module, used for running the execution file, so that the disk array card maps the execution information of the basic block file and the source code file to the host cache area;
[0042] A second acquisition module is used to acquire execution information of each source code file in the host cache area after the execution file is finished running, and write the execution information into a corresponding execution information file;
[0043] The third acquisition module is used to analyze the execution information file and the basic block file to obtain the code coverage of each source code file.
[0044] In a fourth aspect, the present invention provides a device for determining code coverage, which is applied to a disk array card, and the device comprises:
[0045] A mapping module is used to map the execution information of the basic block file and the source code file to the host cache area when the execution file is run on the server host side, so that the server host side obtains the execution information of each source code file in the host cache area after the execution file is run, and writes the execution information into the corresponding execution information file; analyzes the execution information file and the basic block file to obtain the code coverage of each source code file;
[0046] The server host obtains a plurality of source code files of a firmware module of a disk array card; compiles the plurality of source code files into execution files, wherein, in the process of compiling the plurality of source code files into execution files, inserts the plurality of source code files so as to update the execution information of each source code file when the execution files are run; generates basic block files corresponding to the plurality of source code files, wherein the basic block files include pointers to the execution information of the corresponding source code files.
[0047] In a fifth aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the code coverage determination method of the above-mentioned first aspect or any corresponding embodiment thereof or the code coverage determination method of the above-mentioned second aspect or any corresponding embodiment thereof by executing the computer instructions.
[0048] In a sixth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the code coverage determination method of the first aspect or any corresponding embodiment thereof or the code coverage determination method of the second aspect or any corresponding embodiment thereof.
[0049] In the seventh aspect, the present invention provides a computer program product, including computer instructions, which are used to enable a computer to execute the code coverage determination method of the above-mentioned first aspect or any corresponding embodiment or the code coverage determination method of the above-mentioned second aspect or any corresponding embodiment. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0051] Figure 1is a flow chart of a method for determining code coverage according to an embodiment of the present invention;
[0052] Figure 2 It is a structural block diagram of determining code coverage with the support of a file system in the related art;
[0053] Figure 3 It is a flowchart of determining code coverage when there is support of a file system in the related art;
[0054] Figure 4 is a flow chart of another method for determining code coverage according to an embodiment of the present invention;
[0055] Figure 5 is a structural block diagram of determining code coverage according to an embodiment of the present invention;
[0056] Figure 6 is a schematic diagram of mapping the execution information of the basic block file linked list and the source code file to the host cache area according to an embodiment of the present invention;
[0057] Figure 7 is a structural block diagram of a device for determining code coverage according to an embodiment of the present invention;
[0058] Figure 8 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0060] In the era of mass storage, users' demands for storage capacity and data importance are increasing, and the requirements for data reliability and availability are also getting higher and higher. RAID cards based on disk array technology can help solve the problems faced by users.
[0061] To ensure the data reliability requirements of users, RAID card devices need to have high reliability and stability. To ensure the long-term stable operation of RAID card devices, it is necessary to ensure that the software code of RAID card devices is high-quality software code. Among them, code coverage is a key software quality metric, which is used to measure the proportion of source code executed to the total source code during the software testing process. By calculating the proportion of the number of source code lines (or other code elements) executed during the test process to the total number of source code lines (or other code elements), the software quality is indirectly measured. The higher the code coverage of the software code, the more it is determined that the corresponding software has been tested relatively comprehensively, and the higher the quality of the software code, which in turn ensures the quality and reliability of the software, and helps to ensure that the software of the RAID card device can work properly in various scenarios and reduce potential software defects and errors.
[0062] It should be noted that the code coverage of the software code can also be used to predict and diagnose potential problems in the RAID card device-related software. By promptly discovering and solving these problems, the possibility of RAID card device failure in actual use can be reduced, and the stability and reliability of the system can be improved.
[0063] It can be seen that code coverage has important reference value for software development and testing related to RAID card devices. By paying attention to code coverage, the quality and performance of software related to RAID card devices can be improved, thereby improving the stability and reliability of the entire RAID system.
[0064] In the related art, coverage data is collected when the program is running, and the coverage data is output to a specific file system for processing by a coverage analysis tool to obtain the coverage of the software code.
[0065] However, for RAID cards, due to the lack of file system support, they are unable to generate and save coverage data files, and are also unable to analyze and obtain software code coverage through coverage data files, and are unable to solve possible problems in the software code, resulting in low security of RAID cards.
[0066] The embodiment of the present invention provides a method for determining code coverage. When an execution file is run, a disk array card maps execution information of a basic block file and a source code file to a host cache area. After the execution file is run, the execution information of each source code file in the host cache area is obtained, the execution information is written into a corresponding execution information file, and the execution information file and the basic block file are analyzed to obtain the code coverage of each source code file. The execution information of the basic block file and the source code file is mapped to the host cache area, and an execution information file corresponding to the execution information is generated by using a file system on the host side, thereby obtaining the code coverage of each source code file of the disk array card to achieve the acquisition of the code coverage of the RAID card, thereby being able to evaluate and improve the software code of the RAID card, and improving the security of the RAID card.
[0067] According to an embodiment of the present invention, an embodiment of a method for determining code coverage is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0068] In this embodiment, a method for determining code coverage is provided, which can be used on a server host. Figure 1 is a flowchart of a method for determining code coverage according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0069] Step S101, obtaining multiple source code files of the firmware module of the disk array card.
[0070] The disk array card is a RAID card. The server host obtains multiple source code files corresponding to the firmware of the RAID card, and the firmware module is the firmware in the RAID card.
[0071] Step S102, compile the multiple source code files into execution files, wherein, in the process of compiling the multiple source code files into execution files, perform stub processing on the multiple source code files so as to update the execution information of each source code file when the execution files are run; generate basic block files corresponding to the multiple source code files, wherein the basic block files include pointers to the execution information of the corresponding source code files.
[0072] The GNU Compiler Collection (GCC) is used to compile multiple source code files into execution files. The basic block file is convenient for accurately associating execution information with the source code file.
[0073] It should be noted that when compiling multiple source code files, use GCC's -fprofile-arcs and -ftest-coverage options to enable coverage testing. These two options tell GCC to insert additional code and generate necessary files during the compilation process to support coverage analysis.
[0074] It should be noted that in the process of compiling multiple source code files into executable files, GCC will generate a file named *.gcno (corresponding to the source code file name), that is, a basic block file. The basic block file includes the reconstructed basic block graph and the source code line number information of the corresponding basic block, which is the basis for subsequent analysis.
[0075] Among them, the reconstruction of the basic block diagram is a basic block. Basic Block (BB): If the first statement of a program is executed once, each statement in the program must be executed once, forming a basic block. The execution times of all statements in a BB must be the same. It is generally composed of multiple sequential execution statements followed by a jump statement. Therefore, in general, the last statement of a BB must be a jump statement, and the jump destination is the first statement of another BB. If the jump is conditional, a branch is generated, and the BB has two BBs as destinations.
[0076] It should be noted that this embodiment is described by taking one source code file corresponding to one BB as an example. The data structure of the basic block is as follows:
[0077] struct bb
[0078] {
[0079] long zero_word; / / Whether it is inserted into the linked list
[0080] const char*file_name; / / The current file name being tested
[0081] long*count; / / pointer to BX2
[0082] long ncounts; / / Number of pile points
[0083] struct bb*next; / / BX2 information of the next file
[0084] }
[0085] Among them, BX2 is a static array.
[0086] Step S103, running the execution file so that the disk array card maps the execution information of the basic block file and the source code file to the host cache area.
[0087] Figure 2 It is a structural block diagram of determining code coverage with the support of a file system in the related art. Figure 3 This is a flowchart of determining code coverage when there is support from a file system in the related art. Figure 2 and Figure 3 The process of determining code coverage with the support of a file system in the related art is described, such as Figure 2 and Figure 3 As shown, in the related art, GCC and gcov are used to determine code coverage. Gcov is a tool for C / C++ code coverage testing. It is tightly integrated with the GCC compiler and can collect the running status of each line of code during the execution of the program and generate a code coverage report.
[0088] Specifically, obtain the source code file (APP SRC) of the application to be tested, where the source code file is a source file, which is a *.c file or a *.cpp file. Use GCC to compile the source code file, and enable coverage testing by adding GCC's -fprofile-arcs and -ftest-coverage related parameters. During the compilation process, GCC appends a section of code to update the coverage statistics after the code generated by each line of executable statement in the source code file. This process is called stub insertion. These additional codes will update the coverage data when the program is executed. During the compilation process, GCC will generate a file named *.gcno (corresponding to the source code file name), that is, a data file *.gcdo. This file is consistent with the above-mentioned basic block file. Please refer to the above description for details, which will not be repeated here.
[0089] Among them, GCC will insert a static array BX2 at the end of the source file during the stub insertion process. The size of the BX2 array is the number of stubs in the source file. BX2+0 represents the position of the 0th stub, and BX2+n represents the position of the nth stub. The value of the array is the number of executions of the stub, that is, the number of executions of the code line of the source code where the stub is located.
[0090] GCC inserts the assembly statement inc$(BX2+n) at each stub point during the stub insertion process to update the execution count of each stub point during code execution.
[0091] To facilitate subsequent statistics, GCC also links the BX2 arrays of each source file into a linked list. This linked list structure is generated before testing the main function. Before calling main, a function of the type constructor is set to link the BX2 arrays of each source file into a linked list. This function will also call the exit function when the program exits to calculate the number of executions and generate a .gcda file.
[0092] After the compilation is completed, an executable file *.elf is obtained. Running the executable file is to run the compiled program. During the program execution, the stub code will record the execution status of each line of code and each branch in the source code file and store the data in the memory.
[0093] When the program execution ends (for example, by calling the exit function), the gcov initialization function will trigger the cleanup process. Due to the support of the file system, the coverage data stored in the memory can be directly written into a file named *.gcda to obtain the data file *.gcda, which contains the actual coverage data during program execution.
[0094] Use the gcov command to analyze the data file *.gcdo and the data file *.gcda to generate a detailed code coverage report. The basic format of the gcov command is gcov [source file]. After using this command to analyze the data file *.gcdo and the data file *.gcda, a file named *.c.gcov (corresponding to the source file name) is generated, which contains the number of executions of each line of code, unexecuted code and other information. It should be noted that gcov uses basic block BB and jump ARC counts, combined with program flow charts to achieve code coverage statistics.
[0095] By interpreting the code coverage report, you can get the code coverage, specifically:
[0096] The code coverage report includes coverage summary, detailed coverage data, function and branch coverage, etc. Among them, the coverage summary shows the overall line coverage, branch coverage and function coverage of the source file. The detailed coverage data provides the execution times of each line of code in each source file, and the unexecuted code will be marked in a specific way. The coverage of functions and branches shows the execution times and coverage of each function, as well as the execution status of each branch.
[0097] Since there is no file system in the RAID card, the coverage information data cannot be saved by writing files. Therefore, in order to solve the problem that the RAID card has no file system support, in this embodiment, when the execution file is running, the disk array card is used to map the execution information of the basic block file and the source code file to the host cache area, so as to use the host-side file system to generate the execution information file of the source code file of the RAID card.
[0098] It is understandable that, in the process of running the execution file, the disk array card will synchronously map the update of the execution information of the basic block file and the source code file to the host cache area.
[0099] Step S104, after the execution file is finished running, the execution information of each source code file in the host cache is obtained, and the execution information is written into the corresponding execution information file.
[0100] After the execution file is finished running, the server host obtains the execution information of each source code file from the host cache area, and uses the host file system to write the execution information into the corresponding execution information file, that is, into the corresponding .gcda file.
[0101] Step S105, analyzing the execution information file and the basic block file to obtain the code coverage of each source code file.
[0102] Among them, after obtaining the execution information file, the server host uses the gcov tool to analyze the execution file and the basic block file to obtain the code coverage of each source code file, that is, to obtain the code coverage report of each source code file. It should be noted that the code coverage report is consistent with the code coverage report in the related art, and will not be repeated here.
[0103] It is understandable that after obtaining the code coverage report, code quality analysis can be performed based on the code coverage report.
[0104] The code coverage determination method provided in the present embodiment is as follows: when the execution file is run, the disk array card maps the execution information of the basic block file and the source code file to the host cache area; after the execution file is run, the execution information of each source code file in the host cache area is obtained, the execution information is written into the corresponding execution information file, the execution information file and the basic block file are analyzed, and the code coverage of each source code file is obtained; by mapping the execution information of the basic block file and the source code file to the host cache area, the execution information file corresponding to the execution information is generated by using the file system of the host side, and then the code coverage of each source code file of the disk array card is obtained, thereby achieving the acquisition of the code coverage of the RAID card, and then being able to achieve the evaluation and improvement of the software code of the RAID card, thereby improving the security of the RAID card.
[0105] In this embodiment, a method for determining code coverage is provided, which can be used on a server host. Figure 4 is a flowchart of a method for determining code coverage according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:
[0106] Step S401, obtain multiple source code files of the firmware module of the disk array card. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0107] Step S402, compile the multiple source code files into execution files, wherein, in the process of compiling the multiple source code files into execution files, perform plug-in processing on the multiple source code files to update the execution information of each source code file when the execution file is run; generate basic block files corresponding to the multiple source code files, wherein the basic block files include pointers to the execution information of the corresponding source code files.
[0108] Specifically, the above step S402 includes:
[0109] Step S4021, in the process of compiling multiple source code files into execution files, adding a coverage update code after each line of code in the source code file, and the coverage update code is a stub.
[0110] Figure 5 is a structural block diagram of determining code coverage according to an embodiment of the present invention, such as Figure 5 As shown, the server host compiles multiple source code files (FW SRC) of the firmware module of the RAID card into an executable file FW using a cross-compilation chain (ARM-GCC), and then runs it in the RAID card.
[0111] In the process of compiling multiple source code files into execution files, in order to update and obtain the execution information of each source code file, multiple source code files are plugged in, and the plugging in includes: adding an update coverage code after each line of code in the source code file, and the update coverage code will update the coverage data, that is, the execution information, when the program is executed. The update coverage code is a stub.
[0112] Step S4022, inserting a static array into the source code file, the size of the static array is the number of stubs in the source code file, and the value corresponding to the static array is the execution count of each stub.
[0113] The stub processing also includes: inserting a static array into the source code file, the static array is BX2, which is the same as the static array in the related art and will not be described in detail here.
[0114] Step S403: Run the execution file to enable the disk array card to map the execution information of the basic block file and the source code file to the host cache area. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0115] Step S404: After the execution file is finished running, the execution information of each source code file in the host cache is obtained, and the execution information is written into the corresponding execution information file. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0116] Step S405: Analyze the execution information file and the basic block file to obtain the code coverage of each source code file. Figure 1 Step S105 of the illustrated embodiment will not be described in detail here.
[0117] The code coverage determination method provided in this embodiment appends a coverage update code after each line of code in the source code file, inserts a static array in the source code file, and obtains the execution information, i.e., the coverage information, of each source code file when the execution file is run, thereby ensuring the accuracy of the code coverage of each source code file obtained.
[0118] In some optional implementations, the above step S402 includes:
[0119] Step a1, for any source code file, set the basic block file corresponding to the source code file to include a pointer to a static array corresponding to the source code file, the number of stubs included in the source code file and the name of the source code file, wherein the execution information of the source code file includes the static array corresponding to the source code file.
[0120] The value corresponding to the static array corresponding to the source code file is the execution count of each stub point, that is, the execution information of the source code file includes the execution count of each line of code in the source code file.
[0121] The code coverage determination method provided in this embodiment can obtain the correspondence between the source code file and the execution information of the source code file by generating a corresponding basic block file for each source code file, so that the statistics of the code coverage become clearer and independent, and the efficiency of obtaining the code coverage is improved.
[0122] In some optional implementations, the above step S403 includes:
[0123] Step b1, in the process of running the execution file, the basic block files corresponding to the multiple source code files are linked to form a basic block file linked list, so that the disk array card maps the basic block file linked list and the execution information of the source code file to the host cache area.
[0124] Figure 6 FIG. 1 is a schematic diagram of mapping the execution information of the basic block file list and the source code file to the host cache area according to an embodiment of the present invention. Figure 6As shown, in the process of running the execution file, the gcov_init function is called to initialize the statistical data area, that is, the gcov_init function is called to initialize the statistics of the basic block files of each source code file, and at the same time, the gcov_info structure of each source code file is organized, that is, the basic block files corresponding to multiple source code files are linked to form a basic block file linked list, so that the disk array card maps the basic block file linked list and the execution information of the source code file to the host cache area. Among them, the basic block file linked list and the execution information of the source code file exist in the host cache area in the form of gcda pck.
[0125] It is understandable that, in the process of running the execution file, the stub code will record the execution status of each line of code and each branch, generate execution information of each source code file, and the disk array card will map this execution information to the host cache area.
[0126] When the code is executed and exit is called normally, the gcov_exit function is called, and the gcov_flush function is called to write the statistical data of the host buffer area into the corresponding *.gcda file.
[0127] The code coverage determination method provided in this embodiment links the basic block files corresponding to multiple source code files to form a basic block file linked list, so that the disk array card maps the basic block file linked list and the execution information of the source code file to the host cache area. The linked list structure provides an efficient and flexible access path, improves the efficiency of obtaining the execution information of the basic block files and the source code files, and further improves the efficiency of obtaining the code coverage of the software code of the RAID card.
[0128] In some optional implementations, the code coverage determination method further includes:
[0129] Monitor the connection status between the server host and the disk array card.
[0130] Acquiring multiple source code files of the firmware module of the disk array card includes: acquiring multiple source code files of the firmware module of the disk array card when the connection state is a normal state.
[0131] When the connection status is abnormal, the abnormal connection information is recorded in the log file and an alarm is issued, so that the user can analyze, troubleshoot and solve the abnormal connection problem based on the log file.
[0132] It is understandable that the alarm may be issued by displaying the abnormal connection information on the user interface so that the user can find the abnormal connection information in time and solve the problem.
[0133] Running the execution file includes: running the execution file when the multiple source code files are successfully compiled into the execution file. If the multiple source code files are not successfully compiled into the execution file, recording the compilation exception information into the log file and issuing an alarm, so that the user can analyze, troubleshoot and solve the compilation exception problem based on the log file.
[0134] The code coverage determination method provided in this embodiment ensures that multiple source code files are obtained under normal connection status by monitoring the connection status between the server host and the disk array card, thereby avoiding the inefficiency and low accuracy of code coverage determination caused by connection abnormalities. The accuracy of the determined code coverage is ensured by running the execution file after successfully compiling multiple source code files into execution files. The detailed information of connection abnormalities and compilation abnormalities is recorded in the log file, so that the user can analyze, troubleshoot and solve problems based on the log file, improve the efficiency and accuracy of problem solving, and thus improve the efficiency of obtaining code coverage.
[0135] In this embodiment, a method for determining code coverage is provided, which can be used for a disk array card. The process of the method for determining code coverage includes the following steps:
[0136] When the execution file is run on the server host, the execution information of the basic block file and the source code file is mapped to the host cache area, so that after the execution file is finished running, the server host can obtain the execution information of each source code file in the host cache area and write the execution information into the corresponding execution information file; the execution information file and the basic block file are analyzed to obtain the code coverage of each source code file.
[0137] The server host obtains multiple source code files of the firmware module of the disk array card; compiles the multiple source code files into execution files, wherein, in the process of compiling the multiple source code files into execution files, the multiple source code files are plugged to update the execution information of each source code file when the execution files are run; generates basic block files corresponding to the multiple source code files, wherein the basic block files include pointers to the execution information of the corresponding source code files.
[0138] The further description of this step is the same as the specific description of the code coverage determination method applied to the server host side, and will not be repeated here.
[0139] The code coverage determination method provided in this embodiment maps the execution information of the basic block file and the source code file to the host cache area when the execution file is run on the server host side, so that the server host side obtains the execution information of each source code file in the host cache area after the execution file is run, writes the execution information into the corresponding execution information file, analyzes the execution information file and the basic block file, and obtains the code coverage of each source code file. By mapping the execution information of the basic block file and the source code file to the host cache area, the execution information file corresponding to the execution information is generated by using the file system of the host side, and then the code coverage of each source code file of the disk array card is obtained, thereby achieving the acquisition of the code coverage of the RAID card, and then being able to evaluate and improve the software code of the RAID card, thereby improving the security of the RAID card.
[0140] In some optional implementations, mapping the execution information of the basic block file and the source code file to the host cache area includes:
[0141] Step c1, obtaining the address of the host buffer area sent by the server host end, wherein the server host end applies for the host buffer area in the memory during the initialization process of the disk array card, and sends the address of the host buffer area to the disk array card.
[0142] The memory is double data rate synchronous dynamic random access memory (Double Data Rate, referred to as DDR). The host cache area is the host memory buffer (HMB). HMB is one of the basic features of the storage protocol (Non Volatile Memory Express, referred to as NVMe) designed specifically for solid-state drives. It allows NVMe devices to improve their performance by sharing system memory, i.e. host memory, as cache without independent cache. NVMe can make full use of the low latency and high concurrency characteristics of solid-state drives and is an interface standard for the PCIe bus.
[0143] After the server host applies for the host cache area in the memory, it sends the NVMe set Feature command to inform the RAID card of the address of the HMB applied by the host. As a PCIe device, the RAID card can transfer the internal data of the RAID card to the HMB on the host side through the address of the HMB through Direct Memory Access (DMA).
[0144] Step c2, obtaining the number of basic block files in the basic block file linked list.
[0145] After the address of the requested host buffer area is obtained, the number of basic block files in the basic block file linked list is obtained to implement the mapping of the basic block files.
[0146] Step c3: for any basic block file, obtain the order of the basic block file in the basic block file linked list.
[0147] In order to implement the mapping of basic block files, it is also necessary to obtain the order of each basic block file in the basic block file linked list.
[0148] Step c4, allocating corresponding addresses to be written to the basic block files based on the number of basic block files in the basic block file linked list, the order of the basic block files in the basic block file linked list and the addresses of the host cache area.
[0149] After obtaining the number of basic block files in the basic block file linked list and the order of the basic block files in the basic block file linked list, based on the number of basic block files in the basic block file linked list, the order of the basic block files in the basic block file linked list and the address of the host cache area, the corresponding address to be written is allocated to the basic block file. Specifically, the address of the host cache area is divided into multiple addresses according to the number of basic block files in the basic block file linked list, and the divided multiple addresses are allocated to the corresponding basic block files according to the order of the basic block files in the basic block linked list, that is, the corresponding address to be written is allocated to the basic block file.
[0150] Step c5: Map the basic block file to the host cache area based on the address to be written.
[0151] After the corresponding address to be written is allocated to the basic block file, any basic block file is mapped to the host cache area according to the address to be written allocated to it.
[0152] Step c6, based on the link relationship of the basic block files in the basic block file linked list, the link relationship of the basic block files in the host cache area is set.
[0153] After mapping the basic block files to the host cache area, the link relationship of the basic block files in the host cache area is set. Specifically, the link relationship between the basic block files in the host cache area is set to be consistent with the link relationship of the basic block files in the basic block file linked list.
[0154] Step c7, obtaining information of a static array of a source code file corresponding to the basic block file.
[0155] The execution information of the source code file includes information of a static array corresponding to the source code file. To map the execution information of the source code to the host cache, for any basic block file, the information of the static array of the source code file corresponding to the basic block file is obtained.
[0156] Step c8, based on the address to be written, mapping the information of the static array of the source code file corresponding to the basic block file to the host cache area.
[0157] Based on the address to be written of the basic block file, information of the static array of the source code file corresponding to the basic block file is mapped into the host cache area.
[0158] Step c9, based on the pointing relationship between the basic block file and the information of the static array of the source code file corresponding to the basic block file, a corresponding pointing relationship is set in the host cache area.
[0159] In order to realize mapping the execution information of the source code to the host cache area, after mapping the information of the static array of the source code file corresponding to the basic block file to the host cache area, it is also necessary to set the corresponding pointing relationship in the host cache area based on the pointing relationship between the basic block file and the information of the static array of the source code file corresponding to the basic block file. Specifically, the pointing relationship between the basic block file in the host cache area and the information of the static array of the source code file corresponding to the basic block file in the host cache area is set to be consistent with the pointing relationship between the basic block file in the disk array card and the information of the static array of the source code file corresponding to the basic block file in the disk array card.
[0160] The code coverage determination method provided in this embodiment directly transmits the execution information generated during the running of the execution file to the host side by writing the HMB memory address, and uses the host-side file system to generate an execution file corresponding to the execution information, thereby obtaining the code coverage of each source code file of the disk array card, thereby reducing the use of RAID card memory resources.
[0161] By adopting the DMA method, the multiple copies of execution information during the transmission process are reduced, the data transmission speed and efficiency are improved, the performance of RAID card execution information export is improved, and the efficiency of obtaining code coverage is improved.
[0162] In this embodiment, a device for determining code coverage is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0163] This embodiment provides a device for determining code coverage, such as Figure 7 As shown, it is applied to the server host side, including:
[0164] The first acquisition module 701 is used to acquire multiple source code files of the firmware module of the disk array card.
[0165] The compilation module 702 is used to compile multiple source code files into execution files, wherein, in the process of compiling the multiple source code files into execution files, the multiple source code files are instrumented so as to update the execution information of each source code file when the execution file is run; and generate basic block files corresponding to the multiple source code files, wherein the basic block files include pointers to the execution information of the corresponding source code files.
[0166] The running module 703 is used to run the execution file so that the disk array card maps the execution information of the basic block file and the source code file to the host cache area.
[0167] The second acquisition module 704 is used to acquire the execution information of each source code file in the host cache after the execution file is finished running, and write the execution information into the corresponding execution information file.
[0168] The third acquisition module 705 is used to analyze the execution information file and the basic block file to obtain the code coverage of each source code file.
[0169] In some optional implementations, the compiling module 702 includes:
[0170] The appending unit is used to append the coverage update code after each line of code in the source code file during the process of compiling multiple source code files into execution files, and the coverage update code is a stub.
[0171] The insertion unit is used to insert a static array into the source code file. The size of the static array is the number of stubs in the source code file, and the value corresponding to the static array is the execution times of each stub.
[0172] In some optional implementations, the compiling module 702 includes:
[0173] The first setting unit is used to set, for any source code file, a basic block file corresponding to the source code file, including a pointer to a static array corresponding to the source code file, the number of stubs included in the source code file, and the name of the source code file, wherein the execution information of the source code file includes the static array corresponding to the source code file.
[0174] In some optional implementations, the operation module 703 includes:
[0175] The link unit is used to link the basic block files corresponding to multiple source code files to form a basic block file linked list during the execution of the execution file, so that the disk array card can map the basic block file linked list and the execution information of the source code file to the host cache area.
[0176] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0177] In this embodiment, a code coverage determination device is also provided, which is applied to a disk array card. The code coverage determination device includes:
[0178] A mapping module is used to map the execution information of the basic block file and the source code file to the host cache when the execution file is run on the server host, so that the server host can obtain the execution information of each source code file in the host cache after the execution file is run, and write the execution information into the corresponding execution information file; analyze the execution information file and the basic block file to obtain the code coverage of each source code file;
[0179] The server host obtains multiple source code files of the firmware module of the disk array card; compiles the multiple source code files into execution files, wherein, in the process of compiling the multiple source code files into execution files, the multiple source code files are plugged to update the execution information of each source code file when the execution files are run; generates basic block files corresponding to the multiple source code files, wherein the basic block files include pointers to the execution information of the corresponding source code files.
[0180] In some optional implementations, the mapping module includes:
[0181] The first acquisition unit is used to acquire the address of the host buffer area sent by the server host end, wherein the server host end applies for the host buffer area in the memory during the disk array card initialization process and sends the address of the host buffer area to the disk array card.
[0182] The second obtaining unit is used to obtain the number of basic block files in the basic block file linked list.
[0183] The third obtaining unit is used to obtain, for any basic block file, the order of the basic block file in the basic block file linked list.
[0184] The allocation unit is used to allocate corresponding addresses to be written to the basic block files based on the number of basic block files in the basic block file linked list, the order of the basic block files in the basic block file linked list and the addresses of the host cache area.
[0185] The first mapping unit is used to map the basic block file to the host cache area based on the address to be written.
[0186] The second setting unit is used to set the link relationship of the basic block files in the host cache area based on the link relationship of the basic block files in the basic block file linked list.
[0187] The fourth obtaining unit is used to obtain information of a static array of a source code file corresponding to the basic block file.
[0188] The second mapping unit is used to map information of a static array of a source code file corresponding to the basic block file to a host cache area based on an address to be written.
[0189] The third setting unit is used to set a corresponding pointing relationship in the host cache area based on the pointing relationship between the basic block file and the information of the static array of the source code file corresponding to the basic block file.
[0190] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0191] The code coverage determination device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0192] An embodiment of the present invention further provides a computer device having the above-mentioned code coverage determination device.
[0193] See also Figure 8 , Figure 8 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 8 As shown, the computer device includes: one or more processors 801, memory 802, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Each component utilizes different buses to communicate with each other, and can be installed on a common mainboard or installed in other ways as required. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 801 is taken as an example.
[0194] The processor 801 may be a central processing unit, a network processor or a combination thereof. The processor 801 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.
[0195] The memory 802 stores instructions executable by at least one processor 801, so that the at least one processor 801 executes the method shown in the above embodiment.
[0196] The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 802 may optionally include a memory remotely arranged relative to the processor 801, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0197] The memory 802 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 802 may also include a combination of the above types of memory.
[0198] The computer device also includes a communication interface 803, which is used for the computer device to communicate with other devices or a communication network.
[0199] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0200] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0201] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for determining code coverage, characterized in that: Applied to the server host side, the method includes: Obtain multiple source code files of the firmware module of the disk array card; Compile multiple source code files into execution files, wherein, in the process of compiling the multiple source code files into execution files, perform stub processing on the multiple source code files so as to update execution information of each source code file when running the execution files; generate basic block files corresponding to the multiple source code files, wherein the basic block files include pointers to execution information of corresponding source code files; Running the execution file so that the disk array card maps the execution information of the basic block file and the source code file to the host cache area; After the execution file is finished running, the execution information of each source code file in the host buffer area is obtained, and the execution information is written into the corresponding execution information file; The execution information file and the basic block file are analyzed to obtain the code coverage of each source code file.
2. The method according to claim 1, characterized in that In the process of compiling the plurality of source code files into execution files, performing plugging processing on the plurality of source code files includes: In the process of compiling multiple source code files into execution files, adding an update coverage code after each line of code in the source code file, wherein the update coverage code is a stub; A static array is inserted into the source code file, the size of the static array is the number of stubs in the source code file, and the value corresponding to the static array is the execution times of each stub.
3. The method according to claim 1, characterized in that The generating of the basic block files corresponding to the plurality of source code files comprises: For any source code file, a basic block file corresponding to the source code file is set to include a pointer to a static array corresponding to the source code file, the number of pile points included in the source code file and the name of the source code file, wherein the execution information of the source code file includes the static array corresponding to the source code file.
4. The method according to claim 1, characterized in that The step of running the execution file so that the disk array card maps the execution information of the basic block file and the source code file to the host cache area includes: In the process of running the execution file, the basic block files corresponding to the plurality of source code files are linked to form a basic block file linked list, so that the disk array card maps the basic block file linked list and the execution information of the source code file to the host cache area.
5. A method for determining code coverage, characterized in that: Applied to a disk array card, the method comprises: When the execution file is run on the server host, the execution information of the basic block file and the source code file is mapped to the host cache area, so that after the execution file is run, the server host obtains the execution information of each source code file in the host cache area and writes the execution information into the corresponding execution information file; the execution information file and the basic block file are analyzed to obtain the code coverage of each source code file; The server host obtains a plurality of source code files of a firmware module of a disk array card; compiles the plurality of source code files into execution files, wherein, in the process of compiling the plurality of source code files into execution files, inserts the plurality of source code files so as to update the execution information of each source code file when the execution files are run; generates basic block files corresponding to the plurality of source code files, wherein the basic block files include pointers to the execution information of the corresponding source code files.
6. The method according to claim 5, characterized in that The step of mapping the execution information of the basic block file and the source code file to the host cache area includes: Acquire the address of the host buffer area sent by the server host end, wherein the server host end applies for the host buffer area in the memory during the initialization process of the disk array card, and sends the address of the host buffer area to the disk array card; Get the number of basic block files in the basic block file linked list; For any basic block file, obtaining the order of the basic block file in the basic block file linked list; Based on the number of basic block files in the basic block file linked list, the order of the basic block files in the basic block file linked list, and the address of the host buffer area, a corresponding to-be-written address is allocated to the basic block file; Based on the address to be written, mapping the basic block file to the host cache area; Based on the link relationship of the basic block files in the basic block file linked list, setting the link relationship of the basic block files in the host cache area; Obtain information of a static array of a source code file corresponding to the basic block file; Based on the address to be written, mapping information of a static array of a source code file corresponding to the basic block file to a host cache area; Based on the pointing relationship between the basic block file and the information of the static array of the source code file corresponding to the basic block file, a corresponding pointing relationship is set in the host cache area.
7. A device for determining code coverage, characterized in that: Applied to a server host, the device comprises: A first acquisition module is used to acquire multiple source code files of a firmware module of a disk array card; A compiling module, used to compile multiple source code files into execution files, wherein, in the process of compiling the multiple source code files into execution files, the multiple source code files are subjected to instrumentation processing, so as to update the execution information of each source code file when the execution files are run; and generate basic block files corresponding to the multiple source code files, wherein the basic block files include pointers to the execution information of the corresponding source code files; An operation module, used for running the execution file, so that the disk array card maps the execution information of the basic block file and the source code file to the host cache area; A second acquisition module is used to acquire execution information of each source code file in the host cache area after the execution file is finished running, and write the execution information into a corresponding execution information file; The third acquisition module is used to analyze the execution information file and the basic block file to obtain the code coverage of each source code file.
8. A device for determining code coverage, characterized in that: Applied to a disk array card, the device comprises: A mapping module is used to map the execution information of the basic block file and the source code file to the host cache area when the execution file is run on the server host side, so that the server host side obtains the execution information of each source code file in the host cache area after the execution file is run, and writes the execution information into the corresponding execution information file; analyzes the execution information file and the basic block file to obtain the code coverage of each source code file; The server host obtains a plurality of source code files of a firmware module of a disk array card; compiles the plurality of source code files into execution files, wherein, in the process of compiling the plurality of source code files into execution files, inserts the plurality of source code files so as to update the execution information of each source code file when the execution files are run; generates basic block files corresponding to the plurality of source code files, wherein the basic block files include pointers to the execution information of the corresponding source code files.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the code coverage determination method described in any one of claims 1 to 4 or the code coverage determination method described in any one of claims 5 to 6 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the code coverage determination method according to any one of claims 1 to 4 or the code coverage determination method according to any one of claims 5 to 6.
Citation Information
Patent Citations
Memory executing method for executable file
CN104820612A
Incremental code coverage rate determination method and device, storage medium and electronic equipment
CN115408259A
Coverage rate data processing method and device, computer equipment and storage medium
CN115437905A
Method and device for determining code coverage rate and storage medium
CN118363862A
Method for performing cared-zone code coverage evaluation with no source code modification
US20180173610A1
Cited By
Firmware code coverage rate statistical method and electronic equipment
CN120743789A
Method and device for determining firmware coverage rate, storage medium and equipment
CN122111866A