CN105955857A - Method and device for testing BIOS (Basic Input Output System) - Google Patents

Method and device for testing BIOS (Basic Input Output System) Download PDF

Info

Publication number
CN105955857A
CN105955857A CN201610280666.6A CN201610280666A CN105955857A CN 105955857 A CN105955857 A CN 105955857A CN 201610280666 A CN201610280666 A CN 201610280666A CN 105955857 A CN105955857 A CN 105955857A
Authority
CN
China
Prior art keywords
uuid
bios
inspection script
instruction
object element
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.)
Pending
Application number
CN201610280666.6A
Other languages
Chinese (zh)
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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201610280666.6A priority Critical patent/CN105955857A/en
Publication of CN105955857A publication Critical patent/CN105955857A/en
Pending legal-status Critical Current

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a method and a device for testing a BIOS (Basic Input Output System). The method comprises the steps of presetting a test script; running the test script; according to a first command of the test script, acquiring a first UUID (Universally Unique Identifier) of a target unit in a BMC (Baseboard Management Controller); according to a second command of the test script, acquiring a second UUID of the target unit by using the BIOS; and according to a third command of the test script, judging whether the first UUID is the same as the second UUID, if yes, determining that the BIOS acquires the UUID successfully, and otherwise, determining that the BIOS fails to acquire the UUID. According to the method and device for testing the BIOS, the BIOS testing speed can be improved.

Description

