Test methods, apparatus, systems and readable storage media for storage devices

By utilizing a switching device and multiple pauses in the read/write script during storage device testing, the problem of the inability to test low-power functions in existing technologies is solved, achieving a low-cost and efficient testing method.

CN115116535BActive Publication Date: 2025-10-28ZHONGSHAN JIANGBOLONG ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110302943.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-22
Publication Date
2025-10-28
Estimated Expiration
2041-03-22

AI Technical Summary

Technical Problem

Existing technologies cannot effectively test the low-power functions of storage devices, resulting in incomplete testing and increased testing costs.

Method used

The test device is connected to the storage device under test through an adapter. The test results of the storage device are judged by pausing the test multiple times using a read/write script and counting the number of times the low-power function is started.

Benefits of technology

Low-power functions of storage devices can be tested without the need for specific protocol testing equipment, saving testing costs and improving the accuracy and comprehensiveness of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115116535B_ABST
    Figure CN115116535B_ABST
Patent Text Reader

Abstract

This application relates to the field of storage device testing technology, and discloses a testing method, apparatus, system, and readable storage medium for storage devices. The testing method is applied to a testing apparatus connected to the storage device under test via an adapter. The testing method includes: running a read / write script to perform read / write operations on the storage device under test; controlling the execution of the read / write script to pause multiple times; counting the number of times the low-power function of the storage device under test is activated; and obtaining the test result of the storage device under test based on the number of activations. Through this method, the low-power function of the storage device under test can be tested, saving testing costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage device testing technology, and in particular to testing methods, apparatus, systems and readable storage media for storage devices. Background Technology

[0002] During the production of storage devices, the devices need to be tested to distinguish between good and defective products.

[0003] In current storage device manufacturing, storage devices are equipped with low-power functions. However, when testing storage devices, the relevant technologies cannot test the low-power functions, resulting in incomplete testing of storage devices. Summary of the Invention

[0004] The main technical problem addressed by this application is to provide a testing method, apparatus, system, and readable storage medium for a storage device, which can test the low-power functions of the storage device under test and save testing costs.

[0005] To address the aforementioned issues, this application provides a testing method for a storage device. This testing method is applied to a testing device, which is connected to the storage device under test via an adapter. The testing method includes: running a read / write script to perform read / write operations on the storage device under test; controlling the execution of the read / write script to pause multiple times; counting the number of times the low-power function of the storage device under test is activated; and obtaining the test result of the storage device under test based on the number of activations.

[0006] This includes controlling the execution of the read / write script to pause multiple times, including: running a pause script; and using the pause script to pause the read / write script multiple times.

[0007] The process involves using a pause script to pause the read / write script multiple times, including: obtaining the target pause start time and target pause end time from the pause script; controlling the read / write script to pause when the target pause start time is reached; and controlling the read / write script to continue running when the target pause end time is reached.

[0008] Among them, the number of times the low-power function of the storage device under test is started is counted, including: the number of times the low-power function of the storage device under test is started during the time when the read and write script is paused multiple times.

[0009] The test results of the storage device under test are obtained based on the number of startups, including: determining whether the number of startups increases accordingly with the number of pauses in the execution of the read / write script; if yes, the storage device under test is determined to be normal; if no, the storage device under test is determined to be abnormal.

[0010] To address the aforementioned issues, another technical solution adopted in this application is to provide a testing device for a storage device. This testing device includes a processor, a memory connected to the processor, and a communication interface. The communication interface is used to connect to a switching device, the memory is used to store program data, and the processor is used to execute the program data to implement the method provided by the above technical solution.

[0011] To address the aforementioned issues, another technical solution adopted in this application is to provide a testing system for a storage device. This testing system includes: an adapter for connecting the storage device to be tested; and a testing device connected to the adapter; wherein the testing device is as described in the above technical solution.

[0012] The adapter includes: a first communication interface for connecting to the storage device under test; and a second communication interface connected to the first communication interface for connecting to the communication interface of the test device.

[0013] The first communication interface uses the NVM Express communication protocol.

[0014] To address the aforementioned issues, another technical solution adopted in this application is to provide a computer-readable storage medium for storing program data, which, when executed by a processor, is used to implement the method provided by the aforementioned technical solution.

