This application discloses a testing method, storage device, and medium for Universal
Flash Memory (UFS). First, a main thread and a sub-thread are created in the UFS
application layer, and a
queue status mapping table corresponding to the slot
queue in the UFS driver layer is configured. Then, the main thread asynchronously sends an operation request containing a structure carrying the target operation instruction to the driver layer according to the mapping table. Next, the sub-thread receives the response result returned by the driver layer. Subsequently, the time taken for the target operation instruction is determined based on the response result and the corresponding structure. Then, based on a preset time threshold and the time taken, the
timeout result of the target operation instruction is obtained. This application manages the slots through a
queue status mapping table and traces the entire lifecycle information of commands through structures. This enables
full coverage of the number of tasks in the UFS command queue to verify asynchronous read / write functionality, effectively determine whether each asynchronous command has timed out, and reduce the difficulty of analyzing device
firmware problems, thereby effectively solving existing testing deficiencies.