A method, apparatus, medium, and product for testing a disk array card
By introducing randomly generated test cases and perturbation parameter sets into disk array card testing, the problem of missed detection of firmware hidden issues was solved, achieving more efficient test coverage and resource utilization.
Patent Information
- Application Number
- CN202511416460.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2026-01-27
- 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 utilization rate of testing resources, avoids missing potential defects, exposes hidden problems in firmware early, and enhances the coverage and effectiveness of testing.
Smart Images

Figure CN120892278B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of hardware testing, and in particular to a method, device, medium, and product for testing disk array cards. Background Technology
[0002] A RAID (Redundant Array of Independent Disks) card, also known as a RAID adapter or RAID controller, is a hardware device used to implement RAID technology to improve data security, performance, and capacity. The firmware within the RAID card is the software program running on the card, responsible for controlling and managing IP (Intellectual Property). Here, IP refers to the pre-developed functional modules, designs, or technologies used in the RAID card. Furthermore, the firmware provides different levels of data partitioning, redundancy, read / write, backup, and recovery functions, such as RAID 0 / 1 / 5 / 6.
[0003] The internal processing flow of firmware in a disk array card is complex. To achieve complete, reliable, and high-quality functionality within a short development cycle, a hierarchical quality protection strategy is required, moving from within each module to within each subsystem and then between subsystems. Layered testing is an indispensable step. 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 to ensure the correctness of functional integration between multiple modules within a subsystem, the correctness of functional integration between multiple subsystems, and the correctness of hardware-software interaction. It should be noted that unit testing and integration testing typically execute all test cases in a pre-defined fixed order. However, a fixed order may not cover different test case execution paths, especially boundary conditions or abnormal scenarios that require a specific operational sequence to trigger. This can easily lead to the omission of some potential defects. Furthermore, multi-threaded scheduling, interrupt handling, and other logic in the firmware may expose defects due to a specific test case execution order (e.g., deadlock caused by resource contention), but a fixed order is unlikely to effectively trigger such problems.
[0004] It is evident that how to promptly detect hidden firmware issues during disk array card testing is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this invention is to provide a disk array card testing method, device, medium, and product. By introducing a random seed to construct a random, flexible, and dynamic testing architecture, the firmware in the disk array card is forced to face unexpected testing pressure, so as to expose hidden problems in the firmware of the disk array card as early as possible. The specific solution is as follows.
[0006] In a first aspect, the present invention provides a method for testing a disk array card, applied to a host computer. The host computer establishes a communication connection with the disk array card, and the disk array card controls the operation of various local business subsystems and system management modules through internal firmware. The method of the present invention includes:
[0007] Using test resources and random seeds, and based on several test cases corresponding to each business subsystem, several test case sets are randomly generated; different test cases in the test case sets correspond to different business subsystems; all test cases corresponding to several test case sets include all or some test cases corresponding to each business subsystem.
[0008] Using a random seed and based on several system disturbance parameters corresponding to each system management module, a set of disturbance parameters is randomly generated; where different system disturbance parameters in the disturbance parameter set correspond to different system management modules.
[0009] Several test case sets and minor disturbance parameter sets are sequentially distributed to the disk array card to test the firmware in the disk array card.
[0010] Optionally, using test resources and a random seed, and based on several test cases corresponding to each business subsystem, several test case sets are randomly generated, including:
[0011] The scope of test cases is determined based on the size and usage duration of the test resources; the scope of test cases includes a first preset scope and a second preset scope.
[0012] By utilizing the scope of test cases and random seeds, and based on the test cases corresponding to each business subsystem, several test case sets are randomly generated.
[0013] Optionally, by utilizing the test case scope and random seed, and based on several test cases corresponding to each business subsystem, several test case sets are randomly generated, including:
[0014] When the scope of the test cases is the first preset scope, each business subsystem is identified as the subsystem to be tested;
[0015] Using a random seed and based on several test cases corresponding to each subsystem under test, several test case sets are randomly generated.
[0016] Among them, the total number of test cases corresponding to several test case sets includes all test cases corresponding to each business subsystem.
[0017] Optionally, several test case sets are randomly generated using a random seed and based on several test cases corresponding to each subsystem under test, including:
[0018] Determine whether the first subsystem under test exists in each subsystem under test; the first subsystem under test corresponds to test cases that have not been selected.
[0019] If it exists, then a random seed is used to select test cases from the unselected test cases corresponding to each first subsystem 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 subsystem under test until the first subsystem under test does not exist in each subsystem under test, so as to obtain several test case sets.
[0020] Optionally, using a random seed, test cases are selected from the unselected test cases corresponding to each of the first subsystems under test to randomly generate a test case set, including:
[0021] Using a random seed, test cases are selected from the unselected test cases corresponding to each first subsystem under test.
[0022] The selected test cases will be combined to randomly generate at least one test case set.
[0023] Optionally, by utilizing the test case scope and random seed, and based on several test cases corresponding to each business subsystem, several test case sets are randomly generated, including:
[0024] When the scope of the test cases is the second preset scope, the subsystem to be tested is selected from each business subsystem based on the test requirements.
[0025] Determine the total number of testable cases based on the size and usage duration of the test resources;
[0026] Based on the total number of testable test cases, determine the number of testable test cases corresponding to each subsystem under test;
[0027] Using a random seed and based on the number of testable cases and several test cases corresponding to each subsystem under test, several test case sets are randomly generated.
[0028] Among them, the test cases corresponding to several test case sets include a portion of the test cases corresponding to each business subsystem.
[0029] Optionally, using a random seed and based on the number of testable cases corresponding to each subsystem under test and several test cases, several test case sets are randomly generated, including:
[0030] Determine whether a second subsystem exists in each subsystem under test; the number of selected test cases for the second subsystem under test is less than the number of testable test cases for the second subsystem under test.
[0031] If it exists, a random seed is used to select test cases from the unselected test cases corresponding to each second subsystem under test to randomly generate a test case set. Then, the process jumps back to the step of determining whether a second subsystem under test exists in each subsystem under test until no second subsystem under test exists in each subsystem under test, so as to obtain several test case sets.
[0032] Optionally, using a random seed, test cases are selected from the unselected test cases corresponding to each second subsystem under test to randomly generate a test case set, including:
[0033] Using a random seed, test cases are selected from the unselected test cases corresponding to each second subsystem under test.
[0034] The selected test cases will be combined to randomly generate at least one test case set.
[0035] Optionally, using a random seed and based on several system disturbance parameters corresponding to each system management module, a set of disturbance parameters is randomly generated, including:
[0036] Determine whether a target management module exists in each system management module; the target management module corresponds to unselected system disturbance parameters;
[0037] If it exists, a 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 no target management module exists in each system management module, so as to obtain a disturbance parameter set.
[0038] Optionally, using a random seed, system disturbance parameters are selected from the unselected system disturbance parameters corresponding to each target management module to randomly generate a disturbance parameter set, including:
[0039] Using random seeds, system disturbance parameters are selected from the unselected system disturbance parameters corresponding to each target management module;
[0040] The selected system disturbance parameters are combined to randomly generate at least one set of disturbance parameters.
[0041] Optionally, several test case sets are sequentially distributed to the RAID card to test the firmware in the RAID card, including:
[0042] Identify the set of undistributed test cases from several test case sets;
[0043] 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;
[0044] 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 several test case sets until there are no undistributed test case sets among several test case sets.
[0045] Optionally, when there is more than one set of test cases, the firmware in the RAID card is tested using the currently distributed set of test cases, including:
[0046] Using the currently distributed test case set and based on a preset number of repetitions, test the firmware in the disk array card a corresponding number of times;
[0047] The preset number of repetitions is the number of times generated based on the random seed.
[0048] Optionally, when the number of test case sets is one, the firmware in the disk array card is tested using the currently distributed test case set, including:
[0049] 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.
[0050] Optionally, the set of disturbance parameters is distributed sequentially to the RAID card to test the firmware in the RAID card, including:
[0051] Determine the set of undistributed disturbance parameters from the set of disturbance parameters;
[0052] 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;
[0053] 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 perturbation parameter set until there is no undistributed perturbation parameter set in the perturbation parameter set.
[0054] Optionally, the test completion signal is a signal generated by the disk array card after completing the firmware test based on the currently distributed perturbation parameter set within a preset timeout period, or a signal generated when the cumulative test time of the disk array card performing firmware test based on the currently distributed perturbation parameter set reaches the preset timeout period.
[0055] Optionally, several test case sets and minor disturbance parameter sets are sequentially distributed to the disk array card to test the firmware in the disk array card, including:
[0056] From several test case sets and several disturbance parameter sets, determine the set that needs to be distributed this time; the set that needs to be distributed this time includes the test case set and / or the disturbance parameter set;
[0057] 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, generate target test commands; target objects include business subsystems and / or system management modules;
[0058] 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 elements from the set to be distributed, and run the target object based on the corresponding elements to realize the test of the firmware.
[0059] Optionally, the target test command is a command defined based on the non-volatile memory host controller interface specification.
[0060] In a second aspect, the present invention provides an electronic device, comprising:
[0061] Memory, used to store computer programs;
[0062] A processor for executing computer programs to implement the steps of the aforementioned disk array card testing method.
[0063] Thirdly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the aforementioned disk array card testing method.
[0064] Fourthly, the present invention provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the aforementioned disk array card testing method.
[0065] The method of this invention is applied to a host computer, which establishes a communication connection with a disk array card. The disk array card controls the operation of local business subsystems and system management modules through its internal firmware. Specifically, the method of this invention includes: the host computer using test resources and a random seed to randomly generate several test case sets based on several test cases corresponding to each business subsystem; wherein different test cases in the test case sets correspond to different business subsystems; all test cases corresponding to several test case sets include all or some test cases corresponding to each business subsystem; using a random seed and based on several system disturbance parameters corresponding to each system management module, a set of minor disturbance parameters is randomly generated; wherein different system disturbance parameters in the disturbance parameter set correspond to different system management modules; and the several test case sets and the set of minor disturbance parameters are sequentially distributed to the disk array card to test the firmware in the disk array card.
[0066] Beneficial effects: This invention allows for the flexible selection of all or some test cases corresponding to each business subsystem based on test resources, randomly generating several test case sets to test the firmware in the RAID card. This avoids waste or excessive consumption of test resources and improves the effective utilization rate of test resources. Furthermore, this invention introduces a random seed in RAID card testing to randomly generate test case sets based on several test cases corresponding to each business subsystem, and randomly generate perturbation parameter sets based on several system perturbation parameters corresponding to each system management module. This allows for the testing of the firmware in the RAID card. Therefore, this invention constructs a random, flexible, and dynamic test architecture based on the random seed, which not only avoids the potential defect omission problem caused by fixed-order testing, but also forces the firmware in the RAID card to face unexpected test pressure, exposing hidden problems in the firmware of the RAID card as early as possible. Attached Figure Description
[0067] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0068] Figure 1 A flowchart of a disk array card testing method provided in an embodiment of the present invention;
[0069] Figure 2 A schematic diagram of a test case set provided in an embodiment of the present invention;
[0070] Figure 3 This is a schematic diagram of another test case set provided in an embodiment of the present invention;
[0071] Figure 4 A schematic diagram of a disturbance parameter set provided in an embodiment of the present invention;
[0072] Figure 5 A flowchart of a disk array card test provided in an embodiment of the present invention;
[0073] Figure 6 This is a structural diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0074] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0075] The terms "comprising" and "having," and any variations thereof, in the specification and accompanying drawings of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may include steps or units not listed.
[0076] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0077] The internal processing flow of firmware in a disk array card is complex. To achieve complete, reliable, and high-quality functionality within a short development cycle, a hierarchical quality protection strategy is required, moving from within each module to within each subsystem and then between subsystems. Layered testing is an indispensable step. 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 to ensure the correctness of functional integration between multiple modules within a subsystem, the correctness of functional integration between multiple subsystems, and the correctness of hardware-software interaction. However, unit testing and integration testing typically execute all test cases in a pre-defined fixed order. This fixed order may not cover different test case execution paths, especially boundary conditions or abnormal scenarios that require a specific operational sequence to trigger, easily leading to missed detections of potential defects. Furthermore, multi-threaded scheduling and interrupt handling logic in firmware may expose defects due to a specific test case execution order (e.g., deadlock caused by resource contention), but a fixed order is unlikely to effectively trigger such problems.
[0078] To address this, the present invention provides a disk array card testing method. By introducing a random seed into the disk array card testing, a test case set and a perturbation parameter set are randomly generated, and the firmware in the disk array card is tested. This not only constructs a random, flexible, and dynamic testing architecture, avoiding the potential defect omission problem caused by using fixed-order testing, but also forces the firmware in the disk array card to face unexpected testing pressure, so as to expose hidden problems in the firmware of the disk array card as early as possible.
[0079] This invention provides a method for testing a disk array card, applied to a host computer. The host computer establishes a communication connection with the disk array card, and the disk array card controls the operation of local business subsystems and system management modules through internal firmware. Specifically, in conjunction with... Figure 1 The method of the present invention will be described in detail.
[0080] Step S11: Using test resources and random seeds, and based on the test cases corresponding to each business subsystem, randomly generate several test case sets; wherein, different test cases in the test case sets correspond to different business subsystems; the total number of test cases corresponding to the several test case sets includes all or some of the test cases corresponding to each business subsystem.
[0081] The method of this invention is applied to a host computer, which is mainly responsible for the management of test cases, the distribution of test cases, and the statistics of test results. Furthermore, the host computer establishes a communication connection with the disk array card, which mainly includes firmware, several business subsystems, and several system management modules. The disk array card can control the operation of local business subsystems and system management modules through its internal firmware.
[0082] It should be noted that the business subsystem includes, but is not limited to, the host subsystem, the disk array subsystem, and the disk write system. The host subsystem primarily supports critical business processing and data computation; the disk array subsystem mainly manages the disk array, which combines multiple physical hard drives into a virtual, single, high-capacity hard drive, providing higher storage performance, higher I / O (Input / Output) performance, and higher reliability than a single hard drive; the disk write system is primarily used to securely write data to the disk.
[0083] Furthermore, for each business subsystem, several test cases can be generated based on the corresponding test plan. That is, each business subsystem may correspond to one test case or multiple test cases, and the testing purpose of each test case is different.
[0084] To avoid executing test cases in a fixed order, this embodiment of the invention introduces a random seed. To fully utilize test resources, this embodiment combines test resources and a random seed, and randomly generates several test case sets based on the test cases corresponding to each business subsystem. It should be noted that different test cases in the test case sets correspond to different business subsystems. Furthermore, when test resources are sufficient, all test cases in several test case sets can include all test cases corresponding to each business subsystem; when test resources are insufficient, all test cases in several test case sets can include only a portion of the test cases corresponding to each business subsystem.
[0085] Specifically, in the process of randomly generating several test case sets by utilizing test resources and random seeds, and based on several test cases corresponding to each business subsystem, the scope of test cases can first be determined according to the resource size and usage duration of the test resources; the scope of test cases includes a first preset scope and a second preset scope; then, using the scope of test cases and random seeds, and based on several test cases corresponding to each business subsystem, several test case sets can be randomly generated.
[0086] The first preset scope refers to the total number of test cases corresponding to a number of test case sets, which includes all test cases corresponding to each business subsystem; the second preset scope refers to the total number of test cases corresponding to a number of test case sets, which includes some test cases corresponding to each business subsystem.
[0087] It should be noted that the larger the size of the test resource and the longer its usage time, the closer the scope of the test cases will be to the first preset scope. Conversely, the smaller the size of the test resource and the shorter its usage time, the closer the scope of the test cases will be to the second preset scope.
[0088] According to one example, in the process of randomly generating several test case sets based on the test case inclusion scope and random seed, and based on the test cases corresponding to each business subsystem, the process may specifically include: when the test case inclusion scope is a first preset inclusion scope, all business subsystems are determined as subsystems to be tested; using the random seed and based on the test cases corresponding to each subsystem to be tested, several test case sets are randomly generated; wherein, all test cases corresponding to the several test case sets include all test cases corresponding to each business subsystem.
[0089] Specifically, when the scope of the test cases is the first preset scope, all business subsystems in the disk array card can be identified as subsystems to be tested. Then, using a random seed, several test case sets are randomly generated based on the test cases corresponding to each subsystem to be tested. Among them, different test cases in each test case set correspond to different business subsystems, and all test cases corresponding to several test case sets include all test cases corresponding to each business subsystem.
[0090] In the process of randomly generating several test case sets using a random seed and based on several test cases corresponding to each subsystem under test, the process first determines whether a first subsystem under test exists in each subsystem under test. The first subsystem under test corresponds to test cases that have not been selected. If it exists, the random seed is used to select test cases from the unselected test cases corresponding to each first subsystem under test to randomly generate test case sets. Then, the process jumps back to the step of determining whether a first subsystem under test exists in each subsystem under test until no first subsystem under test exists in each subsystem under test, thus obtaining several test case sets.
[0091] Understandably, when the test case scope is the first preset scope, all business subsystems on the disk array card are first identified as subsystems under test. At this point, all test cases corresponding to all subsystems under test are unselected test cases, meaning that all subsystems under test have unselected test cases. Then, it is determined whether a first subsystem under test exists in each subsystem under test, where the first subsystem under test corresponds to unselected test cases. If a first subsystem under test exists in each subsystem under test, test cases are randomly selected from the unselected test cases corresponding to each first subsystem under test using a random seed to randomly generate a test case set. Then, the process jumps back to the step of determining whether a first subsystem under test exists in each subsystem under test until no first subsystem under test exists in each subsystem under test, meaning that all test cases corresponding to all subsystems under test are already selected test cases. At this point, several test case sets can be obtained.
[0092] like Figure 2As 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 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-based system. 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-based system. When the test case coverage is within the first preset coverage range, the host subsystem, disk array subsystem, and disk partitioning system are all identified as subsystems under test. Then, it is determined whether there is a first subsystem under test with an unselected test case in each subsystem under test. If there is a first subsystem under test in each subsystem under test, a random seed is used to select one test case from the unselected test cases corresponding to each first subsystem under test to randomly generate a test case set. Then, the process jumps back to the step of determining whether there is a first subsystem under test with an unselected test case in each subsystem under test until there is no first subsystem under test in each subsystem under test, so as to obtain several test case sets. For example, several test case sets may be (A1, B1, C1), (A2, B2, C2), ..., (Am, Bm, Cm), (Bm+1, Cm+1), ..., (Bn, Co) in one case. This sequential example is only for ease of description. In reality, they should be random and unordered, but it is necessary to ensure that all test cases corresponding to the final several test case sets include all test cases corresponding to each business subsystem.
[0093] It should be noted that the test cases are selected from the unselected test cases corresponding to each first 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.
[0094] Furthermore, since the number of test cases corresponding to different business subsystems may be different, the above method can be used to ignore the business subsystem after all test cases corresponding to a certain business subsystem have been selected, and continue to generate test case sets based only on the test cases corresponding to other business subsystems.
[0095] To further enhance the flexibility, randomness, and dynamism of test case set generation, the present invention, in the process of randomly generating a test case set by using a random seed to select test cases from the unselected test cases corresponding to each first subsystem under test, may specifically include: using a random seed to select test cases from the unselected test cases corresponding to each first subsystem under test; and combining the selected test cases to randomly generate at least one test case set.
[0096] by Figure 2 For example, suppose the test cases selected this time are A1, B1, and C1. By combining the test cases selected this time, one test case set (A1, B1, C1) can be generated in one case, two test case sets (A1, B1) and (C1) can be generated in another case, and three test case sets (A1), (B1), and (C1) can be generated in yet another case. Of course, there are other cases as well, but we will not give too many examples here. We only need to ensure that all test cases corresponding to at least one randomly generated test case set include all the test cases selected this time.
[0097] According to another example, in the process of randomly generating several test case sets based on the test case scope and random seed, and based on several test cases corresponding to each business subsystem, the specific steps may include: when the test case scope is a second preset scope, selecting the subsystem to be tested from each business subsystem based on the test requirements; determining the total number of testable test cases based on the resource size and usage duration of the test resources; determining the number of testable test cases corresponding to each subsystem to be tested based on the total number of testable test cases; randomly generating several test case sets using the random seed and based on the number of testable test cases corresponding to each subsystem to be tested and several test cases; wherein all test cases corresponding to several test case sets include some test cases corresponding to each business subsystem.
[0098] Specifically, when the test case scope is the second preset scope, the subsystem to be tested is selected from each business subsystem based on the test requirements. This can be done by selecting all business subsystems or selecting a subset of them. To avoid excessive consumption of test resources, this embodiment of the invention can determine the total number of testable cases based on the size and duration of the test resources. Then, based on the total number of testable cases, the number of testable cases corresponding to each subsystem to be tested is determined. That is, the sum of the number of testable cases corresponding to each subsystem to be tested equals the total number of testable cases. The number of testable cases corresponding to a subsystem to be tested represents how many test cases can be selected from all the test cases corresponding to that subsystem to be tested to generate a test case set. Furthermore, the number of testable cases corresponding to a subsystem to be tested should not exceed the number of test cases corresponding to that subsystem. Then, using a random seed, and based on the number of testable cases corresponding to each subsystem to be tested and several test cases, several test case sets are randomly generated. In this test case set, different test cases correspond to different business subsystems, and all test cases in several test case sets include some test cases corresponding to each business subsystem.
[0099] It should be noted that after determining the total number of testable cases based on the size and usage duration of the test resources, the specific number of testable cases for each subsystem under test can be determined by configuring an importance level (between 0 and 1) for each subsystem, calculating the sum of the number of test cases for each subsystem, and then determining the proportion coefficient for each subsystem based on the ratio of the number of test cases for each subsystem to the total. The sum of the proportion coefficients for all subsystems under test is 1, and the sum of the importance levels for all subsystems under test is also 1. Then, the number of first test cases for each subsystem under test is determined by multiplying its importance level by the total number of testable cases, and the number of second test cases for each subsystem under test is determined by multiplying its proportion coefficient by the total number of testable cases. Finally, the average of the first and second test case numbers for each subsystem under test is calculated to obtain the total number of testable cases for each subsystem under test.
[0100] In the process of randomly generating several test case sets using a random seed and based on the number of testable test cases corresponding to each subsystem under test and several test cases, the process first determines whether a second subsystem under test exists in each subsystem under test. The number of selected test cases corresponding to the second subsystem under test is less than the number of testable test cases corresponding to the second subsystem under test. If it exists, the random seed is used to select test cases from the unselected test cases corresponding to each second subsystem under test to randomly generate test case sets. Then, the process jumps back to the step of determining whether a second subsystem under test exists in each subsystem under test until no second subsystem under test exists in each subsystem under test, thus obtaining several test case sets.
[0101] Understandably, after selecting the subsystems to be tested from each business subsystem based on testing requirements, the test cases corresponding to these subsystems are all unselected test cases, meaning the number of selected test cases for all subsystems to be tested is zero. Then, it is determined whether a second subsystem to be tested exists within each subsystem to be tested; the number of selected test cases for the second subsystem to be tested is less than the number of testable test cases for that second subsystem. If a second subsystem to be tested exists in each subsystem to be tested, test cases are randomly selected from the unselected test cases corresponding to each second subsystem to be tested using a random seed to randomly generate test case sets. Then, the process returns to determining whether a second subsystem to be tested exists in each subsystem to be tested, until no second subsystem to be tested exists in any subsystem to be tested, meaning the number of selected test cases for each subsystem to be tested is greater than or equal to the corresponding number of testable test cases. At this point, several test case sets are obtained.
[0102] like 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.
[0103] 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.
[0104] 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 process may specifically 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.
[0105] 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.
[0106] Step S12: Using a random seed and based on several system disturbance parameters corresponding to each system management module, randomly generate a set of disturbance parameters; wherein, different system disturbance parameters in the disturbance parameter set correspond to different system management modules.
[0107] In this embodiment of the invention, for each system management module in the disk array card, a random seed is used, and several system disturbance parameter sets are randomly generated based on several system disturbance parameters corresponding to each system management module; wherein, different system disturbance parameters in each disturbance parameter set correspond to different system management modules.
[0108] In the process of randomly generating a set of disturbance parameters using a random seed and based on several system disturbance parameters corresponding to each system management module, the first step is to determine whether a target management module exists in each system management module. 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 set of disturbance parameters. Then, the process jumps back to the step of determining whether a target management module exists in each system management module until no target management module exists in each system management module, thus obtaining the set of disturbance parameters.
[0109] Specifically, for a randomly generated set of minor disturbance parameters, the process first determines whether a target management module exists in each system management module. A target management module corresponds to unselected system disturbance parameters. It should be noted that initially, all system management modules are unselected system disturbance parameters, meaning that initially, all system management modules are target management modules. If a target management module exists in any system management module, a random seed is used to select one system disturbance parameter 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 determining whether a target management module exists in each system management module until no target management module exists in any system management module, meaning that all system disturbance parameters corresponding to all system management modules are selected system disturbance parameters. At this point, the minor disturbance parameter set is obtained. It should be noted that the set of all system disturbance parameters includes all system disturbance parameters corresponding to each system management module.
[0110] like 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.
[0111] 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.
[0112] 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.
[0113] 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.
[0114] It should be noted that the thread management module's thread parameters include three dimensions: priority, concurrency count, and task time limit. Setting the priority allows high-priority threads to dominate CPU (Central Processing Unit) resources and enables dynamic scheduling of threads with different priorities. Setting the concurrency count controls the maximum number of threads running simultaneously, and setting the task time limit controls thread execution time. These thread parameters allow for the construction of complex system runtime states with competitive characteristics. The memory management module's memory parameters include allocation strategies (heap memory management / byte pool pre-allocation) and capacity thresholds. Memory parameters can trigger memory boundary issues by changing the memory layout mode. Thus, this embodiment of the invention, by introducing system disturbance parameters from both the thread and memory directions, can construct non-deterministic load scenarios, causing the firmware in the disk array card to expose deep-seated defects such as timing misordering and memory overflow in an unpredictable resource contention environment.
[0115] Step S13: Distribute several test case sets and minor disturbance parameter sets to the disk array card in sequence to test the firmware in the disk array card.
[0116] In this embodiment of the invention, several test case sets and minor disturbance parameter sets are randomly generated. The host computer distributes the test case sets and minor disturbance parameter sets to the disk array card in sequence through its 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.
[0117] According to one example, in the process of sequentially distributing several test case sets to a disk array card to test the firmware on the disk array card, firstly, undistributed test case sets are identified from the several test case sets; one of the undistributed test case sets is then distributed to the disk array card to test the firmware on the disk array card using the currently distributed test case set; after detecting that the disk array card has completed the firmware test based on the currently distributed test case set, the process jumps back to the step of identifying undistributed test case sets from the several test case sets, until there are no undistributed test case sets among the several test case sets. Initially, all several test case sets are undistributed test case sets.
[0118] It should be noted that the host computer can distribute several test case sets to the disk array card in sequence, or it can distribute several test case sets to the disk array card randomly without order, thereby forcing the firmware in the disk array card to face unpredictable pressure and avoiding the problem of missing potential firmware defects.
[0119] When there is more than one set of test cases, the firmware in the disk array card is tested using the currently distributed test case set. Specifically, this may include: using the currently distributed test case set and based on a preset number of repetitions, testing the firmware in the disk array card a corresponding number of times; wherein, the preset number of repetitions is the number of times generated based on a random seed.
[0120] For example, if the preset number of repetitions based on the random seed is n, then when there are more than one test case set, the firmware in the disk array card can be tested n times using the currently distributed test case set. It should be noted that n is an integer not less than 1.
[0121] Assuming the number of test case sets is m and the preset number of repetitions is n, if the host computer distributes the 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 n times. After the n tests are completed, the second test case set will be used to test the firmware in the disk array card n times, and so on, until the last test case set is used to test the firmware in the disk array card n times.
[0122] When the number of test case sets is one, the firmware in the disk array card is tested using the currently distributed test case set. Specifically, this may include: repeatedly testing the firmware in the disk array card 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.
[0123] It should be noted that when there is only one set of test cases, the number of test cases in this set can be either one or multiple, but they are all randomly selected based on a random seed.
[0124] According to another example, in the process of sequentially distributing potential disturbance parameter sets to the RAID card to test the firmware on the RAID card, firstly, undistributed disturbance parameter sets are identified from the potential disturbance parameter sets; one of the undistributed disturbance parameter sets is then distributed to the RAID card to test the firmware on the RAID card using the currently distributed disturbance parameter set; after receiving a test completion signal from the RAID card, the process jumps back to the step of identifying undistributed disturbance parameter sets from the potential disturbance parameter sets, until no undistributed disturbance parameter sets remain in the potential disturbance parameter set. Initially, all potential disturbance parameter sets are undistributed disturbance parameter sets.
[0125] It should be noted that the host computer can either distribute the set of minor disturbance parameters to the disk array card in sequence or distribute the set of minor disturbance parameters to the disk array card randomly, thereby forcing the firmware in the disk array card to face unpredictable pressure and avoiding the problem of missing potential firmware defects.
[0126] The test completion signal returned by the disk array card is either generated after the disk array card completes the firmware test based on the currently distributed perturbation parameter set within the preset timeout period, or generated when the cumulative test time of the disk array card performing firmware test based on the currently distributed perturbation parameter set reaches the preset timeout period.
[0127] In other words, this embodiment of the invention sets a preset timeout period to avoid situations where a certain perturbation parameter set cannot complete firmware testing due to environmental, network, or other reasons. Specifically, when the disk array card receives the currently distributed perturbation parameter set from the host computer, it will use the currently distributed perturbation parameter set to run the corresponding system management module to test the firmware in the disk array card. If the disk array card detects that the firmware test is completed within the preset timeout period, or the cumulative test time for the firmware test reaches the preset timeout period, it will generate a test completion signal and return it to the host computer. Correspondingly, after receiving the test completion signal returned by the disk array card, the host computer will trigger the distribution of the next perturbation parameter set.
[0128] According to another example, in the process of sequentially distributing several test case sets and minor disturbance parameter sets to the disk array card to test the firmware in the disk array card, the set to be distributed in this instance is first determined from the several test case sets and minor disturbance parameter sets; wherein, the set to be distributed in this instance includes the test case sets and / or disturbance parameter sets; based on the set to be distributed in this instance and the target objects corresponding to the elements in the set to be distributed in this instance, a target test command is generated; wherein, the elements in the set to be distributed in this instance include test cases and / or system disturbance parameters, and the target objects include business subsystems and / or system management modules; the target test command is sent to the disk array card, so that the disk array card can parse the set to be distributed in this instance and the target objects from the target test command through the non-volatile memory host controller interface in the firmware, and then call the interface of the target objects to obtain the corresponding elements from the set to be distributed in this instance, and run the target objects based on the corresponding elements to achieve the testing of the firmware.
[0129] The target test command is a command defined based on the Non-Volatile Memory Host Controller Interface Specification (NVMe). It should be noted that the target test command is a custom command extended from the NVMe specification. The data transfer direction of this command is 0x1 (indicating data transfer from the host computer to the disk array card), and the opcode of this command is between 0xC0 and 0xFF.
[0130] The non-volatile memory host controller interface in the firmware can not only receive target test commands sent by the host computer, but also notify the host computer to obtain the test results of the disk array card through a custom asynchronous event request. Specifically, by marking the asynchronous event type in the asynchronous event request as 111b, it is used to notify the host computer to obtain the test results of the disk array card. Correspondingly, when the host computer receives the asynchronous event request and the asynchronous event type in the asynchronous event request is 111b, it uses the Get Log Page command (a management command in the NVMe protocol used to obtain the log page information of the storage device) to obtain the test results from the disk array card for the user to view.
[0131] Beneficial effects: This invention allows for the flexible selection of all or some test cases corresponding to each business subsystem based on test resources, randomly generating several test case sets to test the firmware in the RAID card. This avoids waste or excessive consumption of test resources and improves the effective utilization rate of test resources. Furthermore, this invention introduces a random seed in RAID card testing to randomly generate test case sets based on several test cases corresponding to each business subsystem, and randomly generate perturbation parameter sets based on several system perturbation parameters corresponding to each system management module. This allows for the testing of the firmware in the RAID card. Therefore, this invention constructs a random, flexible, and dynamic test architecture based on the random seed, which not only avoids the potential defect omission problem caused by fixed-order testing, but also forces the firmware in the RAID card to face unexpected test pressure, exposing hidden problems in the firmware of the RAID card as early as possible.
[0132] See Figure 5 As shown in the figure, this embodiment of the invention provides a method for testing a disk array card, and the specific scheme is as follows.
[0133] The host computer first generates a random seed. Then, using test resources and the random seed, and based on several test cases corresponding to each business subsystem (host subsystem, disk array subsystem, and disk partitioning system), it randomly generates several test case sets. Different test cases within each test case set correspond to different business subsystems. Furthermore, all test cases in each test case set include all or some test cases corresponding to each business subsystem, determined by the size and duration of the test resources. In addition, the host computer can also use the random seed and, based on several system disturbance parameters corresponding to each system management module (exception management module, thread management module, and memory management module), randomly generate several disturbance parameter sets. Different system disturbance parameters in each disturbance parameter set correspond to different system management modules. The host computer also generates a preset number of repetitions based on the random seed.
[0134] Subsequently, the host computer distributes several test case sets and minor disturbance parameter sets to the disk array card through its internal distribution module, so as to test the firmware in the disk array card by running the corresponding business subsystem and system management module in the disk array card.
[0135] It should be noted that when there is more than one set of test cases, for each set of test cases, the firmware in the disk array card needs to be tested a corresponding number of times based on a preset number of repetitions.
[0136] Specifically, the host computer determines the set to be distributed this time from several test case sets and some disturbance parameter sets; the set to be distributed this time includes the test case set and / or disturbance parameter set; 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 elements in the set to be distributed this time include test cases and / or system disturbance parameters, and the target objects include business subsystems and / or system management modules; the target test command is sent to the disk array card through the internal distribution module, so that the disk array card can parse 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 call the interface of the target object to obtain the corresponding elements from the set to be distributed this time, run the target object based on the corresponding elements to realize the firmware test, and after the test is completed, return the test results to the host computer through the non-volatile memory host controller interface. Accordingly, the host computer will count the test results and display them to the user for viewing.
[0137] Beneficial effects: This invention allows for the flexible selection of all or some test cases corresponding to each business subsystem based on test resources, randomly generating several test case sets to test the firmware in the RAID card. This avoids waste or excessive consumption of test resources and improves the effective utilization rate of test resources. Furthermore, this invention introduces a random seed in RAID card testing to randomly generate test case sets based on several test cases corresponding to each business subsystem, and randomly generate perturbation parameter sets based on several system perturbation parameters corresponding to each system management module. This allows for the testing of the firmware in the RAID card. Therefore, this invention constructs a random, flexible, and dynamic test architecture based on the random seed, which not only avoids the potential defect omission problem caused by fixed-order testing, but also forces the firmware in the RAID card to face unexpected test pressure, exposing hidden problems in the firmware of the RAID card as early as possible.
[0138] Furthermore, embodiments of this application also disclose an electronic device, Figure 6 This is a structural diagram of an electronic device according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. Specifically, the electronic device may include: at least one processor 11, at least one memory 12, a power supply 13, a communication interface 14, an input / output interface 15, and a communication bus 16. The memory 12 stores a computer program, which is loaded and executed by the processor 11 to implement the relevant steps in the disk array card testing method disclosed in any of the foregoing embodiments. Furthermore, the electronic device in this embodiment may specifically be an electronic computer.
[0139] In this embodiment, the power supply 13 is used to provide operating voltage for various hardware devices on the electronic device; the communication interface 14 can create a data transmission channel between the electronic device and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 15 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0140] In addition, the memory 12, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 121, computer program 122, etc., and the storage method can be temporary storage or permanent storage.
[0141] The operating system 121 is used to manage and control the various hardware devices on the electronic device and the computer program 122, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the disk array card testing method executed by the electronic device as disclosed in any of the foregoing embodiments, the computer program 122 may further include a computer program capable of performing other specific tasks.
[0142] Furthermore, the present invention also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disk array card testing method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0143] Furthermore, this invention also discloses a computer program product, including a computer program / instructions, wherein the computer program / instructions, when executed by a processor, implement the aforementioned disk array card testing method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0144] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0145] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0146] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0147] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0148] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only intended to help understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this 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 set 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
Firmware testing method and device, equipment and storage medium
CN114924918A
Electronic device and method for testing redundant array of independent disks level
US20150177998A1