UFS private partition management verification method and test host, device and media

By reading and comparing private partition data in UFS devices and simulating multiple data management scenarios using the target path selection mode, the reliability verification problem of private partition management of UFS devices is solved, ensuring the reliability and data integrity of FTL management.

CN120217458BActive Publication Date: 2025-08-19ARTMEM TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510696381.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-08-19
Estimated Expiration
2045-05-28

AI Technical Summary

Technical Problem

In the prior art, when the private partition of UFS equipment is not updated for a long time, data loss is easily caused by NAND flash memory characteristics, and reliability verification of private partition management under FTL management is difficult to be reliable.

Method used

By reading initial data from the private partition of the UFS device, determining the operation path according to the target path selection mode, data operations on the physical partition and the private partition are performed, and consistency comparison is performed, and a loop test is established to verify the reliability of FTL management.

Benefits of technology

Reliable management verification of private partitions of UFS devices is realized, ensuring that data is not lost under FTL management, and improving the reliability and accuracy of verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120217458B_ABST
    Figure CN120217458B_ABST
Patent Text Reader

Abstract

The present application discloses a UFS private partition management verification method and a test host, device, and medium, relating to the field of UFS testing technology. The method includes: reading initial first private data from the private partition of an initialized UFS device and saving it as local data; performing a first data operation on the physical partition according to a target operation path determined from candidate operation paths based on a target path selection mode, and simultaneously performing a second data operation on the private partition to obtain an operated private partition; based on the second data operation performed on the private partition, synchronously updating the current local data to obtain updated local data; when all the second private data read from the operated private partition is consistent with the updated local data, verifying that the management of the private partition is normal, and re-verifying to establish a loop test. The method can reliably complete the FTL management verification of the private partition of the UFS device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of UFS testing technology, and in particular to a UFS private partition management verification method and a testing host, device, and medium. Background Art

[0002] The UFS (Universal Flash Storage) protocol is a high-performance flash memory protocol. UFS devices include a manufacturer-private partition, which stores non-volatile manufacturer information and configuration information. Currently, different memory chip manufacturers use different methods to store data in this partition. For example, some memory chip manufacturers dedicate a physical area to storing manufacturer-private data, which is not managed by the Flash Translation Layer (FTL). This can lead to data loss in this physical area due to the characteristics of NAND flash memory, resulting in errors when accessing this data. Therefore, to mitigate data loss over time, other memory chip manufacturers use FTL management to manage the physical area storing manufacturer-private data. However, using FTL management to manage the physical area storing manufacturer-private data is prone to various errors, making reliable verification of the reliability of this partition before shipment a pressing technical challenge. Summary of the Invention

[0003] This application aims to solve at least one of the technical problems existing in the prior art. To this end, this application proposes a UFS private partition management verification method and test host, device, and media. The method can determine the target operation path through a preset selection method, simulate various data management scenarios, and reliably complete the FTL management verification of the private partition on the UFS device.

[0004] In a first aspect, an embodiment of the present application provides a UFS private partition management verification method, which is applied to a test host, wherein the test host is in communication with a UFS device; the UFS device includes: a private partition and a physical partition other than the private partition; the method includes:

[0005] Reading initial first private data from the private partition of the initialized UFS device, and saving the first private data as local data;

[0006] Performing a test path determination process according to a target path selection mode to determine a target operation path from candidate operation paths;

[0007] performing a first data operation on the physical partition and a second data operation on the private partition according to the target operation path to obtain an operated private partition; and synchronously updating current local data based on the second data operation on the private partition to obtain updated local data;

[0008] performing consistency comparison processing on all second private data read from the operated private partition and the updated local data to obtain a comparison result;

[0009] Verification processing is performed based on the comparison result. When the comparison result is: the second private data and the updated local data are consistent, it is verified that the management of the private partition is normal, and the test path determination processing, the first data operation, the second data operation, the synchronous update processing, the consistency comparison processing, and the verification processing are re-performed to establish a loop test.

[0010] In a second aspect, an embodiment of the present application provides a test host comprising at least one processor and a memory for communicating with the at least one processor; the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the UFS private partition management verification method as described in any one of the embodiments of the first aspect.

[0011] In a third aspect, an embodiment of the present application provides an electronic device, comprising the test host as described in the embodiment of the second aspect.

[0012] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the UFS private partition management verification method as described in any one of the embodiments of the first aspect.

[0013] The embodiment of the present application includes: in a process of verifying private partition management of a UFS device, first, reading initial first private data from a private partition of an initialized UFS device and saving the first private data as local data; second, performing a test path determination process according to a target path selection mode and determining a target operation path from candidate operation paths; then, performing a first data operation on the physical partition and a second data operation on the private partition according to the target operation path to obtain an operated private partition; based on the second data operation on the private partition, performing a synchronous update process on the current local data to obtain updated local data; laying a data foundation for subsequent consistency comparison process; then, performing a consistency comparison process on all the second private data and the updated local data read from the operated private partition to obtain a comparison result; using the comparison result to provide a reliable reference for subsequent determination of whether the management of the private partition is normal; finally, performing a verification process based on the comparison result; if the comparison result shows that the second private data is consistent with the updated local data, then verifying that the management of the private partition is normal, and re-performing the test path determination process, the first data operation, the second data operation, the synchronous update process, the consistency comparison process, and the verification process to establish a loop test. In this way, a long-term cyclic test is established. During the long-term cyclic test, the target operation path is determined by a preset selection method, and various data management scenarios are simulated, thereby reliably verifying the reliability of the management of the private partition of the UFS device based on FTL management, that is, reliably completing the power switching verification of the UFS device. In other words, the embodiments of the present application can determine the target operation path by a preset selection method, simulate various data management scenarios, and reliably complete the FTL management verification of the private partition of the UFS device. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 This is a schematic diagram of a system architecture for executing a UFS private partition management verification method provided by an embodiment of the present application;

[0015] Figure 2 This is a flowchart of a UFS private partition management verification method provided by an embodiment of the present application;

[0016] Figure 3 This is a schematic diagram of the overall process of the UFS private partition management verification method provided by an embodiment of the present application;

[0017] Figure 4 This is a hardware structure diagram of a test host provided in one embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solutions and advantages of this application more clear, this application is further described in detail below with reference to the accompanying drawings and embodiments.

[0019] It should be noted that although a logical order is shown in the flowchart in the description of this application, in some cases, the steps shown or described may be performed in an order different from that in the flowchart. In the description of this application, "several" means one or more, and "more" means two or more. The description of "first" and "second" is only used to distinguish technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0021] First, some terms used in this application are explained:

[0022] FTL (Flash Translation Layer) management: This is the core software / firmware layer in NAND flash memory devices (such as SSDs and USB flash drives). It manages the adaptation between the physical characteristics of flash memory and the logical access of the host system.

[0023] The present application provides a UFS private partition management verification method, a test host, an electronic device, and a computer-readable storage medium, relating to the field of UFS testing technology. The method includes: reading initial first private data from the private partition of an initialized UFS device and saving it as local data; performing a first data operation on the physical partition according to a target operation path determined from candidate operation paths based on a target path selection mode, and simultaneously performing a second data operation on the private partition to obtain an operated private partition; based on the second data operation performed on the private partition, synchronously updating the current local data to obtain updated local data; when all the second private data read from the operated private partition are consistent with the updated local data, verifying that the management of the private partition is normal, and re-verifying to establish a loop test. The FTL management verification of the private partition of the UFS device can be reliably completed.

[0024] The embodiments of the present application are further described below with reference to the accompanying drawings.

[0025] like Figure 1As shown, the test host 100 is electrically connected to the UFS device 200, the host computer 300, and the power supply module 400, respectively. Specifically, it is connected to the host computer 300 via a USB cable, so that the test case executable program is burned from the host computer 300 to the test host 100, so as to run the test case and complete the private partition verification of the UFS device 200. Among them, a 5V voltage is provided to the test host through the power supply module 400 so that the test host 100 can start working. The actual test host 100 is also provided with a serial port board to provide serial port printing. Specifically, the host computer 300 is a PC device. The test host 100 is specifically a test board, or an electronic device or electronic device equipped with a test board; this application does not impose specific restrictions on the model of the test board.

