CN112433738A - Firmware update test method, system, equipment and medium - Google Patents

Firmware update test method, system, equipment and medium Download PDF

Info

Publication number
CN112433738A
CN112433738A CN202011241110.9A CN202011241110A CN112433738A CN 112433738 A CN112433738 A CN 112433738A CN 202011241110 A CN202011241110 A CN 202011241110A CN 112433738 A CN112433738 A CN 112433738A
Authority
CN
China
Prior art keywords
firmware
upgrading
files
configuration file
names
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.)
Granted
Application number
CN202011241110.9A
Other languages
Chinese (zh)
Other versions
CN112433738B (en
Inventor
唐帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202011241110.9A priority Critical patent/CN112433738B/en
Publication of CN112433738A publication Critical patent/CN112433738A/en
Application granted granted Critical
Publication of CN112433738B publication Critical patent/CN112433738B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version

Abstract

The invention discloses a firmware updating test method, which comprises the following steps: acquiring a configuration file containing names of a plurality of firmware files; generating a plurality of random numbers according to the configuration file, and respectively determining the names of corresponding firmware files in the configuration file according to the random numbers; acquiring a plurality of firmware files according to the names of the firmware files; and upgrading or backing the firmware to be updated by utilizing the plurality of firmware files in sequence, and recording related parameters. The invention also discloses a system, a computer device and a readable storage medium. The scheme provided by the invention realizes repeated upgrading and downgrading among a plurality of versions in a file configuration mode, provides powerful guarantee for the success rate of firmware binary file upgrading, can test stability and pressure, further improves test verification efficiency, covers more test scenes, can expose more upgrading failure problems, and provides powerful guarantee for the success of firmware upgrading functions.

Description

Firmware update test method, system, equipment and medium
Technical Field
The invention relates to the field of firmware test, in particular to a firmware update test method, a firmware update test system, firmware update test equipment and a storage medium.
Background
In order to solve the problem of firmware in the product operation and maintenance process, in the firmware development and application process, a method for performing online burning upgrade on a developed firmware binary file through an upgrade tool needs to be provided. Therefore, research and development need to perform a high-pressure test on the binary file of the firmware by using the provided upgrading tool, and the problem of firmware upgrading failure in the upgrading process is solved, so that the firmware upgrading can be successful each time.
At present, during test verification of firmware upgrade, only a pressure stability test of firmware upgrade between adjacent versions is generally performed, but considering that different client versions are different, a stability test of cross-version firmware upgrade is necessary. And for a stability test scenario of firmware upgrade spanning multiple versions, a corresponding method is often absent or lacked in a development test flow.
Disclosure of Invention
In view of the above, in order to overcome at least one aspect of the above problems, an embodiment of the present invention provides a firmware update testing method, including:
acquiring a configuration file containing names of a plurality of firmware files;
generating a plurality of random numbers according to the configuration file, and respectively determining the names of corresponding firmware files in the configuration file according to the random numbers;
acquiring a plurality of firmware files according to the names of the firmware files;
and upgrading or backing the firmware to be updated by utilizing the plurality of firmware files in sequence, and recording related parameters.
In some embodiments, further comprising:
and writing the version numbers and the names of a plurality of firmware files into the configuration file.
In some embodiments, generating a plurality of random numbers from the configuration file further comprises:
counting the number of the plurality of firmware files for writing the version numbers and the names into the configuration files;
determining a range of the generated random numbers according to the number.
In some embodiments, determining the name of the corresponding firmware file in the configuration file according to the plurality of random numbers respectively further includes:
determining the version number of the firmware file in the configuration file according to the random number;
and determining the name of the firmware file according to the version number.
In some embodiments, sequentially upgrading or rolling back the firmware to be updated by using the plurality of firmware files further includes:
and determining the order of upgrading or backing the firmware to be updated by the plurality of firmware files according to the generation order of the plurality of random numbers.
In some embodiments, recording the relevant parameters further comprises:
and recording the number of upgrading or rollback, the version number before upgrading or rollback, the version number after upgrading or rollback and a corresponding log.
In some embodiments, further comprising:
and in response to the completion of upgrading or backing off the firmware to be updated, inquiring the current version number of the firmware to be updated so as to determine whether upgrading or backing off is successful according to the current version number.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a firmware update test system, including:
a first obtaining module configured to obtain a configuration file containing names of a plurality of firmware files;
a determining module configured to generate a plurality of random numbers according to the configuration file, and determine names of corresponding firmware files in the configuration file according to the plurality of random numbers;
a second obtaining module configured to obtain a plurality of firmware files according to names of the plurality of firmware files;
and the updating module is configured to upgrade or rollback the firmware to be updated by using the plurality of firmware files in sequence and record related parameters.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer apparatus, including:
at least one processor; and
a memory storing a computer program operable on the processor, wherein the processor executes the program to perform any of the steps of the firmware update test method described above.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program which, when executed by a processor, performs the steps of any one of the firmware update testing methods described above.
The invention has one of the following beneficial technical effects: the scheme provided by the invention realizes repeated upgrading and downgrading among a plurality of versions in a file configuration mode, provides powerful guarantee for the success rate of firmware binary file upgrading, can test stability and pressure, further improves test verification efficiency, covers more test scenes, can expose more upgrading failure problems, and provides powerful guarantee for the success of firmware upgrading functions.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a firmware update testing method according to an embodiment of the present invention;
FIG. 2 is a block diagram of a firmware update test system according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a computer device provided in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
According to an aspect of the present invention, an embodiment of the present invention provides a firmware update testing method, as shown in fig. 1, which may include the steps of:
s1, obtaining configuration files containing the names of a plurality of firmware files;
s2, generating a plurality of random numbers according to the configuration file, and respectively determining the names of corresponding firmware files in the configuration file according to the random numbers;
s3, obtaining a plurality of firmware files according to the names of the firmware files;
and S4, upgrading or returning the firmware to be updated by using the plurality of firmware files in sequence, and recording related parameters.
The scheme provided by the invention realizes long-time repeated upgrading and downgrading among a plurality of versions in a file configuration mode, provides powerful guarantee for the success rate of firmware binary file upgrading, can test stability and pressure, further improves test verification efficiency, covers more test scenes, can expose more upgrading failure problems, and provides powerful guarantee for the success of firmware upgrading functions.
In some embodiments, further comprising:
and writing the version numbers and the names of a plurality of firmware files into the configuration file.
Specifically, when a plurality of firmware files are used to update the firmware to be updated randomly, configuration parameters of the corresponding plurality of firmware files need to be configured, and for each firmware file, a corresponding firmware version number and a corresponding firmware name need to be configured in the configuration file. Typically, a firmware upgrade has a base version number, such as 1.1, to which multiple versions of corresponding configuration information may be added, and the corresponding version number may be set to 2.1-10.1. Therefore, when the stability and stress test is carried out on the new firmware version, only the version number and the name of the new firmware version need to be written into the configuration file.
In some embodiments, generating a plurality of random numbers from the configuration file further comprises:
counting the number of the plurality of firmware files for writing the version numbers and the names into the configuration files;
determining a range of the generated random numbers according to the number.
Specifically, the number of the plurality of firmware files for updating the firmware file to be updated may be determined according to the number of version numbers of the firmware files in the configuration file, and the range of the generated random number may be determined according to the number, for example, if the number of the firmware files in which the version numbers and names are written in the configuration file is 10, the range of the generated random number is within 10.
In some embodiments, determining the name of the corresponding firmware file in the configuration file according to the plurality of random numbers respectively further includes:
determining the version number of the firmware file in the configuration file according to the random number;
and determining the name of the firmware file according to the version number.
Specifically, the generated random number may be used to determine the version number of the firmware file used to update the firmware to be updated in the configuration file, for example, in the configuration file, the version numbers of the multiple firmware files are sequentially 2.0, 3.0, 4.0, 5.0, and 6.0, and the generated random numbers are 4, 3, 5, 1, and 2, then the version number corresponding to the random number 4 is 5.0, then the version number corresponding to the random number 3 is 4.0, then the version number corresponding to the random number 5 is 6.0, then the version number corresponding to the random number 1 is 2.0, then the version number corresponding to the random number 2 is 3.0, so that the name of the firmware file can be determined according to the version numbers.
In some embodiments, sequentially upgrading or rolling back the firmware to be updated by using the plurality of firmware files further includes:
and determining the order of upgrading or backing the firmware to be updated by the plurality of firmware files according to the generation order of the plurality of random numbers.
Specifically, the sequence of generating the random numbers is the sequence for updating the firmware to be updated, for example, in the configuration file, the version numbers of the plurality of firmware files are 2.0, 3.0, 4.0, 5.0, and 6.0 in sequence, and the generated random numbers are 4, 3, 5, 1, and 2, then the version number corresponding to the random number 4 is 5.0, the version number corresponding to the random number 3 is 4.0, then the version number corresponding to the random number 5 is 6.0, then the version number corresponding to the random number 1 is 2.0, then the version number corresponding to the random number 2 is 3.0, so that the updating sequence is to update the firmware to be updated by using the firmware files with version numbers of 5.0, 4.0, 6.0, 2.0, and 3.0.
In some embodiments, individual folders and corresponding directories of the firmware update stress test tool may be created. For firmware update, a file package may be written, and subfolders, such as a conf configuration folder for configuring multiple firmware versions, a log recording folder for recording corresponding upgrade processes, a tool folder for storing upgraded firmware tools, a file folder for storing multiple firmware binary files, and a script folder for storing process encoding source codes, are created in the file package.
In some embodiments, recording the relevant parameters further comprises:
and recording the number of upgrading or rollback, the version number before upgrading or rollback, the version number after upgrading or rollback and a corresponding log.
In some embodiments, further comprising:
and in response to the completion of upgrading or backing off the firmware to be updated, inquiring the current version number of the firmware to be updated so as to determine whether upgrading or backing off is successful according to the current version number.
Specifically, the target version firmware can be updated through the provided upgrading tool, and after the updating is finished, the version is inquired again, and whether the upgrading is successful or not is determined for the target version. And recording the version number before upgrading in the upgrading process, the version number after upgrading, the upgrading times and corresponding logs printed by the upgrading tool in the upgrading process, and storing the logs in a log folder. And for some firmware such as bios, cpld and the like which needs to restart the system after updating, an update test command needs to be added into a boot execution file of the system, such as/etc.
The scheme provided by the invention realizes repeated upgrading and downgrading across a plurality of versions in a file configuration mode, and provides powerful guarantee for the upgrading success rate of the firmware binary file, so that the stability and pressure of the firmware updating process can be verified, the test verification efficiency is improved, more test scenes are covered, more upgrading failure problems can be exposed, various upgrading failure problems are solved through the positioning logs, and powerful guarantee is provided for finally improving the upgrading success rate of the firmware binary file. And the verification of upgrading tests of different firmware versions is realized only by modifying the configuration files, and the operation is simple and efficient.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a firmware update testing system 400, as shown in fig. 2, including:
a first obtaining module 401, where the first obtaining module 401 is configured to obtain a configuration file containing names of a plurality of firmware files;
a determining module 402, where the determining module 402 is configured to generate a plurality of random numbers according to the configuration file, and determine names of corresponding firmware files in the configuration file according to the plurality of random numbers;
a second obtaining module 403, where the second obtaining module 403 is configured to obtain a plurality of firmware files according to names of the firmware files;
an updating module 404, where the updating module 404 is configured to update or rollback the firmware to be updated in sequence by using the plurality of firmware files, and record related parameters.
The scheme provided by the invention realizes repeated upgrading and downgrading among a plurality of versions in a file configuration mode, provides powerful guarantee for the success rate of firmware binary file upgrading, can test stability and pressure, further improves test verification efficiency, covers more test scenes, can expose more upgrading failure problems, and provides powerful guarantee for the success of firmware upgrading functions.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 3, an embodiment of the present invention further provides a computer apparatus 501, comprising:
at least one processor 520; and
the memory 510, the memory 510 stores a computer program 511 that can be executed on the processor, and the processor 520 executes the program to perform any of the steps of the firmware update testing method as described above.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 4, an embodiment of the present invention further provides a computer-readable storage medium 601, where the computer-readable storage medium 601 stores computer program instructions 610, and the computer program instructions 610, when executed by a processor, perform the steps of any one of the above firmware update test methods.
Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes of the methods of the above embodiments may be implemented by a computer program to instruct related hardware to implement the methods.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A firmware update testing method is characterized by comprising the following steps:
acquiring a configuration file containing names of a plurality of firmware files;
generating a plurality of random numbers according to the configuration file, and respectively determining the names of corresponding firmware files in the configuration file according to the random numbers;
acquiring a plurality of firmware files according to the names of the firmware files;
and upgrading or backing the firmware to be updated by utilizing the plurality of firmware files in sequence, and recording related parameters.
2. The method of claim 1, further comprising:
and writing the version numbers and the names of a plurality of firmware files into the configuration file.
3. The method of claim 2, wherein generating a plurality of random numbers from the configuration file further comprises:
counting the number of the plurality of firmware files for writing the version numbers and the names into the configuration files;
determining a range of the generated random numbers according to the number.
4. The method of claim 2, wherein determining the name of the corresponding firmware file in the configuration file according to the plurality of random numbers, respectively, further comprises:
determining the version number of the firmware file in the configuration file according to the random number;
and determining the name of the firmware file according to the version number.
5. The method of claim 1, wherein upgrading or rolling back the firmware to be updated in sequence using the plurality of firmware files further comprises:
and determining the order of upgrading or backing the firmware to be updated by the plurality of firmware files according to the generation order of the plurality of random numbers.
6. The method of claim 1, wherein the related parameters are recorded, further comprising:
and recording the number of upgrading or rollback, the version number before upgrading or rollback, the version number after upgrading or rollback and a corresponding log.
7. The method of claim 1, further comprising:
and in response to the completion of upgrading or backing off the firmware to be updated, inquiring the current version number of the firmware to be updated so as to determine whether upgrading or backing off is successful according to the current version number.
8. A firmware update testing system, comprising:
a first obtaining module configured to obtain a configuration file containing names of a plurality of firmware files;
a determining module configured to generate a plurality of random numbers according to the configuration file, and determine names of corresponding firmware files in the configuration file according to the plurality of random numbers;
a second obtaining module configured to obtain a plurality of firmware files according to names of the plurality of firmware files;
and the updating module is configured to upgrade or rollback the firmware to be updated by using the plurality of firmware files in sequence and record related parameters.
9. A computer device, comprising:
at least one processor; and
memory storing a computer program operable on the processor, wherein the processor executes the program to perform the steps of the method according to any of claims 1-7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the steps of the method according to any one of claims 1 to 7.
CN202011241110.9A 2020-11-09 2020-11-09 Firmware update test method, system, equipment and medium Active CN112433738B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011241110.9A CN112433738B (en) 2020-11-09 2020-11-09 Firmware update test method, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011241110.9A CN112433738B (en) 2020-11-09 2020-11-09 Firmware update test method, system, equipment and medium

Publications (2)

Publication Number Publication Date
CN112433738A true CN112433738A (en) 2021-03-02
CN112433738B CN112433738B (en) 2023-01-06

Family

ID=74700385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011241110.9A Active CN112433738B (en) 2020-11-09 2020-11-09 Firmware update test method, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN112433738B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110119280A (en) * 2018-02-06 2019-08-13 深圳市帝迈生物技术有限公司 The method and device of more firmware upgrades

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110119280A (en) * 2018-02-06 2019-08-13 深圳市帝迈生物技术有限公司 The method and device of more firmware upgrades

Also Published As

Publication number Publication date
CN112433738B (en) 2023-01-06

Similar Documents

Publication Publication Date Title
US20080320109A1 (en) Complex software deployment
CN101308471B (en) Method and device for data restoration
CN109753289B (en) Art resource merging method and device, electronic equipment and storage medium
CN111400267B (en) Method and device for recording logs
CN111400164B (en) Software testing method and device
CN116149902A (en) Data recovery method and device, electronic equipment and computer readable storage medium
CN114860654A (en) Method and system for dynamically changing Iceberg table Schema based on Flink data stream
CN112433738B (en) Firmware update test method, system, equipment and medium
CN110147313B (en) Log output method and device
CN113495829A (en) Automatic interface testing method and system
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium
CN113204359A (en) Online server upgrading method and device
CN111813588A (en) Computer hard disk fault positioning method, device, equipment and storage medium
JP2010152707A (en) Backup method of database and database system
CN111400243A (en) Research and development management system based on pipeline service and file storage method and device
CN111857744A (en) Installation method, system, equipment and medium of super-fusion system
CN111143229A (en) Software testing method and device, computer equipment and computer readable storage medium
CN116016158B (en) Hybrid cloud aPaaS platform deployment method, device, equipment and computer storage medium
CN112463644B (en) Regression testing method, device and equipment of data recovery software and storage medium
CN109446091B (en) Business entity object testing method and device
CN111858315B (en) Software debugging method, device, equipment and medium based on version management
CN111427731B (en) Automatic split code stream and verification code stream testing method and system
CN117493159A (en) Application testing method and device, electronic equipment and readable storage medium
CN113450114A (en) Block chain-based data file acquisition method and device
CN116841463A (en) Data verification method, device and equipment of storage equipment and storage 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
GR01 Patent grant
GR01 Patent grant