[0015] The beneficial effects of this application are as follows: Unlike the prior art, the testing method for a storage device in this application uses an adapter to connect the testing device to the storage device under test, and pauses the read / write script multiple times to count the number of times the low-power function is started. It can test the low-power function of the storage device under test without using specific protocol testing equipment, thus saving testing costs. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0017] Figure 1 This is a schematic flowchart of an embodiment of the testing method for the storage device provided in this application;

[0018] Figure 2 This is a schematic diagram illustrating the application scenario of the testing method for the storage device provided in this application;

[0019] Figure 3This is a schematic flowchart of another embodiment of the testing method for the storage device provided in this application;

[0020] Figure 4 This is a flowchart illustrating the specific process of step 33 provided in this application;

[0021] Figure 5 This is a flowchart illustrating the specific process of step 35 provided in this application;

[0022] Figure 6 This is a schematic diagram of an embodiment of the testing apparatus for the storage device provided in this application;

[0023] Figure 7 This is a schematic diagram of an embodiment of the test system for the storage device provided in this application;

[0024] Figure 8 This is a schematic diagram of the structure of an embodiment of the adapter provided in this application;

[0025] Figure 9 This is a schematic diagram of an embodiment of the computer-readable storage medium provided in this application. Detailed Implementation

[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are only for explaining this application and not for limiting it. Furthermore, it should be noted that, for ease of description, only the parts related to this application are shown in the accompanying drawings, not all structures. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0027] The terms "first," "second," etc., used in this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0028] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0029] See Figure 1 , Figure 1 This is a schematic flowchart of the first embodiment of the testing method for the storage device provided in this application. The testing method includes:

[0030] Step 11: Run the read / write script to perform read / write operations on the storage device under test.

[0031] In this embodiment, the testing method is applied to a testing device, which is connected to the storage device under test via an adapter.

[0032] The testing device can be a PC (Personal Computer) or other electronic devices capable of running read and write scripts.

[0033] In other embodiments, the read / write script can read and write test programs to perform read and write operations on the storage device under test in order to perform read and write tests on the storage device under test.

[0034] The storage device to be tested can be RAM (random access memory), ROM (read-only memory); it can also be a hard drive, such as a mechanical hard drive, a solid-state drive, or a portable hard drive.

[0035] Step 12: Control the execution of the read / write script to pause multiple times.

[0036] In some embodiments, instructions for controlling the pausing and running of the read / write script can be written into the read / write script, and these instructions are interspersed among the read / write operation instructions. When the pause instruction is reached, the read / write script is paused; when the run instruction is reached, the read / write script is run to continue executing subsequent read / write operation instructions; when the next pause instruction is reached again, the read / write script is paused again. In this way, multiple pauses of the read / write script can be achieved.

[0037] Step 13: Count the number of times the low-power function of the storage device under test is activated.

[0038] In this embodiment, the storage device under test was equipped with low-power functionality during manufacturing.

[0039] If the low-power function of the storage device under test is normal, it will be activated when the read / write script is paused. Therefore, the number of times the low-power function is activated can be counted based on the multiple pauses in the read / write script.

[0040] The low-power feature of the storage device under test can be an automatic power state switching function. Enabling this function can reduce the power consumption of the storage device under test.

[0041] Step 14: Obtain the test results of the storage device under test based on the number of startups.

[0042] In some embodiments, if the number of startups is positively correlated with the number of pauses in the read / write script, it indicates that the low-power function of the storage device under test is normal. If the number of startups is not significantly correlated with the number of pauses in the read / write script, it indicates that the low-power function of the storage device under test is abnormal.

[0043] In one application scenario, refer to Figure 2 To explain:

[0044] The test device 10 is connected to the adapter 20, which in turn is connected to the storage device 30 under test. A read / write script is run on the test device 10 to transmit read / write instructions from the script to the storage device 30 under test via the adapter 20, enabling read / write operations on the storage device 30. During the read / write operations, the test device 10 controls the read / write script to pause execution multiple times to stop the read / write operations on the storage device 30. At each pause, the number of times the low-power function of the storage device 30 under test is activated is counted. The test device 10 obtains the test results for the storage device 30 under test based on the number of activations.

