Disk array card test method and device, medium and product
By introducing randomly generated test cases and perturbation parameters into disk array card testing, a random, flexible, and dynamic test architecture is constructed, which solves the problem of missed detection of hidden firmware issues and achieves more efficient test coverage and resource utilization.
Patent Information
- Application Number
- CN202511416460.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-09-30
AI Technical Summary
Existing technologies struggle to effectively detect hidden issues in the firmware of disk array cards, especially since fixed-sequence testing cannot cover all test case execution paths, leading to missed detections of potential defects.
A random seed is introduced to generate test case sets and perturbation parameter sets, constructing a random, flexible, and dynamic test architecture. The firmware in the disk array card is tested by randomly generating test cases and perturbation parameters.
It improves the effective utilization of testing resources, avoids missing potential defects, and exposes hidden problems in firmware at an early stage.
Smart Images

Figure CN120892278A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of hardware testing, in particular to a disk array card testing method, device, medium and product. BACKGROUND
[0002] The RAID (Redundant Array of Independent Disks) card, also known as a RAID control card or a RAID adapter or a RAID controller, is a hardware device used to implement RAID technology to improve data security, performance and capacity. The firmware in the disk array card is a software program running in the disk array card, responsible for controlling and managing IP (Intellectual Property), which refers to the functional modules, designs or technologies adopted in the disk array card that have been developed, and the firmware in the disk array card also provides different levels of data splitting, redundancy, read / write, backup and recovery functions such as RAID 0 / 1 / 5 / 6.
[0003] The internal processing flow of the firmware in the disk array card is complex. In order to achieve complete, reliable and high-quality functions in a short development cycle, it is necessary to adopt a step-by-step quality protection strategy from each module to each subsystem and between subsystems, and layer-by-layer testing is an indispensable link. Among them, 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 the function integration of multiple modules within a subsystem, the correctness of the function integration of multiple subsystems, and the correctness of the function of software and hardware interaction. It should be noted that unit testing and integration testing usually execute all test cases in a fixed order set in advance, but the fixed order may not cover different test case execution paths, especially boundary conditions or abnormal scenarios that require a specific operation sequence to trigger, which can easily lead to the problem of missing some potential defects, and the logic of multi-thread scheduling, interrupt processing, etc. in the firmware may expose defects due to a particular test case execution order (for example, resource competition leading to deadlock), but the fixed order is difficult to effectively trigger such problems.
[0004] It can be seen that how to discover hidden problems of the firmware in time during disk array card testing is a technical problem that needs to be solved by those skilled in the art. SUMMARY
[0005] The embodiment of the present application aims to provide a disk array card testing method, device, medium and product, a random, flexible and dynamic testing architecture is constructed by introducing a random seed, the firmware in the disk array card is forced to face unexpected testing pressure, and hidden problems of the firmware in the disk array card are exposed as early as possible, and the specific scheme is as follows.
[0006] In the first aspect, the present application provides a disk array card testing method applied to an upper computer, the upper computer is in communication connection with a disk array card, and the disk array card controls the operation of local business subsystems and system management modules through internal firmware, and the method of the present application comprises: a plurality of test case sets are randomly generated by using test resources and a random seed and based on a plurality of test cases corresponding to each business subsystem; different test cases in the test case sets correspond to different business subsystems; all test cases corresponding to the plurality of test case sets contain all test cases or part of test cases corresponding to each business subsystem; a plurality of disturbance parameter sets are randomly generated by using the random seed and based on a plurality of system disturbance parameters corresponding to each system management module; different system disturbance parameters in the disturbance parameter sets correspond to different system management modules; the plurality of test case sets and the plurality of disturbance parameter sets are sequentially distributed to the disk array card to test the firmware in the disk array card.
[0007] Optionally, the plurality of test case sets are randomly generated by using test resources and a random seed and based on a plurality of test cases corresponding to each business subsystem, and the generation comprises: a test case containing range is determined according to the resource size and use time length of the test resources; the test case containing range comprises a first preset containing range and a second preset containing range; the plurality of test case sets are randomly generated by using the test case containing range and the random seed and based on a plurality of test cases corresponding to each business subsystem.
[0008] Optionally, the plurality of test case sets are randomly generated by using test case containing range and a random seed and based on a plurality of test cases corresponding to each business subsystem, and the generation comprises: when the test case containing range is the first preset containing range, each business subsystem is determined as a to-be-tested subsystem; the plurality of test case sets are randomly generated by using the random seed and based on a plurality of test cases corresponding to each to-be-tested subsystem; all test cases corresponding to the plurality of test case sets contain all test cases corresponding to each business subsystem.
[0009] Optionally, a plurality of test case sets are randomly generated by using the random seed and based on a plurality of test cases respectively corresponding to the to-be-tested subsystems, including: determining whether there is a first to-be-tested subsystem in the to-be-tested subsystems; the first to-be-tested subsystem corresponds to a test case that has not been selected; if yes, selecting a test case from the test case that has not been selected respectively corresponding to each first to-be-tested subsystem by using the random seed to randomly generate the test case set, and then jumping back to the step of determining whether there is a first to-be-tested subsystem in the to-be-tested subsystems until there is no first to-be-tested subsystem in the to-be-tested subsystems to obtain the plurality of test case sets.
[0010] Optionally, the test case set is randomly generated by using the random seed and selecting a test case from the test case that has not been selected respectively corresponding to each first to-be-tested subsystem, including: selecting a test case from the test case that has not been selected respectively corresponding to each first to-be-tested subsystem by using the random seed; combining the selected test case to randomly generate at least one test case set.
[0011] Optionally, a plurality of test case sets are randomly generated by using the random seed and based on a plurality of test cases respectively corresponding to the to-be-tested subsystems, including: selecting a to-be-tested subsystem from each business subsystem based on the test requirement when the test case containing range is a second preset containing range; determining the total number of measurable test cases according to the resource size and use duration of the test resource; determining the number of measurable test cases respectively corresponding to each to-be-tested subsystem according to the total number of measurable test cases; randomly generating a plurality of test case sets by using the random seed and based on the number of measurable test cases respectively corresponding to the to-be-tested subsystems and the plurality of test cases; wherein all test cases corresponding to the plurality of test case sets contain part of test cases corresponding to each business subsystem.
[0012] Optionally, a plurality of test case sets are randomly generated by using the random seed and based on the number of measurable test cases respectively corresponding to the to-be-tested subsystems and the plurality of test cases, including: determining whether there is a second to-be-tested subsystem in the to-be-tested subsystems; the number of test cases that have been selected corresponding to the second to-be-tested subsystem is less than the number of measurable test cases corresponding to the second to-be-tested subsystem; If the second to-be-tested subsystem exists, test cases are selected from the unselected test cases corresponding to each second to-be-tested subsystem by using a random seed to randomly generate a test case set, and then the step of determining whether the second to-be-tested subsystem exists in each to-be-tested subsystem is re-executed until no second to-be-tested subsystem exists in each to-be-tested subsystem, so as to obtain a plurality of test case sets.
[0013] Optionally, the test cases are selected from the unselected test cases corresponding to each second to-be-tested subsystem by using a random seed to randomly generate a test case set, including: The test cases are selected from the unselected test cases corresponding to each second to-be-tested subsystem by using a random seed. The selected test cases are combined to randomly generate at least one test case set.
[0014] Optionally, a plurality of disturbance parameter sets are randomly generated by using a random seed and based on a plurality of system disturbance parameters respectively corresponding to each system management module, including: It is determined whether a target management module exists in each system management module; the target management module corresponds to an unselected system disturbance parameter; If the target management module exists, a system disturbance parameter is selected from the unselected system disturbance parameters corresponding to each target management module by using a random seed to randomly generate a disturbance parameter set, and then the step of determining whether the target management module exists in each system management module is re-executed until no target management module exists in each system management module, so as to obtain a plurality of disturbance parameter sets.
[0015] Optionally, the system disturbance parameters are selected from the unselected system disturbance parameters corresponding to each target management module by using a random seed to randomly generate a disturbance parameter set, including: The system disturbance parameters are selected from the unselected system disturbance parameters corresponding to each target management module by using a random seed. The selected system disturbance parameters are combined to randomly generate at least one disturbance parameter set.
[0016] Optionally, the plurality of test case sets are sequentially distributed to the disk array card to test the firmware in the disk array card, including: An un-distributed test case set is determined from the plurality of test case sets; One of the un-distributed test case sets is distributed to the disk array card to test the firmware in the disk array card by using the currently distributed test case set; After monitoring that the disk array card completes the firmware test based on the currently distributed test case set, jump back to the step of determining the test case set not distributed from the plurality of test case sets until there is no test case set not distributed from the plurality of test case sets.
[0017] Optionally, when the number of the plurality of test case sets is more than one, testing the firmware in the disk array card by using the currently distributed test case set comprises: testing the firmware in the disk array card by using the currently distributed test case set and based on a preset repetition number for a corresponding number of times; wherein the preset repetition number is a number generated based on a random seed.
[0018] Optionally, when the number of the plurality of test case sets is one, testing the firmware in the disk array card by using the currently distributed test case set comprises: repeatedly testing the firmware in the disk array card by using the currently distributed test case set, and ending the test of the firmware in the disk array card when a preset termination signal is obtained.
[0019] Optionally, distributing the plurality of disturbance parameter sets to the disk array card in sequence to test the firmware in the disk array card comprises: determining the disturbance parameter set not distributed from the plurality of disturbance parameter sets; distributing one of the disturbance parameter sets not distributed to the disk array card to test the firmware in the disk array card by using the currently distributed disturbance parameter set; after obtaining the test completion signal returned by the disk array card, jump back to the step of determining the disturbance parameter set not distributed from the plurality of disturbance parameter sets until there is no disturbance parameter set not distributed from the plurality of disturbance parameter sets.
[0020] Optionally, the test completion signal is a signal generated by the disk array card after completing the firmware test based on the currently distributed disturbance parameter set within a preset timeout duration, or a signal generated by the disk array card when the cumulative test duration of the firmware test based on the currently distributed disturbance parameter set reaches the preset timeout duration.
[0021] Optionally, distributing the plurality of test case sets and the plurality of disturbance parameter sets to the disk array card in sequence to test the firmware in the disk array card comprises: determining the set to be distributed this time from the plurality of test case sets and the plurality of disturbance parameter sets; the set to be distributed this time includes the test case set and / or the disturbance parameter set; generate a target test command based on the current distribution set and the target object corresponding to the element in the current distribution set; the target object includes a business subsystem and / or a system management module; issue the target test command to the disk array card, so that the disk array card parses the current distribution set and the target object from the target test command through the non-volatile memory host controller interface in the firmware, and calls the interface of the target object to obtain the corresponding element from the current distribution set, and runs the target object based on the corresponding element to test the firmware.
[0022] Optionally, the target test command is a command defined based on the non-volatile memory host controller interface specification.
[0023] In a second aspect, the present application provides an electronic device, comprising: a memory for storing a computer program; a processor for executing the computer program to implement the steps of the above-mentioned disk array card testing method.
[0024] In a third aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the above-mentioned disk array card testing method.
[0025] In a fourth aspect, the present application provides a computer program product, which comprises a computer program / instruction, and the computer program / instruction is executed by a processor to implement the steps of the above-mentioned disk array card testing method.
[0026] The method of the present application is applied to a host computer, and the host computer establishes a communication connection with the disk array card, and the disk array card controls the operation of each business subsystem and each system management module through internal firmware. Specifically, the method of the present application comprises: the host computer randomly generates a plurality of test case sets by using test resources and a random seed and based on a plurality of test cases respectively corresponding to each business subsystem; different test cases in the test case set correspond to different business subsystems; all test cases corresponding to the plurality of test case sets contain all test cases or part of test cases corresponding to each business subsystem; the host computer randomly generates a plurality of disturbance parameter sets by using the random seed and based on a plurality of system disturbance parameters respectively corresponding to each system management module; different system disturbance parameters in the disturbance parameter set correspond to different system management modules; and the plurality of test case sets and the plurality of disturbance parameter sets are sequentially distributed to the disk array card to test the firmware in the disk array card.
[0027] Beneficial effects: the application can flexibly select all test cases or part of test cases corresponding to each business subsystem according to test resources, randomly generate several test case sets, and test the firmware in the disk array card, thereby avoiding waste or excessive consumption of test resources and improving the effective utilization rate of test resources; and the application introduces a random seed in the disk array card test, randomly generates a test case set based on several test cases corresponding to each business subsystem, and randomly generates a disturbance parameter set based on several system disturbance parameters corresponding to each system management module, thereby testing the firmware in the disk array card, so it can be seen that the application constructs a random, flexible and dynamic test architecture according to the random seed, which not only avoids the problem of missing potential defects caused by fixed order testing, but also forces the firmware in the disk array card to face unexpected test pressure to expose hidden problems in the firmware in the disk array card as early as possible. BRIEF DESCRIPTION OF DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0029] Figure 1 A flow chart of a disk array card test method provided by the embodiment of the present application is provided. Figure 2 A test case set schematic diagram provided by the embodiment of the present application is provided. Figure 3 Another test case set schematic diagram provided by the embodiment of the present application is provided. Figure 4 A disturbance parameter set schematic diagram provided by the embodiment of the present application is provided. Figure 5 A flow chart of a disk array card test provided by the embodiment of the present application is provided. Figure 6 An electronic device structure diagram provided by the embodiment of the present application is provided. DETAILED DESCRIPTION
[0030] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0031] The terms “include,” “includes” and “including” in the specification and the foregoing appended claims of the present application are intended to be inclusive, in the sense of “including but not limited to,” to the extent that such terms are used in any of the following claims. Other forms of inclusion (e.g., “comprising,” “comprises,” “comprised of”) will be similarly understood by those of ordinary skill in the art. For example, a process, method, system, product, or apparatus that comprises a list of steps or elements is not necessarily limited to the listed steps or elements but can include additional steps or elements not expressly listed or inherent to such process, method, system, product, or apparatus.
[0032] In order to make the person skilled in the art better understand the present application, the present application will be further described in detail below in combination with the drawings and specific embodiments.
[0033] The internal processing flow of the firmware in the disk array card is complex. In order to realize complete, reliable and high-quality functions in a short development period, it is necessary to adopt a step-by-step quality protection strategy from the internal modules to the internal subsystems and between the subsystems, and layer-by-layer testing is an indispensable link. Among them, 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 the function integration of multiple modules within the subsystem, the correctness of the function integration of multiple subsystems, and the correctness of the software and hardware interaction. However, unit testing and integration testing usually execute all test cases in a fixed order, but the fixed order may not cover different test case execution paths, especially the boundary conditions or abnormal scenarios that need to be triggered by a specific operation sequence, which can easily lead to the problem of missing some potential defects, and the multi-thread scheduling, interrupt processing and other logics in the firmware may expose defects (such as resource competition leading to deadlock) due to a particular test case execution sequence, but the fixed order is difficult to effectively trigger such problems.
[0034] Therefore, the present application provides a disk array card testing method, which introduces a random seed in the disk array card testing to randomly generate a test case set and a perturbation parameter set, and tests the firmware in the disk array card. Not only does it build a random, flexible and dynamic testing architecture to avoid the potential defect missing problem caused by fixed order testing, but it also forces the firmware in the disk array card to face unexpected testing pressure to expose hidden problems in the firmware in the disk array card as early as possible.
[0035] The embodiment of the present application provides a disk array card testing method, which is applied to an upper computer, the upper computer is in communication connection with a disk array card, and the disk array card controls the operation of each business subsystem and each system management module through internal firmware, and the specific combination Figure 1 The method of the present application will be described in detail.
[0036] In step S11, a plurality of test case sets are randomly generated by using the test resources and the random seed and based on a plurality of test cases respectively corresponding to the business subsystems; different test cases in the test case sets correspond to different business subsystems; all test cases corresponding to the plurality of test case sets contain all test cases or part of test cases corresponding to the business subsystems.
[0037] The method of the embodiment of the application is applied to a host computer, and the host computer is mainly responsible for management of test cases, distribution of test cases and statistics of test results. The host computer is in communication connection with a disk array card, and the disk array card mainly includes firmware, a plurality of business subsystems and a plurality of system management modules. The disk array card can control the operation of the local business subsystems and the system management modules by the internal firmware.
[0038] It should be noted that the business subsystems include but are not limited to host subsystems, disk array subsystems and disk writing subsystems. The host subsystems are mainly used to support key business processing and data operation; the disk array subsystems are mainly used to manage disk arrays. The disk array is a virtual single large-capacity hard disk combined by a plurality of physical hard disks in a certain way, which can provide higher storage performance, higher I / O (Input / Output) performance and reliability than a single hard disk; the disk writing subsystems are mainly used to safely write data to a disk.
[0039] In addition, for each business subsystem, a plurality of test cases for the business subsystem can be generated according to a test plan corresponding to the business subsystem, that is, each business subsystem can correspond to one test case or a plurality of test cases, and the test purposes of each test case are different.
[0040] In order to avoid executing the test cases in a fixed order, the embodiment of the application introduces a random seed. In order to fully utilize the test resources, the embodiment of the application selects to combine the test resources and the random seed, and randomly generates a plurality of test case sets based on a plurality of test cases respectively corresponding to the business subsystems. It should be noted that different test cases in the test case sets correspond to different business subsystems. When the test resources are sufficient, all test cases corresponding to the plurality of test case sets can contain all test cases corresponding to the business subsystems. When the test resources are insufficient, all test cases corresponding to the plurality of test case sets can contain part of test cases corresponding to the business subsystems.
[0041] Specifically, in the process of generating the test case sets randomly based on the test resources and the random seeds and the test cases corresponding to the business subsystems respectively, first, the test case containing range can be determined according to the resource size and the use duration of the test resources; the test case containing range includes a first preset containing range and a second preset containing range; then the test case containing range and the random seeds are used to generate the test case sets randomly based on the test cases corresponding to the business subsystems respectively.
[0042] The first preset containing range means that the test cases in the test case sets contain all the test cases corresponding to the business subsystems; and the second preset containing range means that the test cases in the test case sets contain part of the test cases corresponding to the business subsystems.
[0043] It should be noted that the larger the resource size and the longer the use duration of the test resources are, the closer the test case containing range is to the first preset containing range; and on the contrary, the smaller the resource size and the shorter the use duration of the test resources are, the closer the test case containing range is to the second preset containing range.
[0044] According to one example, in the process of generating the test case sets randomly based on the test case containing range and the random seeds and the test cases corresponding to the business subsystems respectively, the process can specifically include: when the test case containing range is the first preset containing range, all the business subsystems are determined as the to-be-tested subsystems; the test case sets are generated randomly based on the random seeds and the test cases corresponding to the to-be-tested subsystems respectively; and the test cases in the test case sets contain all the test cases corresponding to the business subsystems.
[0045] Specifically, when the test case containing range is the first preset containing range, all the business subsystems in the disk array card can be determined as the to-be-tested subsystems, and then the test case sets are generated randomly based on the random seeds and the test cases corresponding to the to-be-tested subsystems respectively; different test cases in each test case set correspond to different business subsystems, and the test cases in the test case sets contain all the test cases corresponding to the business subsystems.
[0046] In the process of generating the test case sets randomly based on the random seed and the test cases corresponding to each of the subsystems to be tested, it is firstly determined whether there is a first subsystem to be tested in the subsystems to be tested, wherein the first subsystem to be tested corresponds to the test cases not selected. If there is, the test cases are selected from the test cases not selected corresponding to each of the first subsystems to be tested by using the random seed to generate the test case sets randomly, and then the step of determining whether there is a first subsystem to be tested in the subsystems to be tested is jumped to again until there is no first subsystem to be tested in the subsystems to be tested, so as to obtain the test case sets.
[0047] It can be understood that when the test case contains the first preset containing range, all the service subsystems in the disk array card are determined as the subsystems to be tested first, and at this time the test cases corresponding to all the subsystems to be tested are the test cases not selected, that is, all the subsystems to be tested correspond to the test cases not selected. Then it is determined whether there is a first subsystem to be tested in the subsystems to be tested, wherein the first subsystem to be tested corresponds to the test cases not selected. If there is a first subsystem to be tested in the subsystems to be tested, the test cases are selected from the test cases not selected corresponding to each of the first subsystems to be tested by using the random seed to generate the test case sets randomly, and then the step of determining whether there is a first subsystem to be tested in the subsystems to be tested is jumped to again until there is no first subsystem to be tested in the subsystems to be tested, that is, the test cases corresponding to all the subsystems to be tested are the test cases selected, and at this time the test case sets can be obtained.
[0048] As Figure 2As shown, taking the host subsystem, the disk array subsystem and the disk subsystem as examples of the business subsystems, it is assumed that test cases A1, A2, …, Am are generated according to the test plan of the host subsystem, test cases B1, B2, …, Bn are generated according to the test plan of the disk array subsystem, and test cases C1, C2, …, Co are generated according to the test plan of the disk subsystem, and the number of test cases corresponding to the host subsystem is less than the number of test cases corresponding to the disk array subsystem, and the number of test cases corresponding to the disk array subsystem is equal to the number of test cases corresponding to the disk subsystem. At this time, when the test case inclusion range is the first preset inclusion range, the host subsystem, the disk array subsystem and the disk subsystem are all determined as the to-be-tested subsystems, and then it is judged whether there is a first to-be-tested subsystem corresponding to a test case that has not been selected in each to-be-tested subsystem; if there is a first to-be-tested subsystem in each to-be-tested subsystem, a test case is selected from each first to-be-tested subsystem corresponding to a test case that has not been selected by using a random seed, to randomly generate a test case set, and then the step of judging whether there is a first to-be-tested subsystem corresponding to a test case that has not been selected in each to-be-tested subsystem is re-jumped until there is no first to-be-tested subsystem in each to-be-tested subsystem, to obtain a plurality of test case sets. For example, the plurality of test case sets may be (A1, B1, C1), (A2, B2, C2), …, (Am, Bm, Cm), (Bm+1, Cm+1), …, (Bn, Co) in a case. Such sequential examples are only for convenience of description, and in fact, they should be random and disordered, but it is necessary to ensure that all test cases corresponding to the plurality of test case sets finally obtained contain all test cases corresponding to each business subsystem.
[0049] It should be noted that the test cases are selected from each first to-be-tested subsystem corresponding to a test case that has not been selected according to a random seed, and there is no fixed order, so that the firmware in the disk array card can face unexpected pressure, so that hidden problems of the firmware can be found as soon as possible.
[0050] In addition, since the number of test cases corresponding to different business subsystems may be different, according to the above method, after all test cases corresponding to a certain business subsystem are selected, the business subsystem can be ignored, and test case sets can be generated only according to test cases corresponding to other business subsystems.
[0051] In order to further improve the flexibility, randomness and dynamicity of the test case set generation, in the process of randomly generating the test case set by using the random seed and selecting the test case from the unselected test case corresponding to each first to-be-tested subsystem, the embodiment of the application can specifically include: selecting the test case from the unselected test case corresponding to each first to-be-tested subsystem by using the random seed; and combining the selected test case to randomly generate at least one test case set.
[0052] For example, assuming that the selected test case is A1, B1 and C1, one test case set (A1, B1, C1) can be generated by combining the selected test case in one case, two test case sets (A1, B1) and (C1) can be generated in another case, three test case sets (A1), (B1) and (C1) can be generated in yet another case, and of course there can be other cases, which will not be described in detail here, as long as the all test cases corresponding to the randomly generated at least one test case set contain all the selected test cases. Figure 2
[0053] According to another example, in the process of randomly generating the test case set by using the test case containing range and the random seed and based on the several test case sets corresponding to each business subsystem, the process can specifically include: selecting the to-be-tested subsystem from each business subsystem based on the test requirement when the test case containing range is the second preset containing range; determining the total number of measurable test cases according to the resource size and the use time length of the test resource; determining the number of measurable test cases corresponding to each to-be-tested subsystem according to the total number of measurable test cases; and randomly generating the several test case sets by using the random seed and based on the number of measurable test cases corresponding to each to-be-tested subsystem and the several test case sets; wherein the all test cases corresponding to the several test case sets contain part of the test case corresponding to each business subsystem.
[0054] Specifically, when the test case includes a second preset inclusion range, the to-be-tested subsystems are selected from the business subsystems based on the test requirements, wherein all the business subsystems can be selected as the to-be-tested subsystems, or a part of the business subsystems can be selected as the to-be-tested subsystems. In order to avoid excessive consumption of test resources, the embodiment of the present application can determine the total number of measurable test cases according to the resource size and use length of the test resources, and then determine the number of measurable test cases corresponding to each to-be-tested subsystem according to the total number of measurable test cases, that is, the sum of the number of measurable test cases corresponding to each to-be-tested subsystem is equal to the total number of measurable test cases. The number of measurable test cases corresponding to each to-be-tested subsystem represents how many test cases can be selected from all the test cases corresponding to the to-be-tested subsystem to generate a test case set, and the number of measurable test cases corresponding to each to-be-tested subsystem should not be greater than the number of test cases corresponding to the to-be-tested subsystem. Then, a plurality of test case sets are randomly generated by using a random seed and based on the number of measurable test cases corresponding to each to-be-tested subsystem and a plurality of test cases. Different test cases in each test case set correspond to different business subsystems, and all the test cases corresponding to the plurality of test case sets include part of the test cases corresponding to each business subsystem.
[0055] It should be noted that after the total number of measurable test cases is determined according to the resource size and use length of the test resources, for the number of measurable test cases corresponding to each to-be-tested subsystem, the importance of each to-be-tested subsystem can be configured as an importance degree (between 0 and 1), the sum of the number of test cases corresponding to each to-be-tested subsystem is calculated, then the proportion coefficient of each to-be-tested subsystem is determined according to the ratio of the number of test cases corresponding to each to-be-tested subsystem to the sum, the sum of the proportion coefficients of each to-be-tested subsystem is 1, and the sum of the importance degrees of each to-be-tested subsystem is also 1. Then, the first number of test cases of each to-be-tested subsystem is determined according to the product of the importance degree of each to-be-tested subsystem and the total number of measurable test cases, and the second number of test cases of each to-be-tested subsystem is determined according to the product of the proportion coefficient of each to-be-tested subsystem and the total number of measurable test cases. Finally, the first number of test cases and the second number of test cases of each to-be-tested subsystem are averaged to obtain the number of measurable test cases corresponding to each to-be-tested subsystem.
[0056] In the process of randomly generating a plurality of test case sets by using a random seed and based on the number of measurable test cases corresponding to each of the to-be-tested subsystems and a plurality of test cases, it is first determined whether there is a second to-be-tested subsystem in the to-be-tested subsystems; the number of selected test cases corresponding to the second to-be-tested subsystem is less than the number of measurable test cases corresponding to the second to-be-tested subsystem; if there is, test cases are selected from the unselected test cases corresponding to each of the second to-be-tested subsystems by using the random seed to randomly generate a test case set, and then the step of determining whether there is a second to-be-tested subsystem in the to-be-tested subsystems is re-executed until there is no second to-be-tested subsystem in the to-be-tested subsystems, so as to obtain a plurality of test case sets.
[0057] It can be understood that after the to-be-tested subsystems are selected from the business subsystems based on the test requirements, the test cases corresponding to the to-be-tested subsystems at this time are all unselected test cases, that is, the number of selected test cases corresponding to all the to-be-tested subsystems at this time is zero. It is then determined whether there is a second to-be-tested subsystem in the to-be-tested subsystems; the number of selected test cases corresponding to the second to-be-tested subsystem is less than the number of measurable test cases corresponding to the second to-be-tested subsystem; if there is a second to-be-tested subsystem in the to-be-tested subsystems, test cases are selected from the unselected test cases corresponding to each of the second to-be-tested subsystems by using the random seed to randomly generate a test case set, and then the step of determining whether there is a second to-be-tested subsystem in the to-be-tested subsystems is re-executed until there is no second to-be-tested subsystem in the to-be-tested subsystems, that is, the number of selected test cases corresponding to each of the to-be-tested subsystems is greater than or equal to the number of measurable test cases corresponding to the to-be-tested subsystems, so as to obtain a plurality of test case sets.
[0058] As Figure 3As shown, taking a business subsystem including a host subsystem, a disk array subsystem, and a disk-based system as an example, assume that test cases A1, A2, ..., Am are generated based on the test plan of the host subsystem, test cases B1, B2, ..., Bn are generated based on the test plan of the disk array subsystem, and test cases C1, C2, ..., Co are generated based on the test plan of the disk-based system. Also assume that the subsystems under test are the host subsystem and the disk array subsystem, and that the number of testable cases for the host subsystem and the disk array subsystem is p, where p is less than or equal to m and p is less than or equal to n. At this point, it is determined whether a second subsystem exists in each subsystem under test. The number of selected test cases corresponding to the second subsystem is less than the number of testable test cases corresponding to the second subsystem. If a second subsystem exists in each subsystem under test, a random seed is used to select one test case from the unselected test cases corresponding to each second subsystem to randomly generate a test case set. Then, the process returns to the step of determining whether a second subsystem exists in each subsystem under test until no second subsystem exists in any subsystem under test, resulting in several test case sets. For example, in one case, several test case sets could be (A1, B1), (A2, B2), ..., (Ap, Bp). This sequential example is for ease of explanation; in reality, they should be random and unordered.
[0059] It should be noted that the test cases are selected from the unselected test cases corresponding to each second subsystem under test. The selection is randomized according to a random seed and there is no fixed order. This selection can subject the firmware in the disk array card to unexpected pressure, thereby discovering hidden firmware problems as early as possible.
[0060] Furthermore, in the process of using a random seed to select test cases from the unselected test cases corresponding to each second subsystem under test to randomly generate a test case set, the specific steps may include: using a random seed to select test cases from the unselected test cases corresponding to each second subsystem under test; and combining the selected test cases to randomly generate at least one test case set.
[0061] by Figure 3 For example, assuming the selected test cases are A1 and B1, by combining the selected test cases, one test case set (A1, B1) can be generated in one case, and two test case sets (A1) and (B1) can be generated in another case. At this time, it is only necessary to ensure that all test cases corresponding to at least one randomly generated test case set include all the selected test cases.
[0062] Step S12, a plurality of disturbance parameter sets are randomly generated by using the random seed and based on a plurality of system disturbance parameters respectively corresponding to the system management modules; different system disturbance parameters in a disturbance parameter set correspond to different system management modules.
[0063] In the embodiment, for each system management module in the disk array card, a plurality of disturbance parameter sets are also randomly generated by using the random seed and based on a plurality of system disturbance parameters respectively corresponding to the system management modules; different system disturbance parameters in each disturbance parameter set correspond to different system management modules.
[0064] In the process of randomly generating a plurality of disturbance parameter sets by using the random seed and based on a plurality of system disturbance parameters respectively corresponding to the system management modules, firstly, it is determined whether there is a target management module in the system management modules; the target management module corresponds to an unselected system disturbance parameter; if there is, a system disturbance parameter is selected from the unselected system disturbance parameters corresponding to each target management module by using the random seed, to randomly generate a disturbance parameter set, and then the step of determining whether there is a target management module in the system management modules is re-jumped until there is no target management module in the system management modules, to obtain a plurality of disturbance parameter sets.
[0065] Specifically, for the plurality of randomly generated disturbance parameter sets, firstly, it is determined whether there is a target management module in the system management modules; the target management module corresponds to an unselected system disturbance parameter; it should be noted that at the beginning, the system disturbance parameters corresponding to all system management modules are unselected system disturbance parameters, that is, at the beginning, all system management modules are target management modules; if there is a target management module in the system management modules, a system disturbance parameter is selected from the unselected system disturbance parameters corresponding to each target management module by using the random seed, to randomly generate a disturbance parameter set, and then the step of determining whether there is a target management module in the system management modules is re-jumped until there is no target management module in the system management modules, that is, the system disturbance parameters corresponding to all system management modules are selected system disturbance parameters, at this time, a plurality of disturbance parameter sets can be obtained. It should be noted that all system disturbance parameters corresponding to the plurality of disturbance parameter sets contain all system disturbance parameters corresponding to the system management modules.
[0066] For example, Figure 4As shown, taking the system management module, which includes a thread management module and a memory management module, as an example, assuming that the system disturbance parameters (i.e., thread parameters) corresponding to the thread management module include thread parameters A1, A2, ..., Am, and the system disturbance parameters (i.e. memory parameters) corresponding to the memory management module include memory parameters B1, B2, ..., Bn, and m=n, then if the set of disturbance parameters can be (A1, B1), (A2, B2), ..., (Am, Bn) in one case, this example in order is only for ease of description, and in reality it should be random and unordered.
[0067] It should be noted that the system disturbance parameters are selected from the unselected system disturbance parameters corresponding to each target management module. The selection is randomized according to a random seed and there is no fixed order. This selection can expose the firmware in the disk array card to unexpected pressure, thereby discovering hidden firmware problems as early as possible.
[0068] Furthermore, in the process of using a random seed to select system disturbance parameters from the unselected system disturbance parameters corresponding to each target management module to randomly generate a disturbance parameter set, the specific steps may include: using a random seed to select system disturbance parameters from the unselected system disturbance parameters corresponding to each target management module; and combining the selected system disturbance parameters to randomly generate at least one disturbance parameter set.
[0069] by Figure 4 For example, assuming the selected system disturbance parameters are A1 and B1, by combining the selected system disturbance parameters, one disturbance parameter set (A1, B1) can be generated in one case, and two disturbance parameter sets (A1) and (B1) can be generated in another case. At this time, it is only necessary to ensure that all system disturbance parameters corresponding to at least one randomly generated disturbance parameter set include all system disturbance parameters selected in this case.
[0070] It should be noted that the thread parameters corresponding to the thread management module include three dimensions of priority, concurrency number and task time limit, wherein the setting of the priority can enable the high-priority thread to preempt the CPU (Central Processing Unit) resource and implement a dynamic scheduling mechanism of threads with different priorities, the setting of the concurrency number can control how many threads are running at the same time, and the setting of the task time limit can control the execution time of the thread. The thread parameters can be used to construct a complex runtime state of a system with competitive characteristics. The memory parameters corresponding to the memory management module include an allocation strategy (heap memory management / byte pool pre-allocation) and a capacity threshold, and the memory parameters can trigger a memory boundary problem by changing a memory layout mode. In this way, the embodiments of the present application can construct a non-deterministic load scenario by introducing system disturbance parameters from two directions of threads and memories, so as to expose time sequence errors and memory boundary problems and other deep-level defect problems of the firmware in the disk array card in an unpredictable resource competition environment.
[0071] In step S13, the plurality of test case sets and the plurality of disturbance parameter sets are sequentially distributed to the disk array card to test the firmware in the disk array card.
[0072] In the embodiments of the present application, after the plurality of test case sets and the plurality of disturbance parameter sets are randomly generated, the host computer sequentially distributes the plurality of test case sets and the plurality of disturbance parameter sets to the disk array card through an internal distribution module, so as to run the corresponding business subsystem and the corresponding system management module in the disk array card, thereby testing the firmware in the disk array card.
[0073] According to one of the examples, in the process of sequentially distributing the plurality of test case sets to the disk array card to test the firmware in the disk array card, first, a test case set that has not been distributed is determined from the plurality of test case sets; one of the test case sets that has not been distributed is distributed to the disk array card to test the firmware in the disk array card by using the currently distributed test case set; after it is monitored that the disk array card completes the firmware test based on the currently distributed test case set, the step of determining the test case set that has not been distributed from the plurality of test case sets is re-jumped to, until there is no test case set that has not been distributed in the plurality of test case sets. In the initial state, the plurality of test case sets are all test case sets that have not been distributed.
[0074] It should be noted that the host computer can sequentially distribute the plurality of test case sets to the disk array card in order, or randomly distribute the plurality of test case sets to the disk array card without order, so as to force the firmware in the disk array card to face unpredictable pressure and avoid the problem of missing potential defects of the firmware.
[0075] In the case that the number of the plurality of test case sets is more than one, the test on the firmware in the disk array card with the currently distributed test case set can include: testing the firmware in the disk array card for a corresponding number of times with the currently distributed test case set and based on a preset number of repetitions; wherein the preset number of repetitions is a number generated based on a random seed.
[0076] For example, if the preset number of repetitions generated based on the random seed is n, in the case that the number of the plurality of test case sets is more than one, the test on the firmware in the disk array card with the currently distributed test case set can be performed n times. It should be noted that n is an integer not less than 1.
[0077] Suppose that the number of the plurality of test case sets is m and the preset number of repetitions is n, if the host computer distributes the plurality of test case sets to the disk array card in sequence, the first test case set will be used to test the firmware in the disk array card for n times, and after n times of testing, the second test case set will be used to test the firmware in the disk array card for n times, and so on, until the last test case set is used to test the firmware in the disk array card for n times.
[0078] In the case that the number of the plurality of test case sets is one, the test on the firmware in the disk array card with the currently distributed test case set can include: repeatedly testing the firmware in the disk array card with the currently distributed test case set, and ending the test on the firmware in the disk array card when a preset termination signal is obtained.
[0079] It should be noted that in the case that the number of the plurality of test case sets is one, the number of test cases in the one test case set can be one or multiple, but are randomly selected according to the random seed.
[0080] According to another example, in the process of distributing the plurality of disturbance parameter sets to the disk array card in sequence to test the firmware in the disk array card, first, a disturbance parameter set that has not been distributed is determined from the plurality of disturbance parameter sets; one of the disturbance parameter sets that have not been distributed is distributed to the disk array card to test the firmware in the disk array card with the currently distributed disturbance parameter set; after obtaining the test completion signal returned by the disk array card, the step of determining a disturbance parameter set that has not been distributed from the plurality of disturbance parameter sets is re-executed until there is no disturbance parameter set that has not been distributed in the plurality of disturbance parameter sets. Wherein, at the beginning, all the plurality of disturbance parameter sets are disturbance parameter sets that have not been distributed.
[0081] It should be noted that the host computer can distribute the plurality of disturbance parameter sets to the disk array card in sequence, or distribute the plurality of disturbance parameter sets to the disk array card in random sequence, so as to force the firmware in the disk array card to face unpredictable pressure and avoid the problem of potential defect leakage of the firmware.
[0082] The test completion signal returned by the disk array card is a signal generated by the disk array card after completing the firmware test based on the currently distributed disturbance parameter set within a preset timeout period, or a signal generated by the disk array card when the cumulative test duration of the firmware test based on the currently distributed disturbance parameter set reaches the preset timeout period.
[0083] That is, the embodiment of the application sets a preset timeout period to avoid the situation that a disturbance parameter set cannot complete the firmware test due to environmental and network reasons. Specifically, when the disk array card receives the disturbance parameter set currently distributed by the host computer, it runs the corresponding system management module using the currently distributed disturbance parameter set to test the firmware in the disk array card. If the disk array card monitors that the firmware test is completed within the preset timeout period or the cumulative test duration of the firmware test reaches the preset timeout period, it generates a test completion signal and returns it to the host computer. Correspondingly, after obtaining the test completion signal returned by the disk array card, the host computer triggers the distribution of the next disturbance parameter set.
[0084] According to another example, in the process of distributing a plurality of test case sets and a plurality of disturbance parameter sets to the disk array card in sequence to test the firmware in the disk array card, first, from the plurality of test case sets and the plurality of disturbance parameter sets, determine the set to be distributed this time; wherein the set to be distributed this time includes test case sets and / or disturbance parameter sets; based on the set to be distributed this time and the target object corresponding to the element in the set to be distributed this time, generate a target test command; wherein the element in the set to be distributed this time includes a test case and / or a system disturbance parameter, and the target object includes a business subsystem and / or a system management module; the target test command is sent to the disk array card, so that the disk array card parses the set to be distributed this time and the target object from the target test command through the non-volatile memory host controller interface in the firmware, then calls the interface of the target object to obtain the corresponding element from the set to be distributed this time, and runs the target object based on the corresponding element to implement the test of the firmware.
[0085] The target test command is a self-defined command according to the Non-Volatile Memory Host Controller Interface Specification, the data transmission direction of the command is 0x1 (indicating transmission from the host computer to the disk array card), and the operation code of the command is between 0XC0 and 0xFF.
[0086] In addition to receiving the target test command sent by the host computer, the Non-Volatile Memory Host Controller Interface in the firmware can also notify the host computer to obtain the test result of the disk array card through a self-defined Asynchronous Event Request, wherein the Asynchronous Event Type in the Asynchronous Event Request is marked as 111b to notify the host computer to obtain the test result of the disk array card, and correspondingly, when the host computer obtains the Asynchronous Event Request and the Asynchronous Event Type in the Asynchronous Event Request is 111b, the test result is obtained from the disk array card through a Get Log Page command (a management command in the NVMe protocol, used to obtain the log page information of the storage device) for the user to view.
[0087] Beneficial effects: According to the test resource, all test cases or part of test cases corresponding to each business subsystem can be selected flexibly to randomly generate a plurality of test case sets, and the firmware in the disk array card is tested, so that the waste or excessive consumption of test resources is avoided, and the effective utilization rate of test resources is improved; and the random seed is introduced in the disk array card test, so as to randomly generate a test case set based on a plurality of test cases corresponding to each business subsystem respectively, and randomly generate a disturbance parameter set based on a plurality of system disturbance parameters corresponding to each system management module respectively, so as to test the firmware in the disk array card, it can be seen that the present application constructs a random, flexible and dynamic test architecture according to the random seed, which not only avoids the potential defect leakage problem caused by fixed order test, but also forces the firmware in the disk array card to face unexpected test pressure to expose hidden problems in the firmware in the disk array card as early as possible.
[0088] Referring to Figure 5 As shown in the figure, the embodiment of the present application provides a disk array card test method, and the specific scheme is as follows.
[0089] The host computer first generates a random seed, and then uses the test resources and the random seed, and based on a plurality of test cases corresponding to each of the business subsystems (host subsystem, disk array subsystem, and disk writing subsystem), randomly generates a plurality of test case sets; wherein different test cases in each test case set correspond to different business subsystems; and all test cases corresponding to the plurality of test case sets contain all test cases or part of test cases corresponding to each business subsystem, which is determined by the resource size and usage time of the test resources. In addition, the host computer can also use the random seed, and based on a plurality of system disturbance parameters corresponding to each of the system management modules (abnormal management module, thread management module, and memory management module), randomly generate a plurality of disturbance parameter sets; wherein different system disturbance parameters in each disturbance parameter set correspond to different system management modules. And the host computer will generate a preset number of repetitions based on the random seed.
[0090] Then, the host computer distributes the plurality of test case sets and the plurality of disturbance parameter sets to the disk array card in turn through the internal distribution module, so as to test the firmware in the disk array card by running the corresponding business subsystem and the corresponding system management module in the disk array card.
[0091] It should be noted that when the number of the plurality of test case sets is more than one, for each test case set in the plurality of test case sets, the firmware in the disk array card needs to be tested a corresponding number of times using each test case set and based on the preset number of repetitions.
[0092] Specifically, the host computer determines the set to be distributed this time from the plurality of test case sets and the plurality of disturbance parameter sets; wherein the set to be distributed this time includes a test case set and / or a disturbance parameter set; generates a target test command based on the set to be distributed this time and the target object corresponding to the elements in the set to be distributed this time; wherein the elements in the set to be distributed this time include test cases and / or system disturbance parameters, and the target object includes business subsystems and / or system management modules; the target test command is issued to the disk array card through the internal distribution module, so that the disk array card parses the set to be distributed this time and the target object from the target test command through the non-volatile memory host controller interface in the firmware, then calls the interface of the target object, obtains the corresponding elements from the set to be distributed this time, runs the target object based on the corresponding elements to test the firmware, and returns the test result to the host computer through the non-volatile memory host controller interface after the test is completed. Correspondingly, the host computer will count the test results and display them to the user for viewing.
[0093] Beneficial effects: the application can flexibly select all test cases or part of test cases corresponding to each business subsystem according to test resources, to randomly generate several test case sets, and test the firmware in the disk array card, so as to avoid waste or excessive consumption of test resources, and improve the effective utilization rate of test resources; and the application introduces a random seed in the disk array card test, to randomly generate a test case set based on several test cases corresponding to each business subsystem, and randomly generate a disturbance parameter set based on several system disturbance parameters corresponding to each system management module, so as to test the firmware in the disk array card, it can be seen that the application constructs a random, flexible and dynamic test architecture according to the random seed, which not only avoids the problem of potential defect leakage caused by fixed order testing, but also forces the firmware in the disk array card to face unexpected test pressure, so as to expose hidden problems in the firmware in the disk array card as early as possible.
[0094] Further, the embodiment of the application further discloses an electronic device, Figure 6 is an electronic device structure diagram shown according to an exemplary embodiment, the contents in the figure cannot be considered as any limitation on the use range of the application. The electronic device, specifically can include: at least one processor 11, at least one memory 12, power supply 13, communication interface 14, input output interface 15 and communication bus 16. Wherein, the memory 12 is used for storing computer program, the computer program is loaded and executed by the processor 11, to realize the related steps in the disk array card test method disclosed in any preceding embodiment. In addition, the electronic device in the embodiment specifically can be electronic computer.
[0095] In the embodiment, the power supply 13 is used for providing working voltage for each hardware device on the electronic device; the communication interface 14 can create data transmission channel between the electronic device and external device, and the communication protocol followed is any communication protocol applicable to the technical solution of the application, which is not limited specifically herein; the input output interface 15 is used for obtaining external input data or outputting data to the outside world, and the specific interface type can be selected according to the specific application needs, which is not limited specifically herein.
[0096] In addition, the memory 12 as the carrier of resource storage can be read-only memory, random access memory, disk or optical disk, etc., and the resources stored thereon can include operating system 121, computer program 122, etc., and the storage mode can be temporary storage or permanent storage.
[0097] The operating system 121 is used to manage and control each hardware device on the electronic device and the computer program 122, which can be Windows Server, Netware, Unix, Linux, etc. The computer program 122 can further include computer programs capable of completing other specific work in addition to the computer programs capable of completing the disk array card testing method disclosed by the electronic device in any of the foregoing embodiments.
[0098] Further, the present application also discloses a computer readable storage medium for storing a computer program; wherein the computer program is executed by a processor to implement the foregoing disclosed disk array card testing method. The specific steps of the method can refer to the corresponding contents disclosed in the foregoing embodiments, which will not be repeated here.
[0099] Further, the present application also discloses a computer program product comprising computer programs / instructions, wherein the computer programs / instructions are executed by a processor to implement the foregoing disclosed disk array card testing method. The specific steps of the method can refer to the corresponding contents disclosed in the foregoing embodiments, which will not be repeated here.
[0100] The 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 embodiments can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can refer to the method part.
[0101] The skilled person can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of both. In order to clearly show the interchangeability of hardware and software, the components and steps of the examples have been described in the above description. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0102] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be directly implemented by hardware, a software module executed by a processor, or a combination of both. The software module can be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0103] Finally, it needs to be pointed out that in this document, relational terms such as first and second and the like can only be intended to distinguish one entity or operation from another entity or operation without necessarily requiring or implying any actual such relationship or order between such entities or operations. Moreover, the terms "comprising", "including", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus including the element.
[0104] The above detailed description of the technical solutions provided by the present application has been provided, and the principles and implementation modes of the present application have been described by applying specific examples. The above description of the examples is only applicable to help understand the method and core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation modes and application ranges will have changes, and in view of the above, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A method for testing a disk array card, characterized in that, The method, applied to a host computer, establishes a communication connection with a disk array card, and the disk array card controls the operation of local business subsystems and system management modules through internal firmware, includes: Using test resources and random seeds, and based on several test cases corresponding to each of the aforementioned business subsystems, several test case sets are randomly generated; wherein, different test cases in the test case sets correspond to different business subsystems; and all test cases corresponding to the several test case sets include all or some of the test cases corresponding to each of the aforementioned business subsystems. Using the random seed and based on several system disturbance parameters corresponding to each of the system management modules, several sets of disturbance parameters are randomly generated; wherein, different system disturbance parameters in the disturbance parameter sets correspond to different system management modules; The test case set and the fault disturbance parameter set are sequentially distributed to the disk array card to test the firmware in the disk array card.
2. The disk array card testing method according to claim 1, characterized in that, The method utilizes test resources and random seeds, and randomly generates several test case sets based on several test cases corresponding to each of the aforementioned business subsystems, including: The scope of test cases is determined based on the size and usage duration of the test resources; wherein, the scope of test cases includes a first preset scope and a second preset scope. Using the scope and random seed of the test cases, and based on the test cases corresponding to each of the business subsystems, several test case sets are randomly generated.
3. The disk array card testing method according to claim 2, characterized in that, The method utilizes the test cases, including a range and a random seed, and randomly generates several test case sets based on the test cases corresponding to each of the business subsystems, including: When the scope of the test cases is the first preset scope, each of the business subsystems is determined as the subsystem to be tested; Using a random seed and based on several test cases corresponding to each of the subsystems under test, several test case sets are randomly generated. The test cases corresponding to the plurality of test case sets include all test cases corresponding to each of the business subsystems.
4. The disk array card testing method according to claim 3, characterized in that, The process of randomly generating several test case sets using a random seed and based on several test cases corresponding to each of the subsystems under test includes: Determine whether a first subsystem under test exists in each of the subsystems under test; the first subsystem under test corresponds to test cases that have not been selected. If it exists, then a random seed is used to select test cases from the unselected test cases corresponding to each of the first subsystems under test to randomly generate a test case set. Then, the process jumps back to the step of determining whether the first subsystem under test exists in each of the subsystems under test until the first subsystem under test does not exist in each of the subsystems under test, so as to obtain the several test case sets.
5. The disk array card testing method according to claim 4, characterized in that, The step of using a random seed to select test cases from the unselected test cases corresponding to each of the first subsystems under test to randomly generate a test case set includes: Using a random seed, test cases are selected from the unselected test cases corresponding to each of the first subsystems under test. The selected test cases will be combined to randomly generate at least one test case set.
6. The disk array card testing method according to claim 2, characterized in that, The method utilizes the test cases, including a range and a random seed, and randomly generates several test case sets based on the test cases corresponding to each of the business subsystems, including: When the scope of the test cases is the second preset scope, the subsystem to be tested is selected from each of the business subsystems based on the test requirements; The total number of testable cases is determined based on the resource size and usage duration of the test resources. Based on the total number of testable test cases, determine the number of testable test cases corresponding to each of the subsystems under test; Using a random seed and based on the number of testable cases and several test cases corresponding to each of the subsystems under test, several test case sets are randomly generated. The test cases corresponding to the plurality of test case sets include a subset of test cases corresponding to each of the business subsystems.
7. The disk array card testing method according to claim 6, characterized in that, The method of randomly generating several test case sets using a random seed and based on the number of testable test cases corresponding to each of the subsystems under test and several test cases includes: Determine whether a second subsystem to be tested exists in each of the subsystems to be tested; the number of selected test cases corresponding to the second subsystem to be tested is less than the number of testable test cases corresponding to the second subsystem to be tested; If it exists, then using a random seed, test cases are selected from the unselected test cases corresponding to each of the second subsystems under test to randomly generate a test case set. Then, the process jumps back to the step of determining whether there is a second subsystem under test in each of the subsystems under test until there is no second subsystem under test in each of the subsystems under test, so as to obtain the several test case sets.
8. The disk array card testing method according to claim 7, characterized in that, The step of using a random seed to select test cases from the unselected test cases corresponding to each of the second subsystems under test to randomly generate a test case set includes: Using a random seed, test cases are selected from the unselected test cases corresponding to each of the second subsystems under test; The selected test cases will be combined to randomly generate at least one test case set.
9. The disk array card testing method according to claim 1, characterized in that, The step of randomly generating a set of disturbance parameters using the random seed and based on several system disturbance parameters corresponding to each of the system management modules includes: Determine whether a target management module exists in each of the system management modules; the target management module corresponds to unselected system disturbance parameters; If it exists, the random seed is used to select system disturbance parameters from the unselected system disturbance parameters corresponding to each target management module to randomly generate a disturbance parameter set. Then, the process jumps back to the step of determining whether a target management module exists in each system management module until the target management module does not exist in each system management module, so as to obtain the disturbance parameter set.
10. The disk array card testing method according to claim 9, characterized in that, The step of using the random seed to select system disturbance parameters from the unselected system disturbance parameters corresponding to each of the target management modules to randomly generate a disturbance parameter set includes: Using the random seed, system disturbance parameters are selected from the unselected system disturbance parameters corresponding to each of the target management modules; The selected system disturbance parameters are combined to randomly generate at least one set of disturbance parameters.
11. The disk array card testing method according to claim 1, characterized in that, The test case sets are sequentially distributed to the disk array card to test the firmware in the disk array card, including: Determine the set of undistributed test cases from the aforementioned test case sets; Distribute one of the test case sets from the undistributed test case sets to the disk array card to test the firmware in the disk array card using the currently distributed test case set; After detecting that the disk array card has completed firmware testing based on the currently distributed test case set, the process jumps back to the step of determining the undistributed test case set from the plurality of test case sets until there are no undistributed test case sets among the plurality of test case sets.
12. The disk array card testing method according to claim 11, characterized in that, When the number of the plurality of test case sets is more than one, the step of testing the firmware in the disk array card using the currently distributed test case set includes: Using the currently distributed test case set and based on a preset number of repetitions, the firmware in the disk array card is tested a corresponding number of times; The preset number of repetitions is the number of times generated based on the random seed.
13. The disk array card testing method according to claim 11, characterized in that, When the number of the plurality of test case sets is one, the step of testing the firmware in the disk array card using the currently distributed test case set includes: Using the currently distributed test case set, the firmware in the disk array card is repeatedly tested, and the test of the firmware in the disk array card ends when a preset termination signal is obtained.
14. The disk array card testing method according to claim 1, characterized in that, The set of disturbance parameters is distributed sequentially to the disk array card to test the firmware in the disk array card, including: Determine the set of undistributed disturbance parameters from the set of disturbance parameters; Distribute one of the undistributed perturbation parameter sets to the disk array card to test the firmware in the disk array card using the currently distributed perturbation parameter set; After receiving the test completion signal returned by the disk array card, the process jumps back to the step of determining the undistributed perturbation parameter set from the set of possible perturbation parameters, until there is no undistributed perturbation parameter set in the set of possible perturbation parameters.
15. The disk array card testing method according to claim 14, characterized in that, The test completion signal is a signal generated by the disk array card after completing firmware testing based on the currently distributed perturbation parameter set within a preset timeout period, or a signal generated when the cumulative test duration of the firmware testing by the disk array card based on the currently distributed perturbation parameter set reaches the preset timeout period.
16. The disk array card testing method according to any one of claims 1 to 15, characterized in that, The step of sequentially distributing the plurality of test case sets and the set of possible disturbance parameters to the disk array card to test the firmware in the disk array card includes: From the plurality of test case sets and the set of disturbance parameters, determine the set that needs to be distributed this time; the set that needs to be distributed this time includes the test case sets and / or the disturbance parameter sets; Based on the set to be distributed this time and the target objects corresponding to the elements in the set to be distributed this time, a target test command is generated; the target object includes the business subsystem and / or the system management module; The target test command is sent to the disk array card, so that the disk array card can parse the set to be distributed and the target object from the target test command through the non-volatile memory host controller interface in the firmware, call the interface of the target object, obtain the corresponding element from the set to be distributed, and run the target object based on the corresponding element to realize the test of the firmware.
17. The disk array card testing method according to claim 16, characterized in that, The target test command is a command defined based on the Non-volatile Memory Host Controller Interface Specification.
18. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the disk array card testing method as described in any one of claims 1 to 17.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the disk array card testing method as described in any one of claims 1 to 17.
20. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the disk array card testing method according to any one of claims 1 to 17.
Citation Information
Patent Citations
Device, server and method for testing performance of RAID card
CN106021081A
Firmware testing method and device, equipment and storage medium
CN114924918A
Test case set generation method and device, computer equipment and storage medium
CN115422080A
Firmware integration test method of disk array card, terminal and storage medium
CN119166531A
Redundant array of independent disks (RAID) card, test method, device and system thereof and host
CN119988234A