UFS private partition management verification method, test host, equipment and medium

By simulating multiple data management scenarios on the test host, verifying the FTL management and reliability of private partitions of UFS devices, the problem of difficulty in verifying the reliability of private partition management in the prior art is solved, and effective verification of private partition management of UFS devices is achieved.

CN120217458AActive Publication Date: 2025-06-27ARTMEM TECHNOLOGY CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

The prior art is difficult to reliably verify the reliability of FTL management of private partitions of UFS devices, resulting in data loss and error acquisition problems.

Method used

A UFS private partition management verification method is proposed. By simulating multiple data management scenarios on the test host, determining the target operation path, performing data operations and synchronous updates, performing consistency comparisons, and verifying the normality of private partition management.

Benefits of technology

Reliable verification of FTL management of private partitions of UFS devices is realized, reducing the risk of data loss and error acquisition, and ensuring the normality of private partition management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120217458A_ABST
    Figure CN120217458A_ABST
Patent Text Reader

Abstract

The invention discloses a UFS private partition management verification method, a test host, equipment and a medium, and relates to the technical field of UFS testing. The method comprises the following steps: reading initial first private data from a private partition of the UFS equipment which completes initialization, and storing the initial first private data as local data; according to a target operation path determined from the candidate operation paths based on a target path selection mode, performing first data operation on the physical partition, and performing second data operation on the private partition to obtain an operated private partition; synchronously updating the current local data to obtain updated local data based on a second data operation performed on the private partition; and 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 performing verification again to establish a loop test. And FTL management verification of the private partition can be reliably completed for the UFS equipment.
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. The UFS device includes a manufacturer private partition, which is used to store manufacturer information and some configuration information that cannot be lost. At present, different storage chip manufacturers use different methods to store data in the manufacturer private partition. For example, some storage chip manufacturers demarcate a physical area specifically for storing manufacturer private data, and do not participate in FTL (Flash Translation Layer) management; in this way, if the manufacturer private data in the physical area is not updated for a long time, according to the characteristics of NAND flash memory, data loss is likely to occur in the physical area as electrons flow, resulting in errors in obtaining manufacturer private data. Therefore, in order to reduce the loss of data as the storage time increases, other storage chip manufacturers use FTL management to manage the physical area where the manufacturer private data is stored. However, in the process of using FTL management to manage the data in the physical area where the manufacturer private data is stored, various errors are prone to occur. Therefore, how to reliably verify the reliability of managing the private partition before leaving the factory is a technical problem that needs to be solved urgently. Summary of the invention

[0003] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a UFS private partition management verification method and a test host, device and medium, which can determine the target operation path through a preset selection method, simulate multiple 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 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 test path determination processing according to the target path selection mode, and determining the target operation path from the candidate operation paths; Perform a first data operation on the physical partition according to the target operation path, and simultaneously perform a second data operation on the private partition to obtain the operated private partition; based on the second data operation performed on the private partition, perform a synchronization update process on the current local data to obtain the updated local data; Read all the second private data and the updated local data from the operated private partition, and perform a consistency comparison process to obtain a comparison result; Perform a verification process according to the comparison result. When the comparison result is that 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 process, the first data operation, the second data operation, the synchronization update process, the consistency comparison process, and the verification process are re-performed to establish a loop test.

[0005] In a second aspect, an embodiment of the present application provides a test host, including at least one processor and a memory communicatively connected to the at least one processor; the memory stores instructions executable 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 according to any one of the embodiments of the first aspect.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, including the test host according to the embodiment of the second aspect.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions for causing a computer to execute the UFS private partition management verification method according to any one of the embodiments of the first aspect.