[0045] In this embodiment, the test device 10 is connected to the storage device 30 under test using the adapter 20. The read and write script is paused multiple times to count the number of times the low-power function of the storage device 30 under test is started. The low-power function of the storage device 30 under test can be tested without the need for a specific protocol test device, thus saving test costs.

[0046] In addition, compared to existing testing equipment that can only check whether the storage device under test supports low power consumption functions and cannot perform long-term stress tests on the low power consumption functions, this embodiment uses the above method to test the low power consumption functions of the storage device under test 30, which increases the testing scheme for the storage device under test 30 and can improve the accuracy and comprehensiveness of the testing of the storage device under test 30.

[0047] See Figure 3 , Figure 3 This is a schematic flowchart of another embodiment of the testing method for the storage device provided in this application. The testing method is applied to a testing device, which is connected to the storage device under test via an adapter. The testing method includes:

[0048] Step 31: Run the read / write script to perform read / write operations on the storage device under test.

[0049] Step 32: Run the pause script.

[0050] In this embodiment, the testing device is equipped with a pause script, which contains a pause command that can pause or run the read / write script. For example, a control command can be set in the pause script to pause the read / write script every 10 minutes of operation for a pause time of 5 minutes.

[0051] It is understandable that the control instructions in the pause script are set before the read / write script is run, in order to set the pause period for the read / write script.

[0052] In other implementations, control instructions can be set randomly in the pause script based on the actual running time of the read / write script to pause the read / write script. For example, if the read / write script runs for 10 hours, the control instructions in the pause script could be: execute the first control instruction to pause the read / write script for 5 minutes after 30 minutes of running; execute the second control instruction to pause the read / write script for 10 minutes after 80 minutes of running; execute the third control instruction to pause the read / write script for 8 minutes after 120 minutes of running; execute the fourth control instruction to pause the read / write script for 15 minutes after 240 minutes of running; execute the fifth control instruction to pause the read / write script for 3 minutes after 320 minutes of running; and execute the sixth control instruction to pause the read / write script for 12 minutes after 500 minutes of running. By employing the above methods, the pauses of read and write scripts are made unordered, allowing the testing of the low-power functions of the storage device under test to more closely resemble the actual usage environment and improving the accuracy of the test.

[0053] Step 33: Use the pause script to pause the read / write script multiple times.

[0054] In some embodiments, see Figure 4 Step 33 can be the following process:

[0055] Step 331: Obtain the target pause start time and target pause end time from the pause script.

[0056] In this embodiment, the pause script sets multiple control instructions based on the execution time of the read and write scripts to control the pause or execution of the read and write scripts.

[0057] When the read / write script is running, the pause script is run synchronously, and the target pause start time and target pause end time in the pause script are obtained.

[0058] Step 332: When the target pause start time is reached, control the read / write script to perform a pause operation.

[0059] In some embodiments, when the target pause start time is reached, the running thread corresponding to the read / write script in the test device is obtained, and the running thread is controlled to perform a pause operation.

[0060] In some embodiments, when the read / write script is running, the running thread corresponding to the read / write script in the test device is obtained, and when the target pause start time is reached, the running thread is controlled to perform a pause operation.

[0061] Step 333: When the target pause end time is reached, control the read / write script to continue running.

[0062] In some embodiments, when the target pause end time is reached, the running thread of the read / write script is controlled to continue running so that the read / write script can continue to perform read / write operations on the storage device under test.

[0063] In some embodiments, read / write scripts can be used to perform read / write operations on the storage device under test in order to test the read / write functionality of the storage device under test.

[0064] Step 34: Count the number of times the low-power function of the storage device under test is activated.

[0065] In some embodiments, each time the read / write script execution pauses, it checks whether the low-power function of the storage device under test is enabled. If so, the current startup count is updated. If not, no action is taken on the current startup count.

[0066] Step 35: Obtain the test results of the storage device under test based on the number of startups.

[0067] In one application scenario, a base number of startups is set based on the number of pauses set in the pause script. Each time the low-power function of the storage device under test is detected to be started, the base number of startups is decremented by one. When the read / write script finishes running, if the base number of startups is less than the set value, the storage device under test is determined to be normal. If the base number of startups is greater than the set value, the storage device under test is determined to be abnormal.

