Test method of storage control device and electronic device
By injecting faults such as link anomalies, input/output non-response, and offline disk operations into the storage control device, the error handling mechanisms of RAID and SAS were verified, the problem of incomplete error handling in RAID and SAS was solved, and the stability and reliability of the storage system were improved.
Patent Information
- Application Number
- CN202511220297.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-28
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-08-28
AI Technical Summary
In existing technologies, the error handling mechanisms of RAID and SAS are imperfect, leading to reduced performance of the storage subsystem and the risk of downtime, and there is a lack of effective verification methods.
By performing link anomaly, input/output non-responsive fault injection, and offline disk operations on the storage control device, test results of the error handling mechanism are generated to verify the error handling capabilities of RAID and SAS.
Early detection and improvement of RAID and SAS error handling mechanisms can prevent data loss and downtime, ensuring storage system stability.
Smart Images

Figure CN120743606B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and particularly relates to a test method of a storage control device and an electronic device. BACKGROUND
[0002] RAID (Redundant Arrays of Independent Disks) and SAS (Serial Attached Small Computer System Interface) are core components of a storage subsystem. Both RAID and SAS have a complete error handling mechanism that can be used to handle different error conditions. Therefore, the stability of RAID and SAS directly affects the performance and data security of the storage subsystem.
[0003] However, in the case that the error handling mechanism of RAID and SAS is imperfect, the RAID or host (main machine) may recover or reset (reset) the abnormal condition multiple times, thereby causing the overall performance to be reduced, and possibly leading to the consequences of a crash or restart. Therefore, how to accurately verify the effectiveness of the error handling mechanism of RAID and SAS is a technical problem to be solved in the related art. SUMMARY
[0004] In view of the above problems, the present application provides a test method of a storage control device and an electronic device.
[0005] According to a first aspect of this application, a testing method for a storage control device is provided, comprising: performing physical layer state management operations on a first target storage device to which the storage control device under test is attached; and obtaining a first error injection test result for the storage control device under test in response to a link anomaly based on a response operation of the storage control device under test to the first target storage device; wherein the response status of the first target storage device characterizes the response status of the first target storage device to input / output requests sent by the storage control device under test; and performing an input / output non-response fault injection operation on a second target storage device to which the storage control device under test is attached. Based on the response operation of the storage control device under test to the second target storage device, a second error injection test result is obtained for the storage control device under test not responding to input / output. Offline and deletion operations are performed on the third target storage device mounted to the storage control device under test, and based on the response operation of the storage control device under test to the third target storage device, a third error injection test result is obtained for the storage control device under test regarding the offline disk. Based on the first error injection test result, the second error injection test result, and the third error injection test result, a test result for the error handling mechanism of the storage control device under test is generated.
[0006] A second aspect of this application provides a testing apparatus for a storage control device, comprising: a link anomaly injection testing module, an input / output non-response injection testing module, an offline disk injection testing module, and a generation module. The link anomaly injection testing module is used to perform physical layer state management operations on a first target storage device attached to the storage control device under test, and based on the response status of the storage control device under test to the first target storage device, obtain a first injection test result for the storage control device under test regarding link anomalies; wherein the response status of the first target storage device characterizes the response status of the first target storage device to input / output requests sent by the storage control device under test; the input / output non-response injection testing module is used to perform input / output non-response fault injection operations on a second ... second target storage device to the first target storage device, obtain a first injection test result for the storage control device under test regarding link anomalies; wherein the response status of the first target storage device characterizes the response status of the first target storage device to input / output requests; and based on the response status of the second target storage device to the first target storage device, obtain a first injection test result for the storage control device under test regarding link anomalies. The control device responds to the response status of the second target storage device to obtain a second error injection test result for the storage control device under test that does not respond to input / output. The offline disk error injection test module is used to perform offline and deletion operations on the third target storage device mounted on the storage control device under test, and based on the response status of the storage control device under test to the third target storage device, obtains a third error injection test result for the storage control device under test for the offline disk. The generation module is used to generate test results for the error handling mechanism of the storage control device under test based on the first error injection test result, the second error injection test result, and the third error injection test result.
[0007] A third aspect of this application provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the test method described above.
[0008] A fourth aspect of this application also provides a computer-readable storage medium having a computer program or instructions stored thereon, wherein the computer program or instructions, when executed by a processor, implement the steps of the above-described test method.
[0009] The fifth aspect of this application also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described test method.
[0010] According to the testing method for the storage control device provided in this application, the error handling mechanism of the storage control device under test (DUT) is verified by performing physical layer state management operations on the DUT, by performing input / output non-response fault injection operations on the DUT, and by performing offline and deletion operations on the DUT, thereby verifying the error handling mechanism of the DUT for offline disks. This achieves verification of the DUT's error handling mechanism through fault injection. Therefore, imperfections in the DUT's error handling mechanism can be identified in advance, preventing serious problems such as data loss and system crashes. Attached Figure Description
[0011] Figure 1 An application scenario diagram of a testing method for a storage control device according to an embodiment of this application is shown;
[0012] Figure 2 A flowchart of a testing method for a storage control device according to an embodiment of this application is shown;
[0013] Figure 3 A flowchart is shown for a test method of a storage control device according to another embodiment of this application;
[0014] Figure 4 A structural block diagram of a test apparatus for a storage control device according to an embodiment of this application is shown;
[0015] Figure 5 A block diagram of an electronic device suitable for implementing a test method for a storage control device according to an embodiment of this application is shown. Detailed Implementation
[0016] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0017] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0018] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0019] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0020] Both RAID and SAS have a complete error handling mechanism to handle different error situations and, in the event of a severe failure, remove or isolate the faulty hard drive to ensure the stable operation of the entire system. Therefore, verifying the effectiveness of the error handling mechanisms of RAID and SAS is crucial.
[0021] Current technologies involve bug-injection methods targeting entire server systems, individual chips, or buses. Specifically, they involve hardware or software bug-injection to cover defects in the overall system or firmware design, enabling the detection of firmware algorithm stability and self-recovery capabilities. However, current bug-injection technologies have relatively limited targets and are quite complex, making them unsuitable for verifying error handling mechanisms for RAID and SAS systems.
[0022] Therefore, embodiments of this application provide a testing method for storage control devices to verify the error handling mechanisms of RAID and SAS through error injection, thereby avoiding the impact caused by imperfect error handling mechanisms of RAID and SAS and preventing problems such as data loss and system crashes.
[0023] Figure 1 An application scenario diagram of a testing method for a storage control device according to an embodiment of this application is shown.
[0024] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a storage control device under test 110, a server 150, and a first target storage device 120, a second target storage device 130, and a third target storage device 140 mounted on the storage control device under test 110.
[0025] In one embodiment, the server 150 can perform physical layer state management operations on the first target storage device 120 attached to the storage control device 110 under test, and obtain the first error injection test result of the storage control device 110 under test for the link anomaly based on the response operation of the storage control device 110 under test to the first target storage device 120.
[0026] The response status of the first target storage device 120 represents the response status of the first target storage device 120 to the input / output request sent by the storage control device under test 110.
[0027] Server 150 can also perform an input / output non-response fault injection operation on the second target storage device 130 attached to the storage control device under test 110, and obtain the second fault injection test result of the storage control device under test 110 for input / output non-response based on the response operation of the storage control device under test 110 to the response status of the second target storage device 130.
[0028] Server 150 can also perform offline and deletion operations on the third target storage device 140 mounted on the storage control device 110 under test, and obtain the third error test result of the storage control device 110 under test for the offline disk based on the response operation of the storage control device 110 under test to the third target storage device 140.
[0029] Therefore, server 150 can also generate test results for the error handling mechanism of storage control device 110 under test based on the first error injection test results, the second error injection test results and the third error injection test results.
[0030] The following will be based on Figure 1 The described scene, through Figures 2-3 The testing method for the storage control device according to the embodiments of this application will be described in detail.
[0031] Figure 2 A flowchart illustrating a testing method for a storage control device according to an embodiment of this application is shown.
[0032] like Figure 2 As shown, the test method 200 includes operations S210 to S240.
[0033] In operation S210, physical layer state management operations are performed on the first target storage device attached to the storage control device under test, and the first error injection test result of the storage control device under test in response to the first target storage device is obtained based on the response operation of the storage control device under test to the response status of the first target storage device.
[0034] The response status of the first target storage device represents its response to input / output requests sent by the storage control device under test.
[0035] In one embodiment, the storage control device under test can be RAID or SAS.
[0036] According to an embodiment of this application, performing physical layer state management operations on a first target storage device attached to the storage control device under test can cause the first target storage device to be in a link failure state. Therefore, when the first target storage device is in a link failure state, the storage control device under test needs to handle the link failure of the first target storage device and take corresponding response operations to resolve the link failure.
[0037] The response status can include no response, response error, response timeout, etc.
[0038] According to embodiments of this application, the storage control device under test (SDD) can determine errors in the first target storage device based on its response to input / output requests. Therefore, the SDD can perform corresponding response operations based on the determined errors in the first target storage device.
[0039] Based on this, the first error injection test result of the storage control device under test in response to the link anomaly can be obtained based on the response operation of the storage control device under test, so as to indicate whether the error handling mechanism of the storage control device under test in response to the link anomaly is sound.
[0040] In one embodiment, the above operation S210 is a link anomaly injection error test for the storage control device under test.
[0041] In operation S220, an input / output non-response fault injection operation is performed on the second target storage device attached to the storage control device under test, and based on the response operation of the storage control device under test to the response status of the second target storage device, the second fault injection test result of the storage control device under test in response to the input / output non-response is obtained.
[0042] The response status of the second target storage device characterizes the response status of the second target storage device to the input / output requests sent by the storage control device under test.
[0043] According to an embodiment of this application, performing an input / output non-responsive fault injection operation on a second target storage device attached to the storage control device under test can render the second target storage device in a non-responsive input / output state. Therefore, when the second target storage device is in a non-responsive input / output state, the storage control device under test needs to process the non-responsive input / output of the second target storage device to take corresponding response operations to resolve the non-responsive input / output issue.
[0044] According to embodiments of this application, the storage control device under test (SDD) can determine errors in the second target storage device based on its response to input / output requests. Therefore, the SDD can perform corresponding response operations based on the determined errors in the second target storage device.
[0045] Based on this, the second error injection test result of the storage control device under test for non-responsive inputs / outputs can be obtained based on the response operation made by the storage control device under test, so as to indicate whether the error handling mechanism of the storage control device under test for non-responsive inputs / outputs is sound.
[0046] In one embodiment, the above operation S220 is a test to check the non-responsive input / output of the storage control device under test.
[0047] In operation S230, the third target storage device mounted to the storage control device under test is taken offline and deleted. Based on the response of the storage control device under test to the third target storage device, the third error test result of the storage control device under test for the offline disk is obtained.
[0048] The response status of the third target storage device characterizes the response status of the third target storage device to the input / output requests sent by the storage control device under test.
[0049] According to embodiments of this application, the first target storage device, the second target storage device, and the third target storage device can be physical disks and logical disks mounted on the storage control device under test. The first target storage device, the second target storage device, and the third target storage device can be the same storage device mounted on the storage control device under test, or they can be different storage devices mounted on the storage control device under test.
[0050] According to an embodiment of this application, performing offline and deletion operations on a third target storage device mounted on the storage control device under test can render the third target storage device an offline disk. Therefore, when the third target storage device is offline, the storage control device under test needs to process this offline status and take appropriate response operations to resolve the issue.
[0051] According to embodiments of this application, the storage control device under test (SDD) can determine errors in the third target storage device based on its response to input / output requests. Therefore, the SDD can perform corresponding response operations based on the determined errors in the third target storage device.
[0052] Based on this, the third error handling test result of the storage control device under test for the offline disk can be obtained from the response operation of the storage control device under test, so as to indicate whether the error handling mechanism of the storage control device under test for the offline disk is perfect.
[0053] In one embodiment, the above operation S230 is an offline disk error injection test of the storage control device under test.
[0054] In operation S240, based on the first error injection test result, the second error injection test result, and the third error injection test result, test results are generated for the error handling mechanism of the storage control device under test.
[0055] According to embodiments of this application, test results for the error handling mechanism of the storage control device under test (SDD) can be generated based on the first error injection test results for link anomalies, the second error injection test results for input / output non-response, and the third error injection test results for offline disks. The completeness of the error handling mechanism of the SDD can be determined based on the test results.
[0056] According to embodiments of this application, the error handling mechanism of the storage control device under test (SDD) is verified by performing physical layer state management operations, by performing input / output non-response fault injection operations, and by performing offline and deletion operations. This achieves verification of the SDD's error handling mechanism through error injection. Therefore, imperfections in the SDD's error handling mechanism can be identified early, preventing serious problems such as data loss and system crashes.
[0057] According to an embodiment of this application, the testing method for the storage control device further includes: executing a test script for the storage control device under test before performing physical layer state management operations, input / output non-response fault injection operations, and offline and deletion operations on the storage control device under test, so that the storage control device under test sends input / output requests to multiple storage devices attached to the storage control device under test.
[0058] According to an embodiment of this application, the storage control device under test can be equipped with multiple storage devices, and the first target storage device, the second target storage device, and the third target storage device can be at least one of the multiple storage devices.
[0059] According to an embodiment of this application, to verify the effectiveness of the error handling mechanism of the storage control device under test, it is necessary to inject errors into the storage devices mounted on the storage control device under test. Therefore, before verifying the effectiveness of the error handling mechanism of the storage control device under test, it is necessary to ensure that the storage control device under test and multiple storage devices are in normal operating condition.
[0060] Therefore, before performing physical layer state management operations, input / output non-response fault injection operations, and offline and deletion operations on the storage control device under test, that is, before performing the above operations S210 to S240, it is necessary to simulate the storage control device under test and multiple storage devices in a normal operating scenario, so as to verify the effectiveness of the error handling mechanism of the storage control device under test when the storage control device under test and multiple storage devices are in a normal operating state.
[0061] Specifically, a test script for the storage control device under test can be executed, enabling the storage control device under test to send input / output requests to multiple storage devices attached to the storage control device under test, thereby simulating the normal operation of the storage control device under test and multiple storage devices.
[0062] In one embodiment, the test script can be a flexible I / O (Input / Output) test script. For example, a flexible I / O test script can be executed on the storage controller under test (SDD) to enable the SDD to send input / output requests to multiple storage devices attached to the SDD, thereby constructing I / O stress. After the stress stabilizes, the normal operation of the SDD and the multiple storage devices can be simulated.
[0063] In one embodiment, simulating the normal operation of the storage control device under test and multiple storage devices is equivalent to simulating a user application scenario.
[0064] According to embodiments of this application, to verify the effectiveness of the error handling mechanism of the storage control device under test (SDD), a test script for the SDD needs to be executed before performing physical layer state management operations, input / output non-response fault injection operations, and offline and deletion operations. This allows the SDD to send input / output requests to multiple storage devices attached to it, simulating the normal operation of the SDD and the multiple storage devices. Therefore, verifying the effectiveness of the SDD's error handling mechanism while the SDD and the multiple storage devices are operating normally ensures that the SDD can handle errors that may be encountered in actual use in a timely, effective, and smooth manner.
[0065] According to an embodiment of this application, a physical layer state management operation is performed on a first target storage device attached to a storage control device under test, including performing the following operations in sequence: performing a physical layer error operation on the first target storage device; performing a physical layer reset operation on the first target storage device; performing a physical layer disconnect operation on the first target storage device; and performing a physical layer connection operation on the first target storage device.
[0066] According to embodiments of this application, physical layer state management operations may include physical layer error operations (phyerror), physical layer reset operations (phy reset), physical layer disconnection operations (phy down), and physical layer connection operations (phyup).
[0067] According to an embodiment of this application, during the verification of the effectiveness of the error handling mechanism of the storage control device under test in response to link anomalies, physical layer error operation, physical layer reset operation, physical layer disconnection operation and physical layer connection operation can be sequentially performed on the first target storage device.
[0068] Specifically, after performing a physical layer disconnection operation on the first target storage device, a physical layer connection operation can be performed on the first target storage device again after a preset time interval.
[0069] According to the embodiments of this application, by sequentially performing physical layer error operation, physical layer reset operation, physical layer disconnect operation, and physical layer connection operation on the first target storage device, it can be verified whether the operations taken by the storage control device under test when the first target storage device malfunctions, is reset, is disconnected, or is connected can resolve the errors existing in the first target storage device.
[0070] According to an embodiment of this application, based on the response operation of the storage control device under test (SDD) to the response status of the first target storage device, a first error injection test result for the SDD in response to a link anomaly is obtained, including: recording response operation information for the physical layer error operation in the log of the SDD in response to the completion of the physical layer error operation; recording response operation information for the physical layer reset operation in the log in response to the completion of the physical layer reset operation; recording response operation information for the physical layer disconnect operation in the log in response to the completion of the physical layer disconnect operation; recording response operation information for the physical layer connection operation in the log in response to the completion of the physical layer connection operation; comparing the response operation information for the physical layer error operation, physical layer reset operation, physical layer disconnect operation, and physical layer connection operation recorded in the log of the SDD with a first expected result, and obtaining a first error injection test result based on the first comparison result.
[0071] The first error injection test result characterizes whether the error handling mechanism of the storage control device under test for link anomalies meets expectations.
[0072] According to embodiments of this application, in response to the completion of a physical layer error operation, the storage control device under test (SDD) can respond based on the response status of the first target storage device to input / output requests. Therefore, response operation information for physical layer error operations can be recorded in the log of the SDD.
[0073] In response to the completion of the physical layer reset operation, the storage device under test (DUT) can respond based on the response status of the first target storage device to input / output requests. Therefore, response information for the physical layer reset operation can be recorded in the log.
[0074] In response to the completion of the physical layer disconnection operation, the storage device under test (DUT) can respond based on the response status of the first target storage device to input / output requests. Therefore, response information for the physical layer disconnection operation can be recorded in the log.
[0075] In response to the completion of the physical layer connection operation, the storage device under test (DUT) can respond based on the response status of the first target storage device to the input / output request. Therefore, response information for the physical layer connection operation can be recorded in the log.
[0076] In one embodiment, the first expected result may include the expected result for the response of the storage control device under test to physical layer error operation, physical layer reset operation, physical layer disconnect operation and physical layer connection operation, respectively.
[0077] According to an embodiment of this application, a first comparison result can be obtained by comparing the response operation information for physical layer error operations, physical layer reset operations, physical layer disconnect operations, and physical layer connection operations recorded in the log of the storage control device under test with a first expected result. Therefore, a first error injection test result can be obtained based on the first comparison result.
[0078] In one embodiment, if the first comparison result indicates that the response operation information for physical layer error operation, physical layer reset operation, physical layer disconnect operation, and physical layer connection operation is consistent with the first expected result, the first error injection test result can indicate that the error handling mechanism of the storage control device under test for link anomalies is as expected.
[0079] In one embodiment, if at least one of the response operation information for physical layer error operation, physical layer reset operation, physical layer disconnect operation, and physical layer connection operation is inconsistent with the first expected result in the first comparison result, the first error injection test result can indicate that the error handling mechanism of the storage control device under test for link anomalies does not meet expectations.
[0080] According to embodiments of this application, by recording the response information of the storage control device under test (DUT) to physical layer error operations, physical layer reset operations, physical layer disconnect operations, and physical layer connection operations in the log, the information recorded in the log can be compared with a first expected result. Therefore, a first error-injection test result determined based on the first comparison result can be used to indicate whether the error handling mechanism of the DUT for link anomalies meets expectations. Based on this, the effectiveness of the error handling mechanism of the DUT for link anomalies can be verified.
[0081] According to an embodiment of this application, an input / output non-response fault injection operation is performed on a second target storage device attached to a storage control device under test, and a second fault injection test result is obtained based on the response operation of the storage control device under test to the response status of the second target storage device. This includes: sending input / output non-response instructions to multiple target sectors of the second target storage device to make the multiple target sectors non-response to input / output; recording response operation information for the input / output non-response fault injection operation in the log of the storage control device under test based on the response operation of the storage control device under test to the response status of the second target storage device; comparing the response operation information for the input / output non-response fault injection operation recorded in the log of the storage control device under test with a second expected result, and obtaining a second fault injection test result based on the second comparison result.
[0082] The second error injection test result characterizes whether the error handling mechanism of the storage control device under test for input / output non-response meets expectations.
[0083] According to embodiments of this application, the second target storage device may include multiple sectors. An input / output non-responsive fault injection operation is performed on the second target storage device to which the storage control device under test is attached, i.e., input / output non-responsive commands are sent to multiple target sectors of the second target storage device.
[0084] For example, performing an input / output non-responsive fault injection operation can specifically involve injecting a fault into the target sector using a general version 3 toolset, rendering it unresponsive to I / O. This general version 3 toolset is used to interact with small computer systems.
[0085] In one embodiment, the parameters in the input / output non-response instruction can be modified to send the instruction to different target sectors of the second target storage device. Specifically, the modified parameters in the input / output non-response instruction can characterize the sector to which the instruction is to be sent.
[0086] According to embodiments of this application, when multiple target sectors fail to respond to input / output, the storage control device under test (SDD) can respond based on the response status of a second target storage device to input / output requests. Therefore, response information for input / output non-response fault injection operations can be recorded in the log of the SDD.
[0087] According to an embodiment of this application, a second comparison result can be obtained by comparing the response operation information for the input / output non-responsive fault injection operation recorded in the log of the storage control device under test with the second expected result. Therefore, a second fault injection test result can be obtained based on the second comparison result.
[0088] In one embodiment, if the second comparison result indicates that the response operation information for the input / output non-responsive fault injection operation is consistent with the second expected result, the second fault injection test result can indicate that the fault handling mechanism of the storage control device under test for input / output non-responsiveness is as expected. If the second comparison result indicates that the response operation information for the input / output non-responsive fault injection operation is inconsistent with the second expected result, the second fault injection test result can indicate that the fault handling mechanism of the storage control device under test for input / output non-responsiveness is not as expected.
[0089] According to embodiments of this application, by recording the response information of the storage control device under test (DUT) to an input / output non-responsive fault injection operation in the log, the information recorded in the log can be compared with a second expected result. This allows the determination of a second error injection test result based on the second comparison result to indicate whether the DUT's error handling mechanism for input / output non-responsiveness meets expectations. Based on this, the effectiveness of the DUT's error handling mechanism for input / output non-responsiveness is verified. Furthermore, since input / output non-responsive commands are sent to multiple target sectors, causing multiple target sectors to become unresponsive to input / output, the input / output requests sent by the DUT to the second target storage device can more quickly reach the abnormal target sector.
[0090] According to an embodiment of this application, an offline and deletion operation is performed on a third target storage device mounted on a storage control device under test, and a third error injection test result for the offline disk is obtained based on the response operation of the storage control device under test to the response status of the third target storage device. This includes: performing offline and deletion operations on the third target storage device to mark the third target storage device as offline and delete the data stored on the third target storage device; and obtaining a third error injection test result based on the response operation of the driver of the storage control device under test to the response status of the third target storage device.
[0091] Among them, the third error test result characterizes whether the error handling mechanism of the storage control device under test for offline disks meets expectations.
[0092] According to an embodiment of this application, an offline and deletion operation is performed on a third target storage device attached to the storage control device under test. That is, an offline and deletion operation is performed on the third target storage device to mark the third target storage device as offline and delete the data stored on the third target storage device, thereby making the third target storage device an offline disk.
[0093] In one embodiment, offline and delete operations on a third target storage device can be performed using the echo command (output command). The echo command is used to output text or variables to the command-line interface.
[0094] According to an embodiment of this application, since the interaction between the storage control device under test and the server depends on the driver, a third error injection test result can be obtained based on the response operation of the driver of the storage control device under test to the response status of the third target storage device.
[0095] In one embodiment, after the offline and deletion operations on the third target storage device are completed, the driver of the storage control device under test responds to the response status of the third target storage device by processing input / output commands pointing to the third target storage device, thus avoiding null pointer issues and verifying the error handling mechanism of the firmware and driver of the storage control device under test.
[0096] According to embodiments of this application, after performing offline and deletion operations on a third target storage device, a third error injection test result can be obtained based on the response operation of the driver of the storage control device under test to the third target storage device. This result indicates whether the error handling mechanism of the storage control device under test for offline disks meets expectations. Based on this, the effectiveness of the error handling mechanism of the storage control device under test for offline disks can be verified.
[0097] According to an embodiment of this application, a third error injection test result is obtained based on the response operation of the driver of the storage control device under test to the response status of the third target storage device, including: in the case that the response operation to the response status of the third target storage device is a restart or triggering a kernel dump mechanism, it is determined that the error handling mechanism of the storage control device under test for the offline disk does not meet expectations.
[0098] According to embodiments of this application, if the response operation to the response status of the third target storage device is a reboot or triggering a kernel dump mechanism (Kdump), it can be determined that the error handling mechanism of the storage control device under test for offline disks does not meet expectations. If the response operation to the response status of the third target storage device prevents input / output commands directed to the third target storage device from being sent to the third target storage device or to other storage devices, it can be determined that the error handling mechanism of the storage control device under test for offline disks meets expectations.
[0099] According to an embodiment of this application, if a reboot or kernel dump mechanism is triggered after an offline and deletion operation is completed on a third target storage device, it is determined that the error handling mechanism of the storage control device under test for the offline disk does not meet expectations.
[0100] According to an embodiment of this application, the testing method for the storage control device further includes: if no keyword exists in the configuration information and logs of the storage control device under test, determining that the storage control device under test and multiple storage devices are in normal status, so as to perform physical layer state management operations, input / output non-response fault injection operations, and offline and deletion operations on the storage control device under test; if a keyword exists in the configuration information and / or logs of the storage control device under test, determining that at least one of the storage control device under test and multiple storage devices is in abnormal status, and excluding the influencing factors of the abnormal status device; if the status of the storage control device under test and multiple storage devices is determined to be normal, clearing the logs of the storage control device under test.
[0101] According to an embodiment of this application, since logs are needed during the testing of the error handling mechanism of the storage control device under test to determine whether the error handling mechanism is sound based on the information recorded in the logs, it is necessary to clear the logs of the storage control device under test before performing the above operations S210 to S240.
[0102] Meanwhile, in order to verify the effectiveness of the error handling mechanism of the storage control device under test, the storage control device under test and the multiple storage devices mounted on the storage control device under test used in the test process should meet the requirement of being in normal condition.
[0103] Therefore, based on the configuration information and logs of the storage controller under test, it is possible to determine whether the storage controller under test and multiple storage devices are in normal condition.
[0104] In one embodiment, keywords can characterize fields used to indicate an abnormal state of the storage control device under test or the storage device.
[0105] For example, the keyword could be "LOCKUP", which indicates that the storage controller under test has experienced a card lock problem; the keyword could be "ALERT: Timeout", which indicates that a storage device has experienced a command timeout.
[0106] According to embodiments of this application, if no keywords are found in the configuration information and logs of the storage control device under test, it can be determined that the storage control device under test and multiple storage devices are in normal status. Therefore, physical layer status management operations, input / output non-response fault injection operations, and offline and deletion operations can subsequently be performed on the storage control device under test.
[0107] According to embodiments of this application, if keywords are present in the configuration information and / or logs of the storage control device under test, it can be determined that at least one of the storage control device under test and multiple storage devices is in an abnormal state. Therefore, in the case of an abnormal state of the storage control device under test or a storage device, it is necessary to eliminate the influencing factors of the abnormal device. Here, the abnormal device refers to the storage control device under test and / or the storage device that is in an abnormal state.
[0108] Therefore, after eliminating the factors affecting the abnormal state of the device, the state of the storage control device under test and multiple storage devices were all normal.
[0109] According to an embodiment of this application, after determining that the storage control device under test and multiple storage devices are in normal condition, the effectiveness of the error handling mechanism of the storage control device under test can be verified. Based on this, the logs of the storage control device under test are cleared.
[0110] In one embodiment, after clearing the log of the storage control device under test, the above operations S210 to S240 can be performed.
[0111] According to embodiments of this application, if no keywords are found in the configuration information and logs of the storage control device under test (DUT), it can be determined that both the DUT and the storage device are functioning normally. Therefore, by utilizing the configuration information and logs of the DUT, a more comprehensive assessment of the normality of both the DUT and the storage device can be made. Furthermore, only when both the DUT and the storage device are functioning normally can the effectiveness of the DUT's error handling mechanism be verified. Therefore, once it is determined that both the DUT and the storage device are functioning normally, the DUT's logs can be cleared to prepare for subsequent determination of the adequacy of the DUT's error handling mechanism based on the logs, thus avoiding interference from previously recorded information in the logs during the testing process.
[0112] According to an embodiment of this application, the testing method for the storage control device further includes: acquiring attribute information of the storage control device under test and attribute information of multiple storage devices mounted on the storage control device under test; and determining, based on the attribute information of the storage control device under test and the attribute information of the multiple storage devices, tools for performing physical layer state management operations, input / output non-response fault injection operations, and offline and deletion operations on the storage control device under test.
[0113] According to the embodiments of this application, before performing the above operations S210 to S240, it is necessary to first obtain the attribute information of the storage control device under test and the attribute information of multiple storage devices mounted on the storage control device under test, so as to determine the tools for performing physical layer state management operations, input / output non-response fault injection operations, and offline and deletion operations on the storage control device under test based on the attribute information.
[0114] Since different manufacturers produce storage control devices under test (SDD) that are compatible with different tools, it is necessary to determine the appropriate tools for the SDD before performing physical layer state management operations, input / output non-responsive fault injection operations, and offline and deletion operations on the SDD. This will allow for the execution of the corresponding operations based on the appropriate tools for the SDD.
[0115] For example, the attribute information of the storage controller under test (SDT) and the attribute information of multiple storage devices mounted on the SDT can be obtained through the tools used on the SDT controller. These tools can be command-line tools or management tools.
[0116] For example, for a storage control device under test (SDD) manufactured by manufacturer A, physical layer state management operations can be performed on the SDD using a command-line interface tool or a general version 3 toolset. This general version 3 toolset is used to interact with a small computer system interface. For an SDD manufactured by manufacturer B, physical layer state management operations can be performed on the SDD using chip linking software.
[0117] In one embodiment, the attribute information of the storage control device under test (SDD) may include information such as the type of the SDD. The attribute information of multiple storage devices connected to the SDD may include information such as the type of the storage devices.
[0118] Specifically, based on the type of the storage control device under test (SDD) and the types of multiple storage devices mounted on it, the manufacturer of the SDD can be determined. This allows for the identification of tools used to perform physical layer state management operations, I / O non-responsive fault injection operations, and offline and deletion operations on the SDD.
[0119] According to embodiments of this application, based on the acquired attribute information of the storage control device under test (SDD) and the attribute information of multiple storage devices mounted on the SDD, tools are determined for performing physical layer state management operations, input / output non-responsive fault injection operations, and offline and deletion operations on the SDD. This allows the application of tools suitable for the SDD to perform these operations. Consequently, faults can be avoided during the execution of these operations on the SDD.
[0120] Figure 3 A flowchart illustrating a test method for a storage control device according to another embodiment of this application is shown.
[0121] like Figure 3 As shown, the method 300 includes operations S310 to S360.
[0122] In operation S310, based on the acquired attribute information of the storage control device under test and the attribute information of multiple storage devices, the tool used to perform physical layer state management operations, input / output non-response fault injection operations, and offline and deletion operations on the storage control device under test is determined.
[0123] When operating S320, the configuration information and logs of the storage control device under test are checked based on keywords to determine whether the status of the storage control device under test and multiple storage devices is normal. If the status of the storage control device under test and multiple storage devices is determined to be normal, the logs of the storage control device under test are cleared.
[0124] When operating the S330, perform link anomaly injection error testing on the storage control device under test.
[0125] According to an embodiment of this application, operation S330 is the same as operation S210 described above.
[0126] When operating the S340, perform an input / output non-response error test on the storage control device under test.
[0127] According to an embodiment of this application, operation S330 is the same as operation S220 described above.
[0128] When operating the S350, perform an offline disk error injection test on the storage control device under test.
[0129] According to an embodiment of this application, operation S330 is the same as operation S230 described above.
[0130] When operating the S360, test results are generated for the error handling mechanism of the storage controller device under test.
[0131] Based on the above, the testing method for the storage control device in this application identifies problems in the RAID / SAS error handling mechanism by injecting errors, thereby improving the stability of RAID / SAS and avoiding significant performance degradation, system crashes, and restarts caused by frequent retries, RAID / SAS and disk resets. This ensures the normal operation of RAID / SAS and data security, significantly reducing operation and maintenance costs. This testing method can optimize the RAID disk kicking mechanism, verify fault isolation at the card end, and identify potential problems and risks in the kernel and drivers in advance. Furthermore, this testing method is simple and effective, saving considerable testing time and manpower, and improving testing efficiency. Moreover, based on whether it meets expectations, it identifies potential risk points, such as imperfect firmware error handling mechanisms at the card end, kernel bugs (errors), or incorrect driver call pointers.
[0132] Based on the above-described testing method for storage control devices, this application also provides a testing apparatus for storage control devices. The following will be combined with... Figure 4 The device is described in detail.
[0133] Figure 4 A structural block diagram of a test apparatus for a storage control device according to an embodiment of this application is shown.
[0134] like Figure 4 As shown, the testing apparatus 400 of the storage control device in this embodiment includes a link anomaly injection test module 410, an input / output non-response injection test module 420, an offline disk injection test module 430, and a generation module 440.
[0135] The link anomaly injection test module 410 performs physical layer state management operations on the first target storage device attached to the storage control device under test, and obtains the first injection test result of the storage control device under test for link anomalies based on the response operation of the storage control device under test to the response status of the first target storage device; wherein, the response status of the first target storage device represents the response status of the first target storage device to the input / output requests sent by the storage control device under test. In one embodiment, the link anomaly injection test module 410 can be used to perform the operation S210 described above, which will not be repeated here.
[0136] The input / output non-response error injection test module 420 is used to perform an input / output non-response fault injection operation on the second target storage device attached to the storage control device under test, and obtain the second error injection test result of the storage control device under test for input / output non-response based on the response operation of the storage control device under test to the response status of the second target storage device. In one embodiment, the input / output non-response error injection test module 420 can be used to perform the operation S220 described above, which will not be repeated here.
[0137] The offline disk error injection test module 430 is used to perform offline and deletion operations on the third target storage device attached to the storage control device under test, and obtain the third error injection test result of the storage control device under test for the offline disk based on the response operation of the storage control device under test to the third target storage device. In one embodiment, the offline disk error injection test module 430 can be used to perform the operation S230 described above, which will not be repeated here.
[0138] The generation module 440 is used to generate test results for the error handling mechanism of the storage control device under test based on the first error injection test results, the second error injection test results, and the third error injection test results. In one embodiment, the generation module 440 can be used to perform the operation S240 described above, which will not be repeated here.
[0139] According to an embodiment of this application, the testing apparatus 400 for the storage control device further includes an execution module.
[0140] The execution module is used to execute test scripts for the storage controller under test before performing physical layer state management operations, input / output non-response fault injection operations, and offline and deletion operations, so that the storage controller under test sends input / output requests to multiple storage devices attached to the storage controller under test.
[0141] According to an embodiment of this application, the link anomaly injection test module 410 includes a first execution unit, a second execution unit, a third execution unit, and a fourth execution unit.
[0142] The first execution unit is used to perform physical layer error operations on the first target storage device.
[0143] The second execution unit is used to perform a physical layer reset operation on the first target storage device.
[0144] The third execution unit is used to perform a physical layer disconnect operation on the first target storage device.
[0145] The fourth execution unit is used to perform physical layer connection operations on the first target storage device.
[0146] According to an embodiment of this application, the link anomaly error injection test module 410 further includes a first recording unit, a second recording unit, a third recording unit, a fourth recording unit, and a first comparison unit.
[0147] The first recording unit is used to record response operation information for physical layer error operations in the log of the storage control device under test in response to the completion of physical layer error operation.
[0148] The second recording unit is used to record the response operation information for the physical layer reset operation in the log in response to the completion of the physical layer reset operation.
[0149] The third recording unit is used to record the response operation information for the physical layer disconnection operation in the log in response to the completion of the physical layer disconnection operation.
[0150] The fourth recording unit is used to record response operation information for the physical layer connection operation in the log in response to the completion of the physical layer connection operation.
[0151] The first comparison unit is used to compare the response operation information for physical layer error operation, physical layer reset operation, physical layer disconnect operation and physical layer connection operation recorded in the log of the storage control device under test with the first expected result, and obtain the first error injection test result based on the first comparison result. The first error injection test result characterizes whether the error handling mechanism of the storage control device under test for link anomalies meets expectations.
[0152] According to an embodiment of this application, the input / output non-response error test module 420 includes a sending unit, a fifth recording unit, and a second comparison unit.
[0153] The sending unit is used to send input / output non-response instructions to multiple target sectors of the second target storage device, so that the multiple target sectors do not respond to input / output.
[0154] The fifth recording unit is used to record response operation information for input / output non-response fault injection operations in the log of the storage control device under test based on the response operation of the storage control device under test to the response status of the second target storage device.
[0155] The second comparison unit is used to compare the response operation information for the input / output non-response fault injection operation recorded in the log of the storage control device under test with the second expected result, and obtain the second error injection test result based on the second comparison result. The second error injection test result characterizes whether the error handling mechanism of the storage control device under test for input / output non-response meets expectations.
[0156] According to an embodiment of this application, the offline disk error testing module 430 includes a fifth execution unit and an acquisition unit.
[0157] The fifth execution unit is used to perform offline and deletion operations on the third target storage device, so as to mark the third target storage device as offline and delete the data stored on the third target storage device.
[0158] The obtaining unit is used to perform response operations based on the response status of the driver of the storage control device under test to the third target storage device, and obtain the third error injection test result, wherein the third error injection test result characterizes whether the error handling mechanism of the storage control device under test for the offline disk meets expectations.
[0159] According to embodiments of this application, the obtaining unit includes a determining subunit.
[0160] The determination subunit is used to determine whether the error handling mechanism of the storage control device under test for offline disks is not as expected, in the case that the response operation to the response status of the third target storage device is a restart or triggering a kernel dump mechanism.
[0161] According to an embodiment of this application, the testing apparatus 400 for the storage control device further includes a first determining module, a second determining module, and a clearing module.
[0162] The first determination module is used to determine that the storage control device under test and multiple storage devices are in normal status when there are no keywords in the configuration information and logs of the storage control device under test, so as to perform physical layer status management operations, input / output non-response fault injection operations, and offline and deletion operations on the storage control device under test.
[0163] The second determination module is used to determine that at least one of the storage control device under test and multiple storage devices is in an abnormal state if keywords are found in the configuration information and / or logs of the storage control device under test, and to exclude the influencing factors of the abnormal state device.
[0164] The clear module is used to clear the logs of the storage control device under test after determining that the status of the storage control device under test and multiple storage devices is normal.
[0165] According to an embodiment of this application, the testing apparatus 400 for the storage control device further includes an acquisition module and a third determination module.
[0166] The acquisition module is used to acquire the attribute information of the storage control device under test and the attribute information of multiple storage devices attached to the storage control device under test.
[0167] The third determination module is used to determine, based on the attribute information of the storage control device under test and the attribute information of multiple storage devices, the tools used to perform physical layer state management operations, input / output non-response fault injection operations, and offline and deletion operations on the storage control device under test.
[0168] According to embodiments of this application, any multiple modules among the link anomaly injection error testing module 410, input / output non-response injection error testing module 420, offline disk injection error testing module 430, and generation module 440 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module. According to embodiments of this application, at least one of the link anomaly injection error testing module 410, input / output non-response injection error testing module 420, offline disk injection error testing module 430, and generation module 440 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the link error injection test module 410, the input / output non-response error injection test module 420, the offline disk error injection test module 430, and the generation module 440 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0169] Figure 5 A block diagram of an electronic device suitable for implementing a test method for a storage control device according to an embodiment of this application is shown.
[0170] like Figure 5 As shown, an electronic device 500 according to an embodiment of this application includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage portion 508 into a random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0171] RAM 503 stores various programs and data required for the operation of electronic device 500. Processor 501, ROM 502, and RAM 503 are interconnected via bus 504. Processor 501 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 502 and / or RAM 503. It should be noted that the programs may also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0172] According to embodiments of this application, the electronic device 500 may further include an input / output (I / O) interface 505, which is also connected to a bus 504. The electronic device 500 may also include one or more of the following components connected to the input / output (I / O) interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output (I / O) interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 510 as needed so that computer programs read from it can be installed into the storage section 508 as needed.
[0173] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0174] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include ROM 502 and / or RAM 503 and / or one or more memories other than ROM 502 and RAM 503 described above.
[0175] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this application.
[0176] When the computer program is executed by the processor 501, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0177] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 509, and / or installed from a removable medium 511. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0178] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by processor 501, it performs the functions defined in the system of this application embodiment. According to embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0179] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0180] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0181] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
[0182] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Without departing from the scope of this application, those skilled in the art can make various substitutions and modifications, all of which should fall within the scope of this application.
Claims
1. A testing method for a storage control device, characterized in that, The testing method includes: Physical layer state management operations are performed on the first target storage device attached to the storage control device under test, and based on the response operation of the storage control device under test to the first target storage device, the first error injection test result of the storage control device under test in response to the link anomaly is obtained; wherein, the response status of the first target storage device represents the response status of the first target storage device to the input / output request sent by the storage control device under test; The physical layer status management operation performed on the first target storage device attached to the storage control device under test includes performing the following operations in sequence: performing a physical layer error operation on the first target storage device; performing a physical layer reset operation on the first target storage device; performing a physical layer disconnect operation on the first target storage device; and performing a physical layer connection operation on the first target storage device. An input / output non-response fault injection operation is performed on the second target storage device attached to the storage control device under test, and based on the response operation of the storage control device under test to the response status of the second target storage device, a second fault injection test result of the storage control device under test in response to the input / output non-response is obtained; Perform offline and delete operations on the third target storage device attached to the storage control device under test, and obtain the third error injection test result of the storage control device under test for the offline disk based on the response operation of the storage control device under test to the third target storage device. Based on the first error injection test result, the second error injection test result, and the third error injection test result, test results are generated for the error handling mechanism of the storage control device under test.
2. The test method according to claim 1, characterized in that, The testing method also includes: Before performing physical layer state management operations, input / output non-responsive fault injection operations, and offline and deletion operations on the storage control device under test, a test script for the storage control device under test is executed to enable the storage control device under test to send input / output requests to multiple storage devices attached to the storage control device under test.
3. The test method according to claim 1, characterized in that, The response operation based on the response status of the storage control device under test to the first target storage device yields the first error injection test result of the storage control device under test for link anomalies, including: In response to the completion of the physical layer error operation, the response operation information for the physical layer error operation is recorded in the log of the storage control device under test; In response to the completion of the physical layer reset operation, response operation information for the physical layer reset operation is recorded in the log; In response to the completion of the physical layer disconnection operation, the response operation information for the physical layer disconnection operation is recorded in the log; In response to the completion of the physical layer connection operation, the response operation information for the physical layer connection operation is recorded in the log; The response operation information for physical layer error operation, physical layer reset operation, physical layer disconnect operation and physical layer connection operation recorded in the log of the storage control device under test is compared with the first expected result, and the first error injection test result is obtained based on the first comparison result. The first error injection test result indicates whether the error handling mechanism of the storage control device under test for link anomalies meets expectations.
4. The test method according to claim 1, characterized in that, The step of performing an input / output non-response fault injection operation on the second target storage device attached to the storage control device under test, and obtaining a second fault injection test result for the storage control device under test in response to the input / output non-response based on the response status of the storage control device under test to the second target storage device, includes: Send input / output no-response instructions to multiple target sectors of the second target storage device to make the multiple target sectors unresponsive to input / output; Based on the response operation of the storage control device under test to the response status of the second target storage device, the response operation information for the input / output non-response fault injection operation is recorded in the log of the storage control device under test; The response operation information for the input / output non-response fault injection operation recorded in the log of the storage control device under test is compared with the second expected result, and the second error injection test result is obtained based on the second comparison result. The second error injection test result characterizes whether the error handling mechanism of the storage control device under test for input / output non-response meets expectations.
5. The test method according to claim 1, characterized in that, The process of performing offline and deletion operations on the third target storage device attached to the storage control device under test, and obtaining the third error injection test result of the storage control device under test for the offline disk based on the response operation of the storage control device under test to the third target storage device, includes: Perform offline and delete operations on the third target storage device to mark the third target storage device as offline and delete the data stored on the third target storage device; Based on the response operation of the driver of the storage control device under test to the response status of the third target storage device, the third error injection test result is obtained, wherein the third error injection test result characterizes whether the error handling mechanism of the storage control device under test for the offline disk meets expectations.
6. The test method according to claim 5, characterized in that, The response operation based on the driver of the storage control device under test to the response status of the third target storage device, to obtain the third error injection test result, includes: If the response to the response status of the third target storage device is a reboot or triggering a kernel dump mechanism, it is determined that the error handling mechanism of the storage control device under test for offline disks does not meet expectations.
7. The test method according to claim 2, characterized in that, The testing method also includes: If no keyword is found in the configuration information and logs of the storage control device under test, it is determined that the storage control device under test and the plurality of storage devices are in normal status, so that physical layer status management operations, input / output non-response fault injection operations, and offline and deletion operations are performed on the storage control device under test. If a keyword exists in the configuration information and / or logs of the storage control device under test, determine that at least one of the storage control device under test and the plurality of storage devices is in an abnormal state, and exclude the influencing factors of the abnormal state device. If the status of the storage control device under test and the plurality of storage devices is determined to be normal, the log of the storage control device under test is cleared.
8. The test method according to any one of claims 1 to 7, characterized in that, The testing method also includes: Obtain the attribute information of the storage control device under test and the attribute information of multiple storage devices attached to the storage control device under test; Based on the attribute information of the storage control device under test and the attribute information of the plurality of storage devices, a tool is determined for performing physical layer state management operations, input / output non-response fault injection operations, and offline and deletion operations on the storage control device under test.
9. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the test method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Firmware testing method and device for solid state disk, equipment and medium
CN115617587A
Magnetic disk fault simulation test method, test device and electronic equipment
CN116662085A