[0026] Specifically, the UFS device 200 further includes a private partition 210 and a physical partition 220. The private partition 210 is used to store the manufacturer's private data. The physical partition 220 includes a user space 221 and a private command space 222. The user space 221 is used to store user data, and the private command space 222 is used to store private commands.

[0027] Those skilled in the art will understand that the system structure shown in the figure does not constitute a limitation on the embodiments of the present application, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0028] The system embodiment described above is merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0029] Those skilled in the art will understand that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will know that with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0030] Based on the above system structure, various embodiments of the UFS private partition management verification method of the present application are proposed below.

[0031] like Figure 2 As shown, the UFS private partition management verification method can be applied to Figure 1In the test host shown, the test host is in communication with a UFS device; wherein the UFS device includes: a private partition and a physical partition other than the private partition; the private partition is used to store the manufacturer's private data. The UFS private partition management verification method may include but is not limited to steps S110 to S150.

[0032] Step S110: reading initial first private data from the private partition of the initialized UFS device, and saving the first private data as local data.

[0033] Step S120: performing a test path determination process according to the target path selection mode, and determining a target operation path from the candidate operation paths.

[0034] Step S130: According to the target operation path, a first data operation is performed on the physical partition, and a second data operation is performed on the private partition to obtain the operated private partition; based on the second data operation on the private partition, the current local data is synchronously updated to obtain updated local data.

[0035] Step S140: performing consistency comparison processing on all second private data and updated local data read from the operated private partition to obtain a comparison result.

[0036] Step S150: Verification is performed based on the comparison result. When the comparison result is that the second private data is consistent with the updated local data, the management of the private partition is verified to be normal. The test path determination process, the first data operation, the second data operation, the synchronous update process, the consistency comparison process, and the verification process are re-performed to establish a loop test.

[0037] Through step S110, the first private data is saved as local data, and the local data is synchronously updated for subsequent synchronization with all data operations on the private partition, so as to judge the reliability of data management on the UFS device based on the updated data.

[0038] To further illustrate step S120 , the target path selection mode is used to indicate a method of determining a target operation path from a plurality of candidate operation paths.

[0039] Specifically, the target path selection mode is: sequential selection mode or random selection mode.

[0040] Specifically, the specific type of the target path selection mode can be determined through instructions, pre-configured selection parameters, etc. This application does not impose any specific restrictions on the method for determining the target path selection mode.

[0041] Specifically, the candidate operation paths include: a first operation path, a second operation path, and a third operation path. It is understandable that different candidate paths indicate different types of operations to be performed on the UFS device.

[0042] Specifically, the target operation path indicates the type of operation performed on the UFS device.

[0043] In the process of performing private partition management verification on the UFS device through steps S110 to S150, first, the initial first private data is read from the private partition of the initialized UFS device, and the first private data is saved as local data; second, a test path determination process is performed according to the target path selection mode, and a target operation path is determined from the candidate operation paths; then, according to the target operation path, a first data operation is performed on the physical partition, and a second data operation is performed on the private partition to obtain the operated private partition; based on the second data operation on the private partition, the current local data is synchronously updated to obtain the updated private partition. The local data is retrieved, laying the data foundation for subsequent consistency comparison processing. Then, all second private data and updated local data are read from the private partition after the operation, and consistency comparison processing is performed to obtain a comparison result. The comparison result provides a reliable reference for subsequent determination of whether the private partition management is normal. Finally, verification processing is performed based on the comparison result. If the comparison result shows that the second private data is consistent with the updated local data, the private partition management is verified to be normal. The test path determination process, the first data operation, the second data operation, the synchronous update process, the consistency comparison process, and the verification process are repeated to establish a cyclic test. In this way, a long-term cyclic test is established. During the long-term cyclic test process, the target operation path is determined by a preset selection method, simulating various data management scenarios, thereby reliably verifying the reliability of the private partition management of the UFS device based on FTL management, that is, reliably completing power consumption switching verification for the UFS device. In other words, the embodiments of the present application can reliably complete FTL management verification of the private partition of the UFS device by determining the target operation path by a preset selection method, simulating various data management scenarios, and reliably completing FTL management verification of the private partition of the UFS device.