[0008] Embodiments of the present application include: In the process of verifying the private partition management of a UFS device, first, read the initial first private data from the private partition of the initialized UFS device and save the first private data as local data; second, perform test path determination processing according to the target path selection mode to determine the target operation path from the candidate operation paths; then, according to the target operation path, perform a first data operation on the physical partition and a second data operation on the private partition to obtain the operated private partition; based on the second data operation performed on the private partition, perform synchronous update processing on the current local data to obtain the updated local data, laying a data foundation for subsequent consistency comparison processing; then, read all the second private data and the updated local data from the operated private partition and perform consistency comparison processing to obtain a comparison result; use the comparison result to provide a reliable reference for subsequent judgment on whether the management of the private partition is normal; finally, perform verification processing according to the comparison result. When the comparison result is that the second private data and the updated local data are consistent, it is verified that the management of the private partition is normal, and re-perform test path determination processing, first data operation, second data operation, synchronous update processing, consistency comparison processing, and verification processing to establish a loop test. In this way, a long-term loop test is established, and during the long-term loop test process, the target operation path is determined by a preset selection method to simulate various data management scenarios, thereby reliably verifying the reliability of managing the private partition of the UFS device based on FTL management, that is, reliably completing the power consumption switching verification for the UFS device. That is to say, 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 for the UFS device. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 FIG. is a schematic diagram of the system architecture for executing the method for verifying UFS private partition management provided by an embodiment of the present application; Figure 2 FIG. is a schematic flowchart of the method for verifying UFS private partition management provided by an embodiment of the present application; Figure 3 FIG. is a schematic diagram of the overall process working of the method for verifying UFS private partition management provided by an embodiment of the present application; Figure 4 FIG. is a schematic diagram of the hardware structure of the test host provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0010] In order to make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments.

[0011] It should be noted that although the logical order is shown in the flowchart in the description of the present application, in some cases, the steps shown or described can be executed in an order different from that in the flowchart. In the description of the present application, the meaning of "several" is one or more, and the meaning of "multiple" is two or more. The description of "first" and "second" is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features or implicitly indicating the sequence relationship of the indicated technical features.

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

[0013] First, the following explains several terms involved in this application: FTL (Flash Translation Layer) management: It is the core software / firmware layer in NAND flash memory devices (such as SSDs, USB flash drives, etc.), responsible for managing the adaptation between the physical characteristics of the flash memory and the logical access of the host system.

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

[0015] The following further elaborates on the embodiments of this application with reference to the accompanying drawings.

[0016] As Figure 1As shown in the figure, 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 through a USB cable, so that the test case executable program can be burned into the test host 100 from the host computer 300, so as to run the test case and complete the private partition verification of the UFS device 200. Among them, the power supply module 400 provides a 5V voltage to the test host so that the test host 100 can start working. A serial port board is also provided on the actual test host 100 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 equipment equipped with a test board; the present application does not specifically limit the model of the test board.

[0017] 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. Among them, the user space 221 is used to store user data, and the private command space 222 is used to store private commands.

[0018] Those skilled in the art can 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 combine some components, or different component arrangements.

[0019] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0020] Those skilled in the art can understand that the system architecture and application scenarios described in the embodiments of the present application are for more clearly explaining the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art know that with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.

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

[0022] As Figure 2 shown, the UFS private partition management verification method can be applied to such as Figure 1In the test host shown, the test host is communicatively connected to the UFS device; wherein, the UFS device includes: a private partition and physical partitions 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.

[0023] Step S110: Read the initial first private data from the private partition of the initialized UFS device, and save the first private data as local data.

[0024] Step S120: Perform test path determination processing according to the target path selection mode, and determine the target operation path from the candidate operation paths.

[0025] Step S130: According to the target operation path, perform a first data operation on the physical partition, and at the same time perform a second data operation on the private partition to obtain the operated private partition; based on the second data operation performed on the private partition, perform a synchronization update process on the current local data to obtain the updated local data.

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

[0027] Step S150: Perform verification processing according to the comparison result. When the comparison result is that the second private data and the updated local data are consistent, it is verified that the management of the private partition is normal, and re-perform test path determination processing, first data operation, second data operation, synchronization update processing, consistency comparison processing, and verification processing to establish a loop test.

[0028] Through step S110, the first private data is saved as local data, so as to synchronize all data operations on the private partition in the follow-up and perform a synchronization update on the local data, thereby judging the reliability of the data management of the UFS device based on the updated data.

[0029] To further illustrate step S120, the target path selection mode is used to indicate: the way to determine a target operation path from multiple candidate operation paths.

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

[0031] Specifically, the specific type of the target path selection mode can be determined by means such as instructions, pre-configured selection parameters, etc. The present application does not make specific limitations on the way to determine the target path selection mode.

[0032] Specifically, the candidate operation paths include: the first operation path, the second operation path, and the third operation path. It can be understood that the types of operations on the UFS device indicated by different candidate paths are different.

[0033] Specifically, the target operation path indicates: the type of operation to be performed on the UFS device.