A kind of method and device checking BIOS
Technical field
The present invention relates to field of computer technology, check BIOS (Basic Input particularly to one Output System, basic input output system) method and device.
Background technology
UUID (Universally Unique Identifier, general unique identifier) is on a machine The numeral generated, it ensures all machines aerial when same is all unique.UUID is as only The identification information of one, increasing equipment needs to preset UUID when dispatching from the factory.
In the BIOS stage, BIOS needs to read UUID to identify corresponding hardware, such as: by reading Take the UUID of mainboard to identify mainboard.But, when BIOS sends mistake when reading UUID, BIOS possibly cannot correctly identify corresponding hardware, accordingly, it would be desirable to BIOS is tested, and checking The UUID that BIOS reads is the most accurate.In prior art, typically by manually testing, specifically Ground, the artificial UUID obtained in BIOS, examines with correct UUID by comparing the UUID of acquisition Test BIOS.
Visible by foregoing description, in prior art, by the speed ratio of the method manually checking BIOS Slower.
Summary of the invention
Embodiments provide a kind of method and device checking BIOS, it is possible to increase inspection BIOS Speed.
On the one hand, embodiments provide a kind of method checking BIOS, including:
Pre-set inspection script;
S1: run described inspection script;
S2: according to the first instruction of described inspection script, obtain BMC (Baseboard Management Controller, baseboard management controller) in a UUID of object element;
S3: according to the second instruction of described inspection script, utilize BIOS to obtain the of described object element Two UUID;
S4: according to the 3rd instruction of described inspection script, it is judged that whether a UUID and the 2nd UUID Identical, if it is, determine that BIOS obtains UUID success, otherwise, it determines BIOS obtains UUID Failure.
Further, described in pre-set inspection script, including:
First instruction of described inspection script is set by dmidecode;
Second instruction of described inspection script is set by dmidecode.
Further, described the 2nd UUID utilizing BIOS to obtain described object element in described S3, Including:
BIOS is utilized to read described the second of described object element from the memorizer that described BMC is corresponding UUID。
Further, after described S2, also include:
According to the 4th instruction of described inspection script, a described UUID is updated system administration output In output system SMBIOS.
Further, before described S1, also include:
Obtain the root authority of the system at described object element place;
Described S1, including:
Described inspection script is run under the root authority of the system at described object element place.
On the other hand, embodiments provide a kind of device checking BIOS, including:
Unit is set, is used for arranging inspection script;
Running unit, is used for running described inspection script;
First acquiring unit, for the first instruction according to described inspection script, obtains the mesh in BMC Oneth UUID of mark unit;
Second acquisition unit, for the second instruction according to described inspection script, utilizes BIOS to obtain institute State the 2nd UUID of object element;
Verification unit, for the 3rd instruction according to described inspection script, it is judged that a UUID and second UUID is the most identical, when judged result is for being, determines that BIOS obtains UUID success, when judging knot When fruit is no, determine that BIOS obtains UUID failure.
Further, described unit is set, for being arranged the of described inspection script by dmidecode One instruction, arranges the second instruction of described inspection script by dmidecode.
Further, described second acquisition unit, perform described utilize BIOS obtain described target list During two UUID of unit, for utilizing BIOS to read described mesh from the memorizer that described BMC is corresponding Described 2nd UUID of mark unit.
Further, also include:
Updating block, for the 4th instruction according to described inspection script, updates a described UUID In system administration output output system SMBIOS.
Further, also include: permission unit, for obtaining the root of the system at described object element place Authority;
Described running unit, described for running under the root authority of the system at described object element place Inspection script.
In embodiments of the present invention, pre-set inspection script, obtain by performing the instruction in inspection script Take a UUID of object element in BMC, and utilize BIOS to obtain the 2nd UUID of object element, The two is compared, checks BIOS by comparative result, artificial participation that checkout procedure is wireless, logical Cross inspection script can realize, improve the speed of inspection BIOS.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to reality Execute the required accompanying drawing used in example or description of the prior art to be briefly described, it should be apparent that below, Accompanying drawing in description is some embodiments of the present invention, for those of ordinary skill in the art, not On the premise of paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the flow chart of a kind of method checking BIOS that one embodiment of the invention provides;
Fig. 2 is the flow chart of the method for the another kind of inspection BIOS that one embodiment of the invention provides;
Fig. 3 is the schematic diagram of a kind of device checking BIOS that one embodiment of the invention provides;
Fig. 4 is the schematic diagram of the device of the another kind of inspection BIOS that one embodiment of the invention provides.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with this Accompanying drawing in bright embodiment, is clearly and completely described the technical scheme in the embodiment of the present invention, Obviously, described embodiment is a part of embodiment of the present invention rather than whole embodiments, based on Embodiment in the present invention, those of ordinary skill in the art are institute on the premise of not making creative work The every other embodiment obtained, broadly falls into the scope of protection of the invention.
As it is shown in figure 1, embodiments provide a kind of method checking BIOS, the method is permissible Comprise the following steps:
S0: pre-set inspection script;
S1: run described inspection script;
S2: according to the first instruction of described inspection script, obtain the mesh in baseboard management controller BMC Oneth UUID of mark unit;
S3: according to the second instruction of described inspection script, utilize BIOS to obtain the of described object element Two UUID;
S4: according to the 3rd instruction of described inspection script, it is judged that whether a UUID and the 2nd UUID Identical, if it is, determine that BIOS obtains UUID success, otherwise, it determines BIOS obtains UUID Failure.
In embodiments of the present invention, pre-set inspection script, obtain by performing the instruction in inspection script Take a UUID of object element in BMC, and utilize BIOS to obtain the 2nd UUID of object element, The two is compared, checks BIOS by comparative result, artificial participation that checkout procedure is wireless, logical Cross inspection script can realize, improve the speed of inspection BIOS.
In an embodiment of the present invention, described in pre-set inspection script, including:
First instruction of described inspection script is set by dmidecode;
Second instruction of described inspection script is set by dmidecode.
After operation test script, obtain a UUID by the first instruction of dmidecode form, The 2nd UUID is obtained by the second instruction of dmidecode form.
In an embodiment of the present invention, described in described S3 utilizes BIOS to obtain described object element 2nd UUID, including:
BIOS is utilized to read described the second of described object element from the memorizer that described BMC is corresponding UUID。
Here memorizer can be EPROM (Erasable Programmable Read Only Memory, erasable programmable read-only register).BMC when arranging the UUID of object element, Can be saved in by UUID in the memorizer of correspondence, BIOS can obtain the 2nd UUID from this memorizer.
In an embodiment of the present invention, after described S2, also include:
According to the 4th instruction of described inspection script, a described UUID is updated in SMBIOS.
By this implementation so that BIOS can get correct UUID.
In an embodiment of the present invention, before described S1, also include:
Obtain the root authority of the system at described object element place;
Described S1, including:
Described inspection script is run under the root authority of the system at described object element place.
In order to the instruction realized in inspection script, need the root authority of acquisition system, weigh at root Under limit, it is possible to achieve all instructions in inspection script, it is to avoid occur in inspection script running, Authority is not had to perform the situation of command adapted thereto.
As in figure 2 it is shown, embodiments provide a kind of method checking BIOS, real in the present invention Executing in example, object element is mainboard, and the method may comprise steps of:
Step 201: pre-set inspection script.
Specifically, inspection script arranges the first instruction, the second instruction, the 3rd instruction and the 4th instruction.
Wherein, the first instruction in inspection script and the second instruction can be realized by dmidecode.
Step 202: obtain the root authority of the system at mainboard place.
Step 203: operation test script under the root authority of the system at mainboard place.
Step 204: according to the first instruction of inspection script, the mainboard in the BMC that acquisition mainboard is corresponding Oneth UUID.
UUID in BMC is accurately, therefore, it can carry out for the UUID obtained with BIOS Relatively.
Step 205: according to the second instruction of inspection script, utilize BIOS from memorizer corresponding for BMC 2nd UUID of middle reading mainboard.
BIOS cannot obtain the UUID of object element from BMC, can read from memorizer UUID。
The UUID of object element can be stored in the memorizer of correspondence by BMC, but, due to BMC In UUID update after, the UUID in memorizer is likely not to have and upgrades in time, or, BIOS read The reason such as make a mistake the when of taking, and the UUID causing UUID with BIOS in BMC to obtain differs Cause.
Step 206: according to the 3rd instruction of inspection script, it is judged that a UUID and the 2nd UUID is No identical, if it is, perform step 206, otherwise, perform step 207.
Step 207: determine that BIOS obtains UUID success.
Step 208: determine that BIOS obtains UUID failure.
After step 204, it is also possible to including:
Step 209: according to the 4th instruction of inspection script, a UUID is updated in SMBIOS.
By this step so that the UUID in BIOS is correct.
Inspection script in the embodiment of the present invention can be realized by code below:
The embodiment of the present invention can be applied in linux system.
As shown in Figure 3, Figure 4, a kind of device checking BIOS is embodiments provided.Device Embodiment can be realized by software, it is also possible to realizes by the way of hardware or software and hardware combining.From For hardware view, as it is shown on figure 3, a kind of device checking BIOS provided for the embodiment of the present invention A kind of hardware structure diagram of place equipment, except the processor shown in Fig. 3, internal memory, network interface, with And outside nonvolatile memory, in embodiment, the equipment at device place generally can also include other hardware, Forwarding chip such as responsible process message etc..As a example by implemented in software, as shown in Figure 4, as one Device on logical meaning, is that the CPU by its place equipment is by meter corresponding in nonvolatile memory Calculation machine programmed instruction reads and runs formation in internal memory.The a kind of of the present embodiment offer checks BIOS's Device, including:
Unit 401 is set, is used for arranging inspection script;
Running unit 402, is used for running described inspection script;
First acquiring unit 403, for the first instruction according to described inspection script, obtains substrate management First general unique identifier UUID of the object element in controller BMC;
Second acquisition unit 404, for the second instruction according to described inspection script, utilizes BIOS to obtain Take the 2nd UUID of described object element;
Verification unit 405, for according to described inspection script the 3rd instruction, it is judged that a UUID with 2nd UUID is the most identical, when judged result is for being, determines that BIOS obtains UUID success, when When judged result is no, determine that BIOS obtains UUID failure.
In an embodiment of the present invention, described unit 401 is set, for arranging institute by dmidecode State the first instruction of inspection script, the second instruction of described inspection script is set by dmidecode.
In an embodiment of the present invention, described second acquisition unit 404, described utilize BIOS performing When obtaining two UUID of described object element, for utilizing BIOS from storage corresponding for described BMC Device reads described 2nd UUID of described object element.
In an embodiment of the present invention, this device also includes:
Updating block, for the 4th instruction according to described inspection script, updates a described UUID In system administration output output system SMBIOS.
In an embodiment of the present invention, this device also includes: permission unit, is used for obtaining described target list The root authority of the system at unit place;
Described running unit 402, for running under the root authority of the system at described object element place Described inspection script.
The contents such as the information between each unit in said apparatus is mutual, execution process, due to the present invention Embodiment of the method is based on same design, and particular content can be found in the narration in the inventive method embodiment, this Place repeats no more.
The embodiment of the present invention at least has the advantages that
1, in embodiments of the present invention, inspection script is pre-set, by performing the instruction in inspection script Obtain a UUID of object element in BMC, and utilize BIOS to obtain the second of object element UUID, compares the two, checks BIOS by comparative result, artificial ginseng that checkout procedure is wireless With, can be realized by inspection script, improve the speed of inspection BIOS.
2, in embodiments of the present invention, realize the inspection to BIOS by inspection script, can avoid The mistake caused by desk checking, improves the accuracy of assay.
It should be noted that in this article, the relational terms of such as first and second etc be used merely to by One entity or operation separate with another entity or operating space, and not necessarily require or imply this Relation or the order of any this reality is there is between a little entities or operation.And, term " includes ", " comprise " or its any other variant is intended to comprising of nonexcludability, so that include that one is The process of row key element, method, article or equipment not only include those key elements, but also include the brightest Other key elements really listed, or also include intrinsic for this process, method, article or equipment Key element.In the case of there is no more restriction, statement " include one " and limit Key element, it is not excluded that there is also another in including the process of described key element, method, article or equipment Outer same factor.
One of ordinary skill in the art will appreciate that: realize all or part of step of said method embodiment Can be completed by the hardware that programmed instruction is relevant, aforesaid program can be stored in embodied on computer readable Storage medium in, this program upon execution, performs to include the step of said method embodiment;And it is aforementioned Storage medium include: various Jie that can store program code such as ROM, RAM, magnetic disc or CD In matter.
Last it should be understood that the foregoing is only presently preferred embodiments of the present invention, it is merely to illustrate this The technical scheme of invention, is not intended to limit protection scope of the present invention.All spirit in the present invention and former Any modification, equivalent substitution and improvement etc. done within then, are all contained in protection scope of the present invention.