[0044] According to some embodiments of the present application, step S120 is further described. Step S120: performing test path determination processing according to the target path selection mode, and determining the target operation path from the candidate operation paths, including but not limited to steps S121 to S123.

[0045] Step S121: Determine that the target path selection mode is a sequential selection mode.

[0046] Step S122: When the test path determination process is performed for the first time, the first candidate operation path is sequentially determined as the target operation path.

[0047] Step S123: When the test path determination process is not performed for the first time, the next candidate operation path is sequentially determined as the target operation path based on the candidate operation path determined last time.

[0048] Through step S121 to step S123, the target operation path is determined in sequence, which is conducive to orderly completing the private partition management verification of the UFS device and more comprehensively simulating the data management scenario of the UFS device.

[0049] According to some embodiments of the present application, step S120 is further described. Step S120: performing test path determination processing according to the target path selection mode, and determining the target operation path from the candidate operation paths, including but not limited to steps S124 to S125.

[0050] Step S124: Determine that the target path selection mode is the random selection mode.

[0051] Step S125: Each time the test path determination process is performed, a candidate operation path is randomly determined from a plurality of candidate operation paths as a target operation path.

[0052] Through step S124 to step S125, since the operations performed on the UFS device are uncertain when the UFS device is actually used, randomly determining the target operation path is conducive to more realistic simulation of the data management scenario of the UFS device and improving the reliability of the private partition management verification of the UFS device.

[0053] According to some embodiments of the present application, the candidate operation path includes a first operation path, and the physical partition includes: user space; further explaining step S130, step S130: according to the target operation path, a first data operation is performed on the physical partition, and a second data operation is performed on the private partition at the same time to obtain the operated private partition; based on the second data operation performed on the private partition, the current local data is synchronously updated to obtain the updated local data, including but not limited to steps S210 to S220.

[0054] Step S210: When the target operation path is the first operation path, a read operation is performed on the user space, and at the same time, a data random modification operation is performed on the private partition to obtain the operated private partition.

[0055] Step S220: Based on the random data modification operation performed on the private partition, the same random data modification operation is performed on the current local data to synchronously obtain updated local data.

[0056] Specifically, when the target operation path is the first operation path, the first data operation performed on the user space is a read operation, ie, reading user data from the user space; and the second data operation performed on the private partition is a random data modification operation.

[0057] Specifically, performing the random data modification operation on the private partition in step S210 specifically involves randomly modifying the private data at any data location or a specified location in the private partition to obtain the modified private data. Performing the same random data modification operation on the current local data in step S220 specifically involves synchronously modifying the local data in the same manner with reference to the modified private data in the private partition to obtain the updated local data. Specifically, modifying the local data at the same data location or the specified location to obtain the updated local data.

[0058] Through step S220, the local data is synchronously updated based on the same data random modification operation to obtain updated local data, laying a data foundation for subsequent consistency comparison processing.

[0059] Through steps S210 to S220, a first data management scenario is simulated in which a read operation is performed on the user space of the UFS device and no read operation is performed on the private partition. In this first data management scenario, a random data modification operation is synchronously performed on the private data and local data in the private partition to facilitate the subsequent execution of step S140. By comparing the data consistency of all the second private data of the operated private partition with the updated local data, it is determined based on the comparison result whether the private data in the private partition is lost in the first data management scenario and whether the FTL management is normal.