[0034] Through steps S110 to S150, during the process of verifying the private partition management of the UFS device, first, read the initial first private data from the private partition of the initialized UFS device and save the first private data as local data; secondly, perform test path determination processing according to the target path selection mode to determine the target operation path from the candidate operation paths; then, according to the target operation path, perform a first data operation on the physical partition and a second data operation on the private partition to obtain the operated private partition; based on the second data operation performed on the private partition, perform synchronous update processing on the current local data to obtain the updated local data, laying a data foundation for subsequent consistency comparison processing; then, perform consistency comparison processing on all the second private data read from the operated private partition and the updated local data to obtain a comparison result; use the comparison result to provide a reliable reference for subsequent judgment on whether the management of the private partition is normal; finally, perform verification processing according to the comparison result. When the comparison result is that the second private data and the updated local data are consistent, it is verified that the management of the private partition is normal, and re-perform test path determination processing, first data operation, second data operation, synchronous update processing, consistency comparison processing, and verification processing to establish a loop test. In this way, a long-term loop test is established, and during the long-term loop test process, the target operation path is determined by a preset selection method to simulate various data management scenarios, thereby reliably verifying the reliability of managing the private partition of the UFS device based on FTL management, that is, reliably completing the power consumption switching verification for the UFS device. That is to say, the embodiment 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 for the UFS device.

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

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

[0037] Step S122: In the case of performing test path determination processing for the first time, sequentially determine the first candidate operation path as the target operation path.

[0038] Step S123: In the case of non-first determination of the test path, based on the previously determined candidate operation path, sequentially determine the next candidate operation path as the target operation path.

[0039] By steps S121 to S123, determining the target operation path in sequence is conducive to orderly completing the verification of the private partition management of the UFS device and comprehensively simulating the data management scenario of the UFS device.

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

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

[0042] Step S125: Each time test path determination processing is performed, randomly determine a candidate operation path from multiple candidate operation paths as the target operation path.

[0043] By steps S124 to S125, since the operations performed on the UFS device during actual use are uncertain, randomly determining the target operation path is conducive to more realistically simulating the data management scenario of the UFS device; improving the reliability of the verification of the private partition management of the UFS device.

[0044] According to some embodiments of the present application, the candidate operation path includes the first operation path, and the physical partition includes: the user space. Step S130 is further described. Step S130: According to the target operation path, perform a first data operation on the physical partition and simultaneously perform a second data operation on the private partition to obtain the operated private partition; based on the second data operation performed on the private partition, perform synchronous update processing on the current local data to obtain the updated local data, including but not limited to steps S210 to S220.

[0045] Step S210: When the target operation path is the first operation path, perform a read operation on the user space and simultaneously perform a data random modification operation on the private partition to obtain the operated private partition.

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

[0047] Specifically, when the target operation path is the first operation path, the first data operation on the user space is: a read operation, that is, reading user data from the user space; at the same time, the second data operation on the private partition is: a data random modification operation.

[0048] Specifically, the data random modification operation on the private partition in step S210 is specifically: randomly modifying any data position or the private data at a specified position in the private partition to obtain the modified private data. Then, the same data random modification operation on the current local data in step S220 is specifically: referring to the modified private data in the private partition, synchronously modifying the local data in the same way to obtain the updated local data, specifically: modifying the local data at the same data position or the specified position to obtain the updated local data.

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

[0050] Through steps S210 to S220, a first data management scenario of performing a read operation on the user space of the UFS device and not performing a read operation on the private partition is simulated. In this first data management scenario, the private data and local data in the private partition are synchronously subjected to a data random modification operation, so as to facilitate the subsequent execution of step S140. By performing a data consistency comparison between all the second private data in the operated private partition and the updated local data, based on the comparison result, it is judged whether the private data in the private partition is lost and whether the FTL management is normal in this first data management scenario.

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

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

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

[0054] 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 data random modification operation; wherein, the write data operation on the private partition specifically refers to: while writing normal user data into the user space, writing the private data to be written into the private partition; the data random modification operation on the private partition specifically refers to: randomly modifying any data position or the private data at a specified position in the private partition to obtain the modified private data.

[0055] And through step S410, the power-off scenario of the UFS device is simulated to facilitate subsequent verification of whether power-off has an impact on the FTL management of the private partition.

