CN116089265A - Testing method and device for basic input/output system and storage medium - Google Patents
Testing method and device for basic input/output system and storage medium Download PDFInfo
- Publication number
- CN116089265A CN116089265A CN202211533748.9A CN202211533748A CN116089265A CN 116089265 A CN116089265 A CN 116089265A CN 202211533748 A CN202211533748 A CN 202211533748A CN 116089265 A CN116089265 A CN 116089265A
- Authority
- CN
- China
- Prior art keywords
- parameters
- option
- starting
- configuration file
- options
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 73
- 238000000034 method Methods 0.000 claims description 30
- 238000012986 modification Methods 0.000 claims description 29
- 230000004048 modification Effects 0.000 claims description 29
- 238000012544 monitoring process Methods 0.000 claims description 26
- 238000004590 computer program Methods 0.000 claims description 16
- 238000010998 test method Methods 0.000 claims description 8
- 230000004913 activation Effects 0.000 claims 2
- 230000002159 abnormal effect Effects 0.000 description 12
- 238000004891 communication Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 8
- 238000013112 stability test Methods 0.000 description 7
- 238000001514 detection method Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 4
- 238000012937 correction Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 125000004122 cyclic group Chemical group 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000001228 spectrum Methods 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000007711 solidification Methods 0.000 description 1
- 230000008023 solidification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a testing method of a basic input/output system, which relates to the technical field of computers, and comprises the following steps: acquiring a configuration file of a basic input/output system, and acquiring each option in the configuration file and optional parameters of each option; according to the sorting result of the selectable parameters, respectively modifying the starting parameters of each option, and enabling the basic input/output system to execute restarting operation based on the modified configuration file so as to obtain a restarting result; repeating the steps until the optional parameters of each option are taken as starting parameters to participate in the restarting operation. According to the technical scheme, the starting test of the selectable parameters in the BIOS options is realized, the parameter test of all the options is completed only based on a small number of configuration files, the testing efficiency of the BIOS is improved, meanwhile, the testing result covers the selectable parameters under all the options, and the integrity and the comprehensiveness of the testing result are improved.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for testing a basic input/output system, and a storage medium.
Background
Since the basic input/output system (Basic Input Output System, BIOS) records the most important basic input/output program, the post-boot self-test program and the system self-start program of the computer device, the stability of the BIOS becomes the operation basis of the computer device.
In the prior art, the BIOS stability is usually tested by performing a cyclic update of the BIOS through different functional components, such as a BMC (Baseboard Management Controller ), a Linux system, a Windows system, etc., or performing a cyclic update of the BIOS between different versions.
However, the above test method is limited to the firmware refreshing level, and the BIOS is not fully and deeply tested for stability, and the test result has one-sided performance and cannot reflect the complete running state of the BIOS.
Disclosure of Invention
The invention provides a testing method, a testing device and a storage medium of a basic input/output system, which are used for solving the problems of incomplete option testing of a BIOS and lower testing efficiency.
According to an aspect of the present invention, there is provided a testing method of a basic input output system, including:
acquiring a configuration file of a basic input/output system, and acquiring each option in the configuration file and optional parameters of each option;
Respectively modifying the starting parameters of the options according to the sorting result of the selectable parameters, and enabling the basic input and output system to execute restarting operation based on the modified configuration file so as to obtain a restarting result;
and continuously modifying the starting parameters of the options respectively according to the sorting result of the optional parameters, and enabling the basic input and output system to continuously execute restarting operation based on the modified configuration file until the optional parameters of the options are taken as the starting parameters to participate in the restarting operation.
The obtaining each option in the configuration file and the selectable parameter of each option specifically includes: and sequentially acquiring each option in the configuration file according to the first keyword, and acquiring the selectable parameter of the current option according to the second keyword in the associated row of each option. Therefore, on the premise that the data line where each option and optional parameter are located is not required to be known in advance, each option and optional parameter can be accurately obtained through keyword query, the obtaining mode of option information is simplified, particularly for continuously updated BIOS, the new addition, deletion and position adjustment of each option and optional parameter can be directly obtained through keyword query, and the application range of the option information obtaining mode is greatly enlarged.
The step of respectively modifying the starting parameters of the options according to the sorting result of the selectable parameters, and the step of further comprises: and if the optional parameters of the current option are determined to be taken as the starting parameters to participate in the restarting operation, modifying the starting parameters of the current option into random parameters in the optional parameters. The random assignment test of the BIOS options is further executed to increase the variety of test types in the stability test result.
After acquiring the configuration file of the basic input/output system, the method further comprises the following steps: acquiring default parameters of each option; the step of respectively modifying the starting parameters of the options according to the sorting result of the selectable parameters specifically comprises the following steps: according to the sorting result of the selectable parameters, taking the adjacent parameters of the default parameters as the modification starting points of the starting parameters and taking the default parameters as the modification ending points of the starting parameters; and if the optional parameters of the current option are determined to be taken as starting parameters to participate in the restarting operation, modifying the starting parameters of the current option into corresponding default parameters. Therefore, when the last configuration file is started, not only the starting test of all option parameters can be completed, but also other types of BIOS tests, such as firmware refreshing test and the like, can be continuously executed based on the default parameter configuration file started at the time, so that independent configuration of the default parameter configuration file is avoided, and the testing efficiency of BIOS stability is improved as a whole.
The step of respectively modifying the starting parameters of the options according to the sorting result of the selectable parameters, and the step of further comprises: if the optional parameters of the current option are determined to be taken as starting parameters to participate in the restarting operation, acquiring the option type of the current option; wherein the option types include load-related options and non-load-related options; if the current option is a load related option, modifying the starting parameter to be the maximum value in the selectable parameters; under the extreme condition that the load related options are all maximum, the stability of the BIOS is tested, and the testing range of the BIOS stability is effectively expanded. And if the current option is a non-load related option, modifying the starting parameter into a corresponding default parameter or a random parameter in the selectable parameters. The method and the device are used for realizing conventional parameter assignment or unconventional parameter assignment of the non-load related options, further executing starting test of the BIOS options, and further increasing the variety of test types in the stability test result.
The obtaining the restart result specifically includes: comparing the configuration file after the current restarting of the basic input output system with the configuration file before the current restarting to judge whether the starting parameters are effective or not; and/or monitoring whether the basic input/output system is in downtime. Therefore, not only can the detection of the unactuated abnormal parameters be realized, but also the configuration environment matched with the abnormal parameters can be obtained, and an environment sample is provided for the correction of the abnormal parameters; meanwhile, the shutdown of the BIOS is monitored, so that whether the option parameters after starting can keep the stable running of the BIOS can be checked, and the stability test of the BIOS is further realized.
The monitoring whether the basic input/output system is in downtime or not comprises the following steps: and acquiring matched monitoring time according to the number of default parameters in the modified configuration file, and monitoring whether the basic input/output system is in downtime or not based on the monitoring time. By acquiring the number of default parameters in the modified configuration file, dynamic monitoring time is acquired, so that long-time monitoring of high-occurrence-frequency starting parameters and low-occurrence-frequency starting parameters is ensured, rapid detection of intermediate-frequency starting parameters is ensured, and monitoring effect of downtime is improved.
According to another aspect of the present invention, there is provided a testing apparatus of a basic input output system, comprising:
the device comprises an option parameter acquisition module, a storage module and a storage module, wherein the option parameter acquisition module is used for acquiring a configuration file of a basic input/output system and acquiring each option in the configuration file and selectable parameters of each option;
the starting parameter modification module is used for respectively modifying the starting parameters of the options according to the sorting result of the selectable parameters and enabling the basic input and output system to execute restarting operation based on the configuration file after modification so as to obtain a restarting result; and continuously modifying the starting parameters of the options respectively according to the sorting result of the optional parameters, and enabling the basic input and output system to continuously execute restarting operation based on the modified configuration file until the optional parameters of the options are taken as the starting parameters to participate in the restarting operation.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of testing a basic input output system according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a method for testing a basic input output system according to any one of the embodiments of the present invention.
According to the technical scheme, after the options in the BIOS configuration file and the optional parameters under each option are obtained, the starting parameters of each option are respectively modified according to the sorting result of the optional parameters, the BIOS executes the restarting operation based on the modified configuration file, and the steps are repeated until the optional parameters of each option are taken as starting parameters to participate in the restarting operation, so that the starting test of the optional parameters in the BIOS option is realized, the parameter test of all the options is completed only based on a small number of configuration files, the testing efficiency of the BIOS is improved, meanwhile, the testing result covers the optional parameters under all the options, and the integrity and the comprehensiveness of the testing result are improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a testing method of a basic input/output system according to a first embodiment of the present invention;
fig. 2 is a flowchart of a testing method of a basic input/output system according to a second embodiment of the present invention;
FIG. 3 is a flow chart of a testing method of a basic input/output system according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a testing device of a basic input/output system according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing a testing method of a basic input output system according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a testing method of a BIOS according to a first embodiment of the present invention, where the method may be performed by a testing device of the BIOS, and the testing device of the BIOS may be implemented in hardware and/or software, and the testing device of the BIOS is configured in an electronic device such as a server. As shown in fig. 1, the method includes:
s101, acquiring a configuration file of a basic input and output system, and acquiring each option in the configuration file and optional parameters of each option.
The configuration file records all options in the BIOS starting process, and simultaneously records parameters which can be selected when each option is started, namely the optional parameters; for example, one option in the BIOS is "Network", and parameters that may be selected include "[00] Do not launch", "[01] UEFI", "[02] legacy", i.e., the "Network" option may set one of the three parameters as a startup parameter as desired; wherein the configuration file may be obtained by an SCE (Setup Control Environment, control environment setting) tool.
After the BIOS is solidified to the main board, each option and optional parameter in the configuration file are determined, and the position (namely the line) of each option and each optional parameter in the configuration file is also determined, so that the configuration file after each start of the BIOS after solidification comprises the same data format; for example, in a configuration file of a BIOS, the first seven rows are prefix information or empty rows; eighth behavior the name of the first option, the next four rows show the attribute information of the option, and each attribute information occupies one row; the later data lines are optional parameters of the options, each parameter in the optional parameters occupies one data line respectively, and the options are separated by an empty line; therefore, the line information of each option and each optional parameter under the option can be determined, and therefore, the options and the optional parameters of the options can be obtained directly through positioning the data line.
Optionally, in an embodiment of the present invention, the obtaining each option in the configuration file and optional parameters of each option specifically includes: and sequentially acquiring each option in the configuration file according to the first keyword, and acquiring the selectable parameter of the current option according to the second keyword in the associated row of each option.
Specifically, the name of each option can be defined by using a Setup Question in the configuration file, the name is used as a first keyword, and the position of each option can be determined based on each first keyword which appears in the configuration file in sequence; meanwhile, the optional parameters can be defined by 'Options' in the configuration file, and the optional parameters of each option are positioned below the names of the Options, so that the optional parameters can be used as second keywords, and the optional parameters closest to the names of the Options under each option are obtained and used as the optional parameters of the current option; therefore, on the premise that the data line where each option and optional parameter are located is not required to be known in advance, each option and optional parameter can be accurately obtained through keyword query, the obtaining mode of option information is simplified, particularly for continuously updated BIOS, the new addition, deletion and position adjustment of each option and optional parameter can be directly obtained through keyword query, and the application range of the option information obtaining mode is greatly enlarged.
Particularly, in the embodiment of the invention, the configuration file acquired by the current electronic device may be a configuration file of the self-BIOS, that is, the configuration file of the self-BIOS is acquired through the SCE tool, and the BIOS options and optional parameters are acquired in the configuration file, so that a restart operation is performed based on the modified start-up parameters to test the stability of the self-BIOS; the configuration file obtained by the current electronic device can also be the BIOS configuration file of other devices, and the device is guided to execute restarting operation based on the configuration file modified by the starting parameters so as to test the BIOS stability of the other devices.
S102, respectively modifying the starting parameters of the options according to the sorting result of the optional parameters, and enabling the basic input/output system to execute restarting operation based on the modified configuration file so as to obtain a restarting result.
Ordering under each option according to the parameter serial numbers of the optional parameters; taking table 1 as an example, the number of optional parameters of options "MMCFG Base", "Video", "Hot Plug" is 6, 2 respectively; among the selectable parameters, the parameter with the "×" mark represents the current starting parameter of the BIOS, i.e. the parameter used in the current starting; the starting parameters of the options can be modified in sequence according to the sequence from small to large or from large to small.
Table 1 optional parameters and default parameters for each option
Specifically, taking the above technical solution as an example, when the configuration file is modified for the first time, the parameter with the smallest parameter serial number in each option is used as the starting parameter, that is, the starting parameters of options "MMCFG Base", "Video", "Hot Plug" are "[00]1g", "[01] uefi", "[00] disabled", respectively, and the configuration file completed by this modification is imported into the BIOS, so that the BIOS executes the restarting operation based on the configuration file after the modification, and further the relevant state parameters of this startup, such as the starting time, etc., can be obtained.
After the restart is completed, when the configuration file is modified for the second time, the second-small parameter of each selected parameter serial number is used as a starting parameter, namely, the starting parameters of options of 'MMCFG Base', 'Video', 'Hot Plug' are respectively '01 ] 1.5G', '02 legacy', '01' respectively, and the configuration file which is modified at the time is also imported into the BIOS, so that the BIOS executes the restart operation based on the configuration file after the modification.
Obviously, as described in the above technical solution, when each configuration file is modified, the starting parameters of each option are modified respectively, and in each configuration file completed by modification, the starting parameters of the same option are different from the starting parameters in the previous configuration file; if the maximum number of selectable parameters in all options is N (N is greater than 1), the starting test of all parameters of all options can be completed through N configuration files. In particular, for the option with a smaller number of selectable parameters, for example, the number of selectable parameters of the current option a is M (M is smaller than N), in the first M configuration files, that is, all selectable parameters of the option a have been tested, starting from the (m+1) -th configuration file, the start-up parameter of the option a may be set as a default parameter among the selectable parameters.
For the acquisition of the default parameters, the default parameters are used as the last attribute information row in the four attribute information rows under the option names, and the default parameters under each option can be directly acquired according to the positioning of the default parameter data row; the Default parameter closest to the option name under each option can be obtained as the Default parameter of the current option according to the third keyword, for example, "BIOS Default".
Optionally, in an embodiment of the present invention, the modifying, according to the result of the sorting of the selectable parameters, the starting parameters of the options respectively further includes: and if the optional parameters of the current option are determined to be taken as the starting parameters to participate in the restarting operation, modifying the starting parameters of the current option into random parameters in the optional parameters. Specifically, taking the above technical solution as an example, since all optional parameters of the option a are tested in the previous M configuration files, in the subsequent N-M configuration files, the starting parameter of the option a may be randomly set to a certain parameter among the optional parameters, so as to implement the unconventional parameter assignment in the BIOS option, and further execute the random assignment test of the BIOS option, so as to increase the diversity of test types in the stability test result.
S103, continuously modifying the starting parameters of the options respectively according to the sorting result of the selectable parameters, and enabling the basic input and output system to continuously execute restarting operation based on the modified configuration file until the selectable parameters of the options are taken as the starting parameters to participate in the restarting operation.
According to the technical scheme, after N configuration files with modified configuration files are obtained and the restarting operation of the BIOS is respectively executed based on the N configuration files, the starting test of all parameters in the BIOS options is completed.
Optionally, in an embodiment of the present invention, after acquiring the configuration file of the bios, the method further includes: acquiring default parameters of each option; the step of respectively modifying the starting parameters of the options according to the sorting result of the selectable parameters specifically comprises the following steps: according to the sorting result of the selectable parameters, taking the adjacent parameters of the default parameters as the modification starting points of the starting parameters and taking the default parameters as the modification ending points of the starting parameters; and if the optional parameters of the current option are determined to be taken as starting parameters to participate in the restarting operation, modifying the starting parameters of the current option into corresponding default parameters.
Specifically, after the default parameters of each option are obtained, taking the upstream adjacent parameter or the downstream adjacent parameter of each option as a starting point and taking the default parameters as an end point; taking table 1 as an example, if taking the downstream adjacent parameters as a starting point, setting the starting parameters of the option "MMCFG Base" to "2.25G", "3G", "Auto", "1G", "1.5G", "1.175G", "2G" in each configuration file after modification; obviously, in the modification configuration file acquired for the sixth time, the starting parameter of the option "MMCFG Base" is set to be the default parameter "2G", and in the options with the number of other optional parameters less than or equal to six, the starting parameter is also the default parameter, so that when the last configuration file starting is executed, that is, the sixth modification configuration file starting, not only the starting test of all the option parameters can be completed, but also other types of BIOS tests, such as firmware refreshing test, can be continuously executed based on the default parameter configuration file started at this time (that is, the configuration files of all the options are the default parameters), so that the independent configuration of the default parameter configuration file is avoided, and the testing efficiency of BIOS stability is improved as a whole.
According to the technical scheme, after the options in the BIOS configuration file and the optional parameters under each option are obtained, the starting parameters of each option are respectively modified according to the sorting result of the optional parameters, the BIOS executes the restarting operation based on the modified configuration file, and the steps are repeated until the optional parameters of each option are taken as starting parameters to participate in the restarting operation, so that the starting test of the optional parameters in the BIOS option is realized, the parameter test of all the options is completed only based on a small number of configuration files, the testing efficiency of the BIOS is improved, meanwhile, the testing result covers the optional parameters under all the options, and the integrity and the comprehensiveness of the testing result are improved.
Example two
Fig. 2 is a flowchart of a testing method of a basic input/output system according to a second embodiment of the present invention, wherein the relationship between the present embodiment and the above embodiment is that if it is determined that the selectable parameters of the current option are all used as the starting parameters to participate in the restarting operation, and the current option is a load related option, the starting parameters are modified to be the maximum value of the selectable parameters. As shown in fig. 2, the method includes:
s201, acquiring a configuration file of a basic input and output system, and acquiring each option in the configuration file and optional parameters of each option.
S202, respectively modifying the starting parameters of the options according to the sorting result of the optional parameters, and enabling the basic input/output system to execute restarting operation based on the modified configuration file so as to obtain a restarting result; if the optional parameters of the current option are determined to be taken as starting parameters to participate in the restarting operation, the option type of the current option is obtained; the option types comprise load related options and non-load related options; if the current option is a load related option, modifying the starting parameter to be the maximum value in the selectable parameters; and if the current option is a non-load related option, modifying the starting parameter into a corresponding default parameter or a random parameter in the selectable parameters.
A load related option, which is related to the running load of the central processing unit (central processing unit, CPU); for example, options "Auto Detect PCI Clk", "Spread Spectrum", "CPU Host/3V66/PCI Clock", respectively related to PCI device Clock frequency, speed Spectrum, frequency multiplication of CPU, increasing the values of the above-mentioned option parameters obviously increases the load of CPU; if the selectable parameter in the option is a specific value and the option is related to the CPU load, the starting parameter is modified to be the maximum value, so that the stability of the BIOS is tested under the extreme condition that the load related options are all the maximum values, and the testing range of the stability of the BIOS is effectively expanded. If the optional parameters in the options are irrelevant to the CPU load, the starting parameters are modified into corresponding default parameters or random parameters in the optional parameters so as to realize conventional parameter assignment or unconventional parameter assignment of the non-load related options, further, the starting test of the BIOS options is executed, and the variety of test types in the stability test result is further increased.
S203, continuously modifying the starting parameters of the options according to the sorting result of the selectable parameters, and enabling the basic input and output system to continuously execute restarting operation based on the modified configuration file until the selectable parameters of the options are taken as the starting parameters to participate in the restarting operation.
According to the technical scheme provided by the embodiment of the invention, if the selectable parameters of the current option are determined to be all taken as the starting parameters to participate in the restarting operation, and the current option is the load related option, the starting parameters are modified to the corresponding maximum value, so that the stability of the BIOS is tested under the extreme condition that the load related options are all maximum values, and the testing range of the stability of the BIOS is effectively expanded.
Example III
Fig. 3 is a flowchart of a testing method of a basic input/output system according to a third embodiment of the present invention, in the embodiment of the present invention, after the BIOS is restarted, whether the startup parameter is valid and/or whether the BIOS is down is monitored. As shown in fig. 3, the method includes:
s301, acquiring a configuration file of a basic input and output system, and acquiring each option in the configuration file and optional parameters of each option.
S302, respectively modifying the starting parameters of the options according to the sorting result of the optional parameters, and enabling the basic input/output system to execute restarting operation based on the modified configuration file.
S303, comparing the configuration file of the basic input/output system after the restarting with the configuration file before the restarting to judge whether the starting parameters are effective; and/or monitoring whether the basic input/output system is in downtime.
After the configuration file after modification is imported into the BIOS, the BIOS is restarted based on the configuration file, and after restarting, the current configuration file is exported, so that the configuration files before and after restarting each time are compared to determine whether the modification of the starting parameters of options in the configuration files is effective or not before restarting; if the abnormal parameters are not validated, recording the abnormal parameters which are not validated and the configuration environment in which the abnormal parameters are located, namely starting parameters of other options in the configuration file; therefore, not only can the detection of the unactuated abnormal parameters be realized, but also the configuration environment matched with the abnormal parameters can be obtained, and an environment sample is provided for the correction of the abnormal parameters; meanwhile, the shutdown of the BIOS is monitored, whether the option parameters after starting can keep the stable running of the BIOS can be checked, and the stability test of the BIOS is further realized.
Optionally, in an embodiment of the present invention, the monitoring whether the bios is down includes: and acquiring matched monitoring time according to the number of default parameters in the modified configuration file, and monitoring whether the basic input/output system is in downtime or not based on the monitoring time. Specifically, the default parameter is the most frequently used starting parameter in one BIOS option, if the number of options using the default parameter as the starting parameter in the current configuration file is large, for example, when the default parameter is greater than or equal to a first preset threshold, the corresponding monitoring time is longer, so as to monitor the most frequently occurring starting state for a longer time; in addition, for the starting states which do not occur frequently, that is, the number of options for using the default parameters as the starting parameters is smaller, for example, when the default parameters are smaller than or equal to a second preset threshold (the second preset threshold is smaller than the first preset threshold), the times and the frequency for testing the starting states are smaller, starting abnormality is easier to occur, and the starting states are also set to be longer in monitoring time so as to monitor the starting states which occur least frequently for a longer time; by acquiring the number of default parameters in the modified configuration file, dynamic monitoring time is acquired, so that long-time monitoring of high-occurrence-frequency starting parameters and low-occurrence-frequency starting parameters is ensured, rapid detection of intermediate-frequency starting parameters is ensured, and monitoring effect of downtime is improved.
S304, continuously modifying the starting parameters of the options respectively according to the sorting result of the selectable parameters, and enabling the basic input and output system to continuously execute restarting operation based on the modified configuration file until the selectable parameters of the options are taken as the starting parameters to participate in the restarting operation.
According to the technical scheme, the configuration file after the restarting of the basic input and output system is compared with the configuration file before the restarting to judge whether the starting parameters are effective, so that the detection of the abnormal parameters which are not effective can be realized, the configuration environment matched with the abnormal parameters can be obtained, and an environment sample is provided for the correction of the abnormal parameters; meanwhile, the shutdown of the BIOS is monitored, so that whether the option parameters after starting can keep the stable running of the BIOS can be checked, and the stability test of the BIOS is further realized.
Example IV
Fig. 4 is a block diagram of a testing apparatus for a basic input/output system according to a fourth embodiment of the present invention, where the testing apparatus specifically includes:
an option parameter obtaining module 401, configured to obtain a configuration file of a basic input/output system, and obtain each option in the configuration file and optional parameters of each option;
A startup parameter modification module 402, configured to modify startup parameters of the options according to the selectable parameter sorting result, and cause the bios to perform a restart operation based on the modified configuration file, so as to obtain a restart result; and continuously modifying the starting parameters of the options respectively according to the sorting result of the optional parameters, and enabling the basic input and output system to continuously execute restarting operation based on the modified configuration file until the optional parameters of the options are taken as the starting parameters to participate in the restarting operation.
According to the technical scheme, after the options in the BIOS configuration file and the optional parameters under each option are obtained, the starting parameters of each option are respectively modified according to the sorting result of the optional parameters, the BIOS executes the restarting operation based on the modified configuration file, and the steps are repeated until the optional parameters of each option are taken as starting parameters to participate in the restarting operation, so that the starting test of the optional parameters in the BIOS option is realized, the parameter test of all the options is completed only based on a small number of configuration files, the testing efficiency of the BIOS is improved, meanwhile, the testing result covers the optional parameters under all the options, and the integrity and the comprehensiveness of the testing result are improved.
Optionally, the option parameter obtaining module 401 is specifically configured to sequentially obtain each option in the configuration file according to the first keyword, and obtain, in an associated row of each option, the selectable parameter of the current option according to the second keyword.
The startup parameter modification module 402 is configured to modify the startup parameter of the current option to a random parameter in the selectable parameters if it is determined that the selectable parameters of the current option are all already involved in the restart operation as the startup parameter.
Optionally, the option parameter obtaining module 401 is specifically further configured to obtain default parameters of each option;
the starting parameter modification module 402 is specifically further configured to take, according to the selectable parameter sorting result, an adjacent parameter of the default parameter as a modification start point of the starting parameter, and take the default parameter as a modification end point of the starting parameter; and if the optional parameters of the current option are determined to be taken as starting parameters to participate in the restarting operation, modifying the starting parameters of the current option into corresponding default parameters.
Optionally, the starting parameter modification module 402 is specifically further configured to obtain an option type of the current option if it is determined that all the optional parameters of the current option are taken as starting parameters to participate in the restarting operation; wherein the option types include load-related options and non-load-related options; if the current option is a load related option, modifying the starting parameter to be the maximum value in the selectable parameters; and if the current option is a non-load related option, modifying the starting parameter into a corresponding default parameter or a random parameter in the selectable parameters.
Optionally, the startup parameter modification module 402 is specifically further configured to compare the configuration file after the current restart of the bios with the configuration file before the current restart to determine whether the startup parameter is effective; and/or monitoring whether the basic input/output system is in downtime.
Optionally, the starting parameter modification module 402 is specifically further configured to obtain a matched monitoring time according to the number of default parameters in the modified configuration file, and monitor whether the bios is down based on the monitoring time.
The device can execute the testing method of the basic input/output system provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be referred to a method for testing a basic input/output system provided in any embodiment of the present invention.
Example five
Fig. 5 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a test method for a basic input output system.
In some embodiments, the method of testing a basic input output system may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and/or installed onto the heterogeneous hardware accelerator via the ROM and/or the communication unit. When the computer program is loaded into RAM and executed by the processor, one or more steps of the above-described method of testing a basic input output system may be performed. Alternatively, in other embodiments, the processor may be configured to perform the method of testing the basic input output system in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a heterogeneous hardware accelerator having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or a trackball) through which a user can provide input to the heterogeneous hardware accelerator. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.
Claims (10)
1. A method for testing a basic input/output system, comprising:
acquiring a configuration file of a basic input/output system, and acquiring each option in the configuration file and optional parameters of each option;
respectively modifying the starting parameters of the options according to the sorting result of the selectable parameters, and enabling the basic input and output system to execute restarting operation based on the modified configuration file so as to obtain a restarting result;
And continuously modifying the starting parameters of the options respectively according to the sorting result of the optional parameters, and enabling the basic input and output system to continuously execute restarting operation based on the modified configuration file until the optional parameters of the options are taken as the starting parameters to participate in the restarting operation.
2. The method according to claim 1, wherein the obtaining each option in the configuration file and the selectable parameters of each option specifically includes:
and sequentially acquiring each option in the configuration file according to the first keyword, and acquiring the selectable parameter of the current option according to the second keyword in the associated row of each option.
3. The method of claim 1, wherein said modifying the activation parameters of each of said options, respectively, based on the selectable parameter ordering result, further comprises:
and if the optional parameters of the current option are determined to be taken as the starting parameters to participate in the restarting operation, modifying the starting parameters of the current option into random parameters in the optional parameters.
4. The method of claim 1, further comprising, after obtaining the configuration file of the bios:
Acquiring default parameters of each option;
the step of respectively modifying the starting parameters of the options according to the sorting result of the selectable parameters specifically comprises the following steps:
according to the sorting result of the selectable parameters, taking the adjacent parameters of the default parameters as the modification starting points of the starting parameters and taking the default parameters as the modification ending points of the starting parameters;
and if the optional parameters of the current option are determined to be taken as starting parameters to participate in the restarting operation, modifying the starting parameters of the current option into corresponding default parameters.
5. The method of claim 1, wherein said modifying the activation parameters of each of said options, respectively, based on the selectable parameter ordering result, further comprises:
if the optional parameters of the current option are determined to be taken as starting parameters to participate in the restarting operation, acquiring the option type of the current option; wherein the option types include load-related options and non-load-related options;
if the current option is a load related option, modifying the starting parameter to be the maximum value in the selectable parameters;
and if the current option is a non-load related option, modifying the starting parameter into a corresponding default parameter or a random parameter in the selectable parameters.
6. The method of claim 1, wherein the obtaining the restart result specifically comprises:
comparing the configuration file after the current restarting of the basic input output system with the configuration file before the current restarting to judge whether the starting parameters are effective or not;
and/or monitoring whether the basic input/output system is in downtime.
7. The method of claim 6, wherein the monitoring whether the bios is down comprises:
and acquiring matched monitoring time according to the number of default parameters in the modified configuration file, and monitoring whether the basic input/output system is in downtime or not based on the monitoring time.
8. A test apparatus for a basic input output system, comprising:
the device comprises an option parameter acquisition module, a storage module and a storage module, wherein the option parameter acquisition module is used for acquiring a configuration file of a basic input/output system and acquiring each option in the configuration file and selectable parameters of each option;
the starting parameter modification module is used for respectively modifying the starting parameters of the options according to the sorting result of the selectable parameters and enabling the basic input and output system to execute restarting operation based on the configuration file after modification so as to obtain a restarting result; and continuously modifying the starting parameters of the options respectively according to the sorting result of the optional parameters, and enabling the basic input and output system to continuously execute restarting operation based on the modified configuration file until the optional parameters of the options are taken as the starting parameters to participate in the restarting operation.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of testing a basic input output system according to any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to execute the method of testing a basic input output system according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211533748.9A CN116089265A (en) | 2022-12-01 | 2022-12-01 | Testing method and device for basic input/output system and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211533748.9A CN116089265A (en) | 2022-12-01 | 2022-12-01 | Testing method and device for basic input/output system and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116089265A true CN116089265A (en) | 2023-05-09 |
Family
ID=86205393
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211533748.9A Pending CN116089265A (en) | 2022-12-01 | 2022-12-01 | Testing method and device for basic input/output system and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116089265A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117827554A (en) * | 2023-10-12 | 2024-04-05 | 宁畅信息产业(北京)有限公司 | Test method, test device, computer equipment and storage medium |
CN117971584A (en) * | 2024-03-29 | 2024-05-03 | 苏州元脑智能科技有限公司 | Method and device for testing graphics processor, electronic equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106648732A (en) * | 2016-09-27 | 2017-05-10 | 郑州云海信息技术有限公司 | DOS-based extraction and modification method for BIOS |
CN108446195A (en) * | 2018-05-30 | 2018-08-24 | 郑州云海信息技术有限公司 | A kind of server memory performance test methods and device |
CN110780928A (en) * | 2019-09-11 | 2020-02-11 | 苏州浪潮智能科技有限公司 | Method for checking functions of CPU C1E based on whitley platform |
CN111767180A (en) * | 2020-06-29 | 2020-10-13 | 西安易朴通讯技术有限公司 | Pressure testing method, device, equipment and storage medium |
CN114116033A (en) * | 2021-11-29 | 2022-03-01 | 曙光信息产业股份有限公司 | Server configuration modification method and device |
-
2022
- 2022-12-01 CN CN202211533748.9A patent/CN116089265A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106648732A (en) * | 2016-09-27 | 2017-05-10 | 郑州云海信息技术有限公司 | DOS-based extraction and modification method for BIOS |
CN108446195A (en) * | 2018-05-30 | 2018-08-24 | 郑州云海信息技术有限公司 | A kind of server memory performance test methods and device |
CN110780928A (en) * | 2019-09-11 | 2020-02-11 | 苏州浪潮智能科技有限公司 | Method for checking functions of CPU C1E based on whitley platform |
CN111767180A (en) * | 2020-06-29 | 2020-10-13 | 西安易朴通讯技术有限公司 | Pressure testing method, device, equipment and storage medium |
CN114116033A (en) * | 2021-11-29 | 2022-03-01 | 曙光信息产业股份有限公司 | Server configuration modification method and device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117827554A (en) * | 2023-10-12 | 2024-04-05 | 宁畅信息产业(北京)有限公司 | Test method, test device, computer equipment and storage medium |
CN117971584A (en) * | 2024-03-29 | 2024-05-03 | 苏州元脑智能科技有限公司 | Method and device for testing graphics processor, electronic equipment and storage medium |
CN117971584B (en) * | 2024-03-29 | 2024-06-07 | 苏州元脑智能科技有限公司 | Method and device for testing graphics processor, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116089265A (en) | Testing method and device for basic input/output system and storage medium | |
WO2019169723A1 (en) | Test case selection method, device and equipment, and computer-readable storage medium | |
CN116303013A (en) | Source code analysis method, device, electronic equipment and storage medium | |
CN117609031A (en) | Multi-core on-chip program debugging method, device, equipment and storage medium | |
CN116702668A (en) | Regression testing method and device, electronic equipment and storage medium | |
CN115695397B (en) | Communication method, device, equipment and medium based on JSON file | |
CN112181853A (en) | Program debugging method, device and system | |
CN116521573A (en) | Automatic test method, device, equipment and storage medium | |
CN116126719A (en) | Interface testing method and device, electronic equipment and storage medium | |
CN116545905A (en) | Service health detection method and device, electronic equipment and storage medium | |
CN116302092A (en) | Method, device, equipment and medium for adapting high-pass chip of Hongmon system | |
CN116089739A (en) | Message pushing method, device, electronic equipment and storage medium | |
CN115883351B (en) | Method and device for setting physical address of network card, electronic equipment and storage medium | |
CN117825934B (en) | Test method, test system, electronic device and program product | |
CN116032813B (en) | Communication module testing method and device, electronic equipment and storage medium | |
CN117407258A (en) | Initialization process time consumption statistical method and device, electronic equipment and storage medium | |
CN117112374A (en) | Display method, device, equipment and storage medium | |
CN116303071A (en) | Interface testing method and device, electronic equipment and storage medium | |
CN117439975A (en) | Address determination method and device for equipment mainboard, electronic equipment and storage medium | |
CN116303074A (en) | Server testing method, device, equipment and medium | |
CN114564133A (en) | Application program display method, device, equipment and medium | |
CN115563015A (en) | Code popularity statistical method, device, equipment and storage medium | |
CN116991629A (en) | Backup method, device, equipment and medium of virtual machine | |
CN117648249A (en) | Method and device for determining distributed system options, electronic equipment and storage medium | |
CN117539719A (en) | Application operation monitoring method, device, equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |