CN105446856B - The detection method of electronic equipment interfaces, device - Google Patents

The detection method of electronic equipment interfaces, device Download PDF

Info

Publication number
CN105446856B
CN105446856B CN201510770319.7A CN201510770319A CN105446856B CN 105446856 B CN105446856 B CN 105446856B CN 201510770319 A CN201510770319 A CN 201510770319A CN 105446856 B CN105446856 B CN 105446856B
Authority
CN
China
Prior art keywords
electronic equipment
speed
file
unit
default
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
CN201510770319.7A
Other languages
Chinese (zh)
Other versions
CN105446856A (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.)
Huzhou Yinglie Intellectual Property Operation Co ltd
Original Assignee
Shanghai Feixun Data Communication 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201510770319.7A priority Critical patent/CN105446856B/en
Publication of CN105446856A publication Critical patent/CN105446856A/en
Application granted granted Critical
Publication of CN105446856B publication Critical patent/CN105446856B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3027Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The present invention discloses the detection method of a kind of electronic equipment interface, including:Detect the External memory equipment of electronic equipment interfaces access;The External memory equipment detected is tied to by default binding catalogue by hot plug mechanism;The default binding catalogue and device path are saved in specified file;The default binding catalogue and device path are read from the specified file to confirm that the External memory equipment whether there is;And in the presence of External memory equipment confirmation, the writing speed and reading speed of the electronic equipment interfaces are detected by sense command.Correspondingly, invention additionally discloses the detection means of a kind of electronic equipment interface and electronic equipment.The technical solution adopted by the present invention, the test of electronic equipment interfaces writing speed and reading speed is realized, improve the efficiency of electronic equipment interfaces test and test comprehensive.

Description