[0060] According to some embodiments of the present application, the candidate operation path includes a second operation path, and the physical partition includes: a user space; further explaining step S130, step S130: according to the target operation path, a first data operation is performed on the physical partition, and a second data operation is performed on the private partition at the same time to obtain the operated private partition; based on the second data operation performed on the private partition, the current local data is synchronously updated to obtain the updated local data, including but not limited to steps S310 to S320.

[0061] Step S310: When the target operation path is the second operation path, a data write operation is performed on the user space according to the user data, and a data write operation is performed on the private partition according to the private data to be written, and a data random modification operation is performed on the private partition to obtain the operated private partition; and a power-off operation is performed on the UFS device.

[0062] Step S320: Based on the data write operation and data random modification operation performed on the private partition, the same data write operation and data random modification operation are performed on the current local data to synchronously obtain the updated local data.

[0063] Specifically, in step S310, when the target operation path is the second operation path, the first data operation performed on the user space is: a write data operation, that is, writing normal user data into the user space; at the same time, the second data operation performed on the private partition includes: a write data operation and a random data modification operation; wherein, the write data operation on the private partition specifically refers to: writing the private data to be written into the private partition while writing the normal user data into the user space; the random data modification operation on the private partition specifically refers to: randomly modifying the private data at any data location or specified location in the private partition to obtain the modified private data.

[0064] Furthermore, through step S410 , a power failure scenario of the UFS device is simulated, so as to facilitate subsequent verification of whether the power failure has an impact on the FTL management of the private partition.

[0065] Then in step S320, referring to the second data operation performed on the private partition, the same random data modification operation is performed on the current local data, specifically including: write data operation, random data modification operation; referring to the new private data in the private partition, the local data is synchronously operated in the same manner to obtain updated local data, specifically: the private data to be written is written locally, and the local data is modified at the same data location or specified location.

[0066] It is understandable that under FTL management, when a data write operation is performed on a UFS device based on a combination of manufacturer-specific data to be written and normal user data, it is easy for the manufacturer-specific data to be mistakenly written into the user space. This application simulates a second data management scenario in which a data write operation is performed on a UFS device based on a combination of manufacturer-specific data to be written and normal user data, and a power outage occurs, through step S310, to facilitate subsequent verification of whether private data in the private partition is lost in this second data management scenario and whether FTL management is normal.

[0067] Through step S320, the local data is synchronously updated based on the same data writing operation and data random modification operation to obtain updated local data, laying a data foundation for subsequent consistency comparison processing.

[0068] Through steps S310 to S320, a second data management scenario is simulated in which data write operations are performed on the user space of the UFS device and on the private partition at the same time. In this second data management scenario, data write operations and random data modification operations are synchronously performed on the private data and local data in the private partition to facilitate the subsequent execution of step S140. By comparing the data consistency of all the second private data of the private partition after the operation with the updated local data, it is determined based on the comparison result whether the private data in the private partition is lost in the second data management scenario and whether the FTL management is normal.

[0069] According to some embodiments of the present application, the candidate operation path includes a third operation path, and the physical partition also includes: a private command space; further explaining step S130, step S130: according to the target operation path, a first data operation is performed on the physical partition, and a second data operation is performed on the private partition at the same time to obtain the operated private partition; based on the second data operation performed on the private partition, the current local data is synchronously updated to obtain the updated local data, including but not limited to steps S410 to S420.

[0070] Step S410: When the target operation path is the third operation path, a write command operation is performed on the private command space according to the private command to be written, and a write data operation is performed on the private partition according to the private data to be written, and a data random modification operation is performed on the private partition to obtain the operated private partition.

[0071] Step S420: Based on the data write operation and data random modification operation performed on the private partition, the same data write operation and data random modification operation are performed on the current local data to synchronously obtain updated local data.

[0072] Specifically, in step S410, when the target operation path is the third operation path, the first data operation performed on the private command space is: a write command operation, that is, writing the private command to be written into the private command space; at the same time, the second data operation performed on the private partition includes: a write data operation and a random data modification operation; wherein, performing a write data operation on the private partition specifically refers to: writing the private command to be written into the private command space and writing the private data to be written into the private partition at the same time; performing a random data modification operation on the private partition specifically refers to: randomly modifying the private data at any data position or specified position in the private partition to obtain the modified private data.