[0068] In another application scenario, a base start count is set based on the number of pauses set in the pause script. The base start count is 0, and the base start count is incremented by one each time the low-power function of the storage device under test is detected. When the read / write script finishes running, if the base start count is less than the set value, the storage device under test is determined to be abnormal; if the base start count is greater than the set value, the storage device under test is determined to be normal.

[0069] In some embodiments, see Figure 5Step 35 can be the following process:

[0070] Step 351: Determine whether the number of startups increases accordingly with the number of pauses during the execution of the read / write script.

[0071] If the number of startups increases accordingly with the number of pauses during the execution of the read / write script, proceed to step 352; if the number of startups does not increase accordingly with the number of pauses during the execution of the read / write script, proceed to step 353.

[0072] It is understandable that if the storage device under test is normal, its low-power function is normal. When the read / write script execution is paused, the low-power function will be activated to reduce the power consumption of the storage device under test when no read / write operations are performed.

[0073] Step 352: Confirm that the storage device under test is normal.

[0074] Step 353: Determine if the storage device under test is faulty.

[0075] In one application scenario, the test device is pre-installed with Windows 10. The storage device under test is connected to the test device via an adapter. A read / write script on the test device is run to perform read and write operations on the storage device. A pause script is also run, pausing the read / write script multiple times. At the end of the read / write script's execution time, the debugging information from the storage device under test is used to determine whether the low-power function has increased accordingly due to the increased number of pauses in the read / write script. The storage device under test is a solid-state drive (SSD), and the SSD's communication protocol is the NVM Express communication protocol.

[0076] In some instances, the read / write script does not continuously perform read / write operations on the storage device under test. Therefore, there are periods when no read / write operations are performed on the device. During these periods, the low-power function of the normally functioning storage device under test will activate and be detected by the testing device. Therefore, at the end of the read / write script's execution time, it is determined whether the low-power function has increased accordingly over time. If so, the low-power function of the storage device under test is considered normal; otherwise, it is considered abnormal.

[0077] In some embodiments, the read / write script and pause script can be displayed in a graphical interface on the testing device, enabling testers to intuitively understand the testing process and simplifying their operation.

[0078] In some embodiments, the testing apparatus may be provided with multiple communication interfaces, each communication interface connected to an adapter, and each adapter connected to a storage device under test. The testing apparatus uses multiple read / write scripts to test the storage devices under test separately. Specifically, the testing of each storage device under test can be referred to the method of any of the above embodiments, which will not be elaborated here. In this way, the low-power functions of multiple storage devices under test can be tested simultaneously, improving testing efficiency.

[0079] See Figure 6 , Figure 6 This is a schematic diagram of an embodiment of the testing apparatus for the storage device provided in this application. The testing apparatus 10 includes a processor 101, a memory 102 connected to the processor 101, and a communication interface 103; wherein the communication interface 103 is used to connect to a switching device, the memory 102 is used to store program data, and the processor 101 is used to execute the program data to implement the following method:

[0080] Run the read / write script to perform read and write operations on the storage device under test; control the execution of the read / write script to pause multiple times; count the number of times the low-power function of the storage device under test is activated; obtain the test results of the storage device under test based on the number of activations.

[0081] Understandably, the processor 101 is also used to execute program data to implement the methods in any of the above embodiments. The specific implementation steps can be referred to the above embodiments, and will not be repeated here.

[0082] See Figure 7 , Figure 7 This is a schematic diagram of an embodiment of the testing system for the storage device provided in this application. The testing system 100 includes a testing device 10 and an adapter 20.

[0083] The adapter 20 is used to connect the storage device to be tested.

[0084] The testing device 10 is connected to the adapter 20; wherein the testing device 10 is the testing device mentioned in any of the above embodiments.

[0085] See Figure 8 The adapter 20 includes a first communication interface 201 and a second communication interface 202. The first communication interface 201 is used to connect to the storage device under test; the second communication interface 202 is connected to the first communication interface 201 and is used to connect to the communication interface of the test device 10.

[0086] The second communication interface 202 is adapted to the communication interface of the test device 10. For example, if the communication interface of the test device 10 is a USB (Universal Serial Bus) interface, then the second communication interface 202 is a USB interface; if the communication interface of the test device 10 is a Thunderbolt interface, then the second communication interface 202 is a Thunderbolt interface. It is understood that different interfaces use different communication protocols.