Claims (10)

1. the method checking basic input-output system BIOS, it is characterised in that including:
Pre-set inspection script;
S1: run described inspection script;
S2: according to the first instruction of described inspection script, obtain the mesh in baseboard management controller BMC First general unique identifier UUID of mark unit;
S3: according to the second instruction of described inspection script, utilize BIOS to obtain the of described object element Two UUID;
S4: according to the 3rd instruction of described inspection script, it is judged that whether a UUID and the 2nd UUID Identical, if it is, determine that BIOS obtains UUID success, otherwise, it determines BIOS obtains UUID Failure.
Method the most according to claim 1, it is characterised in that
Described pre-set inspection script, including:
First instruction of described inspection script is set by dmidecode;
Second instruction of described inspection script is set by dmidecode.
Method the most according to claim 1, it is characterised in that
Described the 2nd UUID utilizing BIOS to obtain described object element in described S3, including:
BIOS is utilized to read described the second of described object element from the memorizer that described BMC is corresponding UUID。
Method the most according to claim 1, it is characterised in that after described S2, also include:
According to the 4th instruction of described inspection script, a described UUID is updated system administration output In output system SMBIOS.
Method the most according to claim 1, it is characterised in that
Before described S1, also include:
Obtain the root authority of the system at described object element place;
Described S1, including:
Described inspection script is run under the root authority of the system at described object element place.
6. the device checking basic input-output system BIOS, it is characterised in that including:
Unit is set, is used for arranging inspection script;
Running unit, is used for running described inspection script;
First acquiring unit, for the first instruction according to described inspection script, obtains substrate management and controls First general unique identifier UUID of the object element in device BMC;
Second acquisition unit, for the second instruction according to described inspection script, utilizes BIOS to obtain institute State the 2nd UUID of object element;
Verification unit, for the 3rd instruction according to described inspection script, it is judged that a UUID and second UUID is the most identical, when judged result is for being, determines that BIOS obtains UUID success, when judging knot When fruit is no, determine that BIOS obtains UUID failure.
Device the most according to claim 6, it is characterised in that described arrange unit, is used for passing through Dmidecode arranges the first instruction of described inspection script, arranges described inspection foot by dmidecode This second instruction.
Device the most according to claim 6, it is characterised in that
Described second acquisition unit, perform described utilize BIOS obtain described object element second During UUID, for utilizing BIOS to read described object element from the memorizer that described BMC is corresponding Described 2nd UUID.
9. according to described device arbitrary in claim 6-8, it is characterised in that also include:
Updating block, for the 4th instruction according to described inspection script, updates a described UUID In system administration output output system SMBIOS.
10. according to described device arbitrary in claim 6-8, it is characterised in that
Also include: permission unit, for obtaining the root authority of the system at described object element place;
Described running unit, described for running under the root authority of the system at described object element place Inspection script.
CN201610280666.6A 2016-04-29 2016-04-29 Method and device for testing BIOS (Basic Input Output System) Pending CN105955857A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610280666.6A CN105955857A (en) 2016-04-29 2016-04-29 Method and device for testing BIOS (Basic Input Output System)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610280666.6A CN105955857A (en) 2016-04-29 2016-04-29 Method and device for testing BIOS (Basic Input Output System)

Publications (1)

Publication Number Publication Date
CN105955857A true CN105955857A (en) 2016-09-21

Family

ID=56916491

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610280666.6A Pending CN105955857A (en) 2016-04-29 2016-04-29 Method and device for testing BIOS (Basic Input Output System)

Country Status (1)

Country Link
CN (1) CN105955857A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168711A (en) * 2017-05-16 2017-09-15 郑州云海信息技术有限公司 A kind of improved acquisition UUID method
CN107368715A (en) * 2017-09-14 2017-11-21 南京百敖软件有限公司 A kind of method of restricted software access right
WO2023155597A1 (en) * 2022-02-17 2023-08-24 浪潮(山东)计算机科技有限公司 Port management method, system and device, and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739266A (en) * 2008-11-27 2010-06-16 英业达股份有限公司 Firmware updating method
CN103226505A (en) * 2013-04-22 2013-07-31 华为技术有限公司 Method and equipment for checking basic input output system (BIOS)
CN103488498A (en) * 2013-09-03 2014-01-01 华为技术有限公司 Computer booting method and computer
CN104899107A (en) * 2014-03-05 2015-09-09 联想(北京)有限公司 Information processing method and electronic equipment
CN104954504A (en) * 2015-05-05 2015-09-30 浪潮电子信息产业股份有限公司 Method for automatically carrying out BMC management IP configuration

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739266A (en) * 2008-11-27 2010-06-16 英业达股份有限公司 Firmware updating method
CN103226505A (en) * 2013-04-22 2013-07-31 华为技术有限公司 Method and equipment for checking basic input output system (BIOS)
CN103488498A (en) * 2013-09-03 2014-01-01 华为技术有限公司 Computer booting method and computer
CN104899107A (en) * 2014-03-05 2015-09-09 联想(北京)有限公司 Information processing method and electronic equipment
CN104954504A (en) * 2015-05-05 2015-09-30 浪潮电子信息产业股份有限公司 Method for automatically carrying out BMC management IP configuration

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168711A (en) * 2017-05-16 2017-09-15 郑州云海信息技术有限公司 A kind of improved acquisition UUID method
CN107368715A (en) * 2017-09-14 2017-11-21 南京百敖软件有限公司 A kind of method of restricted software access right
WO2023155597A1 (en) * 2022-02-17 2023-08-24 浪潮(山东)计算机科技有限公司 Port management method, system and device, and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN110704304A (en) Application program testing method and device, storage medium and server
CN102298529A (en) Providing silicon integrated code for a system
US10489582B1 (en) Firmware security vulnerability verification service
US8990622B2 (en) Post-silicon validation using a partial reference model
US20140208169A1 (en) Domain scripting language framework for service and system integration
CN105893234A (en) Method for software testing and computing device
CN106708704A (en) Method and device for classifying crash logs
CN105320553A (en) Method and system for updating network card firmware based on domestic processor platform
CN110162322A (en) A kind of upgrade method and device
WO2016062146A1 (en) Serial number information update method, device and terminal
CN105955857A (en) Method and device for testing BIOS (Basic Input Output System)
US7673288B1 (en) Bypassing execution of a software test using a file cache
CN115952757A (en) Register testing method and device
US10915427B2 (en) Equivalence verification apparatus and computer readable medium
CN113127331B (en) Test method and device based on fault injection and computer equipment
CN113672260B (en) Method for initializing CPU of processor
CN109902001B (en) Method for detecting uninitialized variable and terminal equipment
CN109802866B (en) Network card SR-IOV function testing method, device, terminal and storage medium
CN116599881A (en) Cloud platform tenant modeling test method, device, equipment and storage medium
CN105301480A (en) Test method of SOC chip
CN115629820A (en) System secure starting method, chip system, storage medium and electronic equipment
Anand Secure bootloader for connectivity mcu
KR20070035266A (en) Testing method for software
CN113672349A (en) Mirror image updating method, device, equipment and medium
CN111597101B (en) SDK access state detection method, computer equipment and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160921