[0073] Then in step S420, referring to the second data operation performed on the private partition, the same random data modification operation is performed on the current local data, specifically including: write data operation, random data modification operation; referring to the new private data in the private partition, the local data is synchronously operated in the same manner to obtain updated local data, specifically: the private data to be written is written locally, and the local data is modified at the same data location or specified location.

[0074] It is understandable that under FTL management, when a write operation is performed on a UFS device based on the manufacturer's private data to be written together with the private command to be written, it is easy to mistakenly write the manufacturer's private data into the private command space. This application simulates a third data management scenario in which a write operation is performed on a UFS device based on the manufacturer's private data to be written together with the private command to be written through step S420, so as to facilitate subsequent verification of whether the private data in the private partition is lost in this third data management scenario and whether the FTL management is normal.

[0075] Through step S420, the local data is synchronously updated based on the same data writing operation and data random modification operation to obtain updated local data, laying a data foundation for subsequent consistency comparison processing.

[0076] Through steps S410 to S420, a third data management scenario is simulated in which write command operations are performed on the private command space of the UFS device and data write operations are performed on the private partition. In this third data management scenario, write data operations and random data modification operations are synchronously performed on the private data and local data in the private partition to facilitate the subsequent execution of step S140. By comparing the data consistency of all the second private data of the private partition after the operation with the updated local data, it is determined based on the comparison result whether the private data in the private partition is lost in the third data management scenario and whether the FTL management is normal.

[0077] To further illustrate step S140 , specifically, the comparison result is: the second private data and the updated local data are consistent, or the comparison result is: the second private data and the updated local data are inconsistent.

[0078] In step S140, all second private data are read from the operated private partition, and after consistency comparison processing is performed on the second private data and the updated local data, the obtained comparison result can provide a reliable reference for subsequent judgment on whether the management of the private partition is normal.

[0079] Further explaining step S150, when the comparison result is: the second private data and the updated local data are consistent, it means that there is no abnormal situation such as data loss or data miswriting in the private partition, and the FTL management of the private partition is verified to be normal; thus, step S120, step S130, step S140, and step S150 are performed again; and so on, a long-term loop test is established; and in the long-term loop test process, the target operation path is determined by a preset selection method, and various data management scenarios are simulated, thereby reliably verifying the reliability of managing the private partition of the UFS device based on FTL management.

[0080] According to some embodiments of the present application, after obtaining the comparison result, the UFS private partition management verification method further includes steps S160 to S170.

[0081] Step S160: When the comparison result is that the second private data and the updated local data are inconsistent, it is determined that the management of the private partition is abnormal.

[0082] Step S170: When it is determined that the management of the private partition is abnormal, the verification is terminated.

[0083] It is understandable that when the second private data is inconsistent with the updated local data, it means that there are abnormal situations such as data loss and data miswriting in the private partition. In this case, the FTL management of the private partition is verified to be abnormal, and the private partition management verification of the UFS device needs to be terminated.

[0084] The verification termination mechanism of the UFS private partition management verification is implemented through steps S160 to S170. When it is determined that the management of the private partition is abnormal, the verification is terminated; so that the tester can promptly detect vulnerabilities in the FTL management of the private partition.

[0085] Combine Figure 4 , taking an example to further illustrate the overall process of the UFS private partition management verification method provided in the embodiment of the present application.

[0086] Step S410: UFS device initialization.

[0087] Step S420: After the UFS device is initialized, the initial first private data is read from the private partition of the UFS device, and the first private data is saved locally on the test host to obtain local data.

[0088] Step S430: Determine the target operation path according to the target path selection mode (sequential selection mode or random selection mode); and select step S441, step S442, or step S443 in step S440 for execution.

[0089] Step S441: Execute the first operation path. Specifically, the first operation path includes: performing a read operation on the user space of the UFS device, performing a random data modification operation on the private partition, synchronizing with the private partition, and synchronously updating the current local data to obtain updated local data.