The detection method of electronic equipment interfaces, device
Technical field
The present invention relates to field of electric control, more particularly to the detection method of a kind of electronic equipment interface, device.
Background technology
The external storage interface of electronic equipment, it is to realize that electronic equipment expands storage and outside storage device data is exchanged Important interface.The existing test for electronic device exterior memory interface, it is generally defeated manually when accessing External memory equipment Enter test command to test External memory equipment, and be only limitted to can normally the test of read-write capability and electronics can not be tested The writing speed and reading speed of equipment interface, cause that testing efficiency is not high and test function is limited.
The content of the invention
In consideration of it, the present invention provides detection method, device and the equipment of a kind of electronic equipment interface, solve existing for electricity The technical problem that the testing efficiency of the external storage interface of sub- equipment is not high and test function is limited.
According to an embodiment of the invention, there is provided the detection method of a kind of electronic equipment interface, including:Detection electronic equipment connects The External memory equipment of mouth access;The External memory equipment detected is tied to by default binding catalogue by hot plug mechanism; The default binding catalogue and device path are saved in specified file;The default binding is read from the specified file Catalogue and device path are to confirm that the External memory equipment whether there is;And when the External memory equipment confirms exist When, the writing speed and reading speed of the electronic equipment interfaces are detected by sense command.
Preferably, it is described that the External memory equipment detected is tied to by default binding catalogue step by hot plug mechanism Including:Call hot plug events processing function, and the equipment that the External memory equipment is read according to implementor name and environmental variance The system format of node and partitioned file;And the equipment section is bound according to the system format select command of the partitioned file Point binds catalogue to default.
Preferably, it is described to be tied up according to the system format select command of the partitioned file binding device node to default Determining catalogue step also includes:Whether the system format for judging the partitioned file is new technology file system;When the partitioned file System format when being judged as new technology file system, select device node described in ntfs-3g command bindings to bind catalogue to default; And when the system format of the partitioned file judge not be new technology file system when, selection mount command bindings described in set Slave node binds catalogue to default.
Preferably, it is described that the electronic equipment is detected by sense command in the presence of the External memory equipment confirms The writing speed and reading speed step of interface include:The write-in speed of the interface of the electronic equipment is detected by sense command Degree;Whether the writing speed that judgement detects is up to standard;And when said write speed is up to standard, detected by sense command described in The reading speed of the interface of electronic equipment;And when said write speed is below standard, export said write speed and correlation Test crash information.
Preferably, the writing speed step of the interface that the electronic equipment is detected by sense command includes:Pass through Dd orders write the NUL stream file of default file size to the default binding catalogue and record the beginning and ending time;And according to The default file size of the NUL stream file and beginning and ending time calculate writing speed.
Preferably, the reading speed step of the interface that the electronic equipment is detected by sense command includes:Pass through Dd orders read the data file of default file size in the default binding catalogue and record the beginning and ending time;And according to institute The default file size and beginning and ending time for stating data file calculate reading speed.
Preferably, in the interface for detecting the electronic equipment by sense command when said write speed is up to standard Also include after reading speed step:Whether the reading speed that judgement detects is up to standard;And when the reading speed is up to standard, Export writing speed, reading speed and the dependence test successful information of the electronic equipment interfaces.
Preferably, said write speed, reading speed and dependence test are exported when the reading speed is below standard to lose Lose information.
Preferably, also include before the External memory equipment of the detection electronic equipment interfaces access:In the electronics The hot plug events of the kernel registration External memory equipment of equipment.
Preferably, walked in the writing speed and reading speed of the interface that the electronic equipment is detected by sense command Also include after rapid:Export writing speed, reading speed and the dependence test successful information of the electronic equipment interfaces.
According to another embodiment of the present invention, there is provided the detection means of a kind of electronic equipment interface, including:Detection unit, For detecting the External memory equipment of electronic equipment interfaces access;Binding unit, for by hot plug mechanism by the detection The External memory equipment that unit detects is tied to default binding catalogue;Storage unit, for by it is described it is default binding catalogue and Device path is saved in specified file;Confirmation unit, for read from the specified file it is described it is default binding catalogue and Device path is to confirm that the External memory equipment whether there is;And read or write speed detection unit, for when the confirmation form In the presence of member confirms that the External memory equipment confirms, by sense command detect the electronic equipment interfaces writing speed and Reading speed.
Preferably, the binding unit includes:Hot plug processing unit, for calling hot plug events to handle function, and The device node of the External memory equipment and the system format of partitioned file are read according to implementor name and environmental variance;And tie up Processing unit is determined, for the system format select command binding of the partitioned file read according to the hot plug processing unit The device node binds catalogue to default.
Preferably, the binding processing unit includes:Zoned format judging unit, it is for judge the partitioned file Whether form of uniting is new technology file system;Binding unit is selected, for judging the subregion when the zoned format judging unit When the system format of file is new technology file system, device node described in ntfs-3g command bindings is selected to bind catalogue to default, And when the zoned format judging unit judges the system format of the partitioned file not for new technology file system, selection Device node described in mount command bindings binds catalogue to default.
Preferably, the read or write speed detection unit includes:Writing speed detection unit, for being detected by sense command The writing speed of the interface of the electronic equipment;Judging unit, for judging that what said write speed detection unit detected writes Whether up to standard enter speed;Reading speed detection unit, for passing through when the judging unit judges that said write speed is up to standard Sense command detects the reading speed of the interface of the electronic equipment;And output unit, for judging when the judging unit Said write speed and dependence test failure information are exported when writing speed is below standard.
Preferably, said write speed detection unit includes:Writing unit, for by dd orders to the default binding The NUL stream file of catalogue write-in default file size simultaneously records the beginning and ending time;And writing speed computing unit, for root Writing speed is calculated according to the default file size and beginning and ending time of the NUL stream file of said write unit write-in.
Preferably, the reading speed detection unit includes:Reading unit, for by dd orders in the default binding The data file of default file size is read in catalogue and records the beginning and ending time;And reading speed computing unit, for basis The default file size for the data file that the reading unit is read and beginning and ending time calculate reading speed.
Preferably, the judging unit is additionally operable to judge whether is reading speed that the reading speed detection unit detects Up to standard, when the judging unit judges that the reading speed is up to standard, the output unit is additionally operable to export the electronic equipment Writing speed, reading speed and the dependence test successful information of interface.
Preferably, when the judging unit judges that the reading speed is below standard, the output unit is additionally operable to export Said write speed, reading speed and dependence test failure information.
Preferably, the detection means of the electronic equipment interfaces also includes hot plug events registering unit, for described The hot plug events of the kernel registration External memory equipment of electronic equipment.
Preferably, the detection means of the electronic equipment interfaces also includes output unit, for exporting the electronic equipment Writing speed, reading speed and the dependence test successful information of interface.
According to further embodiment of this invention, a kind of electronic equipment is also provided, the electronic equipment is set including above-mentioned electronics The detection means of standby interface.
Detection method, device and the equipment of electronic equipment interfaces provided by the invention, bound and accessed by hot plug mechanism External memory equipment, and the writing speed and reading speed of the interface by testing electronic equipment described in command detection be and existing Have and compared for needing to be manually entered test command during electronic equipment interfaces test with limited test function, realize electronics and set The standby writing speed of interface and the test of reading speed, improve the efficiency of electronic equipment interfaces test and test comprehensive.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, make required in being described below to embodiment Accompanying drawing is briefly described.It should be evident that drawings in the following description are only some embodiments of the present invention, for For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings Accompanying drawing.
Fig. 1 is the schematic flow sheet of the detection method of electronic equipment interfaces in first embodiment of the invention.
Fig. 2 is the flow of the binding External memory equipment of the detection method of electronic equipment interfaces in first embodiment of the invention Schematic diagram.
Fig. 3 is the write-in of the detection electronic equipment interfaces of the detection method of electronic equipment interfaces in first embodiment of the invention The schematic flow sheet of speed and reading speed.
Fig. 4 is the structural representation of the detection means of the electronic equipment interfaces of second embodiment of the invention.
Fig. 5 is the structural representation of the binding unit of the detection means of the electronic equipment interfaces of second embodiment of the invention.
Fig. 6 is the structure of the read or write speed detection unit of the detection means of the electronic equipment interfaces of second embodiment of the invention Schematic diagram.
Fig. 7 is the structure of the writing speed detection unit of the detection means of the electronic equipment interfaces of second embodiment of the invention Schematic diagram.
Fig. 8 is the structure of the reading speed detection unit of the detection means of the electronic equipment interfaces of second embodiment of the invention Schematic diagram.
Embodiment
Make further more detailed description to technical scheme with reference to the accompanying drawings and detailed description.It is aobvious So, described embodiment is only the part of the embodiment of the present invention, rather than whole embodiments.Based in the present invention Embodiment, the every other embodiment that those of ordinary skill in the art are obtained on the premise of creative work is not made, The scope of protection of the invention should all be belonged to.
In the description of the invention, it is to be understood that term " first ", " second " etc. are only used for describing purpose, without It is understood that to indicate or implying relative importance.In the description of the invention, it is necessary to which explanation, is provided unless otherwise clear and definite And restriction, term " connected ", " connection " should be interpreted broadly, for example, it may be fixedly connected or be detachably connected, Or it is integrally connected;Can be mechanical connection or electrical connection;Can be joined directly together, intermediary can also be passed through It is indirectly connected.For the ordinary skill in the art, concrete condition can be combined and understands above-mentioned term in the present invention Concrete meaning.In addition, in the description of the invention, unless otherwise indicated, " multiple " are meant that two or more.
Any process or method described otherwise above description in flow chart or herein is construed as, and represents to include Module, fragment or the portion of the code of the executable instruction of one or more the step of being used to realize specific logical function or process Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discuss suitable Sequence, including according to involved function by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Fig. 1 is the schematic flow sheet of the detection method of electronic equipment interfaces in first embodiment of the invention.As illustrated, this The detection method for the electronic equipment interfaces that embodiment provides, including:
Step S101:Detect the External memory equipment of electronic equipment interfaces access.
Wherein, the electronic equipment interfaces can connect for the physical interface of any accessible External memory equipment, such as USB Mouth, SD card interface, TF card interface etc., the expansion for realizing electronic equipment stores and the electronic data with External memory equipment Transmission.The hot plug events of External memory equipment are registered in the electronic equipment kernel in advance, for example SD card or the heat of USB flash disk are inserted Event is pulled out, so can access and read and write External memory equipment by interface in the case where not closing the electronic equipment.
Step S102:The External memory equipment detected is tied to by default binding catalogue by hot plug mechanism.
Specifically, the binding external storage that Fig. 2 is the detection method of electronic equipment interfaces in first embodiment of the invention is set Standby schematic flow sheet.As illustrated, the binding external storage of the detection method of electronic equipment interfaces described in step S102 is set Standby method, including:
Step S201:Hot plug events processing function is called, and the outside is read according to implementor name and environmental variance and deposited Store up the device node of equipment and the system format of partitioned file.
Wherein, when electronic equipment has detected External memory equipment access, Lunix system kernels call client layer advance The processing function udevd of hot plug events corresponding to the External memory equipment of registration, and transmit the implementor name of External memory equipment And environmental variance, udevd read sys system files by libsysfs, so read the partition table of the External memory equipment And device node, and obtain the file system format of each subregion.
Step S202:Whether the system format for judging the partitioned file is new technology file system.
Step S203:When the system format of the partitioned file is judged as new technology file system, ntfs-3g orders are selected The device node is bound to default binding catalogue.
Wherein, it is described it is default binding catalogue be kernel automatically create with zone name identical catalogue, according to the subregion The system format select command of file binds the device node to default binding catalogue.
Step S204:When the system format of the partitioned file judge not be new technology file system when, select mount order Order binds the device node to default binding catalogue.
Step S103:The default binding catalogue and device path are saved in specified file.
The External memory equipment detected is so tied to by default binding catalogue by hot plug mechanism, electronic equipment can With by reading the default binding catalogue and device path in the specified file, to the External memory equipment of access Carry out follow-up reading and write-in test.
Step S104:The default binding catalogue and device path are read from the specified file to confirm the outside Storage device whether there is.
Step S105:In the presence of External memory equipment confirmation, the electronic equipment is detected by sense command and connect The writing speed and reading speed of mouth.
Specifically, the detection electronic equipment that Fig. 3 is the detection method of electronic equipment interfaces in first embodiment of the invention connects The writing speed of mouth and the schematic flow sheet of reading speed.As illustrated, it is described detection electronic equipment interfaces writing speed and The method of reading speed, is specifically included:
Step S301:The default binding catalogue and device path are read from the specified file.
Electronic equipment can be connected computer, with logical by the present embodiment when carrying out electronic equipment interfaces test by serial ports Cross the test information that correlation was checked or printed to serial ports, such as test equipment designation number, testing time, writing speed, reading speed Spend and be successfully tested failure information etc..
Step S302:Confirm that the External memory equipment whether there is.
Wherein, when the default binding catalogue and device path can be read in step S301, determine that the outside is deposited Store up equipment to exist, continue follow-up writing speed and reading speed test;Catalogue and set when the default binding can not be read During standby path, determine that the External memory equipment is not present, perform step S310 and directly export the test that detection device is not present Failure information, the information of dependence test failure is exported or printed by serial ports of computers.
Step S303:The NUL stream file of default file size is write simultaneously to the default binding catalogue by dd orders Record the beginning and ending time.
Step S304:Writing speed is calculated according to the default file size of the NUL stream file and beginning and ending time.
So, in step S303 and step S304, size and the time of write-in file data are copied according to dd orders, very The writing speed of the interface of the electronic equipment is easily calculated.
Step S305:Whether the writing speed that judgement detects is up to standard.
Wherein, also it is not quite similar for different types of electronic equipment interfaces, the standard of writing speed.In the present embodiment In, then continue the test of follow-up reading speed when writing speed is up to standard, step S310 is performed when writing speed is not up to standard Writing speed and test crash information are directly exported, exports or print related writing speed and test crash by serial ports of computers Information.
Step S306:The data file and note of default file size are read in the default binding catalogue by dd orders Record the beginning and ending time.
Step S307:Reading speed is calculated according to the default file size of the data file and beginning and ending time.
So, in step S306 and step S307, size and the time for reading file data are copied according to dd orders, very The reading speed of the interface of the electronic equipment is easily calculated.
Step S308:Whether the reading speed that judgement detects is up to standard.
Wherein, also it is not quite similar for different types of electronic equipment interfaces, the standard of reading speed.In the present embodiment In, when reading speed is not up to standard, execution step S310 directly exports writing speed, reading speed and test crash information, passes through Serial ports of computers exports or printed the information of related writing speed, reading speed and test crash.
Step S309:When the reading speed is up to standard, writing speed, the reading speed of the electronic equipment interfaces are exported With dependence test successful information.
Fig. 4 is the structural representation of the detection means of the electronic equipment interfaces of second embodiment of the invention, as illustrated, On the basis of above method embodiment, the detection means 10 for the electronic equipment interfaces that the present embodiment provides, including detection unit 101st, binding unit 102, storage unit 103, confirmation unit 104 and read or write speed detection unit 105.
The detection unit 101, for detecting the External memory equipment of electronic equipment interfaces access.Wherein, the electronics Equipment interface can be the physical interface of any accessible External memory equipment, such as USB interface, SD card interface, TF card interface Deng for realizing the expansion storage of electronic equipment and electronic data transfer with External memory equipment.In the present embodiment, in advance The hot plug events that hot plug events registering unit registers External memory equipment in the electronic equipment kernel are first passed through, such as The hot plug events of SD card or USB flash disk, so it can access and read and write by interface in the case where not closing the electronic equipment External memory equipment.
The binding unit 102, for being set the external storage that the detection unit 101 detects by hot plug mechanism It is standby to be tied to default binding catalogue.Fig. 5 is the binding unit 102 of the detection means of the electronic equipment interfaces of the embodiment of the present invention Structural representation.As illustrated, the binding unit 102 includes hot plug processing unit 1021 and binding processing unit 1022.
The hot plug processing unit 1021, for calling hot plug events to handle function, and according to implementor name and environment Variable reads the device node of the External memory equipment and the system format of partitioned file.Specifically, when the inspection of electronic equipment When survey unit 101 has detected External memory equipment access, the hot plug processing unit 1021 of Lunix system kernels calls The processing function udevd of hot plug events corresponding to client layer External memory equipment registered in advance, and transmit external storage and set Standby implementor name and environmental variance, udevd read sys system files by libsysfs, so read the external storage and set Standby partition table and device node, and obtain the file system format of each subregion.
The binding processing unit 1022 includes zoned format judging unit 10221 and selection binding unit 10222, is used for The system format select command of the partitioned file read according to the hot plug processing unit 1021 binds the equipment section Point binds catalogue to default.The zoned format judging unit 10221, for judge the partitioned file system format whether For new technology file system.The selection binding unit 10222, described in judging when the zoned format judging unit 10221 When the system format of partitioned file is new technology file system, device node described in ntfs-3g command bindings is selected to default binding Catalogue, and when the zoned format judging unit 10221 judges the system format of the partitioned file not for NTFS files During system, device node described in mount command bindings is selected to default binding catalogue.Wherein, the default binding catalogue is interior Core automatically create with zone name identical catalogue, the equipment is bound according to the system format select command of the partitioned file Node binds catalogue to default.
The storage unit 103, for the default binding catalogue and device path to be saved in specified file.So The External memory equipment detected is tied to default binding catalogue by the binding unit 102 by hot plug mechanism, and electronics is set It is standby can be by reading the default binding catalogue and device path in the specified file, to the external storage of access Equipment carries out follow-up reading by the read or write speed detection unit 105 and write-in is tested.
The confirmation unit 104, for read from the specified file it is described it is default binding catalogue and device path with Confirm that the External memory equipment whether there is.The present embodiment can lead to electronic equipment when carrying out electronic equipment interfaces test Serial ports connection computer is crossed, so that the test information of correlation, such as test equipment designation number, test are checked or printed by serial ports Time, writing speed, reading speed and it is successfully tested failure information etc..The confirmation unit 104 reads the default binding When catalogue and device path, determine that the External memory equipment is present, row write can be entered subsequently through read or write speed test cell 105 Enter speed and reading speed test;When the confirmation unit 104 can not read the default binding catalogue and device path, Determine that the External memory equipment is not present, then the test crash information that directly output detection device is not present, pass through computer Serial ports exports or the information of printing dependence test failure.
The read or write speed detection unit 105, for confirming that the External memory equipment confirms when the confirmation unit 104 In the presence of, the writing speed and reading speed of the electronic equipment interfaces are detected by sense command.Fig. 6 is real for the present invention second The structural representation of the read or write speed detection unit of the detection means of the electronic equipment interfaces of example is applied, as illustrated, the read-write Speed detection unit 105 includes writing speed detection unit 1051, judging unit 1052, reading speed detection unit 1053 and defeated Go out unit 1054.
Wherein, said write speed detection unit 1051, for detecting the interface of the electronic equipment by sense command Writing speed.Fig. 7 is the structure of the writing speed detection unit of the detection means of the electronic equipment interfaces of the embodiment of the present invention Schematic diagram.As illustrated, said write speed detection unit 1051 further comprises that writing unit 10511 and writing speed calculate Unit 10512.
Said write unit 10511, for writing default file size to the default binding catalogue by dd orders NUL stream file simultaneously records the beginning and ending time.Said write speed computing unit 10512, for according to said write unit The default file size of the NUL stream file of 10511 write-ins and beginning and ending time calculate writing speed.So, said write Speed detection unit 1051 copies size and the time of write-in file data according to dd orders, it is easy to the electronics is calculated The writing speed of the interface of equipment.
The judging unit 1052, for judging whether is writing speed that said write speed detection unit 1051 detects It is up to standard.Wherein, also it is not quite similar for different types of electronic equipment interfaces, the standard of writing speed.In the present embodiment, when Then continue to be read out the test of speed when writing speed is up to standard subsequently through the reading speed detection unit 1053, when described When judging unit 1052 judges that writing speed is not up to standard, writing speed and test crash information are directly exported, passes through computer string Mouth output or the information for printing related writing speed and test crash.
The reading speed detection unit 1053, for when the judging unit 1052 judges that said write speed is up to standard The reading speed of the interface of the electronic equipment is detected by sense command.Fig. 8 is the electronic equipment of second embodiment of the invention The structural representation of the reading speed detection unit of the detection means of interface.As illustrated, the reading speed detection unit 1053 include reading unit 10531 and reading speed computing unit 10532.
The reading unit 10531, for reading default file size in the default binding catalogue by dd orders Data file and record the beginning and ending time.The reading speed computing unit 10532, for according to the reading unit 10531 The default file size of the data file read and beginning and ending time calculate reading speed.So, the reading speed detection Unit 1053 copies size and the time for reading file data according to dd orders, it is easy to connecing for the electronic equipment is calculated The reading speed of mouth.
Preferably, the judging unit 1052 can be additionally used in the reading for judging that the reading speed detection unit 1053 detects Take speed whether up to standard.When the judging unit 1052 judges that the reading speed is up to standard, the output unit 1054 may be used also For exporting writing speed, reading speed and the dependence test successful information of the electronic equipment interfaces;When the judging unit 1052 when judging that the reading speed is below standard, and the output unit 1054 is additionally operable to export said write speed, reading speed And dependence test failure information.When the judging unit 1052 judges that writing speed is below standard, the output unit 1054 Export said write speed and dependence test failure information.When the confirmation unit 104 can not read the default binding When catalogue and device path, the output unit 1054 directly exports the test crash information that detection device is not present.
Based on above-described embodiment, the present invention also provides a kind of electronic equipment, and the electronic equipment is set including above-mentioned electronics The detection means of standby interface.
In summary, the detection method of electronic equipment interfaces provided by the invention, device and equipment, hot plug mechanism is passed through Bind the External memory equipment of access, and the writing speed of the interface by testing electronic equipment described in command detection and reading speed Degree, compared with needing to be manually entered test command and limited test function when the existing test for electronic equipment interfaces, realize The writing speed of electronic equipment interfaces and the test of reading speed, improve efficiency and the test of electronic equipment interfaces tests It is comprehensive.
It should be appreciated that each several part of the present invention can be realized with hardware, software, firmware or combinations thereof.Above-mentioned In embodiment, software that multiple steps or method can be performed in memory and by suitable instruction execution system with storage Or firmware is realized.If, and in another embodiment, can be with well known in the art for example, realized with hardware Any one of row technology or their combination are realized:With the logic gates for realizing logic function to data-signal Discrete logic, have suitable combinational logic gate circuit application specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description such as example " or " some examples " means to combine specific features, structure, material or the feature that the embodiment or example describe It is contained at least one embodiment or example of the present invention.In this manual, the schematic representation of above-mentioned term is differed Surely identical embodiment or example are referred to.Moreover, specific features, structure, material or the feature of description can be any Combined in an appropriate manner in one or more embodiments or example.
Although an embodiment of the present invention has been shown and described, it will be understood by those skilled in the art that:Not In the case of departing from the principle and objective of the present invention a variety of change, modification, replacement and modification can be carried out to these embodiments, this The scope of invention is limited by claim and its equivalent.