[0087] The first communication interface 201 is adapted to the communication interface of the storage device under test. For example, if the communication protocol of the communication interface of the storage device under test is the NVM Express communication protocol, then the communication interface is an M.2 interface, and the first communication interface 201 is also an M.2 interface. If the storage device under test can be a solid-state drive using the NVM Express communication protocol, then the first communication interface 201 also uses the NVM Express communication protocol.

[0088] The adapter 20 is used to convert between different interfaces and different communication protocols between the storage device under test and the test device 10.

[0089] By using the above method, the test device 10 is connected to the storage device under test using the adapter 20, so as to realize the method in any of the above embodiments. The read and write script is paused multiple times to count the number of times the low power function of the storage device under test is started. The low power function of the storage device under test can be tested without the need for a specific protocol test device, thus saving test costs.

[0090] See Figure 9 , Figure 9 This is a schematic diagram of an embodiment of the computer-readable storage medium provided in this application. The computer-readable storage medium 90 is used to store program data 91, which, when executed by a processor, is used to implement the following method steps:

[0091] Run the read / write script to perform read and write operations on the storage device under test; control the execution of the read / write script to pause multiple times; count the number of times the low-power function of the storage device under test is activated; obtain the test results of the storage device under test based on the number of activations.

[0092] It is understood that the computer-readable storage medium 90 in this embodiment is applied to the test apparatus provided in any of the above embodiments to implement the method in any of the above embodiments. The specific implementation steps can be referred to the above embodiments, and will not be repeated here.

[0093] In this application, the solutions described in the above embodiments can solve the problems of existing protocol testing equipment being expensive, requiring licenses for script use, resulting in high testing costs and the inability to perform batch testing. They can also solve the problems of existing protocol testing equipment having long development cycles and requiring test developers to master the custom syntax of the protocol testing equipment manufacturer to implement test scripts. Furthermore, they can solve the problem that existing testing equipment can only check whether the storage device supports low-power functionality and cannot perform long-term stress testing on this functionality.

[0094] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0095] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0096] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0097] If the integrated units in the other embodiments described above are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0098] The above description is only an implementation method of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A testing method for a storage device, characterized in that, The testing method is applied to a testing device, which is connected to the storage device under test via an adapter. The testing method includes: Run the read / write script to perform read / write operations on the storage device under test; The read / write script is paused multiple times during execution; The number of times the low-power function of the storage device under test was activated during the multiple pauses in the execution of the read / write script was counted. Determine whether the number of startups increases accordingly as the number of pauses during the execution of the read / write script increases; If so, then the storage device under test is confirmed to be normal; If not, then the storage device under test is determined to be faulty.

2. The test method according to claim 1, characterized in that, The control of pausing the read / write script execution multiple times includes: Run the pause script; The pause script is used to pause the read / write script multiple times.

3. The test method according to claim 2, characterized in that, The method of using the pause script to perform multiple pauses on the read / write script includes: Obtain the target pause start time and target pause end time from the pause script; When the target pause start time is reached, control the read / write script to perform a pause operation; When the target pause end time is reached, control the read / write script to continue running.

4. A testing apparatus for a storage device, characterized in that, The testing device includes a processor and a memory and a communication interface connected to the processor; The communication interface is used to connect to the adapter, the memory is used to store program data, and the processor is used to execute the program data to implement the method as described in any one of claims 1-3.

5. A testing system for a storage device, characterized in that, The testing system includes: Adapter for connecting the storage device to be tested; The testing device is connected to the adapter. The testing device described herein is as described in claim 4.

6. The testing system according to claim 5, characterized in that, The adapter includes: A first communication interface is used to connect to the storage device under test; The second communication interface is connected to the first communication interface and is used to connect to the communication interface of the test device.

7. The testing system according to claim 6, characterized in that, The first communication interface uses the NVM Express communication protocol.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program data, which, when executed by a processor, is used to implement the method as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Random multi-case power-on and power-off test method and system for solid state disk

    CN111858204A

  • Communication equipment, control method for automatic incoming mode therefor and recording medium

    JP2000261565A