A method, device, electronic device and storage medium for elastic testing of server platform firmware
By automatically generating and sending configuration scripts at the test terminal, the automated process of firmware elastic testing of the server platform is realized, solving the problems of cumbersome testing and low accuracy, and improving testing efficiency and accuracy.
Patent Information
- Application Number
- CN202211599783.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-12-14
AI Technical Summary
The existing technology has problems such as cumbersome testing of server platform firmware elasticity testing, time-consuming and low accuracy, and cannot automatically cyclically realize PFR option settings, restarts and result verification, resulting in insufficient testing efficiency and accuracy.
By receiving test parameter setting data at the test terminal, generating parameter configuration scripts and sending setting instructions to the server to be tested, recording the number of tests, verifying the stability of the platform firmware elastic module, and restoring the module status when the preset conditions are met, and cyclically updating the test configuration parameters to realize an automated test process.
It reduces manual testing time, improves testing efficiency and accuracy, and can automatically restart and verify the stability of the platform firmware elastic module, ensuring the accuracy and consistency of test results.
Smart Images

Figure CN115840703B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of server testing, and in particular to a server platform firmware elasticity testing method, a server platform firmware elasticity testing device, an electronic device and a storage medium. Background Art
[0002] 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 when an abnormal situation occurs in the server firmware. Whether the PFR function can play its role in a timely and effective manner is an important factor in ensuring the safe operation of the server. During the PFR setting process, the server is in an unstable state and is prone to server crashes caused by errors in writing setting information. Therefore, the server testing phase needs to test the PFR function implementation, working stability, and abnormal situation handling. The PFR setting cycle test is highly professional and requires testers to have an in-depth understanding of the test document requirements and use corresponding tools for testing. The test steps are cumbersome, time-consuming, and require a large amount of manpower investment.
[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, driver and other software, and configure the operating system environment. Then, manually set the PFR function in the shell environment or OS (operating system) environment according to the test requirements, and verify the stability of PFR when setting different options by loop setting and loop restart, and collect the corresponding test data for analysis. In view of the high professionalism of PFR testing and the complex tools used, the problem can be solved by functional integration. It can realize partial automation of information collection and software organization in PFR testing, which can simplify the test process to a certain extent and improve the test efficiency. However, the existing technical solution is not suitable for the actual situation of PFR setting loop test, and it is impossible to automatically loop to realize the PFR option setting, restart, and setting result verification process, nor can it realize the stability detection of PFR function. Testers still need to manually configure the test environment, manually test according to the design use case, manually set the corresponding parameters, check the server parameter settings after restarting, and analyze the data results, resulting in a long test time and low accuracy. Summary of the invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a server platform firmware elasticity testing method, a server platform firmware elasticity testing device, an electronic device and a storage medium that overcome the above problems or at least partially solve the above problems.
[0005] In the first aspect of the present invention, embodiments of the present invention disclose a method for elastic testing of server platform firmware, which is applied to a test terminal. The test terminal is connected to a server to be tested, and the server to be tested is provided with a platform firmware elastic module. The method includes:
[0006] After the server to be tested enters the test environment, receiving test parameter setting data; the test parameter setting data includes the number of tests and a plurality of test configuration parameters;
[0007] Generating a parameter configuration script based on the target test configuration parameter;
[0008] Generating a setting instruction and a restoration instruction according to the parameter configuration script, sending the setting instruction to the server to be tested, and recording the generated number of tested times; the server to be tested is used to configure the platform firmware elastic module according to the setting instruction and restart after the configuration is completed;
[0009] During the restart process of the server to be tested, verifying the platform firmware elastic module and generating verification information;
[0010] When the verification information meets the preset stability condition, sending the restoration instruction to the server to be tested; the server to be tested is also used to restore the platform firmware elastic module according to the restoration instruction;
[0011] Updating the target test configuration parameter from the plurality of test configuration parameters according to the number of tested times, and continuing to execute the step of generating a parameter configuration script based on the target test configuration parameter until the number of tested times is equal to the number of tests.
[0012] Optionally, the test parameter setting data further includes environment configuration parameters, and the method further includes:
[0013] Generating an environment configuration file according to the environment configuration parameter;
[0014] Sending the environment configuration file to the server to be tested, and the server to be tested is also used to configure the test environment based on the environment configuration file.
[0015] Optionally, the method further includes:
[0016] When the verification information does not meet the preset stability condition, collecting the configuration state of the platform firmware elastic module and generating a test failure message.
[0017] Optionally, the method further includes:
[0018] Visualizing the test failure message to generate an image pop-up window;
[0019] Display the image pop-up window.
[0020] Optionally, the platform firmware elasticity module corresponds to a complex programmable logic CPLD register. The step of verifying the platform firmware elasticity module and generating verification information includes:
[0021] Collect status parameters in the CPLD register to generate working mode information;
[0022] Determine the working mode information as the verification information.
[0023] Optionally, the preset stability condition is that the verification information includes a restart identification value and a target version identification value. The method further includes:
[0024] When the verification information includes the restart identification value and the target version identification value, determine that the verification information meets the preset stability condition;
[0025] When the verification information does not include at least one of the restart identification value and the target version identification value, determine that the verification information does not meet the preset stability condition.
[0026] Optionally, the multiple test configuration parameters correspond to the number of tests performed. The step of updating the target test configuration parameter from the multiple test configuration parameters according to the number of tests performed includes:
[0027] From the multiple test configuration parameters, determine the test configuration parameter corresponding to the number of tests performed as the target test configuration parameter.
[0028] In a second aspect of the present invention, an embodiment of the present invention also discloses a server platform firmware elasticity testing device, which is applied to a test terminal. The test terminal is connected to a server under test, and the server under test is provided with a platform firmware elasticity module. The device includes:
[0029] A receiving module, configured to receive test parameter setting data after the server under test enters a test environment; the test parameter setting data includes the number of tests and multiple test configuration parameters;
[0030] A parameter configuration script generation module, configured to generate a parameter configuration script based on the target test configuration parameter;
[0031] A first sending module, configured to generate a setting instruction and a restoration instruction according to the parameter configuration script, send the setting instruction to the server under test, and record the number of tests performed; the server under test is configured to configure the platform firmware elasticity module according to the setting instruction and restart after the configuration is completed;
[0032] A verification module, configured to verify the platform firmware elasticity module during the restart process of the server to be tested, and generate verification information;
[0033] A second sending module, configured to send the restoration instruction to the server to be tested when the verification information meets a preset stability condition; the server to be tested is further configured to restore the platform firmware elasticity module according to the restoration instruction;
[0034] A loop module, configured to update the target test configuration parameter from the multiple test configuration parameters according to the number of tested times, and continue to execute the step of generating a parameter configuration script based on the target test configuration parameter until the number of tested times is equal to the number of tests.
[0035] In a third aspect of the present invention, an embodiment of the present invention discloses an electronic device, including a processor, a memory, and a computer program stored on the memory and capable of running on the processor. When the computer program is executed by the processor, the steps of the server platform firmware elasticity testing method described above are implemented.
[0036] In a fourth aspect of the present invention, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the server platform firmware elasticity testing method described above are implemented.
[0037] Embodiments of the present invention include the following advantages:
[0038] In an embodiment of the present invention, after the server under test enters the test environment, test parameter setting data is received; the test parameter setting data includes the number of tests and multiple test configuration parameters; based on the target test configuration parameter, a parameter configuration script is generated; a setting instruction and a restoration instruction are generated according to the parameter configuration script, the setting instruction is sent to the server under test, and the number of tested times generated is recorded; the server under test is used to configure the platform firmware elastic module according to the setting instruction and restart after the configuration is completed; during the restart process of the server under test, the platform firmware elastic module is verified to generate verification information; when the verification information meets the preset stability condition, the restoration instruction is sent to the server under test; the server under test is also used to restore the platform firmware elastic module according to the restoration instruction; the target test configuration parameter is updated from the multiple test configuration parameters according to the number of tested times, and the step of generating a parameter configuration script based on the target test configuration parameter is continued until the number of tested times is equal to the number of tests. By determining the parameter configuration script based on the target test configuration parameter and sending the setting instruction to the server under test based on the parameter configuration script, the server automatically configures the platform firmware elastic module according to the setting instruction, reducing the time loss of manual testing and the time consumption of testing; the entire test for the platform firmware elastic module is carried out according to the parameter configuration script and can be automatically restarted for the next round of testing, enabling the automatic cyclic testing process of the platform firmware elastic module to improve the timeliness of testing; and the stability of the platform firmware elastic module is verified during the server restart process, making the test results more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a flowchart of the steps of an embodiment of a method for testing the elasticity of the platform firmware of a server according to the present invention;
[0040] Figure 2 is a flowchart of the steps of another embodiment of a method for testing the elasticity of the platform firmware of a server according to the present invention;
[0041] Figure 3 is a schematic diagram of the functional modules of an embodiment of a method for testing the elasticity of the platform firmware of a server according to the present invention;
[0042] Figure 4 is a block diagram of the structure of an embodiment of a device for testing the elasticity of the platform firmware of a server according to the present invention;
[0043] Figure 5 is a block diagram of the structure of an electronic device provided by an embodiment of the present invention;
[0044] Figure 6 is a block diagram of the structure of a storage medium provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] To make the above objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0046] Refer to Figure 1 , which shows a step flowchart of an embodiment of a method for elastic testing of server platform firmware. The method for elastic testing of server platform firmware is applied to a test terminal, the test terminal is connected to a server to be tested, and the server to be tested is provided with a platform firmware resilience module.
[0047] In an embodiment of the present invention, the test terminal can be a dedicated test device or a test computer formed by configuring relevant test hardware on a general-purpose computer. The present invention does not limit this. The connection between the test terminal and the server to be tested can be through a serial port hardware connection or a wireless connection such as a network. In the server to be tested, a platform firmware resilience (PFR) module is provided, and the PFR function is realized through the operation of the PFR module.
[0048] The method for elastic testing of server platform firmware specifically may include the following steps:
[0049] Step 101, after the server to be tested enters the test environment, receive test parameter setting data; the test parameter setting data includes the number of tests and multiple test configuration parameters;
[0050] In an embodiment of the present invention, the test environment can be a shell environment or an OS environment. Testing can only be carried out after the server to be tested enters the test environment. The tester can input the test parameter setting data through information interaction with the test terminal. The test parameter setting data can include the number of tests that need to be cycled during the test, and during different cycle tests, the test configuration parameters including options and their contents corresponding to each test; that is, the test parameter setting data includes the number of tests and multiple test configuration parameters. The test terminal receives the input test parameter setting data.
[0051] Step 102, generate a parameter configuration script based on the target test configuration parameters;
[0052] After receiving the parameter setting data, based on the current round of testing, obtain the target test configuration parameters corresponding to the current round of testing, and generate a parameter configuration script based on the target test configuration parameters. The parameter configuration script is used to set the test content.
[0053] Step 103: Generate a setting instruction and a restoration instruction according to the parameter configuration script, send the setting instruction to the server under test, and record the generated number of tested times; the server under test is used to configure the platform firmware elastic module according to the setting instruction and restart after the configuration is completed;
[0054] Start the test. Multiple setting instructions can be generated according to the parameter configuration script. Different setting instructions correspond to different test contents; for example, testing the enabling of the PFR function, the disabling of the PFR function, setting the PFR restoration firmware order, setting the PFR restoration firmware mode, etc. Send the generated setting instruction to the server under test. After receiving the setting instruction, the server under test configures the parameters of the platform firmware elastic module according to the instruction of the setting instruction, so that the configured platform firmware elastic module runs on the server under test, and restart the server under test after the configuration is completed to verify whether the configured platform firmware elastic module realizes the function. And record the generated number of tested times for this test. Among them, the initial number of tested times can be the value of "0", and the number of tested times increases by one for each test.
[0055] In addition, a restoration instruction can also be generated according to the number configuration script. The configuration options of the restoration instruction and the setting instruction are the same, but the configuration content is the initial state of the platform firmware elastic module in the server under test. The server under test can restore the platform firmware elastic module by executing the restoration instruction, so that the initial state of the platform firmware elastic module remains unchanged during each test, improving the accuracy of the test.
[0056] Step 104: During the restart process of the server under test, verify the platform firmware elastic module and generate verification information;
[0057] Since the platform firmware elastic module runs when the server under test restarts to protect the security of the firmware of the server under test; therefore, in actual application, during the restart process after the configuration of the platform firmware elastic module is completed, verify the platform firmware elastic module to test whether the configuration status of the platform firmware elastic module under different configurations is normal, so that the server under test runs normally and safely; the test terminal can read the running log of the platform firmware elastic module to verify the platform firmware elastic module and generate verification information.
[0058] Step 105: When the verification information meets the preset stability condition, send the restoration instruction to the server under test; the server under test is also used to restore the platform firmware elastic module according to the restoration instruction;
[0059] After obtaining the verification information, it is possible to determine whether the verification information meets the preset stability condition. When the verification information meets the preset stability condition, that is, the platform firmware elastic module can achieve the function of protecting the firmware security of the server under test, the test terminal can send a restoration instruction to the server under test. The server under test executes the restoration instruction to restore the platform firmware elastic module according to the restoration instruction, so that the platform firmware elastic module can be guaranteed to be consistent before each test starts, improving the accuracy of the test.
[0060] Step 106: Update the target test configuration parameter from the multiple test configuration parameters according to the number of tested times, and continue to execute the step of generating a parameter configuration script based on the target test configuration parameter until the number of tested times is equal to the number of tests.
[0061] After the platform firmware elastic module is restored, a new round of tests can be performed on the platform firmware elastic module; the target test configuration parameter can be updated from multiple test configuration parameters according to the number of tested times, and tests can be performed with the new round of target test configuration parameters. Continue to generate a parameter configuration script based on the target test configuration parameter, so that new setting instructions can be generated to configure the platform firmware elastic module differently and test its stability. Loop until the number of tested times is the same as the number of tests, then stop the test.
[0062] In an embodiment of the present invention, after the server under test enters the test environment, test parameter setting data is received; the test parameter setting data includes the number of tests and a plurality of test configuration parameters; based on the target test configuration parameter, a parameter configuration script is generated; a setting instruction and a restoration instruction are generated according to the parameter configuration script, the setting instruction is sent to the server under test, and the number of tested times generated is recorded; the server under test is used to configure the platform firmware elastic module according to the setting instruction and restart after the configuration is completed; during the restart process of the server under test, the platform firmware elastic module is verified to generate verification information; when the verification information meets the preset stability condition, the restoration instruction is sent to the server under test; the server under test is further used to restore the platform firmware elastic module according to the restoration instruction; the target test configuration parameter is updated from the plurality of test configuration parameters according to the number of tested times, and the step of generating a parameter configuration script based on the target test configuration parameter is continued until the number of tested times is equal to the number of tests. By determining the parameter configuration script based on the target test configuration parameter, sending the setting instruction to the server under test based on the parameter configuration script, and the server automatically configuring the platform firmware elastic module according to the setting instruction, the time loss of manual testing is reduced, and the testing time is reduced; the entire test of the platform firmware elastic module is carried out according to the parameter configuration script, and can be automatically restarted for the next round of testing, so that the process of automatically looping and testing the platform firmware elastic module is improved, and the timeliness of testing is improved; and the stability of the platform firmware elastic module is verified during the restart process of the server, making the test results more accurate.
[0063] Referring to Figure 2 , a step flowchart of another embodiment of the server platform firmware elasticity test method of the present invention is shown. The server platform firmware elasticity test method is applied to a test terminal, and the test terminal is connected to the server under test, and the server under test is provided with a platform firmware elastic module. Specifically, for the hardware function modules of the test terminal and the server under test, reference can be made to Figure 3 ; the test terminal includes: an external serial port management module, a data decoding module, an interaction interface, a test database, a data analysis system, a test exception alarm management module, and a PFR automation management system.
[0064] The external serial port management module controls the external communication between the PFR automation test management system and the server under test, adjusts the information transfer priority of different modules during the external communication process, adjusts the uplink and downlink order, and provides a temporary storage environment.
[0065] The data decoding module is responsible for the instruction transcoding of the data and instruction information obtained from the external serial port and the PFR automated test management system. For the data upload process, it provides a temporary storage space for the data during firmware upload, converts the PFR control instructions into the control formats required by the corresponding components, and stably sends the control instructions. For the data download process, it provides a temporary storage space during the test data acquisition process, sorts out the data and then sends it back to the PFR automated test management system. Classifies and temporarily stores the test results and instruction execution status feedback by the test system firmware, and uniformly sends them to the PFR automated management system.
[0066] The interactive interface provides an interactive environment with the testers, collects the setting parameters and setting information, and transfers the relevant information to the PFR automated test management system.
[0067] The test database classifies and manages the setting parameters, setting methods, system information, server information, etc. required in the PFR test in the form of eigenvalue, and at the same time records the software automation process and the test methods for different server models. In addition, it is also responsible for recording the test data generated in each test during the test cycle and the test comparison criteria for different models of servers and different types of PFR systems. The test database can be remotely configured via the network or deployed by making a dedicated function disk.
[0068] The data analysis system, after the test is completed, the data analysis will automatically call the test standards and comparison steps from the test database, and compare the test data generated during the test according to the set test requirements. For different single-round test result situations, the following steps are carried out: 1. In the case of differences in the single-round test data, the analysis system will record the relevant differences and send the relevant information to the test exception alarm management module. 2. In the case where the test data cannot be obtained in a single-round test (the server 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. 3. In the case where there are no differences in the single-round test data and the verification passes, the corresponding data will be classified and packaged. After all rounds of tests are completed, all test data will be sorted out, the data stability will be analyzed, and a test report will be automatically generated.
[0069] The test exception alarm management module is responsible for the alarm information of the corresponding data analysis system, and sends the corresponding alarm instructions to the interactive interface according to the test settings (stop on single-round test failure / do not stop on single-round test failure; single-round test exception alarm / alarm after summary). After receiving the alarm instruction, the interactive interface will prompt the user of the test exception in the form of a pop-up window or the user's settings.
[0070] The PFR automated management system undertakes functions such as information transfer and test situation management for each system. In terms of the specific task architecture, it is mainly responsible for the following processes: 1. Responsible for interacting with the BMC (Baseboard Management Controller), BIOS (Basic Input Output System), and internal storage of the server to control information, monitoring the firmware operation status, and collecting test situation feedback in real time. 2. Checking the firmware version information, executing the firmware update program, and setting the server firmware, software, and system test environment. 3. Obtaining the user setting information of the interaction interface, calling the relevant test processes in the test database according to the test requirements, and importing the test parameter requirements and files into the test database. 4. Setting the specific function options of the PFR through remote control instructions. 5. Packing the uploaded and downloaded files and performing logical control of information transfer between systems.
[0071] The server to be tested may include: BIOS firmware, BMC firmware, PFR module, internal storage, and Shell environment configuration module. Among them, the platform firmware flexibility module corresponds to complex programmable logic CPLD registers.
[0072] The server platform firmware flexibility test method may specifically include the following steps:
[0073] Step 201, after the server to be tested enters the test environment, receiving test parameter setting data; the test parameter setting data includes the number of tests, multiple test configuration parameters, and environment configuration parameters;
[0074] In the embodiment of the present invention, the server to be tested can import the test system directly into the test environment such as the SHELL of the server to be tested through external methods such as serial ports and networks, or through the USB flash drive. After the server to be tested enters the test environment, the tester can manually set the test parameter setting data imported into the test terminal; the test terminal can interact with the tester through the interaction interface and receive the test parameter setting data. The test parameter setting data includes the number of tests, multiple test configuration parameters, and environment configuration parameters.
[0075] Step 202, generating an environment configuration file according to the environment configuration parameters;
[0076] After receiving the parameter setting data, the test environment parameter setting data can be integrated to generate an environment configuration file to configure the PFR test environment of the server to be tested. The server to be tested is configured through the environment configuration file to form test environments with different configurations.
[0077] In practical applications, the parameter setting data that testers can input includes environment configuration parameters. Environment configuration parameters refer to the data set for the test environment and include various indicators of the test environment. When obtaining the environment configuration parameters, the entire set of environment configuration parameters can be packaged, encoded, and an environment configuration file can be generated.
[0078] Step 203: Send the environment configuration file to the server under test, and the server under test is also used to configure the test environment based on the environment configuration file.
[0079] The generated environment configuration file can be sent to the server under test. When the test environment is running, the server under test configures the test environment according to the environment configuration file, making the test environment match the parameters in the environment configuration file, and can send a configuration completion signal to the test terminal after the configuration is completed to indicate that the test environment configuration is completed.
[0080] Step 204: Generate a parameter configuration script based on the target test configuration parameters.
[0081] Determine the target test configuration parameters from multiple test configuration parameters, integrate the target test configuration parameters, and generate a parameter configuration script.
[0082] In practical applications, the test parameter setting data input by testers can include test options and test configuration parameters corresponding to the test options. Among them, there is a corresponding relationship between the test options and the test configuration parameters, that is, one test option corresponds to at least one test configuration parameter. The test option is a test item, and the test configuration parameter is the set target value corresponding to the test option. The test options for the target test configuration parameters are associated with the corresponding test configuration parameters, the test configuration parameters are classified based on the test options, and a mapping relationship is established. The mapping relationships corresponding to each test configuration parameter are packaged and integrated, and encoded to generate a parameter configuration script.
[0083] Step 205: Generate a setting instruction and a restoration instruction according to the parameter configuration script, send the setting instruction to the server under test, and record the number of times the test has been generated; the server under test is used to configure the platform firmware elastic module according to the setting instruction and restart after the configuration is completed.
[0084] After obtaining the parameter configuration script, a setting instruction and a restoration instruction can be generated according to the parameter configuration script; and the setting instruction is sent to the server under test, and the server under test configures the platform firmware elastic module based on the setting instruction. During the configuration, the number of times the test has been generated is recorded. After the configuration is completed, the server under test is restarted to verify the performance of the PFR. The restoration instruction is used to restore the configured platform firmware elastic module.
[0085] In practical applications, different test contents of the parameter configuration script have different priorities, that is, different test options have different priorities; the setting order can be determined according to the priorities of the mapping relationship to determine the function order of testing the PFR during the test process. According to the setting order, the test configuration parameters corresponding to the corresponding test options can be encoded and converted into setting instructions for the test content to control the server under test to perform the test.
[0086] Step 206, during the restart process of the server under test, verify the platform firmware elasticity module to generate verification information;
[0087] During the restart process of the server under test, the platform firmware elasticity module can be verified by collecting data corresponding to the working state of the platform firmware elasticity module to generate verification information.
[0088] Specifically, the step of verifying the platform firmware elasticity module to generate verification information specifically includes the following sub-steps:
[0089] Sub-step S2061, collect the status parameters in the CPLD register to generate working mode information;
[0090] In practical applications, the CPLD register stores the working parameters of the platform firmware elasticity module. Therefore, the status parameters stored in the CPLD register can be collected to generate the working mode information of the platform firmware elasticity module.
[0091] Sub-step S2062, determine the working mode information as the verification information;
[0092] The working mode information may include whether it works normally and the version used; these working mode information can be determined as verification information.
[0093] Step 207, when the verification information meets the preset stability condition, send the restoration instruction to the server under test; the server under test is further configured to restore the platform firmware elasticity module according to the restoration instruction;
[0094] In the embodiment of the present invention, the preset stability condition is that the verification information includes a restart identification value and a target version identification value. Among them, the restart identification value is used to represent successful restart. When there is a restart identification value, that is, the server under test restarts successfully. The version identification value is the version information used by the platform firmware elasticity module; such as version 1, version 2; the target version identification value is the version identification value that can enable the platform firmware elasticity module to start and be used normally, and the target version identification value can be set in advance.
[0095] After obtaining the verification information, it is possible to first determine whether the verification information meets the preset stability condition. When the verification information includes a restart identification value and a target version identification value, it is determined that the verification information meets the preset stability condition.
[0096] Conversely, when the verification information does not include at least one of the restart identification value and the target version identification value, that is, the verification information does not have a restart identification value, or the version identification value is not the target version identification value, it is determined that the verification information does not meet the preset stability condition.
[0097] When the verification information meets the preset stability condition, that is, the current test is successful, the restoration instruction is sent to the server under test, and the server under test restores the platform firmware elastic module according to the restoration instruction, so that the platform firmware elastic module returns to its initial value, facilitating the next test.
[0098] Step 208, when the verification information does not meet the preset stability condition, collect the configuration status of the platform firmware elastic module and generate a test failure message;
[0099] When the verification information does not meet the preset stability condition, that is, the current test fails, the configuration status of the platform firmware elastic module can be collected, and the state in which the service after the platform firmware elastic module will fail is collected to generate a test failure message, facilitating error analysis by the tester.
[0100] Step 209, visualize the test failure message to generate an image pop-up window;
[0101] When a test failure is generated, that is, the test parameter setting data input by the tester will cause a running error in the platform firmware elastic module, the test failure message can be visualized to generate an image pop-up window.
[0102] Step 210, display the image pop-up window;
[0103] The image pop-up window is displayed on the interaction interface to inform the tester of the test failure result, so that the tester can make improvements.
[0104] Step 211, update the target test configuration parameter from the multiple test configuration parameters according to the number of tests performed, and continue to execute the step of generating a parameter configuration script based on the target test configuration parameter until the number of tests performed is equal to the number of tests.
[0105] After the platform firmware elastic module is restored, the target test configuration parameter can be updated from the multiple test configuration parameters according to the number of tests performed.
[0106] Specifically, the multiple test configuration parameters correspond to the number of times tested. The test configuration parameter corresponding to the number of times tested can be determined from the multiple test configuration parameters as the target test configuration parameter.
[0107] And use the updated target test configuration parameter as the test configuration parameter for the new round, generate a new parameter configuration script, and conduct the next round of tests until the number of times tested is the same as the pre-set number of times tested, meeting the test requirements.
[0108] The embodiment of the present invention realizes the automation of PFR setting tests, reduces the time loss of manual test environment setup and testing, reduces the test time, and improves the test efficiency; the entire test process avoids manual participation, and the fully automatic test process improves the test accuracy; and it can automatically analyze the test results according to the standards required by the project, automatically generate test result files, reducing the workload of personnel while more accurately and meticulously reflecting the test situation.
[0109] To enable those skilled in the art to better understand the embodiments of the present invention, the embodiments of the present invention are illustrated below through an example:
[0110] Refresh the test-specific BMC and BIOS firmware according to the actual requirements of the test project.
[0111] Connect the test computer to the server under test through serial port or network. Run the PFR automated test management system on the test computer. Power on the server under test and confirm the stability of network / serial port data. Upload the firmware file and perform test parameter settings: 1. Settings options to be tested 2. Select the restart mode 3. Log verification mode 4. Set the log save path.
[0112] Click Start Test on the test computer. The test management system will automatically generate a document for the test parameter settings of this time and send it to the server under test through the external port. The configuration file on the server under test will automatically run under SHELL to configure the test environment. After completion, the configuration result will be sent to the test computer through the serial port. After receiving the correct configuration feedback, the test computer will send a serial port instruction to the environment configuration script in the server Shell environment. The script will perform configuration setting operations according to the corresponding requirements, such as setting the enabling of the PFR function, the disabling of the PFR function, setting the PFR restore firmware order, setting the PFR restore firmware mode, etc. options. Then, the script will obtain the PFR working mode information by executing the parameters read from the CPLD register to verify whether the setting is correctly completed.
[0113] After the settings are completed, the server will power off or restart the server as required by the setting changes. The test computer will collect the parameter information during the restart process through the serial port, and analyze whether the server is in the boot process under the corresponding settings. For example, when the PFR function is enabled, there will be a process of verifying the server firmware information during the power-off and restart process.
[0114] If the PFR settings are normal, the server should start normally and enter the Shell environment again. The test script under Shell will check the relevant information about the PFR working status in the CPLD register again. If the verification is normal, the current test is normal, and the test system obtains the relevant test results through the serial port. After that, the script will restore the options changed in this test, repeat the above process, record the information, and perform loop tests to verify the stability.
[0115] If the server cannot start normally during the loop process, an error occurs during the PFR setting process, the current round of testing fails, and the system will automatically record the abnormal situation and report an error through an image pop-up window.
[0116] After the loop test is completed, the system will automatically count the verification data of each test according to the test requirements to determine the stability of the platform firmware elastic module in multiple tests.
[0117] It should be noted that for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present invention are not limited by the described action sequence, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential for the embodiments of the present invention.
[0118] Referring to Figure 4 , a structural block diagram of an embodiment of a server platform firmware elasticity testing device of the present invention is shown. The device is applied to a test terminal, the test terminal is connected to the server to be tested, and the server to be tested is provided with a platform firmware elastic module. The device may specifically include the following modules:
[0119] A receiving module 401, configured to receive test parameter setting data after the server to be tested enters the test environment; the test parameter setting data includes the number of tests and a plurality of test configuration parameters;
[0120] A parameter configuration script generation module 402, configured to generate a parameter configuration script based on the target test configuration parameters;
[0121] The first sending module 403 is configured to generate a setting instruction and a restoration instruction according to the parameter configuration script, send the setting instruction to the server under test, and record the number of times of testing that has been completed; the server under test is configured to configure the platform firmware elastic module according to the setting instruction and restart after the configuration is completed.
[0122] The verification module 404 is configured to verify the platform firmware elastic module during the restart process of the server under test and generate verification information.
[0123] The second sending module 405 is configured to send the restoration instruction to the server under test when the verification information meets the preset stability condition; the server under test is further configured to restore the platform firmware elastic module according to the restoration instruction.
[0124] The loop module 406 is configured to update the target test configuration parameter from the multiple test configuration parameters according to the number of times of testing that has been completed, and continue to execute the step of generating the parameter configuration script based on the target test configuration parameter until the number of times of testing that has been completed is equal to the number of tests.
[0125] In an optional embodiment of the present invention, the test parameter setting data further includes environment configuration parameters, and the device further includes:
[0126] The environment configuration file generation module is configured to generate an environment configuration file.
[0127] The third sending module is configured to send the environment configuration file to the server under test, and the server under test is further configured to configure the test environment based on the environment configuration file.
[0128] In an optional embodiment of the present invention, the device further includes:
[0129] The test failure information generation module is configured to collect the configuration status of the platform firmware elastic module and generate test failure information when the verification information does not meet the preset stability condition.
[0130] In an optional embodiment of the present invention, the device further includes:
[0131] The visualization module is configured to visualize the test failure information and generate an image pop-up window.
[0132] The display module is configured to display the image pop-up window.
[0133] In an optional embodiment of the present invention, the verification module 404 includes:
[0134] The acquisition sub-module is configured to acquire the status parameters in the CPLD register and generate working mode information.
[0135] A verification information determination sub-module, configured to determine that the working mode information is the verification information.
[0136] In an alternative embodiment of the present invention, the preset stability condition is that the verification information includes a restart identification value and a target version identification value, and the device further includes:
[0137] A first stability module, configured to determine that the verification information meets the preset stability condition when the verification information includes the restart identification value and the target version identification value;
[0138] A second stability module, configured to determine that the verification information does not meet the preset stability condition when the verification information does not include at least one of the restart identification value and the target version identification value.
[0139] In an alternative embodiment of the present invention, the multiple test configuration parameters correspond to the number of times tested, and the loop module 406 includes:
[0140] An update sub-module, configured to determine, from the multiple test configuration parameters, the test configuration parameter corresponding to the number of times tested as the target test configuration parameter.
[0141] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For related parts, refer to the partial description of the method embodiment.
[0142] The embodiment of the present invention also provides an electronic device, as Figure 5 shown, including:
[0143] A processor 501 and a storage medium 502, where the storage medium 502 stores a computer program executable by the processor 501. When the electronic device runs, the processor 501 executes the computer program to execute the method according to any one of the embodiments of the present invention. The specific implementation manner and technical effect are similar to those of the method embodiment, and will not be elaborated here.
[0144] The embodiment of the present invention also provides a computer-readable storage medium, as Figure 6 shown, where a computer program 601 is stored on the storage medium, and when the computer program 601 is executed by a processor, it executes the method according to any one of the embodiments of the present invention. The specific implementation manner and technical effect are similar to those of the method embodiment, and will not be elaborated here.
[0145] Each embodiment in this specification is described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same and similar parts between each embodiment, refer to each other.
[0146] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, apparatus, or computer program product. Therefore, the embodiments of the present invention can take the form of an all-hardware embodiment, an all-software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0147] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing terminal devices generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0148] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0149] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, such that a series of operation steps are executed on the computer or other programmable terminal device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0150] Although the preferred embodiments of the embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they know the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present invention.
[0151] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent in such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising the said element.
[0152] The above has introduced in detail a server platform firmware elasticity testing method, device, electronic device and storage medium provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A method for elastic testing of server platform firmware, characterized in that, Applied to a test terminal, the test terminal is connected to a server under test, and the server under test is provided with a platform firmware elasticity module. The method includes: After the server under test enters the test environment, receiving test parameter setting data; the test parameter setting data includes the number of tests and a plurality of test configuration parameters; Generating a parameter configuration script based on the target test configuration parameter; Generating a setting instruction and a restoration instruction according to the parameter configuration script, sending the setting instruction to the server under test, and recording the generated number of tested times; the server under test is used to configure the platform firmware elasticity module according to the setting instruction and restart after the configuration is completed; During the restart process of the server under test, verifying the platform firmware elasticity module to generate verification information; When the verification information meets the preset stability condition, sending the restoration instruction to the server under test; the server under test is also used to restore the platform firmware elasticity module according to the restoration instruction; Updating the target test configuration parameter from the plurality of test configuration parameters according to the number of tested times, and continuing to execute the step of generating a parameter configuration script based on the target test configuration parameter until the number of tested times is equal to the number of tests.
2. The method according to claim 1, characterized in that, The test parameter setting data further includes environment configuration parameters, and the method further includes: Generating an environment configuration file according to the environment configuration parameters; Sending the environment configuration file to the server under test, and the server under test is also used to configure the test environment based on the environment configuration file.
3. The method according to claim 1, wherein The method further includes: When the verification information does not meet the preset stability condition, collecting the configuration status of the platform firmware elasticity module to generate a test failure message.
4. The method according to claim 3, wherein The method further includes: Visualizing the test failure message to generate an image pop-up window; Displaying the image pop-up window.
5. The method according to claim 1, wherein The platform firmware elasticity module corresponds to a complex programmable logic (CPLD) register. The step of verifying the platform firmware elasticity module to generate verification information includes: Collecting status parameters in the CPLD register to generate working mode information; Determining the working mode information as the verification information.
6. The method according to claim 5, wherein The preset stability condition is that the verification information includes a restart identification value and a target version identification value. The method further includes: When the verification information includes the restart identification value and the target version identification value, determining that the verification information meets the preset stability condition; When the verification information does not include at least one of the restart identification value and the target version identification value, determining that the verification information does not meet the preset stability condition.
7. The method according to claim 1, wherein The plurality of test configuration parameters correspond to the number of tested times. The step of updating the target test configuration parameter from the plurality of test configuration parameters according to the number of tested times includes: Determining, from the plurality of test configuration parameters, the test configuration parameter corresponding to the number of tested times as the target test configuration parameter.
8. A server platform firmware elasticity testing device, characterized in that, Applied to a test terminal, the test terminal is connected to a server under test, and the server under test is provided with a platform firmware elasticity module. The device includes: A receiving module, configured to receive test parameter setting data after the server under test enters the test environment; the test parameter setting data includes the number of tests and multiple test configuration parameters; A parameter configuration script generation module, configured to generate a parameter configuration script based on the target test configuration parameters; A first sending module, configured to generate a setting instruction and a restoration instruction according to the parameter configuration script, send the setting instruction to the server under test, and record the generated number of tested times; the server under test is configured to configure the platform firmware elastic module according to the setting instruction and restart after the configuration is completed; A verification module, configured to verify the platform firmware elastic module during the restart process of the server under test and generate verification information; A second sending module, configured to send the restoration instruction to the server under test when the verification information meets a preset stability condition; the server under test is further configured to restore the platform firmware elastic module according to the restoration instruction; A loop module, configured to update the target test configuration parameters from the multiple test configuration parameters according to the number of tested times, and continue to execute the step of generating a parameter configuration script based on the target test configuration parameters until the number of tested times is equal to the number of tests.
9. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored on the memory and capable of running on the processor. When the computer program is executed by the processor, the steps of the server platform firmware elasticity test method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the steps of the server platform firmware elasticity test method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Automatic test method and system, server and storage medium
CN111949545A
Firmware recovery result determination method and device based on PFR, equipment and medium
CN115357507A