CN113282439B - eMMC test method and device, readable storage medium and electronic equipment - Google Patents

eMMC test method and device, readable storage medium and electronic equipment Download PDF

Info

Publication number
CN113282439B
CN113282439B CN202110498810.4A CN202110498810A CN113282439B CN 113282439 B CN113282439 B CN 113282439B CN 202110498810 A CN202110498810 A CN 202110498810A CN 113282439 B CN113282439 B CN 113282439B
Authority
CN
China
Prior art keywords
emmc
test
tested
preset
configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110498810.4A
Other languages
Chinese (zh)
Other versions
CN113282439A (en
Inventor
孙成思
孙日欣
李家敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Baiwei Storage Technology Co ltd
Original Assignee
Chengdu Baiwei Storage Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Baiwei Storage Technology Co ltd filed Critical Chengdu Baiwei Storage Technology Co ltd
Priority to CN202110498810.4A priority Critical patent/CN113282439B/en
Publication of CN113282439A publication Critical patent/CN113282439A/en
Application granted granted Critical
Publication of CN113282439B publication Critical patent/CN113282439B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses an eMMC test method, an eMMC test device, a readable storage medium and electronic equipment, which are used for receiving hardware environment configuration and deployment instructions, carrying out preset configuration on a mainboard to be tested according to the hardware environment configuration and deployment instructions, and installing the eMMC to be tested to a preset position of the mainboard to be tested according to a preset mode, wherein the preset configuration comprises eMMC detachable configuration, and the preset mode comprises a detachable mode; receiving a software environment configuration and deployment instruction, and installing a preset operating system to the mainboard to be tested according to the software environment configuration and deployment instruction; receiving a test request aiming at the eMMC to be tested, generating a test script corresponding to the test request under the software environment according to the test request, testing the eMMC to be tested according to the test script, so that the eMMC chip can be detached and installed more conveniently, and the eMMC chip can be tested and developed by using a script language, thereby conveniently and effectively realizing the test of the eMMC.

Description

eMMC test method and device, readable storage medium and electronic equipment
Technical Field
The present invention relates to the field of memory processing technologies, and in particular, to an eMMC testing method and apparatus, a readable storage medium, and an electronic device.
Background
The eMMC (Embedded Multi Media Card ) is an embedded storage, and the usage scenario is generally embedded in a mobile platform or a relatively closed single board, so that the eMMC cannot be debugged and developed conveniently by using a standard X86 platform. Prior art testing of emmcs generally has two types: one is to use the read-write characteristic of the Input/Output (IO) in the eMMC-to-USB (Universal Serial Bus ) access standard X86 host computer on the hardware, this way does not really verify the driver itself of the eMMC, but does an interface conversion on the hardware, and can not reach the test purpose; the other mode that uses through changing the eMMC chip on the android mobile phone, comes the test to eMMC through android system operating procedure, uses this kind of mode, not only has the inconvenient problem of hardware change, but also has the software to use more complicated problem in operation.
Disclosure of Invention
The technical problems to be solved by the invention are as follows: the eMMC testing method, the eMMC testing device, the readable storage medium and the electronic equipment are provided, and the eMMC testing can be conveniently and effectively realized.
In order to solve the technical problems, the invention adopts a technical scheme that:
an eMMC test method, comprising the steps of:
receiving a hardware environment configuration and deployment instruction, carrying out preset configuration on a main board to be tested according to the hardware environment configuration and deployment instruction, and installing an eMMC to be tested to a preset position of the main board to be tested according to a preset mode, wherein the preset configuration comprises eMMC detachable configuration, and the preset mode comprises a detachable mode;
receiving a software environment configuration and deployment instruction, and installing a preset operating system to the mainboard to be tested according to the software environment configuration and deployment instruction;
receiving a test request aiming at the eMMC to be tested, generating a test script corresponding to the test request in the software environment according to the test request, and testing the eMMC to be tested according to the test script.
In order to solve the technical problems, the invention adopts another technical scheme that:
an eMMC testing device, comprising:
the configuration and deployment module of the hardware environment is used for receiving the configuration and deployment instruction of the hardware environment, carrying out preset configuration on a main board to be tested according to the configuration and deployment instruction of the hardware environment, and installing the eMMC to be tested at a preset position of the main board to be tested according to a preset mode, wherein the preset configuration comprises eMMC detachable configuration, and the preset mode comprises a detachable mode;
the configuration and deployment module of the software environment is used for receiving the configuration and deployment instruction of the software environment and installing a preset operating system to the mainboard to be tested according to the configuration and deployment instruction of the software environment;
the testing module is used for receiving a testing request aiming at the eMMC to be tested, generating a testing script corresponding to the testing request in the software environment according to the testing request, and testing the eMMC to be tested according to the testing script.
The invention has the beneficial effects that:
the method comprises the steps of carrying out eMMC detachable configuration on a main board to be tested, carrying out configuration and deployment of a hardware environment on the eMMC to be tested at a preset position of the main board to be tested in a detachable mode, enabling disassembly and installation of an eMMC chip to be more convenient, generating a test script according to a received test request in a software environment with the configuration and deployment completed, and testing and developing the eMMC chip by using a script language, so that testing of the eMMC chip is conveniently and effectively achieved.
Drawings
FIG. 1 is a flow chart illustrating steps of an eMMC testing method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an eMMC testing method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
FIG. 4 is a flowchart of an eMMC test method according to an embodiment of the present invention;
FIG. 5 is a preset networking diagram of an eMMC test method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an overall architecture of an eMMC test method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a test framework of an eMMC test method according to an embodiment of the present invention;
FIG. 8 is a project file diagram of a test framework of an eMMC test method according to an embodiment of the present invention;
FIG. 9 is a diagram of an example of defining driver.c files in a c module of an eMMC test method according to an embodiment of the present invention;
FIG. 10 is a diagram of an example of development of a cython setup module for an eMMC test method according to an embodiment of the present invention;
FIG. 11 is a diagram of a test case development example of an eMMC test method according to an embodiment of the present invention;
FIG. 12 is a diagram illustrating an example of development of a test script for an eMMC test method according to an embodiment of the present invention;
fig. 13 is a diagram illustrating an example of output of the eMMC test method according to the embodiment of the present invention.
Detailed Description
In order to describe the technical contents, the achieved objects and effects of the present invention in detail, the following description will be made with reference to the embodiments in conjunction with the accompanying drawings.
Referring to fig. 1, an eMMC testing method according to an embodiment of the present invention includes the steps of:
receiving a hardware environment configuration and deployment instruction, carrying out preset configuration on a main board to be tested according to the hardware environment configuration and deployment instruction, and installing an eMMC to be tested to a preset position of the main board to be tested according to a preset mode, wherein the preset configuration comprises eMMC detachable configuration, and the preset mode comprises a detachable mode;
receiving a software environment configuration and deployment instruction, and installing a preset operating system to the mainboard to be tested according to the software environment configuration and deployment instruction;
receiving a test request aiming at the eMMC to be tested, generating a test script corresponding to the test request in the software environment according to the test request, and testing the eMMC to be tested according to the test script.
From the above description, the beneficial effects of the invention are as follows: the method comprises the steps of carrying out eMMC detachable configuration on a main board to be tested, carrying out configuration and deployment of a hardware environment on the eMMC to be tested at a preset position of the main board to be tested in a detachable mode, enabling disassembly and installation of an eMMC chip to be more convenient, generating a test script according to a received test request in a software environment with the configuration and deployment completed, and testing and developing the eMMC chip by using a script language, so that testing of the eMMC chip is conveniently and effectively achieved.
Further, the performing the preset configuration on the to-be-tested motherboard according to the hardware environment configuration and the deployment instruction, and installing the to-be-tested eMMC to the preset position of the to-be-tested motherboard according to the preset manner includes:
determining a target position on the to-be-tested mainboard according to the hardware environment configuration and the deployment instruction, converting the original eMMC of the to-be-tested mainboard into an interface in a preset form according to the target position, and installing the to-be-tested eMMC to the interface in the preset form according to a preset mode, wherein the preset form comprises a detachable form.
It can be seen from the above description that, by configuring and deploying the hardware environment, an implementation environment is provided for the testing of the eMMC, so that the subsequent testing of the eMMC is facilitated, the eMMC to be tested is detachably mounted on the interface in the preset form, and the eMMC chip is convenient to replace and detach.
Further, the installing the preset operating system to the motherboard to be tested according to the software environment configuration and deployment instruction includes:
installing a preset operating system supporting eMMC driving to the main board to be tested according to the software environment configuration and deployment instruction;
constructing a test framework comprising a bottom layer, a middle layer and a top layer according to the development request;
receiving a development instruction corresponding to the test framework, driving interaction with an eMMC of the preset operating system through the bottom layer according to the development instruction, packaging an application interface, and providing the packaged application interface for the middle layer;
generating a c extension based on the application interface package through the middle layer, and providing the c extension to the top layer;
and calling the c extension through the top layer to generate a test case set.
According to the description, the test framework comprising the bottom layer, the middle layer and the top layer is constructed by configuring and deploying the software environment, so that a foundation is laid for the subsequent use of the scripting language to control eMMC and realize development and test of the eMMC.
Further, the development requests include a bottom layer development request, a middle layer development request, and a top layer development request;
the building of the test framework comprising a bottom layer, a middle layer and a top layer according to the development request comprises the following steps:
importing the related header file of the eMMC to be tested into a kernel library of the preset operating system according to the bottom layer development request, generating standard read-write operation of a hardware register, establishing a buffer related public interface function, packaging parameters of a command interface of the eMMC to be tested, and constructing a bottom layer of a test framework;
packaging the command interface of the eMMC to be tested according to the middle layer development request by an object-oriented method, establishing a checking mechanism and a checking interface corresponding to command sending and response, generating functions related to a data format, and constructing a middle layer of a testing framework;
generating a test case set according to the top-level development request, defining a test interface for the test case set, determining the checking mode of the test case, and constructing the top level of a test framework.
From the above description, it is apparent that by developing the bottom layer, the middle layer, and the top layer, the script developer is enabled to operate eMMC more efficiently on software using the scripting language.
Further, the generating the test script corresponding to the test request in the software environment according to the test request includes:
and determining a test module and a dependent item through the middle layer according to the test request, and generating a test script corresponding to the test request.
From the above description, it can be known that, according to the test request, the test module and the dependency term are determined through the middle layer, so as to generate a test script, which can be developed and designed according to different test requirements by multiple developers, and after the script is developed, the script can be debugged on the development board platform, so that the problem of the product itself can be found.
Further, the testing the eMMC to be tested according to the test script includes:
and calling a test case corresponding to the test script through the test framework to test the eMMC to be tested.
From the above description, the test framework invokes the test case corresponding to the test script to test, so as to test the eMMC read-write pressure, protocol consistency and develop the custom test set function, so as to determine whether the eMMC chip has a problem, and improve the reliability of eMMC test.
Further, the performing preset configuration on the motherboard to be tested according to the hardware environment configuration and deployment instruction, and installing the eMMC to be tested to the preset position of the motherboard to be tested according to the preset manner further includes:
networking the mainboard to be tested and the execution computer to the same local area network according to a preset networking diagram;
the mounting of the eMMC to be tested to the preset position of the main board to be tested according to the preset mode further includes:
receiving checking instructions of a hardware environment and a software environment, and checking whether the configuration and deployment of the hardware environment and the software environment are correct or not through the execution computer according to the checking instructions of the hardware environment and the software environment;
the method for testing the eMMC to be tested comprises the following steps:
and receiving a debugging instruction, debugging the test script on the mainboard to be tested according to the debugging instruction, and determining all abnormal exits and reasons corresponding to each abnormal exit through the execution computer.
As can be seen from the above description, the test script is debugged on the motherboard to be tested, and the execution computer determines all the abnormal exits and the reasons corresponding to each abnormal exit, so that the problem of the product itself can be found, the reliability of the chip is checked, and the effectiveness of eMMC test is improved.
Referring to fig. 2, another embodiment of the present invention provides an eMMC testing device, including:
the configuration and deployment module of the hardware environment is used for receiving the configuration and deployment instruction of the hardware environment, carrying out preset configuration on a main board to be tested according to the configuration and deployment instruction of the hardware environment, and installing the eMMC to be tested at a preset position of the main board to be tested according to a preset mode, wherein the preset configuration comprises eMMC detachable configuration, and the preset mode comprises a detachable mode;
the configuration and deployment module of the software environment is used for receiving the configuration and deployment instruction of the software environment and installing a preset operating system to the mainboard to be tested according to the configuration and deployment instruction of the software environment;
the testing module is used for receiving a testing request aiming at the eMMC to be tested, generating a testing script corresponding to the testing request in the software environment according to the testing request, and testing the eMMC to be tested according to the testing script.
Another embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the eMMC test method described above.
Referring to fig. 3, another embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements each step in the eMMC testing method when executing the computer program.
Example 1
Referring to fig. 1 and 4-5, the eMMC testing method of the present embodiment includes the steps of:
s1, receiving a hardware environment configuration and deployment instruction, carrying out preset configuration on a main board to be tested according to the hardware environment configuration and deployment instruction, and installing an eMMC to be tested to a preset position of the main board to be tested according to a preset mode, wherein the preset configuration comprises eMMC detachable configuration, and the preset mode comprises a detachable mode;
determining a target position on the to-be-tested mainboard according to the hardware environment configuration and the deployment instruction, converting an original eMMC of the to-be-tested mainboard into an interface in a preset form according to the target position, installing the to-be-tested eMMC to the interface in the preset form according to a preset mode, wherein the preset form comprises a detachable form
Specifically, determining a target position on a main board to be tested according to hardware environment configuration and deployment instructions, modifying an original eMMC of the main board to be tested into a detachable Socket interface according to the target position, and detachably installing the eMMC to be tested into the Socket interface;
networking the mainboard to be tested and the execution computer to the same local area network according to a preset networking diagram;
specifically, as shown in fig. 4, an ARM motherboard to be tested (ARM embedded motherboard) supporting eMMC function is prepared, the original eMMC of the ARM motherboard to be tested is modified into a detachable Socket interface, in the modification of the Socket interface, serial port and power control extraction of the eMMC to be tested need to be supported, in addition, TF Card (TF memory Card) needs to be supported, and network access needs to be supported by the motherboard to be tested, and the modification needs to be completed by a hardware engineer with knowledge of hardware schematic diagram and hardware chip;
after the modification is finished, the eMMC to be tested is detachably installed on a Socket interface;
as shown in fig. 5, the serial port signal access execution computer is used for printing and inputting internal debugging information, and a TF Card for installing a preset operating system is prepared;
as shown in fig. 5, the network cable is connected to the motherboard to be tested and the executing computer, so that the motherboard to be tested and the executing computer belong to the same local area network;
s2, receiving a software environment configuration and deployment instruction, and installing a preset operating system to the mainboard to be tested according to the software environment configuration and deployment instruction;
s3, receiving a test request aiming at the eMMC to be tested, generating a test script corresponding to the test request in the software environment according to the test request, and testing the eMMC to be tested according to the test script.
Example two
Referring to fig. 4 and 6-7, the present embodiment further defines how to configure and deploy the software environment based on the first embodiment, specifically:
installing a preset operating system supporting eMMC driving to the main board to be tested according to the software environment configuration and deployment instruction;
the preset operating system is Linux (GNU/Linux, a type of UNIX operating system);
specifically, as shown in fig. 4 and 6, linux supporting eMMC driving is installed to a TF Card of a motherboard to be tested according to the software environment configuration and deployment instruction, and Linux is installed with an OpenSSHServer (open-source secure shell protocol service program);
constructing a test framework comprising a bottom layer, a middle layer and a top layer according to the development request;
specifically, as shown in fig. 4, the python3 software and related dependent items are installed, including the cython library that needs to be used, and a test framework including a c module, a cython module and a python module is generated, and the name of the test framework is defined as pyemmc, as shown in fig. 7;
receiving a development instruction corresponding to the test framework, driving interaction with an eMMC of the preset operating system through the bottom layer according to the development instruction, packaging an application interface, and providing the packaged application interface for the middle layer;
specifically, the c module uses c language development, completes direct interaction of commands and eMMC drive of Linux, encapsulates some application interfaces and provides the encapsulated application interfaces for the cython module;
generating a c extension based on the application interface package through the middle layer, and providing the c extension to the top layer;
the cython module is used for packaging and writing c expansion based on the application interface and providing the c expansion for the python module, so that a script developer can operate the eMMC to be tested more efficiently through python, and a user can write the python script directly more simply and easily;
calling the c extension through the top layer to generate a test case set;
specifically, calling c expansion through a python module to generate a test case set;
receiving checking instructions of a hardware environment and a software environment, and checking whether the configuration and deployment of the hardware environment and the software environment are correct or not through the execution computer according to the checking instructions of the hardware environment and the software environment;
specifically, if the configuration and deployment of the hardware environment are correct, the to-be-tested eMMC disk/dev/mmcblk 1 (eMMC disk character) can be queried by executing a disk management tool such as fdisk (a partition tool) and the like;
verifying the read-write of the eMMC disk to be tested by executing a computer by using an IO (input output) tool dd (a tool for copying data in the computer) and a hexadump (a tool for reading data from a computer storage device), and if the data read by using the hexadump is consistent with the data written by using dd, the eMMC to be tested is correctly installed;
if the execution computer can see the printing information related to FW (firmware) by using a serial port tool, the configuration and deployment of the software environment are correct;
in addition, in addition to the IO tool described above, the mmc-utils tool and the eMMC to be tested may also be used to send a management command to verify that the eMMC to be tested is in ready state.
Example III
Referring to fig. 4 and 6-11, the present embodiment further defines how to develop the bottom layer, the middle layer and the top layer based on the first embodiment or the second embodiment, specifically:
the development requests comprise a bottom layer development request, a middle layer development request and a top layer development request;
importing the related header file of the eMMC to be tested into a kernel library of the preset operating system according to the bottom layer development request, generating standard read-write operation of a hardware register, establishing a buffer related public interface function, packaging parameters of a command interface of the eMMC to be tested, and constructing a bottom layer of a test framework;
specifically, as shown in fig. 8-9, defining driver.c files (files necessary for driving) and importing the files into a Linux kernel library, wherein the files comprise mmc.c;
defining a format package of JEDEC (solid State technology Association) standard protocol commands, defining a data structure of a command to be sent, a data structure of a response command and an operation mode for processing single and multiple commands of the mmc by an ioctl (input/output control, a system special for device input/output operation);
establishing a buffer related public interface function, such as application and release of a memory, realizing encapsulation of a buffer initialization function, encapsulating parameters of a command interface of the eMMC to be tested, interacting with ioctl and returning a result to a cyton module for processing, realizing parameterized encapsulation of all mmc protocol commands, and generating a c module of a test framework;
in addition, a special test method can be constructed to provide execution efficiency using the c language characteristic;
packaging the command interface of the eMMC to be tested according to the middle layer development request by an object-oriented method, establishing a checking mechanism and a checking interface corresponding to command sending and response, generating functions related to a data format, and constructing a middle layer of a testing framework;
specifically, as shown in FIGS. 6 and 7, the python library is packaged using a combination of cython features, object-oriented methods, and python language;
the driver_warp. Pyx file is imported into a python library and a cython library, classes of eMMCs to be detected, namely eMMC classes, are built according to an object-oriented method, initializing functions and destructors of the classes are defined, buffer classes, namely buffer classes, and other relevant characteristic classes are built according to development requests;
the eMMC Class realizes the functions of a buffer module, and provides functions related to buffer initialization and data format, wherein the functions include opening and closing of test description equipment, ASSERT (assertion) of an ioctl result and ASSERT of command response;
packaging interfaces of each protocol command and the characteristic method, wherein the functions provide a default checking and asserting mode and provide a controllable checking interface for the python module to generate a cython module of the test framework;
in addition, the cython module further comprises a cython setup module, the cython module compiles through the cython setup module, and an emc.so file is generated after compiling so as to be directly referenced in the development process of the python script, as shown in fig. 10;
generating a test case set according to the top-level development request, defining a test interface for the test case set, determining the checking mode of the test case, and constructing the top level of a test framework;
specifically, as shown in fig. 6, 7 and 11, a test case set is developed to realize triggering and response of the whole test flow of the eMMC to be tested, each test case in the test case set defines a test interface, a function is named by test_, details of the test are written in the function, each check point uses an ASSERT mode, or a set of comparison interfaces of a desired result and an actual result are developed, so that when a problem occurs, the python module of the test framework can be positioned and debugged in time and is convenient for the test developer to read and understand, and the python module of the test framework is generated;
FIG. 8 illustrates all project files of a test framework, wherein the driver_test.py file of the python module develops a common basic read-write operation flow, a register read-write operation flow, emmc storage state query and other related test cases;
the important log information can be packaged through an interface provided by logging (writing a log file) of the python base library, and the log information is printed in a standard output and stored in the log file.
Example IV
Referring to fig. 4, 12-13, the present embodiment further defines how to generate a test script and how to test an eMMC to be tested according to the test script based on the first embodiment, the second embodiment or the third embodiment, specifically:
determining a test module and a dependent item through the middle layer according to the test request, and generating a test script corresponding to the test request;
specifically, a test script is generated by defining a test module and a dependency item through a developed cython module according to a test request, as shown in fig. 12;
receiving a debugging instruction, debugging the test script on the mainboard to be tested according to the debugging instruction, and determining all abnormal exits and reasons corresponding to each abnormal exit through the execution computer;
specifically, as shown in fig. 13, after the development of the test script is completed, a debug instruction is received, the test script is debugged on the main board to be tested according to the debug instruction, and a result is output, if an abnormal exit occurs in the debugging process, the abnormal exit includes an environment abnormality, a script abnormality and a system abnormality, and a developer is required to determine all the abnormal exits and reasons corresponding to each abnormal exit through an execution computer so as to discover the problem of the product itself;
calling a test case corresponding to the test script through the test framework to test the eMMC to be tested;
if the test flow is ended normally, repeated tests can be carried out according to preset test time, and the purpose of test verification is achieved;
in addition, as shown in fig. 4, after the test is finished, document development is performed, and preparation of a software environment and a hardware environment, output results and deployment of a test framework are fully described, so that a tester can intuitively check the test results.
Example five
A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the eMMC test method in embodiment one, embodiment two, embodiment three, or embodiment four.
Example six
Referring to fig. 3, an electronic device includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the steps of the eMMC testing method in the first, second, third, or fourth embodiments when executing the computer program.
In summary, according to the method, the device, the computer readable storage medium and the electronic equipment for testing the eMMC, the eMMC to be tested is detachably preset modified according to the received hardware environment configuration and the deployment instruction, and is detachably mounted to the preset position of the motherboard to be tested according to the preset mode, wherein the preset configuration comprises the eMMC detachable configuration, and the preset mode comprises the detachable mode, so that the disassembly and the mounting of the eMMC chip are more convenient; installing a preset operating system supporting eMMC driving to a main board to be tested according to received software environment configuration and deployment instructions, constructing a test framework comprising a bottom layer, a middle layer and a top layer according to development requests, interacting with the eMMC driving of the preset operating system through the bottom layer according to the received development instructions, packaging an application interface, providing the packaged application interface to the middle layer, packaging based on the application interface through the middle layer to generate c expansion, providing the c expansion to the top layer, calling the c expansion through the top layer to generate a test case set, developing the bottom layer, the middle layer and the top layer, enabling a script developer to operate the eMMC more efficiently through python, and writing a python script more simply and easily; generating a test script corresponding to the test request in a software environment according to the received test request, calling a test case corresponding to the test script through a test framework to test the eMMC to be tested, testing the read-write pressure and protocol consistency of the eMMC and developing a custom test set function so as to judge whether the eMMC chip has a problem or not, improving the reliability of the eMMC test, and conveniently and effectively realizing the eMMC test.
In the foregoing embodiments provided by the present application, it should be understood that the disclosed method, apparatus, computer readable storage medium and electronic device may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple components or modules may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with respect to each other may be an indirect coupling or communication connection via some interfaces, devices or components or modules, which may be in electrical, mechanical, or other forms.
The components illustrated as separate components may or may not be physically separate, and components shown as components may or may not be physical modules, i.e., may be located in one place, or may be distributed over multiple network modules. Some or all of the components may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each component may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
The integrated modules, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It should be noted that, for the sake of simplicity of description, the foregoing method embodiments are all expressed as a series of combinations of actions, but it should be understood by those skilled in the art that the present invention is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily all required for the present invention.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
The foregoing description is only illustrative of the present invention and is not intended to limit the scope of the invention, and all equivalent changes made by the specification and drawings of the present invention, or direct or indirect application in the relevant art, are included in the scope of the present invention.

Claims (7)

1. An eMMC testing method, comprising the steps of:
receiving a hardware environment configuration and deployment instruction, carrying out preset configuration on a main board to be tested according to the hardware environment configuration and deployment instruction, and installing an eMMC to be tested to a preset position of the main board to be tested according to a preset mode, wherein the preset configuration comprises eMMC detachable configuration, and the preset mode comprises a detachable mode;
receiving a software environment configuration and deployment instruction, and installing a preset operating system to the mainboard to be tested according to the software environment configuration and deployment instruction;
receiving a test request aiming at the eMMC to be tested, generating a test script corresponding to the test request in the software environment according to the test request, and testing the eMMC to be tested according to the test script;
the installing the preset operating system to the motherboard to be tested according to the software environment configuration and deployment instruction includes:
installing a preset operating system supporting eMMC driving to the main board to be tested according to the software environment configuration and deployment instruction;
constructing a test framework comprising a bottom layer, a middle layer and a top layer according to the development request;
receiving a development instruction corresponding to the test framework, driving interaction with an eMMC of the preset operating system through the bottom layer according to the development instruction, packaging an application interface, and providing the packaged application interface for the middle layer;
generating a c extension based on the application interface package through the middle layer, and providing the c extension to the top layer;
calling the c extension through the top layer to generate a test case set;
the development requests comprise a bottom layer development request, a middle layer development request and a top layer development request;
the building of the test framework comprising a bottom layer, a middle layer and a top layer according to the development request comprises the following steps:
importing the related header file of the eMMC to be tested into a kernel library of the preset operating system according to the bottom layer development request, generating standard read-write operation of a hardware register, establishing a buffer related public interface function, packaging parameters of a command interface of the eMMC to be tested, and constructing a bottom layer of a test framework;
packaging the command interface of the eMMC to be tested according to the middle layer development request by an object-oriented method, establishing a checking mechanism and a checking interface corresponding to command sending and response, generating functions related to a data format, and constructing a middle layer of a testing framework;
generating a test case set according to the top-level development request, defining a test interface for the test case set, determining the checking mode of the test case, and constructing the top level of a test framework;
the generating the test script corresponding to the test request in the software environment according to the test request comprises the following steps:
and determining a test module and a dependent item through the middle layer according to the test request, and generating a test script corresponding to the test request.
2. The eMMC testing method according to claim 1, wherein the performing the preset configuration on the motherboard to be tested according to the hardware environment configuration and the deployment instruction, and mounting the eMMC to be tested at the preset position of the motherboard to be tested according to the preset manner includes:
determining a target position on the to-be-tested mainboard according to the hardware environment configuration and the deployment instruction, converting the original eMMC of the to-be-tested mainboard into an interface in a preset form according to the target position, and installing the to-be-tested eMMC to the interface in the preset form according to a preset mode, wherein the preset form comprises a detachable form.
3. The eMMC testing method according to claim 1, wherein the testing the eMMC to be tested according to the test script includes:
and calling a test case corresponding to the test script through the test framework to test the eMMC to be tested.
4. The eMMC testing method according to any one of claims 2 or 3, wherein the performing the preset configuration on the motherboard to be tested according to the hardware environment configuration and the deployment instruction, and installing the eMMC to be tested at the preset position of the motherboard to be tested according to the preset manner further includes:
networking the mainboard to be tested and the execution computer to the same local area network according to a preset networking diagram;
the mounting of the eMMC to be tested to the preset position of the main board to be tested according to the preset mode further includes:
receiving checking instructions of a hardware environment and a software environment, and checking whether the configuration and deployment of the hardware environment and the software environment are correct or not through the execution computer according to the checking instructions of the hardware environment and the software environment;
the method for testing the eMMC to be tested comprises the following steps:
and receiving a debugging instruction, debugging the test script on the mainboard to be tested according to the debugging instruction, and determining all abnormal exits and reasons corresponding to each abnormal exit through the execution computer.
5. An eMMC testing device, comprising:
the configuration and deployment module of the hardware environment is used for receiving the configuration and deployment instruction of the hardware environment, carrying out preset configuration on a main board to be tested according to the configuration and deployment instruction of the hardware environment, and installing the eMMC to be tested at a preset position of the main board to be tested according to a preset mode, wherein the preset configuration comprises eMMC detachable configuration, and the preset mode comprises a detachable mode;
the configuration and deployment module of the software environment is used for receiving the configuration and deployment instruction of the software environment and installing a preset operating system to the mainboard to be tested according to the configuration and deployment instruction of the software environment;
the testing module is used for receiving a testing request aiming at the eMMC to be tested, generating a testing script corresponding to the testing request in the software environment according to the testing request, and testing the eMMC to be tested according to the testing script;
the installing the preset operating system to the motherboard to be tested according to the software environment configuration and deployment instruction includes:
installing a preset operating system supporting eMMC driving to the main board to be tested according to the software environment configuration and deployment instruction;
constructing a test framework comprising a bottom layer, a middle layer and a top layer according to the development request;
receiving a development instruction corresponding to the test framework, driving interaction with an eMMC of the preset operating system through the bottom layer according to the development instruction, packaging an application interface, and providing the packaged application interface for the middle layer;
generating a c extension based on the application interface package through the middle layer, and providing the c extension to the top layer;
calling the c extension through the top layer to generate a test case set;
the development requests comprise a bottom layer development request, a middle layer development request and a top layer development request;
the building of the test framework comprising a bottom layer, a middle layer and a top layer according to the development request comprises the following steps:
importing the related header file of the eMMC to be tested into a kernel library of the preset operating system according to the bottom layer development request, generating standard read-write operation of a hardware register, establishing a buffer related public interface function, packaging parameters of a command interface of the eMMC to be tested, and constructing a bottom layer of a test framework;
packaging the command interface of the eMMC to be tested according to the middle layer development request by an object-oriented method, establishing a checking mechanism and a checking interface corresponding to command sending and response, generating functions related to a data format, and constructing a middle layer of a testing framework;
generating a test case set according to the top-level development request, defining a test interface for the test case set, determining the checking mode of the test case, and constructing the top level of a test framework;
the generating the test script corresponding to the test request in the software environment according to the test request comprises the following steps:
and determining a test module and a dependent item through the middle layer according to the test request, and generating a test script corresponding to the test request.
6. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the steps of an eMMC test method according to any one of claims 1 to 4.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the computer program, performs the steps of an eMMC test method according to any one of claims 1 to 4.
CN202110498810.4A 2021-05-08 2021-05-08 eMMC test method and device, readable storage medium and electronic equipment Active CN113282439B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110498810.4A CN113282439B (en) 2021-05-08 2021-05-08 eMMC test method and device, readable storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110498810.4A CN113282439B (en) 2021-05-08 2021-05-08 eMMC test method and device, readable storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113282439A CN113282439A (en) 2021-08-20
CN113282439B true CN113282439B (en) 2023-05-23

Family

ID=77278270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110498810.4A Active CN113282439B (en) 2021-05-08 2021-05-08 eMMC test method and device, readable storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113282439B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116825175B (en) * 2023-05-29 2024-02-23 珠海妙存科技有限公司 eMMC consistency testing method, controller and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106773948A (en) * 2016-12-12 2017-05-31 恒信大友(北京)科技有限公司 A kind of multipurpose low power consumption control device and method for dynamic characteristic test
CN110289042A (en) * 2019-04-11 2019-09-27 珠海全志科技股份有限公司 EMMC chip test system
CN110389900A (en) * 2019-07-10 2019-10-29 深圳市腾讯计算机系统有限公司 A kind of distributed experiment & measurement system test method, device and storage medium
US10772230B1 (en) * 2019-04-22 2020-09-08 SK Hynix Inc. Test board
CN111858197A (en) * 2020-06-15 2020-10-30 詹毕旺 Device, system and method for supporting multiple SSD tests

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106773948A (en) * 2016-12-12 2017-05-31 恒信大友(北京)科技有限公司 A kind of multipurpose low power consumption control device and method for dynamic characteristic test
CN110289042A (en) * 2019-04-11 2019-09-27 珠海全志科技股份有限公司 EMMC chip test system
US10772230B1 (en) * 2019-04-22 2020-09-08 SK Hynix Inc. Test board
CN110389900A (en) * 2019-07-10 2019-10-29 深圳市腾讯计算机系统有限公司 A kind of distributed experiment & measurement system test method, device and storage medium
CN111858197A (en) * 2020-06-15 2020-10-30 詹毕旺 Device, system and method for supporting multiple SSD tests

Also Published As

Publication number Publication date
CN113282439A (en) 2021-08-20

Similar Documents

Publication Publication Date Title
US7669186B2 (en) Debugging applications at resource constrained virtual machines using dynamically installable lightweight agents
CN110865971B (en) System and method for verifying SOC chip
CN112131829A (en) Verification method, system and related device of chip register
US20050165597A1 (en) Apparatus and method for performing hardware and software co-verification testing
US8788886B2 (en) Verification of SoC scan dump and memory dump operations
JP2004227588A (en) Sdio card development system
JP2014532914A (en) Programmable test equipment
US7472052B2 (en) Method, apparatus and computer program product for simulating a storage configuration for a computer system
CN102147831A (en) Logic verification method and device
CN113282439B (en) eMMC test method and device, readable storage medium and electronic equipment
US20060212768A1 (en) Verification circuitry for master-slave system
JP4187470B2 (en) Semiconductor device development support cooperation device and development support method
KR20200067474A (en) Fault injection test method and system for vehicle software based on autosar
CN117413253A (en) Apparatus, device, method and computer program for performing unit testing on firmware code
CN115599618B (en) Register dynamic change-allocation verification method and device, storage medium and processor
US9058184B2 (en) Run time generation and functionality validation of device drivers
CN113220514B (en) Solid state disk testing method and device, readable storage medium and electronic equipment
CN113177388B (en) Device, system and method for testing and verifying IP (Internet protocol) core
CN113204929A (en) Method for realizing AHB VIP based on SV and UVM, electronic device and storage medium
JP2013020425A (en) Hardware and software cooperative verification method using open source software
CN112765021A (en) Debugging and checking method, device, equipment and storage medium of boot program
WO2011100785A1 (en) Co-design of a testbench and driver of a device
CN111338761A (en) 51 single-chip microcomputer virtual interrupt controller and implementation method
CN117370093B (en) Chip debugging method, device, equipment and storage medium
US20230289500A1 (en) Method and system for building hardware images from heterogeneous designs for eletronic systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant