Solid state disk testing method and device, computer equipment and storage medium
By designing the load use case library and the fault use case library, using chaos theory and randomization strategies to generate a test combination, and conducting multiple rounds of chaos testing, the problems of insufficient coverage of existing test methods and neglecting scenario association relationships are solved, and a comprehensive assessment of solid-state drives and effective discovery of potential problems in complex environments are achieved.
Patent Information
- Application Number
- CN202510228471.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-03-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing solid-state drive testing methods are insufficiently covered, ignore scene-related relationships, and it is difficult to comprehensively evaluate the stability and reliability of solid-state drives in complex and dynamic environments, resulting in difficult to detect potential problems.
Design the load use case library and fault use case library, dynamically generate load and fault combinations through chaos theory and randomization strategies, simulate complex and uncertain testing environments, and conduct multiple rounds of chaos testing to verify the performance of solid-state drives in diverse scenarios.
A comprehensive assessment of solid-state drives in complex environments is achieved, and potential problems in load-failure combinations and scenario interactions can be effectively discovered, providing a scientific basis for the optimization and reliability of solid-state drives.
Smart Images

Figure CN119724323A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of hard disk testing, and in particular to a solid state hard disk testing method, device, computer equipment and storage medium. Background Art
[0002] Solid-state drives (SSDs) have become core devices in the computer storage field due to their high-speed read and write performance, low energy consumption, and high reliability, and are widely used in data centers, consumer electronics, and industrial fields. However, existing SSD testing methods have significant limitations. Traditional testing methods mainly rely on fixed fault operations and preset workload scenarios. Although they can verify the basic performance and functions of SSDs to a certain extent, they are insufficient in covering reliability in complex scenarios and uncertain environments.
[0003] First, in order to cover more test scenarios, traditional methods usually need to design a large number of independent test cases. This not only increases the complexity of test design, but also easily leads to a waste of test resources. More importantly, this method often ignores the correlation between scenarios. For example, in actual use, some failures may not be caused by a single scenario, but the result of the interaction of multiple scenarios. For example, when operation A is followed by operation B, it is more likely to cause a failure. However, existing test methods usually only determine the failure in operation B, but fail to trace the impact of operation A, making it difficult to fully evaluate the performance of SSDs in complex and dynamic environments. In addition, traditional test methods are limited in their ability to simulate real-world usage scenarios and unexpected failure situations. This limitation may cause potential problems to be discovered later in actual applications, thereby posing a significant risk to the reliability of the system.
[0004] Therefore, how to dynamically and randomly generate test combinations, simulate the interaction of multiple loads and fault scenarios in complex and uncertain environments, comprehensively evaluate the stability and reliability of solid-state drives, and more efficiently discover their potential problems has become an important issue that needs to be solved urgently. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a solid-state hard disk testing method, apparatus, computer equipment and storage medium, which can effectively solve the problems of insufficient coverage, neglect of scenario associations and difficulty in discovering potential problems in existing testing methods.
[0006] In a first aspect, an embodiment of the present application provides a solid state drive testing method, comprising: Design and build load case library and fault case library according to the requirements and goals of SSD chaos testing; Based on the load case library and the fault case library, different load cases and fault cases are randomly selected for combination to generate multiple rounds of randomly combined chaos test combinations; According to the chaos test combination, multiple rounds of chaos tests are performed on the solid state drive, and it is determined whether the results of the chaos tests meet the expected standards to generate a chaos test report.
[0007] In some embodiments, the design and construction of a load case library and a fault case library according to the requirements and objectives of the chaos test of the solid state drive includes: According to the requirements and objectives of the chaos test, the load case library is constructed to simulate the working pressure of the solid-state drive in various scenarios; and a fault case library is constructed to apply different types of fault pressure when performing chaos testing on the solid-state drive.
[0008] In some embodiments, based on the load case library and the fault case library, randomly selecting different load cases and fault cases for combination to generate multiple rounds of randomly combined chaos test combinations includes: One of the load case studies is randomly selected from the load case library, and one of the fault case studies is randomly selected from the fault case library in turn, and a chaotic test combination is randomly generated based on the randomly selected load case study and the fault case study.
[0009] In some embodiments, performing multiple rounds of chaos testing on the solid-state drive according to the chaos test combination, and determining whether the results of the chaos testing meet expected standards to generate a chaos test report includes: In each round of the chaos test, after the selected load case runs for a preset time, a fault case randomly selected from the fault case library is applied to the solid-state drive to perform a combined test with the load case after running for the preset time; After each round of the chaos test is completed, it is determined whether the result of the chaos test meets the expected standard according to the expected standard, and a chaos test report is generated.
[0010] In some embodiments, after each round of the chaos test is completed, judging whether the result of the chaos test meets the expected standard according to the expected standard, and generating a chaos test report includes: If the load test case fails before the fault test case is injected, the result of the current round of the chaos test is determined to be a failure; If the load case fails during or after the fault case injection, check whether the chaos test combination of the current fault case and the load case conforms to a preset mapping table; If the fault test case itself fails during the chaos test, the result of the current round of chaos test is determined to be a failure; If neither the load use case nor the fault use case fails during the chaos test, the result of the current round of the chaos test is determined to be passed.
[0011] In some embodiments, when checking whether the chaos test combination of the current fault case and the load case conforms to a preset mapping table, it also includes: If the chaotic test combination of the current fault case and the load case conforms to the preset mapping table, the result of the chaotic test is determined to be passed; If the chaotic test combination of the current fault case and the load case does not conform to the preset mapping table, the result of the chaotic test is determined to be a failure.
[0012] In some embodiments, after each round of the chaos test is completed, the process further includes: The time for performing the chaos test in the current round is obtained. If the time for performing the chaos test in the current round is less than the preset chaos test time and the result of the chaos test in the current round is passed, the next round of chaos test with random combination is performed.
[0013] In a second aspect, an embodiment of the present application provides a solid state drive testing device, comprising: A use case library building module is used to design and build a load use case library and a fault use case library according to the requirements and objectives of the chaos test of the solid-state drive; A chaos test combination generation module is used to randomly select different load cases and fault cases for combination based on the load case library and the fault case library to generate a chaos test combination; The chaos test execution module is used to perform multiple rounds of chaos tests on the solid state drive according to the chaos test combination, and determine whether the results of the chaos tests meet the expected standards to generate a chaos test report.
[0014] In a third aspect, an embodiment of the present application provides a computer device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the solid-state hard disk testing method of the first aspect.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, and when the computer program is executed on a processor, the solid-state hard disk testing method of the first aspect is implemented. The embodiments of the present application have the following beneficial effects: The solid-state drive test method proposed in this application designs and constructs a load case library and a fault case library according to the needs and goals of the solid-state drive chaos test, comprehensively covering a variety of workloads and fault scenarios, and ensuring the diversity and comprehensiveness of the test. Based on the case library, chaos theory and randomization strategies are used to dynamically generate load and fault combination scenarios to form a chaotic test combination to simulate a complex and uncertain test environment. Through multiple rounds of chaos testing, the stability and reliability of the solid-state drive in a variety of scenarios are verified one by one. After the test is completed, the results are evaluated according to preset standards and a chaos test report is generated. This method can effectively discover potential problems in load and fault combinations and scene interactions, and provide a scientific basis and effective testing means for the optimization and reliability improvement of solid-state drives. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical combination of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 A schematic diagram of an application environment of a solid state drive testing method according to an embodiment of the present application is shown; Figure 2 A flow chart of a solid state drive testing method according to an embodiment of the present application is shown; Figure 3 A schematic diagram of a load case library of a solid state drive testing method according to an embodiment of the present application is shown; Figure 4 A schematic diagram of a fault case library of a solid state drive testing method according to an embodiment of the present application is shown; Figure 5 Another flow chart of a solid state drive testing method according to an embodiment of the present application is shown; Figure 6 A schematic diagram showing the determination of a chaos test result in a solid state hard disk test according to an embodiment of the present application is shown; Figure 7 A mapping representation diagram of a solid state drive testing method according to an embodiment of the present application is shown; Figure 8 A schematic diagram of a chaos test process of a solid state drive test method according to an embodiment of the present application is shown; Fig. 9 A structural schematic diagram of a solid state drive testing device according to an embodiment of the present application is shown.
[0018] Explanation of main symbols: 10: operating system; 20: test motherboard; 30: network module; 40: whole machine power-off module; 50: automated test platform; 60: voltage control module; 70: serial port; 80: solid state drive; 90: load case library; 100: fault case library; 110: mapping table. DETAILED DESCRIPTION
[0019] The technical combination in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0020] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0021] Hereinafter, the terms "including", "having" and their cognates that can be used in various embodiments of the present application are intended only to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance.
[0022] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.
[0023] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0024] Considering the problems of insufficient coverage, neglect of scenario associations, and difficulty in discovering potential problems in existing test methods, a solid-state drive test method is proposed. By building a load case library and a fault case library, a randomization strategy is used to generate a variety of load and fault combinations to simulate a complex and uncertain test environment. Through multiple rounds of chaos testing, the performance of solid-state drives in various scenarios is fully verified, and the test results are evaluated according to preset standards. A test report is generated, which can effectively discover potential problems and provide a scientific basis for the optimization and reliability improvement of solid-state drives.
[0025] The present invention provides a solid state drive testing method, which can be applied to Figure 1 In the environment, specifically, the test environment includes a test motherboard 20, a voltage control module 60 (PPCM module) and a whole machine power-off module 40 (PDU module), wherein the voltage control module 60 (PPCM module) is connected to the test motherboard 20 through a PCIE interface, and the voltage control module 60 (PPCM module) is connected to the solid-state hard disk 80 through a connection method matching the interface type. Solid-state hard disks 80 with different interfaces, such as SATA and NVMe, need to be equipped with voltage control modules 60 (PPCM modules) of corresponding interfaces. For example, the voltage control module 60 (PPCM module) controls the power supply voltage of the solid-state hard disk 80 through the serial port 70, one end of the serial port 70 line is connected to the PPCM, and the other end is connected to the USB interface of the test motherboard 20 through a USB serial port tool. It is worth noting that the voltage control module 60 (PPCM module) is essentially an adapter board. Compared with ordinary adapter boards on the market, it has the ability to accurately control the power supply voltage of the solid-state hard disk 80, and can be used to simulate single-disk power failure, single-disk flash failure, and voltage deviation.
[0026] Among them, the test motherboard 20 supports at least one PCIE slot: Peripheral Component Interconnect Express slot is a high-performance expansion interface, widely used in motherboards, and is used to connect high-speed external devices, such as graphics cards, storage device expansion cards, network adapters, etc. As the core hardware, the test motherboard 20 is convenient for expanding various test functions, such as power failure of the entire machine, power failure of a single disk, and voltage deviation of the solid-state hard disk supply. It can be understood that in the actual test process, by establishing a network connection between the host computer and the motherboard, it is ensured that the test environment can still be remotely controlled and data collected through the network after a fault occurs. This network connection can support the continuity and stability of the automated test process.
[0027] The following tools and software are installed in the operating system 10: Python: used to run automated test scripts. FIO tool: used to simulate various loads of solid-state drives (such as random read and write, sequential read and write, etc.). nvmecli tool: used to manage and test solid-state drives of the NVMe protocol. The json file and the config.yaml file are configured according to the requirements of the automated test platform 50 (for example, the Automation system), and the agent service is started, so that the automated test platform 50 (for example, the Automation system) can be connected to the test motherboard 20 environment through the network module 30 to control the test tasks.
[0028] Among them, the whole machine power-off module 40 (PDU module) is responsible for realizing the whole machine power-off and recovery functions of the test mainboard 20. The power supply of the test mainboard 20 is connected through the whole machine power-off module 40 (PDU module), and the whole machine power-off module 40 (PDU module) is controlled by the network module 30 to perform power-off and power-on operations. The information of the whole machine power-off module 40 (PDU module) needs to be configured in the json file of the test environment so that it can be called by the automated test platform 50. The voltage control module 60 (PPCM module) supports a variety of test scenarios, including fault simulations such as voltage deviation, single disk power-off, and single disk flash failure.
[0029] That is, in the embodiment of the present application, the above-mentioned test environment is built by combining hardware (test motherboard 20, voltage control module 60, whole machine power-off module 40) and software (operating system 10, automated testing platform 50), which can support complex load and fault testing scenarios and provide comprehensive support for the performance and reliability evaluation of the solid-state drive 80.
[0030] Figure 2 A flow chart of a solid state drive testing method according to an embodiment of the present application is shown. The solid state drive testing method comprises the following steps: Step S100, designing and building a load case library and a fault case library according to the requirements and objectives of the chaos test of the solid state drive.
[0031] Chaos testing is a method to verify the stability and fault tolerance of a system by simulating extreme conditions and unpredictable scenarios. The core idea is to simulate the complex situations that the system may encounter in real-life use by creating random loads and failure scenarios.
[0032] The requirements for chaos testing are designed based on the application scenarios and possible failure types of SSDs. The requirements include: covering a variety of real application scenarios and simulating a variety of potential failure types. The goal of chaos testing is to verify performance: evaluate the read and write speed, latency, and throughput of SSDs under different load conditions; verify fault tolerance: test the recovery ability of SSDs when failures occur to ensure stable system operation; verify data integrity: verify that data will not be lost or damaged under load and failure conditions; discover potential problems: expose weak links in product design through multiple rounds of random combination testing to provide a basis for optimization.
[0033] The load case library 90 is a set of case studies designed for the operation of the SSD in normal operation, which is used to simulate real workload scenarios and test the performance and stability of the SSD in different usage environments. For example, basic load cases, file operation cases, multimedia task cases, etc. The fault case library 100 is a test set designed for various abnormal scenarios that the SSD may encounter, which is used to simulate sudden faults that may occur during system operation, such as system-level faults, hardware-level faults, etc.
[0034] In an optional embodiment, for step S100, according to the requirements and objectives of the chaos test of the solid state drive, a load case library and a fault case library are designed and constructed, including: According to the needs and objectives of chaos testing, a load case library is built to simulate the working pressure of SSDs in various scenarios; a fault case library is built to apply different types of fault pressure when performing chaos testing on SSDs.
[0035] Demonstratively, a load case library 90 is constructed to test the performance indicators of the SSD in daily use, such as read and write speed, latency, and throughput; restore common user operations and system behaviors to verify the performance of the SSD under various usage conditions; and examine the SSD's ability to continue operating under different pressures to ensure consistency in performance and functionality.
[0036] It is worth noting that, considering the different usage scenarios of different SSD products, the business load library and failure mode library can be flexibly adjusted according to the usage scenarios of the SSD.
[0037] For example, if Figure 3 As shown, the load case library 90 includes basic task cases, load cases generated based on FIO, and the like.
[0038] Among them, the basic task use cases include: IDLE: used to simulate the behavior of the device in a low-usage state and test the performance of the background tasks of the SSD; TRIM: used to test the space recovery efficiency and performance of the SSD; File copy: simulate large file transfer operations and test the performance of large file reading and writing; FORMAT: simulate formatting operations to verify the stability of the SSD under high load; Video playback: simulate the scenario of continuous data reading and test the performance of continuous data reading, etc.
[0039] The load use cases generated based on FIO include: Write / read ratio: randomly generate the ratio of write to read (such as 100% write, 50% write + 50% read) to simulate different types of I / O operations. Sequential / random: randomly switch between sequential I / O and random I / O to test the performance of the SSD in different access modes. Random IO block size: dynamically adjust the data block size of the I / O operation (such as 4KB, 16KB, etc.) to test the performance of the SSD in small or large block data transmission. Random data pattern: randomly generate data patterns (such as all zeros, all ones, or pseudo-random data) to test the write performance and consistency of the SSD when processing different data patterns.
[0040] It is worth noting that the FIO tool supports dynamic configuration of various I / Os and can generate loads with different parameters. Each load case can exist and run independently and be randomly combined with fault cases in chaos testing to verify the performance, response time and stability of the SSD in various load scenarios.
[0041] like Figure 4 As shown, the fault case library 100 is a set of predefined abnormal scenarios, which are used to simulate various hardware or software failures that may be encountered during the operation of the solid-state drive. These use cases are used to test the fault tolerance and data protection mechanism of the solid-state drive. For example, the fault case library 100 includes system-level failures, power-related failures, power management mode failures, etc.
[0042] Among them, system-level failures include: kernel reboot test (kernel reboot): simulates the restart of the core module of the system, skips the hardware initialization process, and verifies the driver compatibility, connection status and initialization performance of the solid-state drive after the kernel is reloaded. Kernel shutdown test (kernel shutdown): tests the recovery status of the solid-state drive when the system is shut down and then restarted; regular system reboot (reboot): simulates the system restart, including hardware initialization and operating system 10 loading, and verifies the connection and initialization performance of the solid-state drive.
[0043] Power-related failures include: Power Loss: Use the power loss module 40 (PDU module) to control the mainboard power supply, simulating a sudden power failure of the entire system; Voltage Drift: Use PPCM to adjust the voltage to an abnormal value to test the stability of the solid-state drive; Single Disk Power Loss: Use PPCM to disconnect the solid-state drive power supply to simulate a single-disk power failure; Single Disk Power Glitch: Use PPCM to cut off and restore power multiple times in a short period of time.
[0044] Power management mode failures include: S3 (Sleep Mode): Simulates the behavior of the SSD after the system enters sleep state; S4 (Hibernation Mode): Simulates the behavior of the SSD after the system enters hibernation state.
[0045] That is, by constructing the load case library 90 and the fault case library 100 , the performance of the solid-state drive in a complex environment can be fully verified.
[0046] Step S200: Based on the load case library and the fault case library, different load cases and fault cases are randomly selected for combination to generate multiple rounds of randomly combined chaos test combinations.
[0047] It can be understood that the combination of load and fault cases is randomly selected to increase the coverage of the test, simulate the diverse scenarios that are difficult to predict in the real environment, and find potential system problems. In detail, in each test, a load case is randomly selected from the load case library 90. During the load operation, a fault case is randomly selected from the fault case library 100 to form a randomized combination. The randomized combination increases the complexity of the test, allowing the solid-state drive to accept different challenges in multiple rounds of testing to ensure the consistency and reliability of its performance.
[0048] In an optional embodiment, for step S200, based on the load case library and the fault case library, different load cases and fault cases are randomly selected for combination to generate multiple rounds of randomly combined chaos test combinations, including: A load case is randomly selected from the load case library and a fault case is randomly selected from the fault case library in turn, and a chaotic test combination is randomly generated based on the randomly selected load case and the fault case.
[0049] For example, a load case is randomly selected from the load case library 90 to start running, such as a 4KB random read and write load. During the load running process, a fault case is randomly selected, such as a single disk power failure. The load and the fault are combined to form a chaos test combination. For example, when running a random read and write load, the power supply of the solid state drive is suddenly disconnected.
[0050] The chaos test combination can be: file copy load + single disk power failure, random read and write load + whole machine power failure, sequential write load + voltage deviation, random read and write load + flash failure.
[0051] The combination of each round of testing may be different to ensure the diversity and coverage of the test scenarios. The multiple possible scenarios generated by random combination simulate the behavior of the SSD in a complex real environment, increase the coverage of the test scenarios, and find potential problems of the SSD under high load or sudden failure conditions.
[0052] Step S300, performing multiple rounds of chaos testing on the solid state drive according to the chaos test combination, and determining whether the results of the chaos testing meet the expected standards to generate a chaos testing report.
[0053] Among them, the multiple rounds of chaos testing refer to multiple tests on the solid state drive 80, with different load and failure combinations used in each test. Through multiple rounds of testing, it is ensured that the solid state drive can be fully verified in various possible usage and failure scenarios.
[0054] Test results refer to all data and information collected during the chaos test process, including but not limited to: performance indicators, error logs, recovery status, etc.
[0055] Expected standards refer to the evaluation indicators and thresholds set before the test to determine whether the SSD's performance in the test meets the standards. Expected standards may come from: Industry standards, product specifications: performance and reliability indicators provided by SSD manufacturers. Test specifications: standards set by the test team based on experience and needs, etc.
[0056] The chaos test report is a comprehensive summary and record of the entire test process and results, including detailed data, analysis and conclusions, such as the test start time, test end time, test load case name, test fault case name, test results and other information. The test load case name and test fault case name are jumpable links, which can be clicked and jump to the execution log of the sub-case for easy analysis.
[0057] For example, in the initialization phase, load case library 90 and fault case library 100 are loaded, and test time and parameters are configured; in the first round of testing, a load case (such as 4KB random read and write) is randomly selected from the load case library 90 and run for a period of time, and then a fault case (such as single disk power failure) is randomly selected from the fault case library 100 and injected, and test data is collected and recorded at the same time; subsequent rounds follow the same process, and new load and fault combinations are randomly selected each time until the preset test conditions (such as test time or scenario coverage goals) are met. Through multiple rounds of testing, not only can the test coverage be expanded and the comprehensiveness of the results be improved, but also potential performance bottlenecks and insufficient fault tolerance can be discovered, thereby further enhancing the authenticity and effectiveness of the test.
[0058] In an optional embodiment, if Figure 5 As shown, for step S300, multiple rounds of chaos tests are performed on the solid state drive according to the chaos test combination, and it is determined whether the results of the chaos tests meet the expected standards to generate a chaos test report, including: Step S310, in each round of chaos testing, after the selected load case runs for a preset time, a fault case randomly selected from the fault case library is applied to the solid state drive to perform a combined test with the load case after running for the preset time.
[0059] For example, each round of chaos testing refers to a single execution process in a multi-round test process. Each round of testing includes the following key steps: randomly select a load case from the load case library 90 and run it; after the load runs for a preset period of time, randomly select a fault case from the fault case library 100 for injection; record the test data and fault behavior to form the result of this round. For example, the first round: file copy load + single disk power failure. The second round: 4KB random read and write load + voltage pull failure.
[0060] The load case is random, and a case is randomly selected from the load case library 90 during the test, which may be different in each round.
[0061] The preset time refers to the fixed length of time that the load case runs in the chaos test, during which the SSD is under continuous working pressure. By continuously running the load, the working state in real use is simulated, providing a more realistic scenario for the subsequent fault test. For example, the load running preset time can be set to 30 seconds, 1 minute or longer, depending on the test goal: Short time: used to quickly verify the performance response of the SSD. Long time: used to simulate the impact of continuous load on the performance of the SSD.
[0062] After the load case runs for a preset time, a fault case is randomly selected from the fault case library 100 and injected into the test environment so that the load and the fault act on the solid state drive together. In this way, the recovery ability of the solid state drive when encountering a fault under continuous load is tested, and the impact of fault injection on the performance of the solid state drive and the performance stability after recovery are analyzed.
[0063] For example, (1) Load use case: 4KB random read and write (run for 30 seconds); Fault use case: single disk power failure (injected at the 30th second); Test goal: Check the impact of power failure on read and write performance and data integrity.
[0064] (2) Load use case: file copying (running for 1 minute); Fault use case: voltage pull-off (voltage drops to an unstable value during injection); Test objective: Evaluate the ability to recover from voltage fluctuations in file transfer interruptions.
[0065] Step S320: After each round of chaos testing is completed, it is determined whether the results of the chaos testing meet the expected standards according to the expected standards, and a chaos testing report is generated.
[0066] For example, after the chaos test is completed, the test results are analyzed and evaluated to confirm whether they meet the preset performance, stability, and fault tolerance standards. For example, the test results meet or exceed the preset target standards. If the test results fail to meet the preset goals, the reasons need to be analyzed and the problems recorded.
[0067] Expected standards are the evaluation basis for chaos testing, for example, (1) Performance standards: key indicators such as read and write speed, latency, and throughput must be within the expected range. (2) Data integrity: no data loss or corruption can occur during the test. (3) Fault recovery time: after fault injection, the SSD must resume normal operation within a reasonable time. (4) Stability standards: performance fluctuations in multiple rounds of testing must be within an acceptable range.
[0068] Furthermore, for example, if all indicators meet expectations, the test is determined to have passed; if any indicator does not meet the standards, the test is determined to have failed.
[0069] The chaos test report is a document that records, analyzes, and summarizes the process and results of each round of testing. It comprehensively reflects the problems found in the chaos test and the performance of the SSD in various scenarios. The test report includes: test overview, test methods, test results, compliance judgment, problem records and improvement suggestions, conclusions and summaries, etc.
[0070] In an optional embodiment, for step S320, after each round of chaos test is executed, it is determined whether the result of the chaos test meets the expected standard according to the expected standard, and a chaos test report is generated.
[0071] It can be seen that the current round refers to a single independent chaos test task, including two stages: load operation and fault injection. Figure 6 As shown in the figure, there are mainly the following situations regarding judging whether the results of chaos testing meet the expected standards according to the expected standards: In the first case, if the load case fails before the fault case is injected, the result of the current round of chaos testing is judged as failure.
[0072] Among them, "before injection" refers to the stage before the fault case is injected into the test environment. During this period, only the load case is run, and the SSD is subjected to the working pressure of the load case to simulate the performance and stability in the normal operation scenario. Each round of test scenarios is randomly generated, and the results only reflect the specific conditions and SSD performance of the current round, and are recorded separately without affecting other rounds.
[0073] If a load case fails in the "before injection" phase (such as video playback failure, video file loss, playback freeze, playback failure, etc.), the test is terminated directly and the current round of testing is considered a failure. Test failure indicates that the SSD fails to operate normally under basic load conditions and does not meet the test requirements.
[0074] For example: Performance failure: read and write speeds are severely reduced or delays exceed expected ranges; Data failure: data loss, file corruption, or data integrity check failure; System failure: SSD video playback failure, video file loss, playback freeze, playback failure, disconnection or inability to continue running load tasks.
[0075] The above situations all determine that the current round of testing has failed.
[0076] In the second case, if a load case fails during or after the fault case injection, it is checked whether the chaos test combination of the current fault case and the load case conforms to the preset mapping table 110 .
[0077] Among them, "during the injection process" refers to the stage where the fault use case is being applied to the test environment. At this time, the impact of the fault may have been partially manifested, but has not yet been fully applied, which is used to observe the initial response of the SSD to the fault. After the "post-injection" fault use case has been fully applied to the test environment, it enters the stage of fault stabilization, which is used to test the continuous performance and recovery capabilities of the SSD. The preset mapping table 110 is a standard reference table designed for the combination of load use cases and fault use cases, which is used to verify whether the fault behavior is reasonable, determine whether the results of the chaos test meet expectations, and provide a basis for problem location.
[0078] That is, if the load case fails, first check whether the load case fails before the fault case runs. If the load case fails before the fault case runs, the test result is failure and the test ends. If the load case does not fail before the fault case is injected, it is necessary to check whether the mapping table 110 is satisfied.
[0079] like Figure 7 As shown, the mapping table 110 represented by lines provided in this embodiment, if there is a line between the combination of the load use case and the fault use case in the mapping table 110 (mapping exists), the current chaos test combination result is determined to be successful; if there is no line between the combination of the load use case and the fault use case in the mapping table 110 (mapping does not exist), the current chaos test combination result is determined to be a failure.
[0080] It is worth noting that in the actual test process, the mapping relationship can be dynamically improved according to the addition and deletion of loads and faults to make it more accurate and complete. For example, when a new load case or fault case is added, the corresponding mapping relationship can be added synchronously; in the test analysis, if it is found that a certain fault case has an actual impact on a specific load case but is not defined in the mapping, the corresponding mapping should be added; on the contrary, if some mappings lead to misjudgment of the test results, the unreasonable mapping needs to be deleted in time.
[0081] The following example uses a load case failure during the fault case injection process to illustrate: In the "file copy + whole machine power failure" chaos test, the file copy task triggered a whole machine power failure at the 10th second of running, resulting in task interruption. The system restored power after 5 seconds, and the file copy task restarted and completed the transmission of the remaining data. After the test, all file data consistency checks passed, and no data was lost or damaged. According to mapping table 110, the "file copy + whole machine power failure" combination allows task interruption and requires data integrity to meet expectations, so the current chaos test combination result is judged to be successful.
[0082] Take the load case as an example where a fault occurs after the fault case is injected: In the "video playback + S3 mode" chaos test, the video playback task triggered the S3 mode failure after running for 15 seconds, and the system entered a low-power sleep state, and woke up and restored power after 10 seconds. However, after the system woke up, the video playback task failed to continue running, the playback was interrupted, and the data integrity check failed, and some video files were damaged. There is no connection for the "video playback + S3 mode" combination in mapping table 110, which requires that the combined task must run smoothly and the data integrity must remain consistent. Therefore, the current chaos test combination result is judged to be a failure, and it is recommended to optimize the recovery capability and data protection mechanism of the solid-state drive in S3 mode.
[0083] In the third case, if the faulty test case itself fails during the chaos test, the result of the current round of chaos testing is determined to be a failure.
[0084] Exemplarily, when a faulty test case fails to execute as expected or behaves abnormally, it is called a faulty test case itself. When a faulty test case itself fails in a chaos test and the test scenario fails to simulate the expected conditions, the execution of the load test case is ignored and the result of the current round of chaos testing is directly judged as a failure.
[0085] For example, in the "file copy + voltage deviation" chaos test, the file copy task starts running, simulating the transfer of 100 files of 1GB in size. Then the voltage deviation fault is triggered, with the goal of reducing the supply voltage from 5V to 4V to test the performance of the SSD under low voltage. However, in the actual test, the voltage deviation module failed to work successfully, and the supply voltage remained at 5V without change, resulting in the failure to simulate the expected low-voltage scenario. Due to the failure of the fault case itself, the current round of chaos test goals cannot be achieved, and the test result is judged as a failure. Further inspection and optimization of the function of the voltage deviation module is required.
[0086] In the fourth case, if neither the load test case nor the fault test case fails during the chaos test, the result of the current round of chaos test is determined to be passed.
[0087] Exemplarily, no failures occurred in the load case means that the load case can run as expected during the test without interruption or abnormal behavior. The normal operation of the load case indicates that the SSD can withstand the basic workload and maintain stable performance under certain conditions; no failures occurred in the fault case means that the fault case was successfully injected and recovered as expected without abnormal behavior. The normal execution of the fault case indicates that the test environment has the necessary conditions and can accurately simulate the target abnormal scenario.
[0088] If both the load test case and the fault test case do not fail, the test is successfully completed, the chaos test goal is achieved, and the current round of test results is considered to have passed. That is, if both test cases pass, then a round of load & fault random combination test passes.
[0089] For example, in the "File Copy + Voltage Deviation" chaos test, the file copy task starts running, simulating the transmission of 100 files of 1GB in size, and the transmission speed remains stable. Then the voltage deviation fault is triggered, and the supply voltage is reduced from 5V to 4.5V and maintained for 10 seconds. During the test, the file copy task is not interrupted, all files are successfully transmitted and the data consistency check passes. The voltage deviation fault is successfully injected and recovered as expected, without abnormal behavior. Since no faults occur in the load use case and the fault use case, the result of the current round of chaos test is judged to be passed.
[0090] In an optional embodiment, when checking whether the chaos test combination of the current fault case and the load case conforms to the preset mapping table, it also includes: If the chaos test combination of the current fault case and the load case conforms to the preset mapping table 110, the result of the chaos test is determined to be passed.
[0091] For example, in the "random read and write + single disk power failure" chaos test, the random read and write task starts to run, simulating a high-concurrency 4KB random read and write operation. After running for 20 seconds, the single disk power failure is triggered, and the power supply of the single disk of the solid-state drive is cut off, and the power supply is restored after 5 seconds. During the test, the random read and write task is briefly interrupted, but after the power supply is restored, the task is automatically restarted and the operation is completed. The data consistency check passes, and no data is lost or damaged. According to mapping table 110, there is a connection for the "random read and write + single disk power failure" combination, which allows the task to be briefly interrupted but requires the data integrity to meet expectations. Since the test performance is consistent with the expectations of mapping table 110, the current chaos test result is determined to be passed.
[0092] If the chaos test combination of the current fault case and the load case does not conform to the preset mapping table 110, the result of the chaos test is determined to be a failure.
[0093] For example, in the "IDLE + whole machine power off" chaos test, the solid-state drive is in an idle (IDLE) state, simulating a scenario with no load running. After running for 600ms-140s, the whole machine power off fault is triggered, the system power supply is cut off, and restored after 10 seconds. However, after the power is restored, the solid-state drive fails to mount normally, and the device cannot be recognized by the system, resulting in the failure of basic functions. According to mapping table 110, the "IDLE + whole machine power off" combination is not connected, indicating that the solid-state drive must be mounted normally in the idle state under this combination and can be used normally after the system is restored. Because the test performance does not meet the requirements of mapping table 110, the current chaos test result is determined to be a failure.
[0094] In an optional embodiment, after each round of chaos testing is completed, the following steps are further included: The time for the current round of chaos test is obtained. If the time for the current round of chaos test is less than the preset chaos test time and the result of the current round of chaos test is passed, the next round of chaos test with random combination is performed.
[0095] Exemplarily, the time for chaos testing refers to the actual running time of the current round of chaos testing, from the start of the load test case to the injection of the fault case and the completion of recovery or the determination of the test result. The preset chaos test time refers to the total test duration pre-set in the chaos test plan, which is used to control the overall execution time of the test. For example, the preset chaos test time is 24 hours, which means that as many scenarios as possible need to be tested through multiple rounds of load and fault combinations within 24 hours.
[0096] If the cumulative test time of the current round does not exceed the preset chaos test time, the test can still continue. If the current round of test results is passed, it means that no problems are found in the test scenario of this round, and it is allowed to enter the next round. When the above two conditions are met at the same time, a new load and fault combination is randomly generated to enter the next round of chaos testing.
[0097] For example, in a chaos test, the preset total test time is 24 hours. In the first round of testing, the "file copy" case is randomly selected from the load case library 90 to simulate the transmission of 100 files of 1GB in size; the "single disk power failure" fault is randomly selected from the fault case library 100 to simulate the scenario of a single disk power failure of the solid-state drive. After running for 500ms-120s, the test is completed. The file copy task automatically recovers after the fault injection and the transmission is successfully completed. All file data consistency checks pass, and no data is damaged or lost. The test result is passed.
[0098] Since the first round of test time (10 minutes) is less than the preset chaos test time (24 hours) and the test results meet the requirements, the system triggers the next round of random combination chaos test. Select a new load from the load case library 90, such as "random read and write", and select a new fault case from the fault case library 100, such as "power failure of the whole machine", to start a new round of test cycle. This logic will continue until the 24-hour test limit is reached or a round of test fails.
[0099] In an optional embodiment, if Figure 8 As shown, an example is given based on the chaos test process: the chaos test is started on the host computer through the automated test platform 50 (for example, the Automation system). At the beginning of the test, the running time (usually 24 hours) is set and the test start time is recorded. A load case is selected from the load case library 90 through the Python random function to run, and after randomly waiting for 1-300 seconds, a fault case is randomly selected from the fault case library 100 for execution. After the fault case is executed, it automatically recovers and judges the test result: if the result is passed and the actual test time is less than 24 hours, the next round of testing is entered; if the result is passed but the actual test time is greater than or equal to 24 hours, the test is ended and a test report is generated; if the result is failed, the test is ended immediately and a report is generated. Each round of testing records the load, fault combination and results, and summarizes them into a final test report for analyzing the performance of the solid-state drive in different scenarios.
[0100] The solid-state drive testing method of the embodiment of the present application achieves comprehensive coverage of various workloads and fault scenarios by designing and constructing a load case library and a fault case library according to the needs and goals of the solid-state drive chaos test, thereby ensuring the diversity and comprehensiveness of the test. A randomization strategy is used to dynamically combine load and fault cases to generate a chaotic test combination, thereby simulating a complex and uncertain test environment. Through multiple rounds of chaos testing, the performance of the solid-state drive in a variety of scenarios is verified one by one. After the test is completed, the results are evaluated according to preset standards and a test report is generated. The introduction of chaos theory and randomization strategies can effectively discover potential load and fault combination problems, as well as potential problems under the influence of scene interactions, providing a scientific and effective testing method for the optimization and reliability improvement of solid-state drives.
[0101] The present application also proposes a solid state hard disk testing device, such as Fig. 9 As shown, the test device includes: A use case library construction module 91 is used to design and construct a load use case library and a fault use case library according to the requirements and objectives of the chaos test of the solid state drive; A chaos test combination generating module 92 is used to randomly select different load cases and fault cases for combination based on the load case library and the fault case library to generate a chaos test combination; The chaos test execution module 93 is used to perform multiple rounds of chaos tests on the solid state drive according to the chaos test combination, and determine whether the results of the chaos tests meet the expected standards to generate a chaos test report.
[0102] It can be understood that the device of this embodiment corresponds to a solid state hard disk testing method of the above embodiment, and the options in the above embodiment are also applicable to this embodiment, so they will not be described repeatedly here.
[0103] The present application also provides a computer device. Exemplarily, the computer device includes a processor and a memory, wherein the memory stores a computer program, and the processor runs the computer program to enable the terminal device to execute the functions of each module in the above-mentioned solid-state hard disk testing method or the above-mentioned solid-state hard disk testing device.
[0104] Among them, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or at least one of other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application.
[0105] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electric erasable programmable read-only memory (EEPROM), etc. The memory is used to store a computer program, and the processor may execute the computer program accordingly after receiving an execution instruction.
[0106] The present application also provides a computer-readable storage medium for storing the computer program used in the above terminal device. For example, the computer-readable storage medium may include but is not limited to: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0107] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0108] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0109] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical combination of the present application, or the part that contributes to the prior art, or the part of the technical combination, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0110] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A solid state hard disk testing method, characterized in that: The method comprises: Design and build load case library and fault case library according to the requirements and goals of SSD chaos testing; Based on the load case library and the fault case library, different load cases and fault cases are randomly selected for combination to generate multiple rounds of randomly combined chaos test combinations; According to the chaos test combination, multiple rounds of chaos tests are performed on the solid state drive, and it is determined whether the results of the chaos tests meet the expected standards to generate a chaos test report.
2. The solid state drive testing method according to claim 1, characterized in that: According to the requirements and objectives of the chaos test of the solid-state drive, a load case library and a fault case library are designed and constructed, including: According to the requirements and objectives of the chaos test, the load case library is constructed to simulate the working pressure of the solid-state drive in various scenarios; and a fault case library is constructed to apply different types of fault pressure when performing chaos testing on the solid-state drive.
3. The solid state drive testing method according to claim 1, characterized in that: Based on the load case library and the fault case library, randomly selecting different load cases and fault cases for combination to generate multiple rounds of randomly combined chaos test combinations, includes: One of the load case studies is randomly selected from the load case library, and one of the fault case studies is randomly selected from the fault case library in turn, and a chaotic test combination is randomly generated based on the randomly selected load case study and the fault case study.
4. The solid state drive testing method according to claim 1, characterized in that: The step of performing multiple rounds of chaos tests on the solid state drive according to the chaos test combination and determining whether the results of the chaos tests meet expected standards to generate a chaos test report includes: In each round of the chaos test, after the selected load case runs for a preset time, a fault case randomly selected from the fault case library is applied to the solid-state drive to perform a combined test with the load case after running for the preset time; After each round of the chaos test is completed, it is determined whether the result of the chaos test meets the expected standard according to the expected standard, and a chaos test report is generated.
5. The solid state drive testing method according to claim 4, characterized in that: After each round of the chaos test is completed, judging whether the result of the chaos test meets the expected standard according to the expected standard, and generating a chaos test report, including: If the load test case fails before the fault test case is injected, the result of the current round of the chaos test is determined to be a failure; If the load case fails during or after the fault case injection, check whether the chaos test combination of the current fault case and the load case conforms to a preset mapping table; If the fault test case itself fails during the chaos test, the result of the current round of chaos test is determined to be a failure; If neither the load use case nor the fault use case fails during the chaos test, the result of the current round of the chaos test is determined to be passed.
6. The solid state drive testing method according to claim 5, characterized in that: When checking whether the chaos test combination of the current fault case and the load case conforms to the preset mapping table, it also includes: If the chaotic test combination of the current fault case and the load case conforms to the preset mapping table, the result of the chaotic test is determined to be passed; If the chaotic test combination of the current fault case and the load case does not conform to the preset mapping table, the result of the chaotic test is determined to be a failure.
7. The solid state drive testing method according to claim 4, characterized in that: After each round of chaos testing is completed, the process further includes: The time for performing the chaos test in the current round is obtained. If the time for performing the chaos test in the current round is less than the preset chaos test time and the result of the chaos test in the current round is passed, the next round of chaos test with random combination is performed.
8. A solid state hard disk testing device, characterized in that: The device comprises: A use case library building module is used to design and build a load use case library and a fault use case library according to the requirements and objectives of the chaos test of the solid-state drive; A chaos test combination generation module is used to randomly select different load cases and fault cases for combination based on the load case library and the fault case library to generate a chaos test combination; The chaos test execution module is used to perform multiple rounds of chaos tests on the solid state drive according to the chaos test combination, and determine whether the results of the chaos tests meet the expected standards to generate a chaos test report.
9. A computer device, characterized in that: The computer device comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the solid state drive testing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed on a processor, implements the solid state hard disk testing method according to any one of claims 1-7.
Citation Information
Patent Citations
Method and device for testing abnormal power failure in SSD random scene and computer equipment
CN110569158A
Distributed system testing system and method, storage medium and electronic equipment
CN113238950A
Chaos test method and system, electronic equipment and storage medium
CN113515449A
Abnormal power-off test method and system based on solid state disk, medium and equipment
CN115344445A
System testing method and device based on chaos engineering, medium and related equipment
CN117453559A
Cited By
Test method and device of storage unit and storage medium
CN120452516A