[0056] Then in step S320, referring to the second data operation performed on the private partition, the same data random modification operation performed on the current local data specifically includes: a write data operation and a data random modification operation; referring to the new private data in the private partition, synchronously perform operations on the local data in the same manner to obtain the updated local data, specifically: writing the private data to be written into the local and modifying the local data at the same data position or the specified position.

[0057] It can be understood that under FTL management, when performing a write data operation on the UFS device based on the combination of the private data of the manufacturer to be written and normal user data, it is easy to miswrite the private data of the manufacturer into the user space. Through step S310 of the present application, a second data management scenario of performing a write data operation on the UFS device based on the combination of the private data of the manufacturer to be written and normal user data and power-off is simulated to facilitate subsequent verification of whether the private data in the private partition is lost and whether the FTL management is normal in this second data management scenario.

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

[0059] Through steps S310 to S320, a second data management scenario of simultaneously writing data to the user space of the UFS device and writing data to the private partition is simulated. And in this second data management scenario, data writing operations and data random modification operations are synchronously performed on the private data and local data in the private partition, so as to facilitate the subsequent execution of step S140. By comparing the data consistency between all the second private data in the operated private partition and the updated local data, and based on the comparison result, it is judged whether the private data in the private partition is lost and whether the FTL management is normal in this second data management scenario.

[0060] According to some embodiments of the present application, the candidate operation paths include a third operation path, and the physical partition further includes: a private command space; further describe step S130. Step S130: According to the target operation path, perform a first data operation on the physical partition and a second data operation on the private partition simultaneously to obtain the operated private partition; based on the second data operation performed on the private partition, perform synchronous update processing on the current local data to obtain the updated local data, including but not limited to steps S410 to S420.

[0061] Step S410: When the target operation path is the third operation path, perform a write command operation on the private command space according to the private command to be written, and at the same time perform a data writing operation on the private partition according to the private data to be written, and perform a data random modification operation on the private partition to obtain the operated private partition.

[0062] Step S420: Based on the data writing operation and data random modification operation performed on the private partition, perform the same data writing operation and data random modification operation on the current local data, and synchronously obtain the updated local data.

[0063] 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 data writing operation and a data random modification operation; wherein, the data writing operation performed on the private partition specifically refers to: while writing the private command to be written into the private command space, writing the private data to be written into the private partition; the data random modification operation performed on the private partition specifically refers to: randomly modifying the private data at any data position or a specified position in the private partition to obtain the modified private data.

[0064] In step S420, with reference to the second data operation performed on the private partition, the same data random modification operations on the current local data specifically include: write data operation, data random modification operation; with reference to the new private data in the private partition, the local data is synchronously operated in the same manner to obtain the updated local data. Specifically: write the private data to be written into the local, and modify the local data at the same data position or a specified position.

[0065] It can be understood that under the management of the FTL, when writing to the UFS device based on the private data of the manufacturer to be written and the private command to be written, it is easy to miswrite the private data of the manufacturer into the private command space. Through step S420 of this application, a third data management scenario of writing to the UFS device based on the private data of the manufacturer to be written and the private command to be written is simulated, so as to facilitate subsequent verification of whether the private data in the private partition is lost and whether the FTL management is normal in this third data management scenario.

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

[0067] Through steps S410 to S420, a third data management scenario of writing a write command operation to the private command space of the UFS device and writing data to the private partition is simulated. And in this third data management scenario, write data operations and data random modification operations are synchronously performed on the private data and local data in the private partition, so as to facilitate subsequent execution of step S140. By performing a data consistency comparison on all the second private data in the operated private partition and the updated local data, based on the comparison result, it is judged whether the private data in the private partition is lost and whether the FTL management is normal in this third data management scenario.

[0068] Further elaborating on step S140, specifically, the comparison result is: the second private data is consistent with the updated local data, or the comparison result is: the second private data is inconsistent with the updated local data.

[0069] Through step S140, all the second private data is read from the operated private partition. After performing a consistency comparison process on the second private data and the updated local data, the obtained comparison result can provide a reliable reference for subsequent judgment of whether the management of the private partition is normal.

[0070] To further illustrate step S150, when the comparison result is that the second private data is consistent with the updated local data, it indicates that there are no abnormal situations such as data loss or data miswriting in the private partition, which verifies that the FTL management of the private partition is normal. Therefore, steps S120, S130, S140, and S150 are performed again; and so on, to establish a long-term loop test. During the long-term loop test, the target operation path is determined through a preset selection method to simulate various data management scenarios, thereby reliably verifying the reliability of managing the private partition of the UFS device based on FTL management.

