Linux-based solid state disk mass production power failure test method and device
Through Linux-based testing methods and devices, using trigger method of multi-process and FIO tools to test scripts, the problems of inconvenient operation, time-consuming and high cost of solid-state drive power-down protection testing are solved, and efficient and low-cost mass production testing is achieved.
Patent Information
- Application Number
- CN202311391363.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-25
- Publication Date
- 2025-04-29
AI Technical Summary
The existing solid-state drive power-down protection testing methods have problems such as inconvenient operation, long time and high testing costs.
Using Linux-based testing methods and devices, the test host is connected to a power control board with multiple independent power supply channels, and using Python's multi-process and trigger method test scripts, it realizes asynchronous power-down tests on multiple solid-state drives.
It improves the efficiency of power-down testing of solid-state drives and reduces the testing cost, and does not need to purchase special testing software and power supplies, achieving convenient and fast mass production testing.
Smart Images

Figure CN119905133A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of solid state hard disk testing, and in particular to a method and device for testing power failure of a mass-produced solid state hard disk based on Linux. Background Art
[0002] Solid State Drives (SSDs) are hard disks made with solid-state electronic storage chip arrays, which consist of a control unit and a storage unit (such as FLASH chips and DRAM chips). SSDs are exactly the same as traditional hard disks in terms of interface specifications and definitions, functions and usage methods, and are also completely consistent with traditional hard disks in product appearance and size. However, the I / O performance of SSDs is greatly improved compared to traditional hard disks, so they are widely used in many fields. With the increasing demand for SSDs, it is particularly important to carry out quality control during the mass production testing of SSDs. Among them, the power-off test item in the mass production testing of SSDs is a test item that simulates normal power-off and abnormal power-off scenarios in actual use, and tests the power-off protection capability of the SSD in this scenario. It is used to evaluate the power-off protection performance of the SSD. At present, there are two common methods for testing the power-off protection of solid-state drives in the industry. One is to connect the solid-state drive to the test host, read and write data IO to the solid-state drive, and then manually or by command to shut down the test host, restart the test host, and then read and write data IO to the solid-state drive to verify the power-off protection capability of the solid-state drive; the other is to power the solid-state drive with a programmable power supply, connect the data cable to the test host, and control the programmable power supply and proprietary software through the test script to complete the power-off test. The former requires manual operation, which is inconvenient and time-consuming, and the test operation efficiency is low; the latter requires the purchase of dedicated test software and power supply, which increases the cost of mass production testing. Summary of the invention
[0003] Based on this, it is necessary to provide a Linux-based solid-state hard disk mass production power-off test method and device with high test efficiency and low test cost to address the above shortcomings.
[0004] A method for testing power failure of mass-produced solid-state hard disks based on Linux. The device for implementing the method comprises a power control board with multiple independent power supply channels, a test host connected to the serial port of the power control board and loaded with test software, each SSD to be tested is connected to the test host via a data cable, and the test software is a trigger test script using multi-process of Python and FIO tool under Linux. The method comprises the following steps:
[0005] S1. Insert multiple SSDs to be tested into corresponding channels of the power control board;
[0006] S2, the test host supplies power to the SSD and identifies and reads the SSD information;
[0007] S3. A test process is created for each SSD in an asynchronous manner, and each test process obtains a corresponding configuration file of the test item;
[0008] S4, the test host controls the SSD to enter the normal power-off test process;
[0009] S5, the test host controls the SSD to enter the abnormal power-off test process;
[0010] S6, outputting the power-off test result and ending the test process of the SSD;
[0011] S7, repeat steps S4-S6 until the test process of the SSDs in all channels is completed.
[0012] In one embodiment, the test host supplies power to the SSD and identifies and reads SSD information, including:
[0013] S21, the test host detects the status of each channel through the test software, and supplies power to the channel where the SSD is in place;
[0014] S22, identifying product information of the SSD in each channel, wherein the product information includes the path name, serial number, capacity, manufacturer, interface type, and speed of the SSD;
[0015] S23. Read the SMART information of the SSD in each channel, where the SMART information includes the number of power-offs and abnormal power-offs of the SSD.
[0016] In one embodiment, the step of creating a test process for each SSD in an asynchronous manner, and each test process obtaining a corresponding configuration file of a test item includes:
[0017] S31. Based on the SSD product information, use the asynchronous method of the process pool under Python to create a test process for each SSD;
[0018] S32, the test process obtains a configuration file corresponding to the test item, wherein the configuration file includes the number of normal power-off tests, the number of abnormal power-off tests, the interval time between power-off and power-on, and the maximum time of read and write IO.
[0019] In one embodiment, the test host controls the SSD to enter a normal power-off test process including:
[0020] S41, start FIO's IO random write, and set FIO's normal power-off trigger command; the normal power-off trigger command includes: uninstalling the SSD device; disconnecting the power supply and waiting for the trigger-timeout duration; setting FIO's verify to pattern;
[0021] S42, after the FIO is executed, wait for the configured interval time and power on the SSD of the channel again;
[0022] S43, monitoring the preparation time after the SSD is powered on, and re-obtaining the path name according to the serial number of the SSD;
[0023] S44, start FIO to perform IO random read, and verify whether the read IO data is consistent with the IO data completed by IO random write in step S41;
[0024] S45, repeating steps S41-S44 until the number of cycles reaches the number of normal power-off tests in the configuration file. In one embodiment, the test host controls the SSD to enter the abnormal power-off test process, including:
[0025] S51, start the IO random write of FIO, and set the trigger command of abnormal power failure of FIO; the trigger command of abnormal power failure includes: disconnecting the power supply;
[0026] S52, after the FIO is executed, wait for the configured interval time and power on the SSD of the channel again;
[0027] S53, monitoring the preparation time after the SSD is powered on, and re-obtaining the path name according to the serial number of the SSD;
[0028] S54, start FIO to perform IO random read, and verify whether the read IO data is consistent with the IO data completed by IO random write in step S51;
[0029] S55, repeat steps S51-S54 until the number of cycles reaches the number of abnormal power-off tests in the configuration file.
[0030] In one embodiment, step S55 further includes:
[0031] S56. The test host reads the SMART information again to check whether the number of power failures of the SSD is the sum of the number of power failures in step S44, the number of normal power failure tests, and the number of abnormal power failure tests, and check whether the number of abnormal power failures of the SSD is the sum of the number of abnormal power failures and the number of abnormal power failure tests in step S54.
[0032] The present invention also discloses a solid state hard disk mass production power-off test device for implementing the above-mentioned Linux-based solid state hard disk mass production power-off test method, comprising a power control board with multiple independent power supply channels, a test host connected to the serial port of the power control board and loaded with test software, and a connection conversion board for inserting the SSD to be tested and connected to the power supply channel of the power control board, wherein the connection conversion board is connected to the test host via a data line, the test software is a trigger mode test script using multi-process of python and FIO tool under Linux, and the test host comprises:
[0033] An information reading module, the information reading module is used to control the corresponding power supply channel to be powered on to supply power to the SSD, and to identify and read SSD information;
[0034] A test process creation module, wherein the test process creation module is used to create a test process for each SSD in an asynchronous manner, and allocate a corresponding configuration file of a test item to each test process;
[0035] A normal power-off test module, which is used to control the SSD to perform a normal power-off test;
[0036] An abnormal power-off test module, wherein the abnormal power-off test module is used to control the SSD to perform an abnormal power-off test;
[0037] The result output module is used to output the power-off test result.
[0038] In one of the embodiments, the information read by the information reading module includes SSD product information and SMART information of the SSD, wherein the product information includes the path name, serial number, capacity, manufacturer, interface type and speed of the SSD; and the SMART information includes the number of power failures and abnormal power failures of the SSD.
[0039] In one embodiment, the normal power-off test module includes:
[0040] A normal power-off control module, which is used to start the IO random write of FIO and set the trigger command of the normal power-off of FIO;
[0041] A first power-on module, wherein the first power-on module is used to wait for a preset interval time and power on the corresponding SSD in the channel again after the FIO of the normal power-off control module is executed;
[0042] A first monitoring module, the first monitoring module is used to monitor the preparation time after the SSD is powered on after the first power recovery module is activated, and re-acquire the path name according to the serial number of the SSD;
[0043] The first comparison module is used to receive the path name information sent by the first monitoring module and start FIO to perform IO random reading, and verify whether the read IO data is consistent with the IO data completed by the IO random writing of the normal power-off control module.
[0044] In one embodiment, the abnormal power failure test module includes:
[0045] An abnormal power-off control module, which is used to start the IO random write of FIO and set the trigger command of abnormal power-off of FIO;
[0046] A second power restoration module, wherein the second power restoration module is used to wait for a preset interval length and power on the corresponding SSD in the channel again after the FIO of the abnormal power failure control module is executed;
[0047] A second monitoring module, the second monitoring module is used to monitor the preparation time after the SSD is powered on after the second power recovery module is activated, and re-acquire the path name according to the serial number of the SSD;
[0048] The second comparison module is used to receive the path name information sent by the second monitoring module and start FIO to perform IO random reading, and verify whether the read IO data is consistent with the IO data completed by the IO random writing of the abnormal power-off control module.
[0049] The method and device for mass production power-off testing of solid-state hard disks based on Linux of the present invention are implemented. For mass production testing of solid-state hard disks, a test host is connected to a power control board with multiple independent power supply channels through a serial port, and independent power supply can be provided to the SSD in each channel. At the same time, the SSD is directly connected to the test host through a data cable. The test software adopts the multi-process of python and the trigger method test script of the FIO tool under Linux, and concurrently executes power-off verification of multiple SSDs. The power-off test items in mass production testing can be completed in a convenient, fast and low-cost manner, thereby improving the efficiency of the SSD power-off test operation. There is no need to purchase special test software and power supply, and the cost of the SSD power-off test operation is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A flowchart of a power-off test method for mass production of solid state hard disks in one embodiment of the present invention;
[0051] Figure 2 The module structure diagram of a power-off test device for mass production of solid-state hard disks in one embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.
[0053] Please combine Figure 1 and Figure 2 The present invention discloses a method for testing the mass production of solid state hard disks based on Linux with high testing efficiency and low testing cost, wherein the device for implementing the method includes a power control board with multiple independent power supply channels, a test host connected to the serial port of the power control board and loaded with test software, each SSD to be tested is connected to the test host through a data line, and the test software is a trigger test script using multi-process of python and FIO tool under Linux. In other words, this embodiment is based on the python test script and programs it, and there is no need to purchase professional test software. In addition, by setting a power control board with multiple independent power supply channels, the cost of purchasing a test power supply is eliminated, which is conducive to reducing the cost of power-off testing of SSD mass production. The above device is used to perform power-off testing of SSD mass production, replacing manual operation, and significantly improving the efficiency of test operations. In addition, in order to support power-off testing of multiple SSDs at the same time without affecting each other, the power control board of the SSD adopts independent control of the SSD power supply of each channel, and the power supply of the SSD of a certain channel can be disconnected or connected at will to ensure the reliability of the test operation.
[0054] It should be noted that the power-off test of the SSD includes two parts: normal power-off test and abnormal power-off test. The normal power-off test refers to the process of notifying the SSD to enter the standby immediately state through commands and then disconnecting the SSD power supply during the test host's data IO reading and writing process on the SSD; the abnormal power-off test refers to the process of directly disconnecting the SSD power supply during the test host's data IO reading and writing process on the SSD.
[0055] Specifically, the solid state drive mass production power-off test method of this embodiment includes the following steps:
[0056] S1. Insert multiple SSDs to be tested into corresponding channels of the power control board. Specifically, after inserting SSDs into each channel of the power control board, click the start test switch of the software to start the test. In this embodiment, during the test, one SSD to be tested can be inserted into each channel of the power control board, or corresponding SSDs to be tested can be inserted into some channels of the power control board. During the test, the power-off test is performed in sequence according to the setting bit sequence of each SSD on the power control board.
[0057] S2. The test host supplies power to the SSD and identifies and reads SSD information.
[0058] The test host supplies power to the SSD and identifies and reads SSD information including:
[0059] S21. The test host detects the in-place status of each channel through the test software, and supplies power to the channel where the SSD is in place. Specifically, in this embodiment, the test software under Linux starts process 1 to control the power control board through the serial port, and the test software starts process 2 to detect the in-place status of the SSD of each channel. If the SSD on a certain channel is in place, a command is sent to the power control board through process 1 to turn on the power of the channel. In this embodiment, the power supply voltage used to power the SSD is different depending on the type of SSD. For example, for an SSD with a SATA interface, the power supply voltage used is 5V. In other words, only the channels into which the SSD to be tested is inserted are powered, and these power supply side channels are the objects of subsequent power-off and power-on operations, so as to avoid interference with the power-off test operation caused by mistakenly powering off idle channels during the power-off operation, thereby ensuring the reliability of the power-off test results.
[0060] S22. Identify product information of the SSD in each channel, where the product information includes the path name, serial number, capacity, manufacturer, interface type, and speed of the SSD.
[0061] S23, reading the SMART information of the SSD in each channel, the SMART information including the number of power failures (power count) and the number of abnormal power failures (unsafe power count) of the SSD.
[0062] S3. A test process is created for each SSD in an asynchronous manner, and each test process obtains a corresponding configuration file of the test item.
[0063] A test process is created for each SSD in an asynchronous manner, and each test process obtains the corresponding configuration files of the test items, including:
[0064] S31. According to the SSD product information, use the asynchronous method of the process pool under Python to create a test process for each SSD.
[0065] S32, the test process obtains a configuration file corresponding to the test item, the configuration file includes the number of normal power-off tests, the number of abnormal power-off tests, the interval time after power-off and then power-on, and the maximum time of read and write IO.
[0066] That is to say, in this embodiment, when power is supplied to the channels where each SSD to be tested is located, the product information and SMART information of each SSD are respectively collected, and test processes for testing the power-off capability of each SSD are created in sequence. The test process of each SSD includes a normal power-off test process, an abnormal power-off test process and a power-off test result output. After a single SSD test process is completed, the test process of the next SSD is carried out.
[0067] S4: The test host controls the SSD to enter the normal power-off test process.
[0068] Specifically, the test host controls the SSD to enter a normal power-off test process including:
[0069] S41. Start FIO's IO random write and set FIO's normal power-off trigger command; the normal power-off trigger command includes: uninstalling the SSD device; disconnecting the power supply and waiting for the trigger-timeout duration; setting FIO's verify to pattern. Among them, the command to uninstall the SSD device is / sys / block / sdX / device / delete; the setting value of trigger-timeout is a random number within 1-5s; FIO's verify is set to pattern, the purpose of which is to read data and verify consistency after powering off and then on. In this embodiment, the code for starting FIO's IO random write and setting FIO's normal power-off trigger command is as follows:
[0070] fio--ioengine=libaio--direct=1--numjobs=1--group_reporting--thread--name=fio-3--filename= / dev / sdc--size=100%--runtime=20--time_based--iodepth=32--rw=randw rite--bs=4k--do_verify=0--verify=pattern--trigger-timeout=2--trigger='echo1> / sys / blo ck / sdc / device / delete&&echosetDutOff 2|ncat localhost 8888'.
[0071] S42, after the FIO is executed, wait for the configured interval (for example, wait for 5 seconds), and then power on the SSD of the channel again to restore the power to the SSD.
[0072] S43, monitor the ready time after the SSD is powered on, and reacquire the path name according to the serial number of the SSD. In this embodiment, the ready time after the SSD is powered on is monitored in order to determine whether the SSD of the channel can be successfully identified after power-on. If the ready time after the SSD is powered on exceeds the preset time, it is determined that the SSD of the channel cannot be successfully identified after power-on, that is, the power-off test process is terminated and the product is determined to be faulty. Since the path name of the SSD may change after power is restored after power failure, in this embodiment, the path name of the SSD after power is restored is reacquired according to its serial number, which can avoid errors caused by path name changes and improve the reliability of the test.
[0073] S44, start FIO to perform IO random read, and verify whether the read IO data is consistent with the IO data completed by IO random write in step S41. In this embodiment, by setting FIO parameters do_verify=1, verify=pattern and verify_state_load=1, the parameters are used to read the IO state of the previous random write, including IO number, IO address and length. The code for IO data consistency verification is as follows:
[0074] fio--ioengine=libaio--direct=1--numjobs=1--group_reporting--thread--name=fio-3--filename= / dev / sdc--size=100%--runtime=20--time_based--iodepth=32--rw=randre ad--bs=4k--do_verify=1--verify=pattern--verify_state_load=1.
[0075] S45, repeat steps S41-S44 until the number of cycles reaches the number of normal power-off tests in the configuration file.
[0076] S5. The test host controls the SSD to enter the abnormal power-off test process.
[0077] The test host controls the SSD to enter the abnormal power-off test process including:
[0078] S51, start the IO random write of FIO, and set the trigger command of abnormal power failure of FIO; the trigger command of abnormal power failure includes: disconnecting the power supply.
[0079] S52: After FIO is executed, wait for the configured interval and power on the SSD of the channel again.
[0080] S53: monitor the preparation time after the SSD is powered on, and re-acquire the path name according to the serial number of the SSD.
[0081] S54, start FIO to perform IO random read, and verify whether the read IO data is consistent with the IO data completed by IO random write in step S51.
[0082] S55, repeat steps S51-S54 until the number of cycles reaches the number of abnormal power-off tests in the configuration file.
[0083] That is to say, except for the trigger command during FIO random write, the abnormal power-off test process is different from the normal power-off test process. The rest of the steps are the same as the steps of the normal power-off test process. For details, please refer to the above description of the normal power-off test process.
[0084] It should be noted that, in this embodiment, after step S55, the following steps are further included:
[0085] S56, the test host reads the SMART information again, checks whether the power-off times of the SSD are the sum of the power-off times, the normal power-off test times, and the abnormal power-off test times in step S44, and checks whether the abnormal power-off times of the SSD are the sum of the abnormal power-off times and the abnormal power-off test times in step S54. In this embodiment, by reading the SMART information again and checking the power-off times, the problem of insufficient reliability of the test results caused by failure to complete all normal power-off test processes and abnormal power-off test processes can be avoided, thereby improving the reliability of the power-off test results.
[0086] S6. Output the power-off test result and end the test process of the SSD.
[0087] S7, repeating steps S4-S6 until the test process of the SSDs in all channels is completed, that is, the test work of the test host is completed.
[0088] For further information, see Figure 2The present invention also discloses a solid state drive mass production power-off test device for implementing the above-mentioned Linux-based solid state drive mass production power-off test method, comprising a power control board 100 having multiple independent power supply channels, a test host 200 connected to the power control board 100 by serial port and loaded with test software, and a connection conversion board 300 for inserting the SSD to be tested and connected to the power supply channel of the power control board 100. The connection conversion board 300 is connected to the test host 200 through a data line. The test software is a trigger mode test script using multi-process of python and FIO tool under Linux. The test host 200 comprises:
[0089] An information reading module, which is used to control the corresponding power supply channel to power the SSD, and to identify and read the SSD information;
[0090] A test process creation module, which is used to create a test process for each SSD in an asynchronous manner and allocate a corresponding configuration file of a test item to each test process;
[0091] Normal power-off test module: The normal power-off test module is used to control the SSD to perform a normal power-off test;
[0092] Abnormal power-off test module: The abnormal power-off test module is used to control the SSD to perform abnormal power-off test;
[0093] Result output module: The result output module is used to output the power-off test results.
[0094] Furthermore, the information read by the information reading module includes SSD product information and SSD SMART information. The product information includes the path name, serial number, capacity, manufacturer, interface type and speed of the SSD; the SMART information includes the number of power-offs and abnormal power-offs of the SSD.
[0095] In this embodiment, the normal power-off test module includes:
[0096] Normal power-off control module: The normal power-off control module is used to start FIO's IO random write and set the trigger command for FIO's normal power-off;
[0097] A first power-on module, which is used to wait for a preset interval after the FIO of the normal power-off control module is executed, and then power on the corresponding SSD in the channel again;
[0098] A first monitoring module, the first monitoring module is used to monitor the preparation time after the SSD is powered on after the first power recovery module is activated, and re-acquire the path name according to the serial number of the SSD;
[0099] The first comparison module is used to receive the path name information sent by the first monitoring module and start FIO to perform IO random reading, and verify whether the read IO data is consistent with the IO data completed by the IO random writing of the normal power-off control module.
[0100] The abnormal power-off test module includes:
[0101] Abnormal power-off control module: The abnormal power-off control module is used to start FIO's IO random write and set the trigger command of FIO's abnormal power-off;
[0102] The second power restoration module is used to wait for a preset interval length and power on the corresponding SSD in the channel again after the FIO of the abnormal power failure control module is executed;
[0103] The second monitoring module is used to monitor the preparation time after the SSD is powered on after the second power recovery module is activated, and re-acquire the path name according to the serial number of the SSD;
[0104] The second comparison module is used to receive the path name information sent by the second monitoring module and start FIO to perform IO random reading, and verify whether the read IO data is consistent with the IO data completed by the IO random writing of the abnormal power-off control module.
[0105] When the above-mentioned solid-state hard disk mass production power-off test device is working, first, after plugging in the SSD in each channel, click the software to start the test; the test software under Linux starts process 1 to control the power control board through the serial port, and the test software starts process 2 to detect the SSD status of each channel. If the SSD of a channel is in place, a command is sent to the power control board through process 1 to connect the power supply of the channel. After the SSD is powered on, the test host identifies the SSD product information of each channel and reads the SMART information. The product information includes the path name, serial number, capacity, manufacturer, interface type and speed of the SSD, and the SMART information includes the number of power-offs and abnormal power-offs of the SSD.
[0106] Then, based on the product information of the identified SSD, a test process is created for each SSD using the asynchronous method of the process pool under Python. Each test process obtains the corresponding configuration file of the test item. The configuration file includes the number of normal power-off tests, the number of abnormal power-off tests, the interval time after power-off and then power-on, the maximum time of read and write IO, etc.
[0107] Perform the power-off test process for each SSD one by one. A complete power-off test process for SSD includes the normal power-off test process, the abnormal power-off test process and the test result output. When performing the normal power-off test process, first start the IO random write of FIO, and set the trigger command of FIO's normal power-off, and then execute the unloading device, disconnect the power supply, wait for the trigger-timeout duration, and set FIO's verify to pattern in sequence; after FIO is executed, wait for the configured interval duration, and then power on the SSD of the channel; monitor the ready time after the SSD is powered on, and re-obtain the path name according to its serial number; start FIO for IO random read, and verify whether it is consistent with the IO data completed by FIO random write by setting FIO parameters do_verify=1, verify=pattern and verify_state_load=1. Repeat the above power-off and power-on actions until the number of cycles is the normal power-off number in the configuration file, that is, the normal power-off test process is completed.
[0108] Then the abnormal power-off test process of the SSD is entered. Except for the trigger command during FIO random write, the abnormal power-off test process is the same as the normal power-off test process.
[0109] Read the SMART information again to check whether the number of power-off times of the SSD is the sum of the number of power-off times in step S44, the number of normal power-off tests and the number of abnormal power-off tests, and check whether the number of abnormal power-off times of the SSD is the sum of the number of abnormal power-off times and the number of abnormal power-off tests in step S54. Based on the above output of the power-off test result of the SSD, the test process of the SSD is ended, that is, the power-off test process of a single SSD is completed.
[0110] The working process of the solid state drive mass production power-off test device is the same as the process of the solid state drive mass production power-off test method mentioned above. For details, please refer to the process of the solid state drive mass production power-off test method mentioned above, which will not be repeated here.
[0111] The method and device for mass production power-off testing of solid-state hard disks based on Linux of the present invention are implemented. For mass production testing of solid-state hard disks, a test host 200 is used to connect a power control board 100 having multiple independent power supply channels through a serial port, so that the SSD in each channel can be independently powered. At the same time, the SSD is directly connected to the test host 200 through a data cable. The test software uses a multi-process python and a trigger test script of the FIO tool under Linux to concurrently execute power-off verification of multiple SSDs. The power-off test items in mass production testing can be completed in a convenient, fast and low-cost manner, thereby improving the efficiency of the SSD power-off test operation. There is no need to purchase special test software and power supply, thereby reducing the cost of the SSD power-off test operation.
[0112] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0113] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A power-off test method for mass production of solid-state hard disks based on Linux, characterized in that: The device for implementing the method includes a power control board with multiple independent power supply channels, a test host connected to the serial port of the power control board and loaded with test software, each SSD to be tested is connected to the test host through a data cable, and the test software is a trigger mode test script using multi-process of python and FIO tool under Linux. The method includes the following steps: S1. Insert multiple SSDs to be tested into corresponding channels of the power control board; S2, the test host supplies power to the SSD and identifies and reads the SSD information; S3. A test process is created for each SSD in an asynchronous manner, and each test process obtains a corresponding configuration file of the test item; S4, the test host controls the SSD to enter the normal power-off test process; S5, the test host controls the SSD to enter the abnormal power-off test process; S6, outputting the power-off test result and ending the test process of the SSD; S7, repeat steps S4-S6 until the test process of the SSDs in all channels is completed.
2. The method for testing power failure of solid state hard disks in mass production according to claim 1, characterized in that: The test host supplies power to the SSD and identifies and reads SSD information, including: S21, the test host detects the status of each channel through the test software, and supplies power to the channel where the SSD is in place; S22, identifying product information of the SSD in each channel, wherein the product information includes the path name, serial number, capacity, manufacturer, interface type, and speed of the SSD; S23. Read the SMART information of the SSD in each channel, where the SMART information includes the number of power-offs and abnormal power-offs of the SSD.
3. The method for testing power failure of solid state hard disks in mass production according to claim 2, characterized in that: The method of creating a test process for each SSD in an asynchronous manner, and each test process obtaining a corresponding configuration file of a test item includes: S31. Based on the SSD product information, use the asynchronous method of the process pool under Python to create a test process for each SSD; S32, the test process obtains a configuration file corresponding to the test item, wherein the configuration file includes the number of normal power-off tests, the number of abnormal power-off tests, the interval time between power-off and power-on, and the maximum time of read and write IO.
4. The method for testing power failure of solid state hard disks in mass production according to claim 3, characterized in that: The test host controls the SSD to enter a normal power-off test process including: S41, start FIO's IO random write, and set FIO's normal power-off trigger command; the normal power-off trigger command includes: uninstalling the SSD device; disconnecting the power supply and waiting for the trigger-timeout duration; setting FIO's verify to pattern; S42, after the FIO is executed, wait for the configured interval time and power on the SSD of the channel again; S43, monitoring the preparation time after the SSD is powered on, and re-obtaining the path name according to the serial number of the SSD; S44, start FIO to perform IO random read, and verify whether the read IO data is consistent with the IO data completed by IO random write in step S41; S45, repeat steps S41-S44 until the number of cycles reaches the number of normal power-off tests in the configuration file.
5. The method for testing power failure of solid state hard disks in mass production according to claim 4, characterized in that: The test host controls the SSD to enter an abnormal power-off test process including: S51, start the IO random write of FIO, and set the trigger command of abnormal power failure of FIO; the trigger command of abnormal power failure includes: disconnecting the power supply; S52, after the FIO is executed, wait for the configured interval time and power on the SSD of the channel again; S53, monitoring the preparation time after the SSD is powered on, and re-obtaining the path name according to the serial number of the SSD; S54, start FIO to perform IO random read, and verify whether the read IO data is consistent with the IO data completed by IO random write in step S51; S55, repeat steps S51-S54 until the number of cycles reaches the number of abnormal power-off tests in the configuration file.
6. The method for testing power failure of solid state hard disks in mass production according to claim 5, characterized in that: After step S55, the following steps are also included: S56. The test host reads the SMART information again to check whether the number of power failures of the SSD is the sum of the number of power failures in step S44, the number of normal power failure tests, and the number of abnormal power failure tests, and check whether the number of abnormal power failures of the SSD is the sum of the number of abnormal power failures and the number of abnormal power failure tests in step S54.
7. A solid state drive mass production power-off test device for implementing the Linux-based solid state drive mass production power-off test method according to any one of claims 1 to 6, characterized in that: It includes a power control board with multiple independent power supply channels, a test host connected to the serial port of the power control board and loaded with test software, and a connection conversion board for inserting the SSD to be tested and connected to the power supply channel of the power control board. The connection conversion board is connected to the test host through a data line. The test software is a trigger test script using multi-process of python and FIO tool under Linux. The test host includes: An information reading module, the information reading module is used to control the corresponding power supply channel to be powered on to supply power to the SSD, and to identify and read SSD information; A test process creation module, wherein the test process creation module is used to create a test process for each SSD in an asynchronous manner, and allocate a corresponding configuration file of a test item to each test process; A normal power-off test module, which is used to control the SSD to perform a normal power-off test; An abnormal power-off test module, wherein the abnormal power-off test module is used to control the SSD to perform an abnormal power-off test; The result output module is used to output the power-off test result.
8. The power-off test device for mass production of solid state hard disks according to claim 7, characterized in that: The information read by the information reading module includes SSD product information and SSD SMART information. The product information includes the path name, serial number, capacity, manufacturer, interface type and speed of the SSD; the SMART information includes the number of power failures and abnormal power failures of the SSD.
9. The power-off test device for mass production of solid state hard disks according to claim 8, characterized in that: The normal power-off test module comprises: A normal power-off control module, which is used to start the IO random write of FIO and set the trigger command of the normal power-off of FIO; A first power-on module, wherein the first power-on module is used to wait for a preset interval time and power on the corresponding SSD in the channel again after the FIO of the normal power-off control module is executed; A first monitoring module, the first monitoring module is used to monitor the preparation time after the SSD is powered on after the first power recovery module is activated, and re-acquire the path name according to the serial number of the SSD; The first comparison module is used to receive the path name information sent by the first monitoring module and start FIO to perform IO random reading, and verify whether the read IO data is consistent with the IO data completed by the IO random writing of the normal power-off control module.
10. The power-off test device for mass production of solid state hard disks according to claim 9, characterized in that: The abnormal power-off test module comprises: An abnormal power-off control module, which is used to start the IO random write of FIO and set the trigger command of abnormal power-off of FIO; A second power restoration module, wherein the second power restoration module is used to wait for a preset interval length and power on the corresponding SSD in the channel again after the FIO of the abnormal power failure control module is executed; A second monitoring module, the second monitoring module is used to monitor the preparation time after the SSD is powered on after the second power recovery module is activated, and re-acquire the path name according to the serial number of the SSD; The second comparison module is used to receive the path name information sent by the second monitoring module and start FIO to perform IO random reading, and verify whether the read IO data is consistent with the IO data completed by the IO random writing of the abnormal power-off control module.
Citation Information
Cited By
Memory card activation test method, server and computer program product
CN121075403A
A solid state disk abnormal power-off test method and test system
CN122598731A