Redundant array of independent disks (RAID) card, test method, device and system thereof and host
By setting up a unified testing framework in the RAID card, problems such as redundant code and inconsistent test in existing RAID card tests are solved, and automated integration testing of RAID cards is realized, which improves testing efficiency and convenience.
Patent Information
- Application Number
- CN202510198722.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-05-13
AI Technical Summary
The firmware integration test of existing RAID cards lacks a unified testing framework, resulting in redundant code, inconsistent test commands, difficult to execute in batches and automatically run, and the output of test results is inconvenient for docking automation.
Provide a test method for independent disk redundant array cards. Through the test framework, it uniformly manages and executes test cases, reduces the number of interactions with the test host, improves testing efficiency, and reduces the workload and waste of testers.
It realizes automated integrated testing of RAID cards, improves testing efficiency, reduces the workload and resource waste of testers, and facilitates batch testing at granularity such as firmware system and subsystem to achieve unified output of test results.
Smart Images

Figure CN119988234A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a test method, device, system, redundant array of independent disks card, test host, computer program product and computer readable storage medium. Background Art
[0002] RAID (Redundant Array of Independent Disks) can combine multiple independent physical hard disks into a virtual single large-capacity hard disk in a specific way to provide higher storage performance, higher I / O (input / output) performance and reliability than a single hard disk. The main function of the RAID controller is to manage multiple hard disk drives and implement RAID-level data storage and data protection functions.
[0003] RAID card (RAID controller card), also known as RAID adapter or RAID controller, is a hardware device used to implement RAID technology to improve data security, performance and capacity. The firmware of the RAID card is a software program running in the RAID card, which is responsible for controlling and managing IP, and also provides different levels of data segmentation, redundancy, read and write, backup and recovery functions such as RAID 0 / 1 / 5 / 6.
[0004] At present, due to the complexity of RAID card firmware implementation, which may include multiple firmware systems, different testers often write test codes (i.e. test cases) for RAID card firmware integration testing separately, and there is no unified test framework, which leads to the following problems: First, there are a large number of similar redundant codes. As the number of test cases increases, the memory grows rapidly, resulting in memory overage; second, the test commands are not unified, and it is difficult to execute test cases in batches according to the granularity of firmware systems and subsystems, which is not convenient for development, debugging and automatic operation; third, the test result output is not unified, which is not convenient for docking automation. And if Figure 1 As shown, the host computer is responsible for test case management, test case distribution and test result statistics. The host computer executes all test cases in the test plan in sequence. A test case generally requires multiple interactions between the host computer and the firmware to complete, which occupies more host computer resources and slows the test speed.
[0005] Therefore, how to conveniently implement automated integrated testing of RAID cards, reduce the workload and resource waste of testers, and improve testing efficiency is a problem that urgently needs to be solved today. Summary of the invention
[0006] The purpose of the present invention is to provide a test method, device, system, redundant array of independent disks card, test host, computer program product and computer readable storage medium for a redundant array of independent disks card, so as to conveniently realize the automated integrated test of RAID cards, reduce the workload and resource waste of testers, and improve the test efficiency.
[0007] In order to solve the above technical problems, the present invention provides a test method of an independent disk redundant array card, which is applied to an independent disk redundant array card and comprises:
[0008] Obtain an integrated test command of a target firmware system sent by a test host; wherein the target firmware system is any firmware system of the independent disk redundant array card in the test framework, and the firmware system includes at least one of a core control system, an auxiliary control system, an independent disk redundant array control system, a power management system, a power failure protection recovery system, and a boot system;
[0009] According to the integrated test command, determine the target test case in the target subsystem in the test framework; wherein the target subsystem is the subsystem corresponding to the integrated test command under the target firmware system, and the target test case is the test case corresponding to the integrated test command registered under the target subsystem;
[0010] The target test case is executed using the test framework to obtain an integration test result of the integration test command, and the integration test result is sent to the test host.
[0011] On the other hand, determining a target test case in a target subsystem in the test framework according to the integrated test command includes:
[0012] If all test identifiers exist in the integrated test command, all subsystems under the target firmware system are determined as the target subsystems, and all test cases under each of the target subsystems are determined as the target test cases;
[0013] If the integrated test command contains a current subsystem identifier and does not contain a test case identifier corresponding to the current subsystem identifier, the current subsystem corresponding to the current subsystem identifier under the target firmware system is determined as the target subsystem, and all test cases under the target subsystem are determined as the target test cases; wherein the current subsystem is any subsystem under the target firmware system, and the current subsystem identifier is the identifier of the current subsystem;
[0014] If the current subsystem identifier exists in the integrated test command and there is a current test case identifier corresponding to the current subsystem identifier, the current subsystem corresponding to the current subsystem identifier under the target firmware system is determined as the target subsystem, and the current test case corresponding to the current test case identifier under the current subsystem is determined as the target test case; wherein the current test case is any test case under the current subsystem, and the current test case identifier is the identifier of the current test case.
[0015] On the other hand, executing the target test case using the test framework to obtain the integration test result of the integration test command includes:
[0016] If the current subsystem identifier and the current test case identifier exist in the integrated test command and there are custom test parameters corresponding to the current test case identifier, then the current test case is executed according to the custom test parameters using the test framework to obtain an integrated test result of the current test case;
[0017] If the current subsystem identifier and the current test case identifier exist in the integration test command and there are no custom test parameters corresponding to the current test case identifier, the test framework is used to execute the target test case according to the default test parameters of the current test case to obtain the integration test result of the current test case.
[0018] On the other hand, when a subsystem identifier exists in the integrated test command, the number of subsystem identifiers in the integrated test command is 1; when a test case identifier exists in the integrated test command, the number of test case identifiers in the integrated test command is 1.
[0019] On the other hand, the target firmware system is the core control system, and the subsystems under the core control system in the test framework include a host subsystem, an independent disk redundant array acceleration subsystem, a hardware engine interaction subsystem, a landing subsystem, and at least one of an operating system and a central processing unit subsystem.
[0020] On the other hand, executing the target test case using the test framework to obtain the integration test result of the integration test command includes:
[0021] Utilizing the test framework, the target test cases are executed according to the preset platform information of each target test case and the preset test strategy to obtain the integrated test result of the integrated test command; wherein the preset test strategy specifies the execution order of all subsystems under the target firmware system.
[0022] On the other hand, sending the integration test result to the test host includes:
[0023] Generate a custom asynchronous event request corresponding to the integration test result;
[0024] The custom asynchronous event request is sent to the test host.
[0025] On the other hand, obtaining the integrated test command of the target firmware system sent by the test host includes:
[0026] Receiving a non-volatile memory host controller interface specification command sent by the test host;
[0027] If the data transmission direction of the non-volatile memory host controller interface specification command is 0x1, and the operation code value is a preset operation code, it is determined that the non-volatile memory host controller interface specification command is the integrated test command; wherein the preset operation code is a value between 0XC0 and 0xFF.
[0028] In another aspect, the method further comprises:
[0029] Obtaining a test case registration command sent by a test host; wherein the test case registration command includes a test case to be registered and a test case identifier, a subsystem identifier, preset platform information, and default test parameters corresponding to the test case to be registered;
[0030] According to the use case registration command, the test case to be registered is added to the test case set under the subsystem corresponding to the registration subsystem identifier in the test framework, and the registration information of the test case to be registered is registered in the test framework; wherein the registration information includes the test case identifier, subsystem identifier, preset platform information and default test parameters corresponding to the test case to be registered.
[0031] On the other hand, the registering the registration information of the test case to be registered includes:
[0032] The registration information of the test case to be registered is registered in the test framework in a symbol table manner according to the predicted hierarchical relationship; wherein the predicted hierarchical relationship is a hierarchical relationship from each firmware system to its corresponding subsystem in the test framework.
[0033] The present invention also provides a test device for an independent disk redundant array card, which is applied to an independent disk redundant array card and comprises:
[0034] A test acquisition module is used to acquire an integrated test command of a target firmware system sent by a test host; wherein the target firmware system is any firmware system of the independent disk redundant array card in the test framework, and the firmware system includes at least one of a core control system, an auxiliary control system, an independent disk redundant array control system, a power management system, a power failure protection recovery system, and a boot system;
[0035] A test determination module, used to determine a target test case in a target subsystem in the test framework according to the integrated test command; wherein the target subsystem is a subsystem corresponding to the integrated test command under the target firmware system, and the target test case is a test case corresponding to the integrated test command registered under the target subsystem;
[0036] The test execution module is used to execute the target test case using the test framework, obtain the integration test result of the integration test command, and send the integration test result to the test host.
[0037] The present invention also provides an independent disk redundant array card, comprising:
[0038] Memory for storing computer programs;
[0039] The processor is used to implement the steps of the above-mentioned method for testing the redundant array of independent disks card when executing the computer program.
[0040] The present invention also provides a method for testing an independent disk redundant array card, which is applied to a test host and comprises:
[0041] Acquire test selection information of the redundant array of independent disks card; wherein the test selection information includes case selection information of a target test case under a target subsystem under a target firmware system, the target firmware system is any firmware system of the redundant array of independent disks card, and the target subsystem is a subsystem under the target firmware system where the target test case is located;
[0042] Generate an integrated test command for the target firmware system according to the test selection information, and send the integrated test command to the redundant array of independent disks card, so that the redundant array of independent disks card executes the target test case using a test framework to obtain an integrated test result of the integrated test command;
[0043] Receive the integration test result sent by the independent disk redundant array card.
[0044] On the other hand, the receiving the integration test result sent by the independent disk redundant array card includes:
[0045] Receiving a custom asynchronous event request corresponding to the integration test result sent by the independent disk redundant array card;
[0046] The integration test result corresponding to the custom asynchronous event request is obtained by requesting the log page command.
[0047] On the other hand, if the use case selection information in the test selection information is selection information of all test cases under the target firmware system, the integrated test command includes all test identifiers;
[0048] If the use case selection information in the test selection information is selection information of all test cases of the current subsystem under the target firmware system, the integrated test command includes a current subsystem identifier; wherein the current subsystem is any subsystem under the target firmware system, and the current subsystem identifier is an identifier of the current subsystem;
[0049] If the use case selection information in the test selection information is the selection information of the current test case of the current subsystem under the target firmware system, then the integrated test command includes a current subsystem identifier and a current test case identifier; wherein, the current test case is any test case under the current subsystem, and the current test case identifier is the identifier of the current test case.
[0050] In another aspect, the method further comprises:
[0051] Acquire the test case to be registered of the redundant array of independent disks card and the test case configuration information of the test case to be registered; wherein the test case configuration information includes the test case identifier, subsystem identifier, preset platform information and default test parameters corresponding to the test case to be registered;
[0052] Generate a test case registration command for the test case to be registered according to the test case to be registered and the test case configuration information;
[0053] The test case registration command is sent to the redundant array of independent disks card to register the test case to be registered in the test framework.
[0054] On the other hand, the step of obtaining the test case to be registered of the redundant array of independent disks card and the test case configuration information of the test case to be registered includes:
[0055] According to the acquired adaptation selection information, the subsystem identification and preset platform information in the use case configuration information are determined; wherein the adaptation selection information includes the subsystem selection information and the test platform selection information corresponding to the test case to be registered.
[0056] The present invention also provides a test device for an independent disk redundant array card, which is applied to a test host and comprises:
[0057] An information acquisition module is used to acquire test selection information of an independent disk redundant array card; wherein the test selection information includes case selection information of a target test case under a target subsystem under a target firmware system, wherein the target firmware system is any firmware system of the independent disk redundant array card, and the target subsystem is a subsystem under the target firmware system where the target test case is located;
[0058] A command generation module, configured to generate an integrated test command for the target firmware system according to the test selection information, and send the integrated test command to the redundant array of independent disks card, so that the redundant array of independent disks card executes the target test case using a test framework to obtain an integrated test result of the integrated test command;
[0059] The test receiving module is used to receive the integration test result sent by the independent disk redundant array card.
[0060] The present invention also provides a test host, comprising:
[0061] Memory for storing computer programs;
[0062] The processor is used to implement the steps of the above-mentioned method for testing the redundant array of independent disks card when executing the computer program.
[0063] The present invention also provides a test system for an independent redundant array of disks card, comprising: the independent redundant array of disks card as described above and the test host as described above.
[0064] The present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned test method for an independent disk redundant array card or an independent disk redundant array card of a test host.
[0065] In addition, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the test method for an independent redundant array of independent disks card or an independent redundant array of independent disks card of a test host as described above are implemented.
[0066] The present invention provides a test method for an independent disk redundant array card, which is applied to the independent disk redundant array card and comprises: obtaining an integrated test command of a target firmware system sent by a test host; wherein the target firmware system is any firmware system of the independent disk redundant array card in a test framework, and the firmware system comprises at least one of a core control system, an auxiliary control system, an independent disk redundant array control system, a power management system, a power failure protection recovery system and a boot system; determining a target test case in a target subsystem in the test framework according to the integrated test command; wherein the target subsystem is a subsystem corresponding to the integrated test command under the target firmware system, and the target test case is a test case corresponding to the integrated test command registered under the target subsystem; and executing the target test case by using the test framework to obtain an integrated test result of the integrated test command, and sending the integrated test result to the test host.
[0067] It can be seen that the present invention can reduce the number of interactions with the test host and improve the test efficiency by setting the test framework in the RAID card, and the test framework can uniformly distribute and execute test cases and judge and count test results. The setting of the test framework can reduce redundant code when writing test cases, reduce the workload and resource waste of testers, and facilitate batch testing at the granularity of firmware systems and subsystems, realize the unified output of test results, and conveniently realize the automated integrated testing of the RAID card docking test host. In addition, the present invention also provides a test device for an independent disk redundant array card applied to an independent disk redundant array card, a test method and device for an independent disk redundant array card applied to a test host, a test system for an independent disk redundant array card, an independent disk redundant array card, a test host, a computer program product and a computer-readable storage medium, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0069] Figure 1 A schematic diagram of a system framework for test case management of a RAID card;
[0070] Figure 2 A flowchart of a method for testing a redundant array of independent disks card provided by an embodiment of the present invention;
[0071] Figure 3 A schematic diagram of the structure of a test system for a redundant array of independent disks card provided by an embodiment of the present invention;
[0072] Figure 4 A display diagram of test case registration under a core control system in a test framework provided by an embodiment of the present invention;
[0073] Figure 5 A schematic flow chart of another method for testing a redundant array of independent disks card provided by an embodiment of the present invention;
[0074] Figure 6 A diagram showing a registration format of a test case provided by an embodiment of the present invention;
[0075] Figure 7 A flow chart of a test method for a redundant array of independent disks card applied to a test host provided by an embodiment of the present invention;
[0076] Figure 8 A structural block diagram of a test device for a redundant array of independent disks card provided by an embodiment of the present invention;
[0077] Fig. 9 A schematic diagram of the structure of a redundant array of independent disks card provided by an embodiment of the present invention;
[0078] Fig.10 A structural block diagram of another test device for a redundant array of independent disks card provided by an embodiment of the present invention;
[0079] Fig.11 A schematic diagram of the structure of a test host provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0080] 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0081] Please refer to Figure 2 , Figure 2 A flowchart of a method for testing a redundant array of independent disks card provided by an embodiment of the present invention. The method is applied to a RAID card and may include:
[0082] Step 101: Obtain an integrated test command of a target firmware system sent by a test host.
[0083] Among them, the target firmware system is any firmware system of the independent disk redundant array card in the test framework, and the firmware system includes at least one of the core control system, auxiliary control system, independent disk redundant array control system, power management system, power failure protection recovery system and boot system.
[0084] It can be understood that the test host in this embodiment can be a host device (such as a RAID card) for controlling the test of the RAID card (ie, a redundant array of independent disks card). Figure 1 The host computer in the test host can communicate with the RAID card, such as the test host can communicate with the RAID card through the NVMe (Non-Volatile Memory Host Controller Interface Specification) interface, such as Figure 3 As shown, the RAID card can communicate with the test host using the NVMe test interface layer. The target firmware system in this embodiment can be a firmware system that needs to be tested, that is, all or part of the subsystems (i.e., the target subsystem) in the target firmware system need to be tested by executing the test case (i.e., the target test case) corresponding to the integrated test command.
[0085] Correspondingly, for the specific type of the target firmware system in this embodiment, such as the specific number and type of the firmware system in the RAID card, the designer can set it according to the practical scenario and user needs. For example, the firmware system in the RAID card may include at least one of a core control system, an auxiliary control system, a redundant array of independent disks (RAID) control system, a power management system, a power failure protection recovery system, and a boot system; Figure 3 As shown, the firmware system in the RAID card may include a core control system, an auxiliary control system, a RAID control system, a power management system, a power-off protection and recovery system, and a boot system; among them, the core control system may be responsible for core control and data processing; the auxiliary control system may be responsible for system and interface communication, firmware upgrades, and system debugging control, etc.; the RAID control system may be responsible for user command processing and product form settings, etc. The power management system may be responsible for powering each system of the RAID card; the power-off protection and recovery system may be responsible for data protection when the system is abnormally powered off and data recovery when the system is powered on; the boot system may be responsible for loading other firmware systems, exiting after loading, and handing over control to the auxiliary control system.
[0086] Accordingly, due to the complex internal processing flow of the firmware of the RAID card, in order to achieve complete, reliable and high-quality functions within a shorter R&D cycle, it is necessary to set up protection strategies step by step from the inside of each small module to the inside of the subsystem and then between subsystems. Layer-by-layer testing is an indispensable link. Unit testing is generally used to verify the smallest testable unit (usually a function or method) in the software to ensure the correctness of the internal logic of each module. Integration testing combines multiple units together for testing to ensure the correctness of functional integration between multiple modules within the subsystem and the correctness of functional integration between multiple subsystems, as well as the functional correctness of software and hardware interactions. The integration test command in this embodiment can be a command to control the execution of corresponding test cases (i.e., integration test cases) to implement corresponding integration testing.
[0087] It should be noted that this embodiment is demonstrated by taking the integrated testing of all or part of the subsystems in a certain firmware system (i.e., the target firmware system) inside the RAID card as an example. The integrated testing of multiple firmware systems and the unit testing in the firmware system can be implemented in the same or similar manner as the method provided in this embodiment, and this embodiment does not impose any restrictions on this.
[0088] Among them, the specific method for the RAID card to obtain the integrated test command of the target firmware system sent by the test host in this step can be set by the designer. For example, the RAID card can receive the NMVe command sent by the test host; if the data transmission direction of the NMVe command is 0x1, and the operation code value is a preset operation code, then the non-volatile memory host controller interface specification command is determined to be an integrated test command; wherein the preset operation code is a value between 0XC0 and 0xFF. That is to say, in this embodiment, the NVMe protocol standard can be referred to to extend a custom NVMe command as an integrated test command: the data transmission direction is 0x1 (indicating host to controller, i.e., host to RAID card), and the Opcode value is between 0XC0-0xFF; such as Figure 3 As shown, the RAID card can utilize the NVMe test interface layer to parse the NMVe command. If it is a customized integrated test command, it is further parsed to determine the target test case.
[0089] For example, the opcode value in the integrated test commands of different firmware systems can be the same preset opcode, that is, the integrated test command can include a firmware system identifier (such as a firmware system name) to determine the target firmware system; the opcode value in the integrated test commands of different firmware systems can also be different preset opcodes, that is, the RAID card can determine the target firmware system through the opcode value in the NMVe command.
[0090] Step 102: Determine the target test case in the target subsystem in the test framework according to the integrated test command; wherein the target subsystem is the subsystem corresponding to the integrated test command under the target firmware system, and the target test case is the test case corresponding to the integrated test command registered under the target subsystem.
[0091] It can be understood that in this embodiment, the RAID card can parse the acquired integrated test command to determine the test case (i.e., target test case) to be used by the test subsystem (i.e., target subsystem) under the target firmware system in the test framework, that is, the test case registered in the test framework corresponding to the integrated test command.
[0092] Among them, the target subsystem in this embodiment is the subsystem that needs to be tested under the target firmware system. The specific type of the target subsystem in this embodiment, that is, the specific number and type of subsystems in each firmware system in the RAID card, can be set by the designer according to practical scenarios and user needs. For example, the setting method of the subsystem in the firmware system of the RAID card in the related technology can be used. For example, when the target firmware system is the core control system, the core control system can include a host subsystem, a redundant array of independent disks (RAID) acceleration subsystem, a hardware engine interaction subsystem, a plate landing subsystem, and at least one of an operating system (OS) and a central processing unit (CPU) subsystem. Figure 4 As shown in the figure, the subsystems under the core control system in the test framework (integrated test framework) include the host subsystem, RAID acceleration subsystem, hardware engine interaction subsystem, plate drop subsystem, and OS and CPU subsystem. Among them, the host subsystem can be used to test the interaction process between the firmware of the RAID card and the host, including NVMe device initialization, path test of the host sending control commands, and path test of the host sending data commands. The RAID acceleration subsystem can be used to test the business configuration of the control plane of each scenario and the IO processing process of the data plane, including RAID management, normal IO processing, abnormal IO processing, and foreground and background task processing. The hardware engine interaction subsystem can be used to test the software and hardware interaction process related to the hardware engine, including hardware engine initialization, data path and abnormal processing, etc., to verify the processing process of PRP (physical region page) handling, RAID deformation and RAID calculation related algorithm engine. The plate drop subsystem can be used to test the interaction process with SSD (solid state drive) disk, including the processing of management commands and data commands, as well as the management of some disk status information. The OS and CPU subsystems can be used to test the functions and interface internal logic of the integrated components of the operating system and CPU subsystem in each test platform.
[0093] Correspondingly, the specific settings of the integrated test command in this embodiment can be set by the designer. For example, when the test case is registered to the test framework according to the hierarchical relationship between the firmware system and the subsystem, the integrated test command can be set in the following manner. For example, when it is necessary to test all test cases of the target firmware system, the integrated test command can include all test identifiers (such as all), for example, the integrated test command can be IT_RUN all; when it is necessary to test all test cases of a subsystem in the target firmware system, the integrated test command can include the identifier of the subsystem (such as the subsystem name), for example, the integrated test command can be IT_RUN subsystem name; when it is necessary to test a test case of a subsystem in the target firmware system, the integrated test command can include the identifier of the subsystem and the identifier of the test case (such as the test case name), for example, the integrated test command can be IT_RUN use case name; when it is necessary to test a test case of a subsystem in the target firmware system and use non-default test parameters, the integrated test command can include the identifier of the subsystem, the identifier of the test case and the custom test parameters, for example, the integrated test command can be IT_RUN use case name [parameter 1, parameter 2, ..., parameter n].
[0094] Correspondingly, the specific method for the RAID card in this step to determine the target test case in the target subsystem in the test framework according to the integrated test command can be set by the designer according to the practical scenario and user needs. For example, when all test identifiers exist in the integrated test command, the RAID card can determine all subsystems under the target firmware system as target subsystems, and determine all test cases under each target subsystem as target test cases. When there is a current subsystem identifier in the integrated test command and there is no test case identifier corresponding to the current subsystem identifier, the current subsystem corresponding to the current subsystem identifier under the target firmware system is determined as the target subsystem, and all test cases under the target subsystem are determined as target test cases; wherein the current subsystem is any subsystem under the target firmware system, and the current subsystem identifier is the identifier of the current subsystem.
[0095] That is to say, the RAID card can parse the integrated test command to obtain parsing parameters; according to the parsing parameters, the target test case is determined. Figure 2 As shown, the RAID card can use the NVMe test interface layer to parse the integrated test command and obtain the parsing parameters; if the test case name in the parsing parameter and the parameter list are empty, all test cases of the corresponding subsystem are executed according to the subsystem name; in particular, if the subsystem name is all, all test cases in the target firmware system are executed.
[0096] Correspondingly, the present embodiment does not limit the number of subsystem identifiers and test case identifiers in each integrated test command. For example, in some embodiments, when a subsystem identifier exists in an integrated test command, the number of subsystem identifiers in the integrated test command may be 1; when a test case identifier exists in an integrated test command, the number of test case identifiers in the integrated test command may be 1; that is, each integrated test command may control the execution of all or one test case in a subsystem. In other embodiments, when a subsystem identifier exists in an integrated test command, the number of subsystem identifiers in the integrated test command may be greater than 1; when a test case identifier exists in an integrated test command, the number of test case identifiers in the integrated test command may be greater than 1; that is, each integrated test command may control the execution of all or part of the test cases in multiple subsystems.
[0097] Step 103: Execute the target test case using the test framework, obtain the integration test result of the integration test command, and send the integration test result to the test host.
[0098] It is understandable that in this step, the RAID card can use the test framework to execute the target test case registered in the test framework, obtain the integrated test result of the integrated test command, and send the integrated test result to the test host to realize the automated integrated test of the RAID card.
[0099] Among them, for the specific method of the RAID card using the test framework to execute the target test case in this step and obtain the integrated test result of the integrated test command, it can be set by the designer. For example, when the target test case is all the test cases in the target firmware system or the target subsystem, the RAID card can use the default test parameters of each test case to execute each target test case and obtain the integrated test result of each target test case; when there is a current subsystem identifier and a current test case identifier in the integrated test command and there is no custom test parameter corresponding to the current test case identifier, the RAID card can use the test framework to execute the target test case according to the default test parameter of the current test case and obtain the integrated test result of the current test case; when there is a current subsystem identifier and a current test case identifier in the integrated test command and there is a custom test parameter corresponding to the current test case identifier, the RAID card can use the test framework to execute the current test case according to the custom test parameter and obtain the integrated test result of the current test case. That is to say, the registration information of each test case registered in the test framework can not only include the test case identifier and subsystem identifier corresponding to each test case, but also include the default test parameters corresponding to each test case, so that when the custom test parameters are not specified, the default test parameters are used for testing.
[0100] Correspondingly, the registration information of each test case registered in the test framework may also include the platform information (i.e., preset platform information) corresponding to each test case, so that the test framework can use the corresponding test platform to execute the test case by adding the platform information when registering the test case. That is to say, in this step, the RAID card can use the test framework to execute the current target test case according to the preset platform information of the current target test case, and obtain the integrated test result of the integrated test command.
[0101] Correspondingly, for the case where there are multiple target test cases, such as the target test cases are all the test cases of the target firmware system, in this step, the RAID card can use the test framework to execute the target test cases according to the preset platform information of each target test case and the preset test strategy to obtain the integrated test result of the integrated test command; wherein, the preset test strategy can specify the execution order of all subsystems under the target firmware system to test each subsystem in turn. Further, the RAID card can use the test framework to determine and execute the target test case set corresponding to the test platform according to the preset platform information of the currently running test platform and the target test case in the current target subsystem; wherein, the current target subsystem can be a target subsystem of the current test determined according to the preset test strategy, and the target test case set is a collection of all target test cases whose preset platform information under the current target subsystem corresponds to the test platform; by using the configuration of the preset platform information, the test framework can automatically select relevant test cases according to the currently running test platform to improve the test efficiency.
[0102] It should be noted that the test framework of the RAID card in this embodiment can provide a unified test result judgment interface and record the integrated test results so that the test framework can uniformly feedback the integrated test results to the test host, such as the integrated test results of the firmware system, subsystem or single test case.
[0103] Correspondingly, the specific method for the RAID card to send the integrated test results to the test host using the test framework in this step can be set by the designer, such as the test framework can generate a custom asynchronous event request corresponding to the integrated test results; the custom asynchronous event request is sent to the test host to notify the test host to obtain the integrated test results from the RAID card by means of an asynchronous event request, further reducing the interaction process between the RAID card and the test host. For example, after the integrated test case is executed, the NVMe test interface layer in the firmware of the RAID card can notify the test host to obtain the integrated test results through a custom asynchronous event request; referring to the NVMe protocol standard, the Asynchronous Event Type value in the Asynchronous Event Request can be a custom 111b, which can be used to notify the test host to obtain the integrated test results, that is, the custom asynchronous event request can be an NVMe request with an asynchronous event type value of 111b. Correspondingly, after receiving the custom asynchronous event request, the test host can obtain the complete integrated test results from the RAID card through the Get Log Page command.
[0104] For example, the test flow for executing all test cases of the core control system of the RAID card can be as follows Figure 5 As shown, in the first step, the test host sends the NVMe custom integration test command (i.e., the integration test command). In the second step, the NVMe test interface layer is used to parse the integration test command to obtain IT_RUN all, that is, the subsystem name is all, and the use case name and parameter list are empty. In the third step, the test framework is used to execute all test cases of the core control system, including the host subsystem, RAID acceleration subsystem, hardware engine interaction subsystem, drop subsystem, and test cases under the OS and CPU subsystems, and the test results are counted; the test framework can specify the execution order of each subsystem based on the preset test strategy. In the fourth step, the NVMe test interface layer in the firmware notifies the test host to obtain the integration test results through a custom asynchronous event request; in the fifth step, after the host receives the asynchronous event request, it obtains the integration test results through the Get Log Page command. All firmware-level test cases can be executed through a custom NVMe integrated test command, which is used to automatically monitor the quality of software versions during the development process. The test time for all cases can be reduced from 3-4 hours to 30 minutes. This can not only effectively save manpower and time costs in the development and testing process, but also help to expose code defects and software-hardware interaction problems as early as possible, which can further accelerate the development progress of RAID card firmware.
[0105] Furthermore, the method provided in this embodiment may also include a registration process of test cases in the test framework of the RAID card. For example, the RAID card may obtain a test case registration command sent by the test host; wherein the test case registration command includes the test case to be registered and the test case identifier, subsystem identifier, preset platform information, and default test parameters corresponding to the test case to be registered; according to the test case registration command, the test case to be registered is added to the test case set under the subsystem corresponding to the registered subsystem identifier in the test framework, and the registration information of the test case to be registered is registered in the test framework; wherein the registration information includes the test case identifier, subsystem identifier, preset platform information, and default test parameters corresponding to the test case to be registered.
[0106] Correspondingly, the above-mentioned process of registering the registration information of the test case to be registered may include: registering the registration information of the test case to be registered in the test framework in a symbol table manner according to the predicted hierarchical relationship; wherein the predicted hierarchical relationship is the hierarchical relationship from each firmware system to the corresponding subsystem in the test framework. In other words, the test case of the firmware system of the RAID card can be registered in the test framework in a symbol table manner according to the hierarchical relationship between the firmware system and the subsystem; the registration format of the test case (i.e., the format of the registration information) can be as follows Figure 6 As shown, it includes the subsystem name (i.e., subsystem identifier), use case name (test case identifier), test platform (i.e., preset platform information), and default test parameters (parameter 0-parameter n). Since the firmware system of the RAID card contains multiple test platforms, such as some test platforms based on software simulation of hardware IP (Internet Protocol) functions, they can only be used to verify software logic; some test platforms may only contain part of the hardware IP and can only test some test cases of software and hardware interaction; according to the test platform running the test case, adding preset platform information when registering the test case can facilitate the test framework to automatically select the relevant use case set according to the currently running test platform. And adding default test parameters during registration can facilitate debugging and automatic operation; accordingly, specific custom test parameters can also be entered according to test needs to execute test cases.
[0107] It should be noted that in this embodiment, each firmware system of the RAID card (such as Figure 4 Multiple test cases corresponding to different test platforms under each subsystem in the core control system shown in Figure 4 Test case 1-test case n in the test case registration method of the core control system of the RAID card is as follows Figure 4As shown in the figure, the test cases are registered to the test framework according to the subsystems they belong to. The test cases are registered with default parameters (i.e. default test parameters) to facilitate one-click execution of all test cases for a certain firmware system or a certain subsystem. By setting up a unified test framework in the RAID card, only one test script needs to be written to adapt to multiple firmware systems and multiple test platforms, which can not only avoid Figure 1 As shown, different test case sets are written for different test platforms (i.e., corresponding to different test plans), and the host side distributes test cases during testing, which significantly reduces the interaction between the test host and the RAID card, saves test host resources, and improves test efficiency.
[0108] In this embodiment, the embodiment of the present invention sets up a test framework in the RAID card, and the test framework uniformly distributes and executes test cases and judges and counts test results, which can reduce the number of interactions with the test host and improve test efficiency. In addition, the setting of the test framework can reduce redundant code when writing test cases, reduce the workload and resource waste of testers, and facilitate batch testing at the granularity of firmware systems and subsystems, realize unified output of test results, and conveniently realize automated integrated testing of the RAID card docking with the test host.
[0109] Based on the above embodiments, the embodiments of the present invention further provide a test method for a redundant array of independent disks card applied to a test host, so as to realize the test control of a RAID card. The test method for a redundant array of independent disks card applied to a test host described below and the test method for a redundant array of independent disks card applied to a redundant array of independent disks card described above can be referred to each other.
[0110] Please refer to Figure 7 , Figure 7 A flowchart of a method for testing a redundant array of independent disks card of a test host provided by an embodiment of the present invention. The method is applied to the test host and may include:
[0111] Step 201: Acquire test selection information of a redundant array of independent disks card.
[0112] The test selection information includes case selection information of a target test case under a target subsystem under a target firmware system, the target firmware system is any firmware system of an independent disk redundant array card, and the target subsystem is a subsystem under the target firmware system where the target test case is located.
[0113] It is understandable that the test selection information in this step can be the selection configuration information for testing the RAID card. The specific content of the test selection information can be set by the designer according to the practical scenario and user needs. For example, the test selection information can include the use case selection information of the target test case under the target subsystem under the target firmware system, that is, the use case selection information of the test case (i.e., the target test case) that needs to be executed when testing the target subsystem in the target firmware system; it can also include the custom test parameters corresponding to the target test case, so as to execute the corresponding target test case according to the custom test parameters.
[0114] For example, when the tester needs to test all test cases of the target firmware system, the test case selection information in the test selection information can be the selection information of all test cases under the target firmware system, such as directly selecting the test target as a certain firmware system; when the tester needs to test all test cases of a subsystem (i.e., the current subsystem) in the target firmware system, the test case selection information in the test selection information can be the selection information of all test cases of the current subsystem under the target firmware system, such as directly selecting the test target as a subsystem under a certain firmware system. When the tester needs to test a test case under a subsystem, the test case selection information in the test selection information can be the selection information of the current test case of the current subsystem under the target firmware system, such as selecting the test target as a test case.
[0115] Step 202: Generate an integrated test command of the target firmware system according to the test selection information, and send the integrated test command to the redundant array of independent disks card, so that the redundant array of independent disks card executes the target test case using the test framework to obtain an integrated test result of the integrated test command.
[0116] It can be understood that in this step, the test host can generate corresponding integrated test commands according to the test selection information and send them to the RAID card, so that the RAID card can use the test framework to execute corresponding test cases (i.e., target test cases) and obtain the integrated test results of the integrated test commands.
[0117] Correspondingly, the specific manner in which the test host generates the integrated test command of the target firmware system according to the test selection information in this step, that is, the specific parameter content in the integrated test command, can be set by the designer. For example, when the use case selection information in the test selection information is the selection information of all test cases under the target firmware system, the generated integrated test command can include all test identifiers; when the use case selection information in the test selection information is the selection information of all test cases of the current subsystem under the target firmware system, the generated integrated test command can include the current subsystem identifier; wherein, the current subsystem is any subsystem under the target firmware system, and the current subsystem identifier is the identifier of the current subsystem; when the use case selection information in the test selection information is the selection information of the current test case of the current subsystem under the target firmware system, the generated integrated test command can include the current subsystem identifier and the current test case identifier; wherein, the current test case is any test case under the current subsystem, and the current test case identifier is the identifier of the current test case.
[0118] Correspondingly, when the use case selection information in the test selection information is the selection information of the current test case of the current subsystem under the target firmware system, and the test selection information also includes custom test parameters corresponding to the current test case, the generated integrated test command can also include custom test parameters corresponding to the current test case identifier.
[0119] Step 203: Receive the integration test result sent by the redundant array of independent disks card.
[0120] Among them, in this step, the test host can obtain the integrated test result corresponding to the integrated test command from the RAID card. For example, in order to reduce the interaction with the RAID card, in this step, the test host can obtain the integrated test result from the RAID card after receiving the custom asynchronous event request corresponding to the integrated test result sent by the RAID card; for example, in this step, the test host can receive the custom asynchronous event request corresponding to the integrated test result sent by the independent disk redundant array card; obtain the integrated test result corresponding to the custom asynchronous event request through the GetLog Page (request log page) command.
[0121] Furthermore, the method provided in this embodiment may also include a process in which the test host registers the test case to the test framework of the RAID card; for example, the test host may obtain the test case to be registered of the independent disk redundant array card and the test case configuration information of the test case to be registered; wherein the test case configuration information includes the test case identifier, subsystem identifier, preset platform information and default test parameters corresponding to the test case to be registered; according to the test case to be registered and the test case configuration information, a test case registration command of the test case to be registered is generated; and the test case registration command is sent to the independent disk redundant array card to register the test case to be registered in the test framework.
[0122] Correspondingly, the above process of obtaining the test cases to be registered and the case configuration information of the test cases to be registered of the independent disk redundant array card can directly receive the test cases to be registered and the case configuration information of the test cases to be registered. In order to facilitate the configuration of the test cases, the test host in this embodiment can also determine the subsystem identification and preset platform information in the case configuration information according to the obtained adaptation selection information; wherein, the adaptation selection information includes the subsystem selection information and the test platform selection information corresponding to the test cases to be registered; that is, the user can select the subsystem required to be tested and the test platform to be executed for the test case (i.e., the test case to be registered) that needs to be registered currently according to the needs, so as to achieve the adaptation of the same test case to multiple firmware systems (or subsystems) and multiple test platforms, without having to write test cases separately for different test platforms. For example, the number of subsystems corresponding to a test case to be registered in the subsystem selection information can be greater than or equal to 2; the number of subsystems corresponding to a test case to be registered in the test platform selection information can be greater than or equal to 2.
[0123] In this embodiment, the embodiment of the present invention generates an integrated test command of the target firmware system according to the test selection information, and sends the integrated test command to the independent disk redundant array card, so as to control the RAID card to execute the target test case by using the test framework, obtain the integrated test result of the integrated test command, and realize the control of the distribution and execution of the test case of the test framework in the RAID card, thereby reducing the number of interactions with the RAID card and improving the test efficiency; and through the setting of the test framework in the RAID card, it is possible to reduce the redundant code when writing the test case, reduce the workload and resource waste of the test personnel, and facilitate batch testing at the granularity of the firmware system and subsystem, realize the unified output of the test results, and conveniently realize the automated integrated testing of the RAID card docking test host.
[0124] Corresponding to the above method embodiment, an embodiment of the present invention further provides a test device for a RAID card applied to a RAID card. The test device for a RAID card applied to a RAID card described below and the test method for a RAID card applied to a RAID card described above can refer to each other.
[0125] Please refer to Figure 8 , Figure 8 This is a structural block diagram of a test device for a redundant array of independent disks card provided by an embodiment of the present invention. The device is applied to a RAID card and may include:
[0126] The test acquisition module 10 is used to acquire the integrated test command of the target firmware system sent by the test host; wherein the target firmware system is any firmware system of the independent disk redundant array card in the test framework, and the firmware system includes at least one of the core control system, the auxiliary control system, the independent disk redundant array control system, the power management system, the power failure protection recovery system and the boot system;
[0127] The test determination module 20 is used to determine the target test case in the target subsystem in the test framework according to the integrated test command; wherein the target subsystem is the subsystem corresponding to the integrated test command under the target firmware system, and the target test case is the test case corresponding to the integrated test command registered under the target subsystem;
[0128] The test execution module 30 is used to execute the target test case using the test framework, obtain the integrated test result of the integrated test command, and send the integrated test result to the test host.
[0129] In some embodiments, the test determination module 20 may include:
[0130] A first determination submodule is used to determine all subsystems under the target firmware system as target subsystems if all test identifiers exist in the integrated test command, and to determine all test cases under each target subsystem as target test cases;
[0131] The second determination submodule is used to determine the current subsystem corresponding to the current subsystem identifier under the target firmware system as the target subsystem if the integrated test command contains the current subsystem identifier and there is no test case identifier corresponding to the current subsystem identifier, and determine all test cases under the target subsystem as target test cases; wherein the current subsystem is any subsystem under the target firmware system, and the current subsystem identifier is the identifier of the current subsystem;
[0132] The third determination submodule is used to determine the current subsystem corresponding to the current subsystem identifier under the target firmware system as the target subsystem if there is a current subsystem identifier in the integrated test command and there is a current test case identifier corresponding to the current subsystem identifier, and determine the current test case corresponding to the current test case identifier under the current subsystem as the target test case; wherein the current test case is any test case under the current subsystem, and the current test case identifier is the identifier of the current test case.
[0133] In some embodiments, the test execution module 30 may include:
[0134] The custom test submodule is used to use the test framework to execute the current test case according to the custom test parameters if the current subsystem identifier and the current test case identifier exist in the integrated test command and there are custom test parameters corresponding to the current test case identifier, so as to obtain the integrated test result of the current test case;
[0135] The default test submodule is used to use the test framework to execute the target test case according to the default test parameters of the current test case if the current subsystem identifier and the current test case identifier exist in the integration test command and there are no custom test parameters corresponding to the current test case identifier, so as to obtain the integration test result of the current test case.
[0136] In some embodiments, when a subsystem identifier exists in the integrated test command, the number of subsystem identifiers in the integrated test command is 1; when a test case identifier exists in the integrated test command, the number of test case identifiers in the integrated test command is 1.
[0137] In some embodiments, the target firmware system is a core control system, and the subsystems under the core control system in the test framework include a host subsystem, an independent disk redundant array acceleration subsystem, a hardware engine interaction subsystem, a landing subsystem, and at least one of an operating system and a central processing unit subsystem.
[0138] In some embodiments, the test execution module 30 can be specifically used to utilize the test framework to execute the target test cases according to the preset platform information of each target test case and the preset test strategy to obtain the integrated test results of the integrated test command; wherein the preset test strategy specifies the execution order of all subsystems under the target firmware system.
[0139] In some embodiments, the test execution module 30 may include:
[0140] The request generation submodule is used to generate custom asynchronous event requests corresponding to the integration test results;
[0141] The request sending submodule is used to send custom asynchronous event requests to the test host.
[0142] In some embodiments, the test acquisition module 10 may include:
[0143] A command receiving submodule, used for receiving a non-volatile memory host controller interface specification command sent by a test host;
[0144] The test determination submodule is used to determine that the non-volatile memory host controller interface specification command is an integrated test command if the data transmission direction of the non-volatile memory host controller interface specification command is 0x1 and the operation code value is a preset operation code; wherein the preset operation code is a value between 0XC0 and 0xFF.
[0145] In some embodiments, the apparatus may further include:
[0146] A registration receiving module is used to obtain a test case registration command sent by a test host; wherein the test case registration command includes the test case to be registered and the test case identifier, subsystem identifier, preset platform information and default test parameters corresponding to the test case to be registered;
[0147] A registration module is used to add the test case to be registered to the test case set under the subsystem corresponding to the registration subsystem identifier in the test framework according to the test case registration command, and register the registration information of the test case to be registered in the test framework; wherein the registration information includes the test case identifier, subsystem identifier, preset platform information and default test parameters corresponding to the test case to be registered.
[0148] In some embodiments, the registration module may include:
[0149] The information registration submodule is used to register the registration information of the test case to be registered in the test framework in a symbol table manner according to the predicted hierarchical relationship; wherein the predicted hierarchical relationship is the hierarchical relationship from each firmware system to its corresponding subsystem in the test framework.
[0150] In this embodiment, the embodiment of the present invention sets up a test framework in the RAID card, and the test framework uniformly distributes and executes test cases and judges and counts test results, which can reduce the number of interactions with the test host and improve test efficiency. In addition, the setting of the test framework can reduce redundant code when writing test cases, reduce the workload and resource waste of testers, and facilitate batch testing at the granularity of firmware systems and subsystems, realize unified output of test results, and conveniently realize automated integrated testing of the RAID card docking with the test host.
[0151] Corresponding to the above method embodiment, the embodiment of the present invention further provides a RAID card. The RAID card described below and the RAID card testing method applied to the RAID card described above can refer to each other.
[0152] Please refer to Fig. 9 , Fig. 9 A schematic diagram of the structure of a redundant array of independent disks card provided by an embodiment of the present invention. The RAID card may include:
[0153] A memory D1, for storing computer programs;
[0154] The processor D2 is configured to implement the steps of the RAID card testing method applied to the RAID card provided in the above embodiment when executing the computer program.
[0155] Corresponding to the above method embodiment, an embodiment of the present invention further provides a testing device for a RAID card of a testing host. The testing device for a RAID card of a testing host described below and the testing method for a RAID card of a testing host described above can refer to each other.
[0156] Please refer to Fig.10 , Fig.10 This is a structural block diagram of another test device for a redundant array of independent disks card provided by an embodiment of the present invention. The device is applied to a test host and may include:
[0157] The information acquisition module 40 is used to acquire test selection information of the redundant array of independent disks card; wherein the test selection information includes case selection information of a target test case under a target subsystem under a target firmware system, the target firmware system is any firmware system of the redundant array of independent disks card, and the target subsystem is a subsystem under the target firmware system where the target test case is located;
[0158] The command generation module 50 is used to generate an integrated test command of the target firmware system according to the test selection information, and send the integrated test command to the independent disk redundant array card, so that the independent disk redundant array card executes the target test case using the test framework to obtain the integrated test result of the integrated test command;
[0159] The test receiving module 60 is used to receive the integrated test results sent by the independent disk redundant array card
[0160] In some embodiments, the test receiving module 60 may include:
[0161] A request receiving submodule, used for receiving a custom asynchronous event request corresponding to an integration test result sent by an independent disk redundant array card;
[0162] The test acquisition submodule is used to obtain the integration test results corresponding to the custom asynchronous event request through the request log page command.
[0163] In some embodiments, if the use case selection information in the test selection information is selection information of all test cases under the target firmware system, the integrated test command includes all test identifiers;
[0164] If the use case selection information in the test selection information is the selection information of all test cases of the current subsystem under the target firmware system, the integrated test command includes the current subsystem identifier; wherein the current subsystem is any subsystem under the target firmware system, and the current subsystem identifier is the identifier of the current subsystem;
[0165] If the use case selection information in the test selection information is the selection information of the current test case of the current subsystem under the target firmware system, the integrated test command includes the current subsystem identifier and the current test case identifier; wherein the current test case is any test case under the current subsystem, and the current test case identifier is the identifier of the current test case.
[0166] In some embodiments, the apparatus further comprises:
[0167] A registration acquisition module is used to acquire the test cases to be registered of the independent disk redundant array card and the test case configuration information of the test cases to be registered; wherein the test case configuration information includes the test case identifier, subsystem identifier, preset platform information and default test parameters corresponding to the test case to be registered;
[0168] A registration generation module, used to generate a case registration command for the test case to be registered according to the test case to be registered and the case configuration information;
[0169] The registration sending module is used to send the test case registration command to the independent disk redundant array card to register the test case to be registered in the test framework.
[0170] In some embodiments, the registration acquisition module can be specifically used to determine the subsystem identification and preset platform information in the use case configuration information based on the acquired adaptation selection information; wherein the adaptation selection information includes the subsystem selection information and test platform selection information corresponding to the test case to be registered.
[0171] In this embodiment, the embodiment of the present invention generates an integrated test command of the target firmware system according to the test selection information through the command generation module 50, and sends the integrated test command to the independent disk redundant array card, which can control the RAID card to use the test framework to execute the target test case, obtain the integrated test result of the integrated test command, and realize the control of the distribution and execution of the test case of the test framework in the RAID card, thereby reducing the number of interactions with the RAID card and improving the test efficiency; and through the setting of the test framework in the RAID card, it is possible to reduce redundant code when writing test cases, reduce the workload and resource waste of testers, and facilitate batch testing at the granularity of firmware systems and subsystems, realize unified output of test results, and conveniently realize the automated integrated testing of the RAID card docking test host.
[0172] Corresponding to the above method embodiment, the embodiment of the present invention further provides a test host. The test host described below and the test method of a RAID card applied to the test host described above can refer to each other.
[0173] Please refer to Fig.11 , Fig.11A schematic diagram of the structure of a test host provided by an embodiment of the present invention. The test host may include:
[0174] A memory D3, for storing computer programs;
[0175] The processor D4 is configured to implement the steps of the test method for the RAID card of the test host provided in the above embodiment when executing the computer program.
[0176] Corresponding to the above embodiment, the embodiment of the present invention further provides a test system for a RAID card. The test system for a RAID card described below and the RAID card and the test host described above can refer to each other.
[0177] A test system for a redundant array of independent disks card comprises: a RAID card as provided in the above embodiment and a test host as provided in the above embodiment.
[0178] The RAID card is connected to the test host for communication.
[0179] Corresponding to the above method embodiment, the embodiment of the present invention further provides a computer program product. The computer program product described below and the test method for the RAID card applied to the RAID card and the RAID card applied to the test host described above can be referred to each other.
[0180] A computer program product includes a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of the test method for a RAID card or a redundant array of independent disks card of a test host provided in the above embodiment are implemented.
[0181] Corresponding to the above method embodiment, the embodiment of the present invention further provides a computer-readable storage medium. The computer-readable storage medium described below and the test method for the RAID card applied to the RAID card and the RAID card applied to the test host described above can be referred to each other.
[0182] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the test method for a redundant array of independent disks card applied to a RAID card or a test host as provided in the above embodiment.
[0183] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device, system, RAID card, test host, computer program product and computer-readable storage medium disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0184] The above is a detailed introduction to the test method, device, system, independent disk redundant array card, test host, computer program product and computer readable storage medium of an independent disk redundant array card provided by the present invention. Specific examples are used in this article to illustrate the principle and implementation method of the present invention. The description of the above embodiment is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A method for testing a redundant array of independent disks card, characterized in that: Applicable to independent disk redundant array cards, including: Obtain an integrated test command of a target firmware system sent by a test host; wherein the target firmware system is any firmware system of the independent disk redundant array card in the test framework, and the firmware system includes at least one of a core control system, an auxiliary control system, an independent disk redundant array control system, a power management system, a power failure protection recovery system, and a boot system; According to the integrated test command, determine the target test case in the target subsystem in the test framework; wherein the target subsystem is the subsystem corresponding to the integrated test command under the target firmware system, and the target test case is the test case corresponding to the integrated test command registered under the target subsystem; The target test case is executed using the test framework to obtain an integration test result of the integration test command, and the integration test result is sent to the test host.
2. The method for testing a redundant array of independent disks card according to claim 1, characterized in that: Determining a target test case in a target subsystem in the test framework according to the integrated test command includes: If all test identifiers exist in the integrated test command, all subsystems under the target firmware system are determined as the target subsystems, and all test cases under each of the target subsystems are determined as the target test cases; If the integrated test command contains a current subsystem identifier and does not contain a test case identifier corresponding to the current subsystem identifier, the current subsystem corresponding to the current subsystem identifier under the target firmware system is determined as the target subsystem, and all test cases under the target subsystem are determined as the target test cases; wherein the current subsystem is any subsystem under the target firmware system, and the current subsystem identifier is the identifier of the current subsystem; If the current subsystem identifier exists in the integrated test command and there is a current test case identifier corresponding to the current subsystem identifier, the current subsystem corresponding to the current subsystem identifier under the target firmware system is determined as the target subsystem, and the current test case corresponding to the current test case identifier under the current subsystem is determined as the target test case; wherein the current test case is any test case under the current subsystem, and the current test case identifier is the identifier of the current test case.
3. The method for testing a redundant array of independent disks card according to claim 2, wherein: The using the test framework to execute the target test case to obtain the integration test result of the integration test command includes: If the current subsystem identifier and the current test case identifier exist in the integrated test command and there are custom test parameters corresponding to the current test case identifier, then the current test case is executed according to the custom test parameters using the test framework to obtain an integrated test result of the current test case; If the current subsystem identifier and the current test case identifier exist in the integration test command and there are no custom test parameters corresponding to the current test case identifier, the test framework is used to execute the target test case according to the default test parameters of the current test case to obtain the integration test result of the current test case.
4. The method for testing a redundant array of independent disks card according to claim 2, wherein: When there is a subsystem identifier in the integrated test command, the number of subsystem identifiers in the integrated test command is 1; when there is a test case identifier in the integrated test command, the number of test case identifiers in the integrated test command is 1.
5. The method for testing a redundant array of independent disks card according to claim 1, wherein: The target firmware system is the core control system, and the subsystems under the core control system in the test framework include a host subsystem, an independent disk redundant array acceleration subsystem, a hardware engine interaction subsystem, a landing subsystem, and at least one of an operating system and a central processing unit subsystem.
6. The method for testing a redundant array of independent disks card according to claim 1, wherein: The using the test framework to execute the target test case to obtain the integration test result of the integration test command includes: Utilizing the test framework, the target test cases are executed according to the preset platform information of each target test case and the preset test strategy to obtain the integrated test result of the integrated test command; wherein the preset test strategy specifies the execution order of all subsystems under the target firmware system.
7. The method for testing a redundant array of independent disks card according to claim 1, characterized in that: The sending the integration test result to the test host comprises: Generate a custom asynchronous event request corresponding to the integration test result; The custom asynchronous event request is sent to the test host.
8. The method for testing a redundant array of independent disks card according to claim 1, characterized in that: The step of obtaining the integrated test command of the target firmware system sent by the test host comprises: Receiving a non-volatile memory host controller interface specification command sent by the test host; If the data transmission direction of the non-volatile memory host controller interface specification command is 0x1, and the operation code value is a preset operation code, it is determined that the non-volatile memory host controller interface specification command is the integrated test command; wherein the preset operation code is a value between 0XC0 and 0xFF.
9. The method for testing a redundant array of independent disks card according to any one of claims 1 to 8, characterized in that: Also includes: Obtaining a test case registration command sent by a test host; wherein the test case registration command includes a test case to be registered and a test case identifier, a subsystem identifier, preset platform information, and default test parameters corresponding to the test case to be registered; According to the use case registration command, the test case to be registered is added to the test case set under the subsystem corresponding to the registration subsystem identifier in the test framework, and the registration information of the test case to be registered is registered in the test framework; wherein the registration information includes the test case identifier, subsystem identifier, preset platform information and default test parameters corresponding to the test case to be registered.
10. The method for testing a redundant array of independent disks card according to claim 9, characterized in that: The registration information of the test case to be registered includes: The registration information of the test case to be registered is registered in the test framework in a symbol table manner according to the predicted hierarchical relationship; wherein the predicted hierarchical relationship is a hierarchical relationship from each firmware system to its corresponding subsystem in the test framework.
11. A test device for a redundant array of independent disks card, characterized in that: Applicable to independent disk redundant array cards, including: A test acquisition module is used to acquire an integrated test command of a target firmware system sent by a test host; wherein the target firmware system is any firmware system of the independent disk redundant array card in the test framework, and the firmware system includes at least one of a core control system, an auxiliary control system, an independent disk redundant array control system, a power management system, a power failure protection recovery system, and a boot system; A test determination module, used to determine a target test case in a target subsystem in the test framework according to the integrated test command; wherein the target subsystem is a subsystem corresponding to the integrated test command under the target firmware system, and the target test case is a test case corresponding to the integrated test command registered under the target subsystem; The test execution module is used to execute the target test case using the test framework, obtain the integration test result of the integration test command, and send the integration test result to the test host.
12. A redundant array of independent disks card, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the method for testing a redundant array of independent disks card as claimed in any one of claims 1 to 10 when executing the computer program.
13. A method for testing a redundant array of independent disks card, characterized in that: Applicable to test hosts, including: Acquire test selection information of the redundant array of independent disks card; wherein the test selection information includes case selection information of a target test case under a target subsystem under a target firmware system, the target firmware system is any firmware system of the redundant array of independent disks card, and the target subsystem is a subsystem under the target firmware system where the target test case is located; Generate an integrated test command for the target firmware system according to the test selection information, and send the integrated test command to the redundant array of independent disks card, so that the redundant array of independent disks card executes the target test case using a test framework to obtain an integrated test result of the integrated test command; Receive the integration test result sent by the independent disk redundant array card.
14. The method for testing a redundant array of independent disks card according to claim 13, characterized in that: The receiving the integration test result sent by the independent disk redundant array card includes: Receiving a custom asynchronous event request corresponding to the integration test result sent by the independent disk redundant array card; The integration test result corresponding to the custom asynchronous event request is obtained by requesting the log page command.
15. The method for testing a redundant array of independent disks card according to claim 13, wherein: If the use case selection information in the test selection information is selection information of all test cases under the target firmware system, the integrated test command includes all test identifiers; If the use case selection information in the test selection information is selection information of all test cases of the current subsystem under the target firmware system, the integrated test command includes a current subsystem identifier; wherein the current subsystem is any subsystem under the target firmware system, and the current subsystem identifier is an identifier of the current subsystem; If the use case selection information in the test selection information is the selection information of the current test case of the current subsystem under the target firmware system, then the integrated test command includes a current subsystem identifier and a current test case identifier; wherein, the current test case is any test case under the current subsystem, and the current test case identifier is the identifier of the current test case.
16. The method for testing a redundant array of independent disks card according to any one of claims 13 to 15, characterized in that: Also includes: Acquire the test case to be registered of the redundant array of independent disks card and the test case configuration information of the test case to be registered; wherein the test case configuration information includes the test case identifier, subsystem identifier, preset platform information and default test parameters corresponding to the test case to be registered; Generate a test case registration command for the test case to be registered according to the test case to be registered and the test case configuration information; The test case registration command is sent to the redundant array of independent disks card to register the test case to be registered in the test framework.
17. The method for testing a redundant array of independent disks card according to claim 16, wherein: The step of obtaining the test cases to be registered of the redundant array of independent disks card and the test case configuration information of the test cases to be registered includes: According to the acquired adaptation selection information, the subsystem identification and preset platform information in the use case configuration information are determined; wherein the adaptation selection information includes the subsystem selection information and the test platform selection information corresponding to the test case to be registered.
18. A test device for a redundant array of independent disks card, characterized in that: Applicable to test hosts, including: An information acquisition module is used to acquire test selection information of an independent disk redundant array card; wherein the test selection information includes case selection information of a target test case under a target subsystem under a target firmware system, wherein the target firmware system is any firmware system of the independent disk redundant array card, and the target subsystem is a subsystem under the target firmware system where the target test case is located; A command generation module, configured to generate an integrated test command for the target firmware system according to the test selection information, and send the integrated test command to the redundant array of independent disks card, so that the redundant array of independent disks card executes the target test case using a test framework to obtain an integrated test result of the integrated test command; The test receiving module is used to receive the integration test result sent by the independent disk redundant array card.
19. A test host, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the method for testing a redundant array of independent disks card as claimed in any one of claims 13 to 17 when executing the computer program.
20. A test system for a redundant array of independent disks card, characterized in that: include: The independent redundant array of disks card as claimed in claim 12 and the test host as claimed in claim 19.
21. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the method for testing a redundant array of independent disks card as claimed in any one of claims 1 to 10 and 13 to 17 are implemented.
22. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for testing a redundant array of independent disks card according to any one of claims 1 to 10 and 13 to 17 are implemented.
Citation Information
Cited By
Disk array card test method and device, medium and product
CN120892278A