[0090] Step S442: Execute the second operation path. The second operation path specifically includes: writing normal user data to the user space, writing private data to the private partition, performing a random data modification operation on the private partition, synchronizing the private partition, and synchronously updating the current local data to obtain updated local data; and powering off the UFS device.

[0091] Step S443: Execute the third operation path. Specifically, the third operation path includes: writing the private command into the private command space, writing the private data into the private partition, performing random data modification operations on the private partition, synchronizing with the private partition, and synchronously updating the current local data to obtain updated local data.

[0092] After executing step S441, or step S442, or step S443, continue to execute step S450.

[0093] Step S450: Read all second private data in the operated private partition.

[0094] Step S460: Compare the second private data with the updated local data to see if they are consistent. If so, execute step S470; if not, execute step S480.

[0095] Step S470: determine that the management of the private partition is normal, jump to re-execute step S430 to establish a long-term loop test.

[0096] Step S480: determine that the management of the private partition is abnormal; end the private partition management verification.

[0097] In one embodiment, after executing step S430, step S441 is selected to be executed, and step S450 is continued to be executed. When the second private data is consistent with the updated local data, it is verified that the FTL management is normal when the read operation is performed on the user space of the UFS device and the private partition is not read; when the second private data is inconsistent with the updated local data, it is verified that the FTL management is abnormal when the read operation is performed on the user space of the UFS device and the private partition is not read.

[0098] In one embodiment, after executing step S430, step S442 is selected to be executed, and step S450 is continued to be executed. When the second private data is consistent with the updated local data, it is verified that: when the private data and normal user data are written together and the UFS device is powered off, the private data is not mistakenly written to the user space, and the FTL management is normal; when the second private data is inconsistent with the updated local data, it is verified that: when the private data and normal user data are written together and the UFS device is powered off, the private data is mistakenly written to the user space, and the FTL management is abnormal.

[0099] In one embodiment, after executing step S430, step S443 is selected to be executed, and step S450 is continued to be executed. When the second private data is consistent with the updated local data, it is verified that: when the private data and private commands are written together, the private data is not mistakenly written to the private command space, and the FTL management is normal; when the second private data is inconsistent with the updated local data, it is verified that: when the private data and private commands are written together, the private data is mistakenly written to the private command space, and the FTL management is abnormal.

[0100] like Figure 4 As shown, the present invention also provides a test host, including:

[0101] The processor 401 may be implemented as a general-purpose central processing unit, a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0102] The memory 402 can be implemented in the form of a read-only memory, a static storage device, a dynamic storage device, or a random access memory. The memory 402 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 402 and is called by the processor 401 to execute the UFS private partition management verification method of the embodiments of this application.

[0103] Input / output interface 403, used to implement information input and output;

[0104] Communication interface 404, used to implement communication interaction between the apparatus and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);

[0105] Bus 405 , which transmits information between various components of the device (e.g., processor 401 , memory 402 , input / output interface 403 , and communication interface 404 );

[0106] The processor 401 , the memory 402 , the input / output interface 403 and the communication interface 404 are connected to each other in communication within the device via a bus 405 .

[0107] An embodiment of the present application also provides an electronic device, including the above test host.

[0108] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned UFS private partition management verification method is implemented.

[0109] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory optionally includes a memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of the above-mentioned networks include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and are located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0110] Those skilled in the art will appreciate that all or some of the steps and systems disclosed above can be implemented as software, firmware, hardware, or any suitable combination thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is well known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVDs) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0111] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above implementation mode. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the present application.

Claims

1. A UFS private partition management verification method, characterized in that: Applied to a test host, the test host being communicatively connected to a UFS device; The UFS device includes: a private partition and a physical partition other than the private partition; the method includes: Reading initial first private data from the private partition of the initialized UFS device, and saving the first private data as local data; Performing a test path determination process according to a target path selection mode to determine a target operation path from candidate operation paths; performing a first data operation on the physical partition and a second data operation on the private partition according to the target operation path to obtain an operated private partition; and synchronously updating current local data based on the second data operation on the private partition to obtain updated local data; performing consistency comparison processing on all second private data read from the operated private partition and the updated local data to obtain a comparison result; Verification processing is performed based on the comparison result. When the comparison result is: the second private data and the updated local data are consistent, it is verified that the management of the private partition is normal, and the test path determination processing, the first data operation, the second data operation, the synchronous update processing, the consistency comparison processing, and the verification processing are re-performed to establish a loop test.

2. The UFS private partition management verification method according to claim 1, characterized in that: The candidate operation path includes a first operation path, and the physical partition includes a user space; performing a first data operation on the physical partition according to the target operation path, and simultaneously performing a second data operation on the private partition to obtain an operated private partition; and synchronously updating current local data based on the second data operation on the private partition to obtain updated local data, including: When the target operation path is the first operation path, a read operation is performed on the user space, and a data random modification operation is performed on the private partition to obtain the operated private partition; Based on the random data modification operation performed on the private partition, the same random data modification operation is performed on the current local data to synchronously obtain updated local data.

3. The UFS private partition management verification method according to claim 1, characterized in that: The candidate operation path includes a second operation path, and the physical partition includes a user space; performing a first data operation on the physical partition according to the target operation path, and simultaneously performing a second data operation on the private partition to obtain an operated private partition; and synchronously updating current local data based on the second data operation on the private partition to obtain updated local data, including: When the target operation path is the second operation path, a data write operation is performed on the user space according to the user data, and a data write operation is performed on the private partition according to the private data to be written, and a data random modification operation is performed on the private partition to obtain an operated private partition; and a power-off operation is performed on the UFS device; Based on the data write operation and the data random modification operation performed on the private partition, the same data write operation and the data random modification operation are performed on the current local data to synchronously obtain the updated local data.

4. The UFS private partition management verification method according to claim 1, characterized in that: The candidate operation path includes a third operation path, and the physical partition further includes a private command space; performing a first data operation on the physical partition according to the target operation path and simultaneously performing a second data operation on the private partition to obtain an operated private partition; and synchronously updating current local data based on the second data operation performed on the private partition to obtain updated local data, including: When the target operation path is the third operation path, a write command operation is performed on the private command space according to the private command to be written, a data write operation is performed on the private partition according to the private data to be written, and a data random modification operation is performed on the private partition to obtain the operated private partition; Based on the data write operation and the data random modification operation performed on the private partition, the same data write operation and the data random modification operation are performed on the current local data to synchronously obtain the updated local data.

5. The UFS private partition management verification method according to claim 1, characterized in that: The process of performing test path determination processing according to the target path selection mode to determine the target operation path from the candidate operation paths includes: Determining that the target path selection mode is a sequential selection mode; When the test path determination process is performed for the first time, determining the first candidate operation path in sequence as the target operation path; When the test path determination process is not performed for the first time, based on the candidate operation path determined last time, the next candidate operation path is determined in sequence as the target operation path.

6. The UFS private partition management verification method according to claim 1, characterized in that: The process of performing test path determination processing according to the target path selection mode to determine the target operation path from the candidate operation paths includes: Determining that the target path selection mode is a random selection mode; Each time the test path determination process is performed, one of the candidate operation paths is randomly determined as the target operation path from among the plurality of candidate operation paths.

7. The UFS private partition management verification method according to claim 1, characterized in that: After obtaining the comparison result, the method further includes: When the comparison result is that the second private data and the updated local data are inconsistent, determining that management of the private partition is abnormal; If it is determined that the management of the private partition is abnormal, the verification is terminated.

8. A test host, characterized in that: It includes at least one processor and a memory for communicating with the at least one processor; the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the UFS private partition management verification method as described in any one of claims 1 to 7.

9. An electronic device, characterized in that: The test host comprises the test host as claimed in claim 8.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the UFS private partition management verification method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • SSD data testing method and device, storage medium and testing equipment

    CN114388053A

  • Parallel Mirrored Copying with Write Consistency

    US20160077928A1