[0071] 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.

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

[0073] Step S170: In the case where it is determined that the management of the private partition is abnormal, the verification is ended.

[0074] It can be understood that when the second private data is inconsistent with the updated local data, it indicates that there are abnormal situations such as data loss or data miswriting in the private partition, which verifies that the FTL management of the private partition is abnormal and it is necessary to terminate the verification of the private partition management of the UFS device.

[0075] Through steps S160 to S170, a verification termination mechanism for UFS private partition management verification is implemented. When it is determined that the management of the private partition is abnormal, the verification is ended; so as to enable testers to promptly check for vulnerabilities in the FTL management of the private partition.

[0076] Combined with Figure 4 , taking an example, further illustrate the overall process of the UFS private partition management verification method provided by the embodiments of the present application.

[0077] Step S410: Initialize the UFS device.

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

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

[0080] Step S441: Execute the first operation path. Specifically, the first operation path is to perform a read operation on the user space of the UFS device, and at the same time perform a data random modification operation on the private partition, synchronize to the private partition, and synchronously update the current local data to obtain the updated local data.

[0081] Step S442: Execute the second operation path. Specifically, the second operation path is to write normal user data into the user space, and at the same time write private data into the private partition, and perform a data random modification operation on the private partition, synchronize to the private partition, and synchronously update the current local data to obtain the updated local data; and perform a power-off operation on the UFS device.

[0082] Step S443: Execute the third operation path. Specifically, the third operation path is to write a private command into the private command space, and at the same time write private data into the private partition, and perform a data random modification operation on the private partition, synchronize to the private partition, and synchronously update the current local data to obtain the updated local data.

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

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

[0085] Step S460: Compare whether the second private data is consistent with the updated local data. If so, execute step S470; if not, execute step S480.

[0086] Step S470: Determine that the management of the private partition is normal, and jump back to execute step S430 to establish a long-term loop test.

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

[0088] In an embodiment, after executing step S430, select to execute step S441, and continue to execute step S450. When the second private data is consistent with the updated local data, it verifies that when performing a read operation on the user space of the UFS device and not performing a read operation on the private partition, the FTL management is normal; when the second private data is inconsistent with the updated local data, it verifies that when performing a read operation on the user space of the UFS device and not performing a read operation on the private partition, the FTL management is abnormal.

[0089] In one embodiment, after step S430 is executed, step S442 is selected for execution, and step S450 is continued for execution. When the second private data is consistent with the updated local data, it is verified that: when writing the private data and normal user data together and the UFS device loses power, the private data is not miswritten 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 writing the private data and normal user data together and the UFS device loses power, the private data is miswritten to the user space and the FTL management is abnormal.

[0090] In one embodiment, after step S430 is executed, step S443 is selected for execution, and step S450 is continued for execution. When the second private data is consistent with the updated local data, it is verified that: when writing the private data and private commands together, the private data is not miswritten 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 writing the private data and private commands together, the private data is miswritten to the private command space and the FTL management is abnormal.

[0091] As Figure 4 shown, the present invention further provides a test host, including: A processor 401, which can be implemented by using a general-purpose central processing unit, a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided by the embodiments of the present application; A memory 402, which can be implemented in the form of a read-only memory, a static storage device, a dynamic storage device, or a random access memory, etc. The memory 402 can store an operating system and other application programs. When implementing the technical solutions provided by the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 402, and the processor 401 is called to execute the UFS private partition management verification method of the embodiments of the present application; An input / output interface 403, which is used to implement information input and output; A communication interface 404, which is used to implement communication interaction between this device and other devices, and can implement communication through a wired manner (such as USB, network cable, etc.) or through a wireless manner (such as mobile network, WIFI, Bluetooth, etc.); A bus 405, which transmits information between the various components of the device (such as the processor 401, the memory 402, the input / output interface 403, and the communication interface 404); Wherein the processor 401, the memory 402, the input / output interface 403, and the communication interface 404 are communicatively connected to each other inside the device through the bus 405.

[0092] An embodiment of the present application further provides an electronic device, including the test host as described above.

[0093] An embodiment of the present application further 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.

[0094] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include memories remotely disposed relative to the processor, and these remote memories may be connected to the processor through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and may be 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 solution of this embodiment.

[0095] Those of ordinary skill in the art can understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or can be implemented as hardware, or can be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium 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 disk (DVD) or other optical disk storage, magnetic cassette, 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. In addition, as is well known to those of ordinary skill in the art, a communication medium generally includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.

[0096] The above is a specific description of the preferred embodiment of the present application. However, the present application is not limited to the above-mentioned embodiments. Those skilled in the art can make various equivalent deformations or substitutions without departing from the spirit of the present application, and these equivalent deformations or substitutions are all included within 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 is communicatively connected to a UFS device; The UFS device includes: a private partition and physical partitions other than the private partition; The method includes: Read initial first private data from the private partition of the initialized UFS device, and save the first private data as local data; Perform a test path determination process according to a target path selection mode, and determine a target operation path from candidate operation paths; According to the target operation path, perform a first data operation on the physical partition, and at the same time perform 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, perform a synchronous update process on the current local data to obtain updated local data; Perform a consistency comparison process on all the second private data read from the operated private partition and the updated local data to obtain a comparison result; Perform a verification process according to the comparison result. When the comparison result is: the second private data is consistent with the updated local data, it is verified that the management of the private partition is normal, and 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.

2. The UFS private partition management verification method according to claim 1, wherein The candidate operation paths include a first operation path, and the physical partition includes: a user space; The step of performing a first data operation on the physical partition according to the target operation path, and at the same time 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, performing a synchronous update process on the current local data to obtain updated local data includes: When the target operation path is the first operation path, perform a read operation on the user space, and at the same time perform a data random modification operation on the private partition to obtain an operated private partition; Based on the data random modification operation performed on the private partition, perform the same data random modification operation on the current local data to synchronously obtain updated local data.

3. The UFS private partition management verification method according to claim 1, wherein The candidate operation paths include a second operation path, and the physical partition includes: a user space; The step of performing a first data operation on the physical partition according to the target operation path, and at the same time 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, performing a synchronous update process on the current local data to obtain updated local data includes: When the target operation path is the second operation path, perform a write data operation on the user space according to user data, and at the same time perform a write data operation on the private partition according to the private data to be written, and perform a data random modification operation on the private partition to obtain an operated private partition; And perform a power-off operation on the UFS device; Based on the write data operation and data random modification operation performed on the private partition, perform the same write data operation and data random modification operation on the current local data, and synchronously obtain the updated local data.

4. The UFS private partition management verification method according to claim 1, wherein 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 the operated private partition; based on the second data operation performed on the private partition, performing synchronous update processing on the current local data to obtain the updated local data, including: When the target operation path is the third operation path, perform a write command operation on the private command space according to the private command to be written, and simultaneously perform a write data operation on the private partition according to the private data to be written, and perform a data random modification operation on the private partition to obtain the operated private partition; Based on the write data operation and data random modification operation performed on the private partition, perform the same write data operation and data random modification operation on the current local data, and synchronously obtain the updated local data.

5. The UFS private partition management verification method according to claim 1, wherein The determining the target operation path from the candidate operation paths according to the target path selection mode and performing test path determination processing includes: Determine that the target path selection mode is the sequential selection mode; In the case of performing the test path determination processing for the first time, sequentially determine the first candidate operation path as the target operation path; In the case of performing the test path determination processing not for the first time, based on the previously determined candidate operation path, sequentially determine the next candidate operation path as the target operation path.

6. The UFS private partition management verification method according to claim 1, wherein The determining the target operation path from the candidate operation paths according to the target path selection mode and performing test path determination processing includes: Determine that the target path selection mode is the random selection mode; Each time the test path determination processing is performed, randomly determine one of the multiple candidate operation paths as the target operation path.

7. The UFS private partition management verification method according to claim 1, wherein After obtaining the comparison result, the method further includes: When the comparison result is that the second private data is inconsistent with the updated local data, determine that the management of the private partition is abnormal; In the case of determining that the management of the private partition is abnormal, end the verification.

8. A test host, characterized in that, Comprising at least one processor and a memory for communicatively connecting with the at least one processor; the memory stores instructions executable 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 according to any one of claims 1 to 7.

9. An electronic device, characterized in that, Comprising the test host according to claim 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing 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

  • RPMB regional performance test method and device based on UFS storage device

    CN118471317A

  • Parallel Mirrored Copying with Write Consistency

    US20160077928A1

Cited By

  • UFS equipment stability test method, system and device and storage medium

    CN120581060A