Claims (18)

1. the detection method of a kind of electronic equipment interface, it is characterised in that including:
Detect the External memory equipment of electronic equipment interfaces access;
The External memory equipment detected is tied to by default binding catalogue by hot plug mechanism;
The default binding catalogue and device path are saved in specified file;
The default binding catalogue and device path are read from the specified file whether to confirm the External memory equipment In the presence of;And
When the External memory equipment confirmation in the presence of, by sense command detect the electronic equipment interfaces writing speed and Reading speed;Wherein, include in the writing speed that the electronic equipment interfaces are detected by sense command:
The NUL stream file of default file size is write to the default binding catalogue by dd orders and records the beginning and ending time;
Writing speed is calculated according to the default file size of the NUL stream file and beginning and ending time.
2. the detection method of electronic equipment interfaces as claimed in claim 1, it is characterised in that wherein described to pass through hot plug machine The External memory equipment detected is tied to default binding catalogue step by system to be included:
Hot plug events processing function is called, and the equipment section of the External memory equipment is read according to implementor name and environmental variance The system format of point and partitioned file;And
The device node is bound to default binding catalogue according to the system format select command of the partitioned file.
3. the detection method of electronic equipment interfaces as claimed in claim 2, it is characterised in that wherein described according to the subregion The system format select command of file binds the device node also to be included to default binding catalogue step:
Whether the system format for judging the partitioned file is new technology file system;
When the system format of the partitioned file is judged as new technology file system, equipment described in ntfs-3g command bindings is selected Node binds catalogue to default;And
When the system format of the partitioned file judge not be new technology file system when, selection mount command bindings described in set Slave node binds catalogue to default.
4. the detection method of electronic equipment interfaces as claimed in claim 1, it is characterised in that wherein described when the outside is deposited Storage equipment detects the writing speed and reading speed step bag of the interface of the electronic equipment by sense command in the presence of confirming Include:
The writing speed of the interface of the electronic equipment is detected by sense command;
Whether the writing speed that judgement detects is up to standard;And
When said write speed is up to standard, the reading speed of the interface of the electronic equipment is detected by sense command;And work as When said write speed is below standard, said write speed and dependence test failure information are exported.
5. the detection method of electronic equipment interfaces as claimed in claim 4, it is characterised in that wherein described to pass through sense command Detecting the reading speed step of the interface of the electronic equipment includes:
The data file of default file size is read in the default binding catalogue by dd orders and records the beginning and ending time;With And
Reading speed is calculated according to the default file size of the data file and beginning and ending time.
6. the detection method of electronic equipment interfaces as claimed in claim 4, it is characterised in that wherein work as said write described Detect the reading speed step of the interface of the electronic equipment when speed is up to standard by sense command also includes afterwards:
Whether the reading speed that judgement detects is up to standard;And
When the reading speed is up to standard, export writing speed, reading speed and the dependence test of the electronic equipment interfaces into Work(information.
7. the detection method of electronic equipment interfaces as claimed in claim 6, it is characterised in that wherein when the reading speed not Said write speed, reading speed and dependence test failure information are exported when up to standard.
8. the detection method of electronic equipment interfaces as claimed in claim 1, it is characterised in that wherein set in the detection electronics Also include before the External memory equipment of standby interface access:The heat that External memory equipment is registered in the kernel of the electronic equipment is inserted Pull out event.
9. the detection method of electronic equipment interfaces as claimed in claim 1, it is characterised in that wherein ordered described by detecting Order detects the writing speed of the interface of the electronic equipment and reading speed step also to be included afterwards:The electronic equipment is exported to connect Writing speed, reading speed and the dependence test successful information of mouth.
10. the detection means of a kind of electronic equipment interface, it is characterised in that including:
Detection unit, for detecting the External memory equipment of electronic equipment interfaces access;
Binding unit, for the External memory equipment that the detection unit detects to be tied into default tie up by hot plug mechanism Determine catalogue;
Storage unit, for the default binding catalogue and device path to be saved in specified file;
Confirmation unit, for reading the default binding catalogue and device path from the specified file to confirm the outside Storage device whether there is;And
Read or write speed detection unit, in the presence of the confirmation unit confirms that the External memory equipment confirms, passing through inspection Survey writing speed and reading speed that order detects the electronic equipment interfaces;Wherein, the electricity is being detected by sense command The writing speed of sub- equipment interface includes:
The NUL stream file of default file size is write to the default binding catalogue by dd orders and records the beginning and ending time;
Writing speed is calculated according to the default file size of the NUL stream file and beginning and ending time.
11. the detection means of electronic equipment interfaces as claimed in claim 10, it is characterised in that wherein described binding unit bag Include:
Hot plug processing unit, for calling hot plug events to handle function, and according to being read implementor name and environmental variance The device node of External memory equipment and the system format of partitioned file;And
Processing unit is bound, the system format of the partitioned file for being read according to the hot plug processing unit selects life Order binds the device node to default binding catalogue.
12. the detection means of electronic equipment interfaces as claimed in claim 11, it is characterised in that wherein described binding processing is single Member includes:
Zoned format judging unit, for judging whether the system format of the partitioned file is new technology file system;
Binding unit is selected, for judging the system format of the partitioned file when the zoned format judging unit for NTFS texts During part system, device node described in ntfs-3g command bindings is selected to default binding catalogue, and when the zoned format judges When the system format of partitioned file described in unit judges is not new technology file system, equipment described in mount command bindings is selected Node binds catalogue to default.
13. the detection means of electronic equipment interfaces as claimed in claim 10, it is characterised in that wherein described read or write speed inspection Surveying unit includes:
Writing speed detection unit, the writing speed of the interface for detecting the electronic equipment by sense command;
Judging unit, for judging whether the writing speed that said write speed detection unit detects is up to standard;
Reading speed detection unit, for being detected when the judging unit judges that said write speed is up to standard by sense command The reading speed of the interface of the electronic equipment;And
Output unit, for exporting said write speed and correlative measurement when the judging unit judges that writing speed is below standard Try failure information.
14. the detection means of electronic equipment interfaces as claimed in claim 13, it is characterised in that wherein described reading speed inspection Surveying unit includes:
Reading unit, for reading the data file and note of default file size in the default binding catalogue by dd orders Record the beginning and ending time;And
Reading speed computing unit, for the default file size of the data file read according to the reading unit and rise Only the time calculates reading speed.
15. the detection means of electronic equipment interfaces as claimed in claim 13, it is characterised in that the judging unit is additionally operable to Judge whether the reading speed that the reading speed detection unit detects is up to standard, when the judging unit judges the reading speed When spending up to standard, the output unit is additionally operable to export writing speed, reading speed and the dependence test of the electronic equipment interfaces Successful information.
16. the detection means of electronic equipment interfaces as claimed in claim 15, it is characterised in that wherein when the judging unit When judging that the reading speed is below standard, the output unit is additionally operable to export said write speed, reading speed and correlation Test crash information.
17. the detection means of electronic equipment interfaces as claimed in claim 10, it is characterised in that also noted including hot plug events Volume unit, for registering the hot plug events of External memory equipment in the kernel of the electronic equipment.
18. the detection means of electronic equipment interfaces as claimed in claim 10, it is characterised in that also including output unit, use In the writing speed, reading speed and the dependence test successful information that export the electronic equipment interfaces.
CN201510770319.7A 2015-11-12 2015-11-12 The detection method of electronic equipment interfaces, device Active CN105446856B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510770319.7A CN105446856B (en) 2015-11-12 2015-11-12 The detection method of electronic equipment interfaces, device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510770319.7A CN105446856B (en) 2015-11-12 2015-11-12 The detection method of electronic equipment interfaces, device

Publications (2)

Publication Number Publication Date
CN105446856A CN105446856A (en) 2016-03-30
CN105446856B true CN105446856B (en) 2018-02-06

Family

ID=55557088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510770319.7A Active CN105446856B (en) 2015-11-12 2015-11-12 The detection method of electronic equipment interfaces, device

Country Status (1)

Country Link
CN (1) CN105446856B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109992463A (en) * 2018-01-03 2019-07-09 浙江舜宇智能光学技术有限公司 A kind of method and system with automatic detection packaged type storage equipment read or write speed adaptation electronic equipment
CN109117344A (en) * 2018-08-29 2019-01-01 郑州云海信息技术有限公司 Method of calibration and device before a kind of starting of storage unit
CN113076225B (en) * 2021-03-30 2023-03-24 山东英信计算机技术有限公司 External storage medium detection method, device and equipment and storage medium
CN117406924A (en) * 2023-10-19 2024-01-16 合肥力高动力科技有限公司 TF card-based data storage method in BMS

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296250A (en) * 2007-04-27 2008-10-29 株式会社东芝 Device control apparatus and device control method
CN103024219A (en) * 2011-09-27 2013-04-03 深圳市普联技术有限公司 IAD (Integrated Access Device) and voice processing method and system based on same

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8661497B2 (en) * 2008-01-25 2014-02-25 General Instrument Corporation Set-top box for converting media signals based on stored output settings

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296250A (en) * 2007-04-27 2008-10-29 株式会社东芝 Device control apparatus and device control method
CN103024219A (en) * 2011-09-27 2013-04-03 深圳市普联技术有限公司 IAD (Integrated Access Device) and voice processing method and system based on same

Also Published As

Publication number Publication date
CN105446856A (en) 2016-03-30

Similar Documents

Publication Publication Date Title
CN105446856B (en) The detection method of electronic equipment interfaces, device
CN112331253B (en) Chip testing method, terminal and storage medium
TWI799135B (en) Chip design verification system, chip design verification method, and computer readable recording media with stored programs
CN103197914B (en) Multiprocessor postpones the method and system performed
CN105790830A (en) Optical module in-situ detection method and device
CN109298266A (en) Test macro, test method, test device and storage medium
CN110765032A (en) Method for reading and writing I2C memory based on system management bus interface
CN101354667B (en) Method for testing peripheral component interconnect bus level pressure
CN109256173A (en) On-board memory devices test macro
CN107491372A (en) A kind of method and system for linux system RPM bags statistics CPU usage
CN109445691A (en) A kind of method and device improving FTL algorithm development and verification efficiency
CN104020457B (en) The real-time recording device of multichannel data and the method that realizes data real time record in radar test
CN103365772B (en) Software test automatic evaluation device and method
CN105912415A (en) Method and device for verifying cache consistency protocol
CN104731577B (en) Multisystem and the method for starting the multisystem
US9563500B2 (en) Storage integrity validator
CN102305906B (en) Chip testing method and device
US7937511B2 (en) Burning apparatus
CN115599618A (en) Register dynamic relocation verification method and device, storage medium and processor
CN108829541A (en) Dilatation detection method, electronic device and computer readable storage medium
TWI502350B (en) Flash memory accessing apparatus and method thereof
CN104572429B (en) Page method of testing and device for gathering dvielement
EP3557422A1 (en) Method for accessing code sram, and electronic device
CN117236277B (en) Method and device for checking register and electronic equipment
CN105302688B (en) A kind of parallel bus self checking method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201203

Address after: Dai Xi Zhen Shang Qiang Lu, Wuxing District, Huzhou City, Zhejiang Province

Patentee after: HUZHOU AIDI ELECTRIC Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221229

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: Dai Xi Zhen Shang Qiang Lu, Wuxing District, Huzhou City, Zhejiang Province

Patentee before: HUZHOU AIDI ELECTRIC Co.,Ltd.

TR01 Transfer of patent right