PFR-based firmware recovery result determination method, device, equipment and medium
Through a fully automatic test process, the test parameter setting documents are generated and the external power supply and platform firmware recovery system is controlled, which solves the problem of high cost and low efficiency of abnormal firmware recovery results based on PFR in the existing technology, and achieves efficient and accurate determination of firmware recovery results.
Patent Information
- Application Number
- CN202211052464.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-08-31
AI Technical Summary
In the prior art, the abnormal firmware recovery results based on PFR are costly and inefficient, the testing steps are cumbersome, and a lot of manpower is required.
By generating test parameter setting documents, automatically configure the test environment, and using preset instructions to control the external power supply and platform firmware recovery system, fully automatic firmware recovery result determination is achieved, reducing manual construction and re-jump testing.
It improves testing efficiency, reduces the time to build a test environment and re-jump the test, improves the accuracy and seriousness of the results, and can reflect the firmware recovery results in detail.
Smart Images

Figure CN115357507B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for determining a firmware recovery result based on PFR. Background Art
[0002] BMC (Baseboard Management Controller) is an important component in server system control. It is installed on the server in the form of burnable firmware, providing the server with a series of functions such as management interface and external interactive interface. Its operating stability is directly related to the stability of server use. The server's PFR (Platform Firmware Resilience) function is an important guarantee for the stable operation of the server. It can protect the server firmware security when abnormal situations occur in the server firmware. The timely and effective functioning of the PFR function is an important factor in ensuring the safety of server operation. Therefore, during the server testing phase, it is necessary to test the implementation of firmware recovery, working stability, and abnormal situation handling results based on PFR functions.
[0003] Under the existing technical environment, testers can confirm the environment, tools, test methods, and test data requirements required for the test by querying the PFR technical documents, and configure the test environment according to the requirements of the technical documents. Manually install the corresponding test software, drivers and other software, configure the operating system environment, manually trigger abnormal situations according to the test requirements, and collect the corresponding test data for analysis. Testers still need to manually configure the test environment, manually test according to the design use cases, manually trigger abnormal situations, such as abnormal power outages, firmware transmission abnormalities, BMC crashes, BMC crashes during upgrades, etc., and manually analyze the data results. Using PFR to recover the firmware, the test of the recovery results is highly professional, requiring testers to deeply understand the requirements of the test documents and use the corresponding tools for testing. The test steps are cumbersome, time-consuming, and require a large amount of manpower investment.
[0004] In summary, it can be seen that how to reduce the cost of abnormal firmware recovery result testing based on PFR and improve test efficiency is a problem to be solved in the field. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for determining firmware recovery results based on PFR, so as to reduce the cost of abnormal firmware recovery result testing based on PFR and improve the test efficiency. The specific scheme is as follows:
[0006] In a first aspect, the present application discloses a method for determining a firmware recovery result based on PFR, which is applied to a preset test end, comprising:
[0007] Based on the preset test start instruction, generate a test parameter setting document, and send the test parameter setting document to the server to be tested, so that the server to be tested performs test environment configuration based on the test parameter setting document and generates corresponding environment configuration results;
[0008] If the obtained environment configuration result meets the first preset condition, then based on the current preset abnormal configuration command, the external power supply is controlled to stop supplying power to the server to be tested, and the target firmware in the server to be tested is restored by using the preset platform firmware recovery system;
[0009] Based on the preset power-on instruction, the external power supply is controlled to start supplying power to the server to be tested, and it is determined whether the server to be tested currently meets the preset power-on state, and if so, whether the version of the target firmware meets the second preset condition;
[0010] If the condition is met, the next preset exception configuration command is updated to the current preset exception configuration command, and the process jumps again to the step of controlling the external power supply to stop powering the server to be tested based on the current preset exception configuration command until the third preset condition is met to generate a test record, and then determine the recovery result of the target firmware by the preset platform firmware recovery system based on the test record.
[0011] Optionally, before controlling the external power supply to stop supplying power to the server to be tested based on the current preset abnormal configuration command, the method further includes:
[0012] Sending a preset temporary storage instruction to the target firmware of the server to be tested so that the target firmware temporarily stores the firmware information to be uploaded, and then sending a preset refresh instruction to the target firmware so that the target firmware uploads the firmware information to a preset platform firmware recovery system based on the preset refresh instruction;
[0013] Correspondingly, the use of the preset platform firmware recovery system to recover the target firmware in the server to be tested includes:
[0014] The preset platform firmware recovery system uses the firmware information to recover the target firmware in the server to be tested.
[0015] Optionally, after determining whether the server to be tested currently meets a preset startup state, the method further includes:
[0016] If it is not satisfied, a first abnormal log that the current state does not meet the preset power-on state is recorded, and a first abnormal reminder message corresponding to the first abnormal log is generated, and then the first abnormal reminder message is displayed through a preset interactive interface by displaying an image pop-up window.
[0017] Optionally, after verifying whether the version of the target firmware satisfies a second preset condition, the method further includes:
[0018] If the version of the target firmware and the original firmware version information of the target firmware do not meet the second preset condition, a second exception log that currently does not meet the second preset condition is recorded, and a second exception reminder information corresponding to the second exception log is generated, and then the second exception reminder information is displayed by displaying an image pop-up window through the preset interactive interface.
[0019] Optionally, the step of re-jumping to the step of controlling the external power supply to stop powering the server to be tested based on the current preset abnormal configuration command until a third preset condition is met to generate a test record includes:
[0020] Re-jump to the step of controlling the external power supply to stop powering the server to be tested based on the current preset abnormal configuration command until the preset cycle threshold is met to generate a test record, and save the test record based on the test record saving path.
[0021] Optionally, before generating a test parameter setting document based on a preset test start instruction, the method further includes:
[0022] Establishing a connection between the preset test terminal and the server to be tested through an external connection method;
[0023] Alternatively, the test terminal is imported into the SHELL environment of the server to be tested by means of a USB flash drive, so as to generate a test parameter setting document based on a preset test start instruction.
[0024] Optionally, before generating a test parameter setting document based on a preset test start instruction, the method further includes:
[0025] If the connection between the preset test end and the server to be tested is established through the external connection method, the original firmware version information of the target firmware is uploaded to the server to be tested, and the preset cycle threshold, the current preset abnormal configuration command and the test record saving path are set.
[0026] In a second aspect, the present application discloses a firmware recovery result determination device based on PFR, which is applied to a preset test end, including:
[0027] A configuration result generating module, used to generate a test parameter setting document based on a preset test start instruction, and send the test parameter setting document to the server to be tested, so that the server to be tested performs test environment configuration based on the test parameter setting document and generates a corresponding environment configuration result;
[0028] A recovery module, configured to control an external power supply to stop supplying power to the server to be tested based on a current preset abnormal configuration command if the obtained environment configuration result meets a first preset condition, and to recover the target firmware in the server to be tested using a preset platform firmware recovery system;
[0029] A verification module, configured to control the external power supply to start supplying power to the service to be tested based on a preset power-on instruction, and to determine whether the server to be tested currently meets a preset power-on state, and if so, to verify whether the version of the target firmware meets a second preset condition;
[0030] The result determination module is used to update the next preset exception configuration command to the current preset exception configuration command if it is met, and jump again to the step of controlling the external power supply to stop power supply to the server to be tested based on the current preset exception configuration command until the third preset condition is met to generate a test record, and then determine the recovery result of the target firmware by the preset platform firmware recovery system based on the test record.
[0031] In a third aspect, the present application discloses an electronic device, comprising:
[0032] Memory, used to store computer programs;
[0033] The processor is used to execute the computer program to implement the steps of the aforementioned PFR-based firmware recovery result determination method.
[0034] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned PFR-based firmware recovery result determination method are implemented.
[0035] It can be seen that the present application discloses a method for determining a firmware recovery result based on PFR, which generates a test parameter setting document based on a preset test start instruction, and sends the test parameter setting document to the server to be tested, so that the server to be tested performs a test environment configuration based on the test parameter setting document and generates a corresponding environment configuration result; if the acquired environment configuration result meets the first preset condition, the external power supply is controlled to stop powering the server to be tested based on the current preset abnormal configuration command, and the target firmware in the server to be tested is restored by using the preset platform firmware recovery system; the external power supply is controlled to start powering the service to be tested based on the preset power-on instruction, and it is determined whether the server to be tested currently meets the preset power-on state, and if so, whether the version of the target firmware meets the second preset condition; if so, the next preset abnormal configuration command is updated to the current preset abnormal configuration command, and the step of controlling the external power supply to stop powering the server to be tested based on the current preset abnormal configuration command is jumped again, until the third preset condition is met to generate a test record, and then the recovery result of the target firmware by the preset platform firmware recovery system is determined based on the test record. It can be seen that the present application does not require manual construction of the test environment or manual construction of a specific re-jump test. The subsequent steps of determining the firmware recovery results can be fully automatic based on the preset test start instructions, thereby reducing the time for setting up the test environment and re-jumping the test. The fully automatic firmware recovery result determination process improves the accuracy and seriousness of the results, and based on the automatically generated test parameter setting document, whether the server to be tested currently meets the preset power-on status, and whether the version of the target firmware meets the second preset condition, it can reflect the specific situation of the firmware recovery result in more detail. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0037] Figure 1 A flowchart of a method for determining a firmware recovery result based on PFR disclosed in this application;
[0038] Figure 2 A specific firmware recovery result test schematic diagram disclosed in this application;
[0039] Figure 3 A flowchart of a specific method for determining a firmware recovery result based on PFR disclosed in this application;
[0040] Figure 4 A schematic diagram of the structure of a device for determining a firmware recovery result based on PFR disclosed in the present application;
[0041] Figure 5 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0043] BMC is an important component in server system control. It is installed on the server in the form of burnable firmware, providing the server with a series of functions such as management interface and external interactive interface. Its operation stability is directly related to the stability of server use. The server's PFR (Platform Firmware Resilience) function is an important guarantee for the stability of server operation. It can protect the server firmware security when abnormal situations occur in the server firmware. The timely and effective functioning of the PFR function is an important factor in ensuring the safety of server operation. Therefore, during the server testing phase, it is necessary to test the implementation of firmware recovery, working stability, and abnormal situation handling results based on PFR functions.
[0044] Under the existing technical environment, testers can confirm the environment, tools, test methods, and test data requirements required for the test by querying the PFR technical documents, and configure the test environment according to the requirements of the technical documents. Manually install the corresponding test software, drivers and other software, configure the operating system environment, manually trigger abnormal situations according to the test requirements, and collect the corresponding test data for analysis. Testers still need to manually configure the test environment, manually test according to the design use cases, manually trigger abnormal situations, such as abnormal power outages, firmware transmission abnormalities, BMC crashes, BMC crashes during upgrades, etc., and manually analyze the data results. Using PFR to recover the firmware, the test of the recovery results is highly professional, requiring testers to deeply understand the requirements of the test documents and use the corresponding tools for testing. The test steps are cumbersome, time-consuming, and require a large amount of manpower investment.
[0045] To this end, the present application correspondingly provides a firmware recovery result determination solution based on PFR, which reduces the cost of abnormal firmware recovery result testing based on PFR and improves testing efficiency.
[0046] See also Figure 1As shown, the embodiment of the present application discloses a method for determining a firmware recovery result based on PFR, which is applied to a preset test end, including:
[0047] Step S11: Based on a preset test start instruction, a test parameter setting document is generated, and the test parameter setting document is sent to the server to be tested, so that the server to be tested performs test environment configuration based on the test parameter setting document and generates corresponding environment configuration results.
[0048] In this embodiment, Figure 2 A specific firmware recovery result test diagram is shown. The server to be tested may include BMC firmware, BIOS (Basic Input Output System) firmware, server internal storage, SHELL environment, preset platform firmware recovery system PFR, and an external power supply is used to power the server to be tested. PFR is used to refresh the firmware information of the BMC to restore the abnormal situation of the BMC and maintain the BMC. The various modules inside the server to be tested can interact through external ports. It should be noted that before the test, the preset test terminal needs to be written into the SHELL environment of the server to be tested, or the connection between the preset test terminal and the server to be tested needs to be established through an external connection.
[0049] In this embodiment, the preset test end may include a preset interactive interface, a PFR automated test management system, an AC (Alternating Current) management module, a test database, a data analysis system, and a test abnormality alarm management module. When the preset test port interacts with the server to be tested, an external port management module and a data decoding module are also required.
[0050] In this embodiment, the external port management module can control the external communication between the PFR automated test management system and the server to be tested, adjust the information transmission priority of different modules during the external communication process, adjust the uplink and downlink sequence, and provide a temporary storage environment.
[0051] In this embodiment, the data decoding module is responsible for transcoding the data, instruction information, and instructions of the PFR automated test management system obtained through the external serial port. For the data uplink process, the data decoding module provides temporary data storage space when the target firmware is uploaded. Because the BMC and BIOS firmware have requirements for the communication format, the data decoding module can convert the PFR's preset power-on instruction and the current preset abnormal configuration command into the control format required by the corresponding component, and stably send the preset power-on instruction and the current preset abnormal configuration command. For the data downlink process, the data decoding module provides temporary storage space during the test data collection process, organizes the data and returns it to the PFR automated test management system, and temporarily stores the test results and instruction execution status fed back by the test system firmware, and sends them to the PFR automated management system in a unified manner.
[0052] In this embodiment, the preset interactive interface provides an interactive environment between the software system and the tester, collects setting parameters and setting information, and transmits relevant information to the PFR automated test management system. The user can click to start the test at the corresponding position of the preset interactive interface, that is, generate a preset test start instruction.
[0053] In this embodiment, the PFR automatic management system is the core system, which is responsible for the information flow of each system and module, test situation management and other functions. From the specific task architecture, it is mainly responsible for the following processes:
[0054] (1) Responsible for interacting with BIOS, BMC, and server internal storage to control information, monitor firmware operation, and collect test feedback in real time;
[0055] (2) Check the firmware version information, execute the firmware refresh program, and set up the firmware, software, and system test environment in the server to be tested;
[0056] (3) Obtain relevant information about user settings of the preset interactive interface, call relevant test processes of the test database according to the test requirements, and import the test parameter requirements and files into the test database;
[0057] (4) Controlling the AC management module through remote control commands, i.e., the current preset abnormal configuration command and the preset power-on command, indirectly controls the power system of the server to be tested, and actively generates an abnormal state of the BMC firmware;
[0058] (5) Package uploaded and downloaded files and perform logical control of information transmission between systems.
[0059] Step S12: If the obtained environment configuration result meets the first preset condition, the external power supply is controlled to stop supplying power to the server to be tested based on the current preset abnormal configuration command, and the target firmware in the server to be tested is restored by using the preset platform firmware recovery system.
[0060] In this embodiment, before controlling the external power supply to stop powering the server to be tested based on the current preset abnormal configuration command, it also includes: sending a preset temporary storage instruction to the target firmware of the server to be tested, so that the target firmware temporarily stores the firmware information to be uploaded, and then sending a preset refresh instruction to the target firmware, so that the target firmware uploads the firmware information to the preset platform firmware recovery system based on the preset refresh instruction.
[0061] In this embodiment, the recovering the target firmware in the server to be tested by using the preset platform firmware recovery system specifically includes: recovering the target firmware in the server to be tested by using the firmware information through the preset platform firmware recovery system.
[0062] In this embodiment, the AC management module can be configured separately, or the function of the AC management module can be embedded in the intelligent PDU (Power Distribution Unit). After receiving the corresponding power-off information, the AC management module cuts off the power supply interface corresponding to the server to be tested according to the program flow to trigger the abnormal situation.
[0063] Step S13: Based on the preset power-on instruction, the external power supply is controlled to start supplying power to the server to be tested, and it is determined whether the server to be tested currently meets the preset power-on status. If so, it is verified whether the version of the target firmware meets the second preset condition.
[0064] In this embodiment, after the data analysis system of the preset test end is tested, the data analysis system will automatically call the test standard from the test database and compare it, and compare the test data generated during the test according to the actual test requirements. Based on different single-round test results, the processing example is as follows:
[0065] (1) When there are differences in the test data of a single round, the analysis system will record the relevant differences and send the relevant information to the test abnormality alarm management module;
[0066] (2) If the test data cannot be obtained in a single round of testing, for example, the server to be tested does not return data normally, this situation will be recorded and the PFR test management system will be notified to increase the number of tests;
[0067] (3) If there is no difference in the data of a single round of testing and the verification is passed, the corresponding data will be classified and packaged.
[0068] In this embodiment, the test abnormality alarm management module of the preset test end is responsible for the alarm information of the corresponding data analysis system. According to the test settings, such as stopping due to a single round of test failure, not stopping due to a single round of failure, alarming due to a single round of test abnormality, and alarming after summary, the corresponding alarm instructions are sent to the preset interactive interface. After the preset interactive interface receives the alarm instruction, it will display the abnormal reminder information corresponding to the alarm instruction in a pop-up window or in the form of user settings to prompt the user of the test abnormality.
[0069] In this embodiment, the test database of the preset test end classifies and manages the setting parameters, setting methods, system information, server information and other contents required in the PFR test in the form of characteristic values, and records the preset test end automation process and the test methods of different server models. In addition, the test database is also responsible for recording the test data generated by each test in the test cycle, and the test comparison standards of different models of servers and different types of PFR systems. The test database can be remotely configured through the network, or it can be deployed by making a dedicated function disk.
[0070] Step S14: If the condition is met, the next preset exception configuration command is updated to the current preset exception configuration command, and the process jumps again to the step of controlling the external power supply to stop powering the server to be tested based on the current preset exception configuration command until the third preset condition is met to generate a test record, and then determine the recovery result of the target firmware by the preset platform firmware recovery system based on the test record.
[0071] In this embodiment, when the third preset condition is met, the re-jumping is stopped. The third preset condition is, for example, a preset cycle threshold, that is, the number of re-jumps meets the preset cycle threshold. After the preset test end completes all rounds of testing, the data analysis system organizes all test data, analyzes the data stability, and automatically generates test records.
[0072] It can be seen that the present application discloses a method for determining a firmware recovery result based on PFR, which generates a test parameter setting document based on a preset test start instruction, and sends the test parameter setting document to the server to be tested, so that the server to be tested performs a test environment configuration based on the test parameter setting document and generates a corresponding environment configuration result; if the acquired environment configuration result meets the first preset condition, the external power supply is controlled to stop powering the server to be tested based on the current preset abnormal configuration command, and the target firmware in the server to be tested is restored by using the preset platform firmware recovery system; the external power supply is controlled to start powering the service to be tested based on the preset power-on instruction, and it is determined whether the server to be tested currently meets the preset power-on state, and if so, whether the version of the target firmware meets the second preset condition; if so, the next preset abnormal configuration command is updated to the current preset abnormal configuration command, and the step of controlling the external power supply to stop powering the server to be tested based on the current preset abnormal configuration command is jumped again, until the third preset condition is met to generate a test record, and then the recovery result of the target firmware by the preset platform firmware recovery system is determined based on the test record. It can be seen that the present application does not require manual construction of the test environment or manual construction of a specific re-jump test. The subsequent steps of determining the firmware recovery results can be fully automatic based on the preset test start instructions, thereby reducing the time for setting up the test environment and re-jumping the test. The fully automatic firmware recovery result determination process improves the accuracy and seriousness of the results, and based on the automatically generated test parameter setting document, whether the server to be tested currently meets the preset power-on status, and whether the version of the target firmware meets the second preset condition, it can reflect the specific situation of the firmware recovery result in more detail.
[0073] See also Figure 3 As shown, the embodiment of the present application discloses a specific method for determining a firmware recovery result based on PFR, which is applied to a preset test end, including:
[0074] Step S21: Based on a preset test start instruction, a test parameter setting document is generated, and the test parameter setting document is sent to the server to be tested, so that the server to be tested performs test environment configuration based on the test parameter setting document and generates corresponding environment configuration results.
[0075] In this embodiment, before generating the test parameter setting document based on the preset test start instruction, it also includes: establishing a connection between the preset test terminal and the server to be tested through an external connection method; or, importing the test terminal into the SHELL environment of the server to be tested through a USB flash disk, so as to generate the test parameter setting document based on the preset test start instruction. The external connection method is, for example, a serial port or a network external connection method, and the USB flash disk is one of the storage media. The test terminal can also be imported into the SHELL environment of the server to be tested by using other storage media.
[0076] In this embodiment, if the method of importing through a USB flash drive or other storage media is used, it is necessary to configure the internal storage in the server to be tested to complete the test environment configuration of the server to be tested.
[0077] In this embodiment, before generating the test parameter setting document based on the preset test start instruction, it also includes: if the connection between the preset test end and the server to be tested is established through the external connection method, the original firmware version information of the target firmware is uploaded to the server to be tested, and the preset cycle threshold, the current preset abnormal configuration command and the test record saving path are set. It can be understood that the PFR automated test management system is run on the preset test end, the server to be tested is turned on, the data stability of the network or serial port is confirmed, the firmware information of the different versions of the BMC firmware to be refreshed is uploaded, and the test parameters are set, such as the original BMC version information of the server to be tested, which is used to compare the BMC recovery situation; the number of test laps is set, that is, the preset cycle threshold; the abnormal trigger mode is set, such as the trigger mode is a timed trigger mode, a random trigger within a period of time; and the test record saving path is set. Among them, the abnormal trigger mode is a mode of controlling the external power supply to stop power supply, such as timing control of the external power supply to stop power supply, and the external power supply can also be randomly controlled to stop power supply within a preset time period to simulate the abnormal situation of the BMC firmware.
[0078] Step S22: If the obtained environment configuration result meets the first preset condition, the external power supply is controlled to stop supplying power to the server to be tested based on the current preset abnormal configuration command, and the target firmware in the server to be tested is restored by using the preset platform firmware recovery system.
[0079] In this embodiment, if the environment configuration result satisfies the first preset condition, that is, if the environment configuration result indicates that the environment configuration is correct, then the external power supply is controlled to stop supplying power to the server to be tested based on the current preset abnormal configuration command, and the current preset abnormal configuration command may include an abnormal trigger mode to determine how to control the server to be tested to stop supplying power. After the power supply is stopped, the preset platform firmware recovery system uses the firmware information and the firmware version information to restore the target firmware to ensure that the target firmware is in a normal state. It is understandable that when the BMC is refreshed, the old BMC has been cleared and the new BMC has not been burned.
[0080] Step S23: Based on the preset power-on instruction, the external power supply is controlled to start supplying power to the server to be tested, and it is determined whether the server to be tested currently meets the preset power-on status.
[0081] In this embodiment, after a preset time period, the server to be tested may be powered on, that is, a preset power-on instruction is used to control the AC management module so that an external power source starts to power the server to be tested.
[0082] Step S24: If not satisfied, record a first abnormal log that the current state does not meet the preset power-on state, generate a first abnormal reminder message corresponding to the first abnormal log, and then display the first abnormal reminder message in a pop-up window through a preset interactive interface.
[0083] Step S25: If the condition is satisfied, then checking whether the version of the target firmware meets the second preset condition.
[0084] In this embodiment, after verifying whether the version of the target firmware satisfies the second preset condition, it also includes: if the version of the target firmware and the original firmware version information of the target firmware do not satisfy the second preset condition, then recording a second abnormality log that currently does not satisfy the second preset condition, and generating a second abnormality reminder information corresponding to the second abnormality log, and then displaying the second abnormality reminder information in a manner of displaying an image pop-up window through the preset interactive interface. It can be understood that the second preset condition can be that the version of the target firmware matches the original firmware version information of the target firmware.
[0085] Step S26: If the condition is met, the next preset exception configuration command is updated to the current preset exception configuration command, and the process jumps again to the step of controlling the external power supply to stop powering the server to be tested based on the current preset exception configuration command until the third preset condition is met to generate a test record, and then determine the recovery result of the target firmware by the preset platform firmware recovery system based on the test record.
[0086] In this embodiment, the step of re-jumping to the step of controlling the external power supply to stop power supply to the server to be tested based on the current preset abnormal configuration command until the third preset condition is met to generate a test record specifically includes: re-jumping to the step of controlling the external power supply to stop power supply to the server to be tested based on the current preset abnormal configuration command until the preset cycle threshold is met to generate a test record, and saving the test record based on the test record saving path.
[0087] It can be seen that this application realizes the automation of BMC recovery capability testing under abnormal conditions of the PFR system, reducing the time loss of manual test environment construction and cyclic testing. The fully automatic test process improves the accuracy of the test. It can automatically analyze the test results according to the standards required by the project and automatically generate test files. While reducing the workload of personnel, it can also reflect the test situation more accurately and meticulously.
[0088] See also Figure 4 As shown, the embodiment of the present application discloses a device for determining a firmware recovery result based on PFR, which is applied to a preset test end and includes:
[0089] The configuration result generating module 11 is used to generate a test parameter setting document based on a preset test start instruction, and send the test parameter setting document to the server to be tested, so that the server to be tested performs test environment configuration based on the test parameter setting document and generates a corresponding environment configuration result;
[0090] A recovery module 12, configured to control an external power supply to stop supplying power to the server to be tested based on a current preset abnormal configuration command if the obtained environment configuration result meets a first preset condition, and to use a preset platform firmware recovery system to recover the target firmware in the server to be tested;
[0091] A verification module 13 is used to control the external power supply to start powering the service to be tested based on a preset power-on instruction, and to determine whether the server to be tested currently meets a preset power-on state, and if so, to verify whether the version of the target firmware meets a second preset condition;
[0092] The result determination module 14 is used to update the next preset exception configuration command to the current preset exception configuration command if it is met, and jump again to the step of controlling the external power supply to stop power supply to the server to be tested based on the current preset exception configuration command until the third preset condition is met to generate a test record, and then determine the recovery result of the target firmware by the preset platform firmware recovery system based on the test record.
[0093] It can be seen that the present application discloses a method for determining a firmware recovery result based on PFR, which generates a test parameter setting document based on a preset test start instruction, and sends the test parameter setting document to the server to be tested, so that the server to be tested performs a test environment configuration based on the test parameter setting document and generates a corresponding environment configuration result; if the acquired environment configuration result meets the first preset condition, the external power supply is controlled to stop powering the server to be tested based on the current preset abnormal configuration command, and the target firmware in the server to be tested is restored by using the preset platform firmware recovery system; the external power supply is controlled to start powering the service to be tested based on the preset power-on instruction, and it is determined whether the server to be tested currently meets the preset power-on state, and if so, whether the version of the target firmware meets the second preset condition; if so, the next preset abnormal configuration command is updated to the current preset abnormal configuration command, and the step of controlling the external power supply to stop powering the server to be tested based on the current preset abnormal configuration command is jumped again, until the third preset condition is met to generate a test record, and then the recovery result of the target firmware by the preset platform firmware recovery system is determined based on the test record. It can be seen that the present application does not require manual construction of the test environment or manual construction of a specific re-jump test. The subsequent steps of determining the firmware recovery results can be fully automatic based on the preset test start instructions, thereby reducing the time for setting up the test environment and re-jumping the test. The fully automatic firmware recovery result determination process improves the accuracy and seriousness of the results, and based on the automatically generated test parameter setting document, whether the server to be tested currently meets the preset power-on status, and whether the version of the target firmware meets the second preset condition, it can reflect the specific situation of the firmware recovery result in more detail.
[0094] Furthermore, an embodiment of the present application also provides an electronic device. Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0095] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the following steps:
[0096] Based on the preset test start instruction, generate a test parameter setting document, and send the test parameter setting document to the server to be tested, so that the server to be tested performs test environment configuration based on the test parameter setting document and generates corresponding environment configuration results;
[0097] If the obtained environment configuration result meets the first preset condition, then based on the current preset abnormal configuration command, the external power supply is controlled to stop supplying power to the server to be tested, and the target firmware in the server to be tested is restored by using the preset platform firmware recovery system;
[0098] Based on the preset power-on instruction, the external power supply is controlled to start supplying power to the server to be tested, and it is determined whether the server to be tested currently meets the preset power-on state, and if so, whether the version of the target firmware meets the second preset condition;
[0099] If the condition is met, the next preset exception configuration command is updated to the current preset exception configuration command, and the process jumps again to the step of controlling the external power supply to stop powering the server to be tested based on the current preset exception configuration command until the third preset condition is met to generate a test record, and then determine the recovery result of the target firmware by the preset platform firmware recovery system based on the test record.
[0100] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:
[0101] Sending a preset temporary storage instruction to the target firmware of the server to be tested so that the target firmware temporarily stores the firmware information to be uploaded, and then sending a preset refresh instruction to the target firmware so that the target firmware uploads the firmware information to a preset platform firmware recovery system based on the preset refresh instruction;
[0102] Correspondingly, the use of the preset platform firmware recovery system to recover the target firmware in the server to be tested includes:
[0103] The preset platform firmware recovery system uses the firmware information to recover the target firmware in the server to be tested.
[0104] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:
[0105] If it is not satisfied, a first abnormal log that the current state does not meet the preset power-on state is recorded, and a first abnormal reminder message corresponding to the first abnormal log is generated, and then the first abnormal reminder message is displayed through a preset interactive interface by displaying an image pop-up window.
[0106] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:
[0107] If the version of the target firmware and the original firmware version information of the target firmware do not meet the second preset condition, a second exception log that currently does not meet the second preset condition is recorded, and a second exception reminder information corresponding to the second exception log is generated, and then the second exception reminder information is displayed by displaying an image pop-up window through the preset interactive interface.
[0108] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:
[0109] Re-jump to the step of controlling the external power supply to stop powering the server to be tested based on the current preset abnormal configuration command until the preset cycle threshold is met to generate a test record, and save the test record based on the test record saving path.
[0110] In some specific implementations, the processor can implement the following steps by executing the computer program stored in the memory:
[0111] Establishing a connection between the preset test terminal and the server to be tested through an external connection method;
[0112] Alternatively, the test terminal is imported into the SHELL environment of the server to be tested by means of a USB flash drive, so as to generate a test parameter setting document based on a preset test start instruction.
[0113] In some specific implementations, the processor may further include the following steps by executing the computer program stored in the memory:
[0114] If the connection between the preset test end and the server to be tested is established through the external connection method, the original firmware version information of the target firmware is uploaded to the server to be tested, and the preset cycle threshold, the current preset abnormal configuration command and the test record saving path are set.
[0115] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0116] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0117] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.
[0118] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, which can be Windows, Unix, Linux, etc. In addition to including a computer program that can be used to complete the PFR-based firmware recovery result determination method performed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to data transmitted from an external device received by the electronic device, the data 223 can also include data collected by its own input and output interface 25, etc.
[0119] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the method steps performed in the process of determining the firmware recovery result based on PFR disclosed in any of the aforementioned embodiments are implemented.
[0120] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0121] The above is a detailed introduction to a method, device, equipment and medium for determining a firmware recovery result based on PFR provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for determining firmware recovery results based on PFR, It is characterized in that Applicable to the preset test terminals, including: Based on the preset test start instruction, generate a test parameter setting document, and send the test parameter setting document to the server to be tested, so that the server to be tested performs test environment configuration based on the test parameter setting document and generates corresponding environment configuration results; If the obtained environment configuration result meets the first preset condition, then based on the current preset abnormal configuration command, the external power supply is controlled to stop supplying power to the server to be tested, and the target firmware in the server to be tested is restored by using the preset platform firmware recovery system; Based on the preset power-on instruction, the external power supply is controlled to start supplying power to the server to be tested, and it is determined whether the server to be tested currently meets the preset power-on state, and if so, whether the version of the target firmware meets the second preset condition; If the condition is met, the next preset exception configuration command is updated to the current preset exception configuration command, and the process jumps again to the step of controlling the external power supply to stop powering the server to be tested based on the current preset exception configuration command until the third preset condition is met to generate a test record, and then determine the recovery result of the target firmware by the preset platform firmware recovery system based on the test record.
2. The method for determining a firmware recovery result based on PFR according to claim 1, It is characterized in that Before the external power supply is controlled to stop supplying power to the server to be tested based on the current preset abnormal configuration command, the method further includes: Sending a preset temporary storage instruction to the target firmware of the server to be tested so that the target firmware temporarily stores the firmware information to be uploaded, and then sending a preset refresh instruction to the target firmware so that the target firmware uploads the firmware information to a preset platform firmware recovery system based on the preset refresh instruction; Correspondingly, the use of the preset platform firmware recovery system to recover the target firmware in the server to be tested includes: The preset platform firmware recovery system uses the firmware information to recover the target firmware in the server to be tested.
3. The method for determining a firmware recovery result based on PFR according to claim 1, It is characterized in that After determining whether the server to be tested currently meets the preset startup state, the method further includes: If it is not satisfied, a first abnormal log that the current state does not meet the preset power-on state is recorded, and a first abnormal reminder message corresponding to the first abnormal log is generated, and then the first abnormal reminder message is displayed through a preset interactive interface by displaying an image pop-up window.
4. The method for determining a firmware recovery result based on PFR according to claim 3, It is characterized in that After the checking whether the version of the target firmware meets the second preset condition, the method further includes: If the version of the target firmware and the original firmware version information of the target firmware do not meet the second preset condition, a second exception log that currently does not meet the second preset condition is recorded, and a second exception reminder information corresponding to the second exception log is generated, and then the second exception reminder information is displayed by displaying an image pop-up window through the preset interactive interface.
5. The method for determining a firmware recovery result based on PFR according to claim 4, It is characterized in that The step of re-jumping to the step of controlling the external power supply to stop powering the server to be tested based on the current preset abnormal configuration command until a third preset condition is met to generate a test record includes: Re-jump to the step of controlling the external power supply to stop powering the server to be tested based on the current preset abnormal configuration command until the preset cycle threshold is met to generate a test record, and save the test record based on the test record saving path.
6. The method for determining a firmware recovery result based on PFR according to claim 5, It is characterized in that Before generating the test parameter setting document based on the preset test start instruction, the method further includes: Establishing a connection between the preset test terminal and the server to be tested through an external connection method; Alternatively, the test terminal is imported into the SHELL environment of the server to be tested by means of a USB flash drive, so as to generate a test parameter setting document based on a preset test start instruction.
7. The method for determining a firmware recovery result based on PFR according to claim 6, It is characterized in that Before generating the test parameter setting document based on the preset test start instruction, the method further includes: If the connection between the preset test end and the server to be tested is established through the external connection method, the original firmware version information of the target firmware is uploaded to the server to be tested, and the preset cycle threshold, the current preset abnormal configuration command and the test record saving path are set.
8. A firmware recovery result determination device based on PFR, It is characterized in that Applicable to the preset test end, including: A configuration result generating module, used to generate a test parameter setting document based on a preset test start instruction, and send the test parameter setting document to the server to be tested, so that the server to be tested performs test environment configuration based on the test parameter setting document and generates a corresponding environment configuration result; A recovery module, configured to control an external power supply to stop supplying power to the server to be tested based on a current preset abnormal configuration command if the obtained environment configuration result meets a first preset condition, and to recover the target firmware in the server to be tested using a preset platform firmware recovery system; A verification module, configured to control the external power supply to start supplying power to the service to be tested based on a preset power-on instruction, and to determine whether the server to be tested currently meets a preset power-on state, and if so, to verify whether the version of the target firmware meets a second preset condition; The result determination module is used to update the next preset exception configuration command to the current preset exception configuration command if it is met, and jump again to the step of controlling the external power supply to stop power supply to the server to be tested based on the current preset exception configuration command until the third preset condition is met to generate a test record, and then determine the recovery result of the target firmware by the preset platform firmware recovery system based on the test record.
9. An electronic device, It is characterized in that include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the method for determining a firmware recovery result based on PFR according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that Used to store a computer program; wherein, when the computer program is executed by a processor, the steps of the method for determining a firmware recovery result based on PFR according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
PFR function test method, device and equipment and readable storage medium
CN113722170A
BIOS firmware recovery method and system based on PFR, terminal and storage medium
CN114116305A