CN113722212B - CPLD upgrading test method, device, equipment and medium - Google Patents

CPLD upgrading test method, device, equipment and medium Download PDF

Info

Publication number
CN113722212B
CN113722212B CN202110930468.0A CN202110930468A CN113722212B CN 113722212 B CN113722212 B CN 113722212B CN 202110930468 A CN202110930468 A CN 202110930468A CN 113722212 B CN113722212 B CN 113722212B
Authority
CN
China
Prior art keywords
cpld
switch
upgrade
upgraded
updating
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.)
Active
Application number
CN202110930468.0A
Other languages
Chinese (zh)
Other versions
CN113722212A (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 CN202110930468.0A priority Critical patent/CN113722212B/en
Publication of CN113722212A publication Critical patent/CN113722212A/en
Application granted granted Critical
Publication of CN113722212B publication Critical patent/CN113722212B/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/3688Test management for test execution, e.g. scheduling of test suites
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a CPLD upgrade test method, device, equipment and medium, wherein the method comprises the following steps: executing CPLD updating script to upgrade CPLD of exchanger to be upgraded and make CPLD effective after upgrade; judging whether sound logic information is captured on a screen; if yes, judging that the CPU terminal enters the switch to be upgraded, and switching to the BMC terminal; judging whether BMC logic information is captured on a screen; if yes, judging that the BMC terminal of the switch to be upgraded is entered, updating the cycle upgrading times, and judging whether the cycle upgrading times after updating meet the preset requirements; and if the number of the updated cyclic upgrades does not reach the preset requirement, re-executing the steps from executing the CPLD updating script. Therefore, the full-automatic CPLD upgrading test can be performed, more personnel and labor force are not needed, the cost is reduced, and the upgrading result can be seen after each upgrading is completed.

Description

CPLD upgrading test method, device, equipment and medium
Technical Field
The present disclosure relates to the field of testing technologies, and in particular, to a CPLD upgrade testing method, device, apparatus, and medium.
Background
At present, the switch is generally two systems, one is a BMC (Baseboard Management Controller ) end, and mainly plays a role in controlling and supervising whether various sensors of the whole switch are normal or not; the other is a CPU (central processing unit ) end, the starting of the CPU end requires CPLD (Complex Programmable logic device ) and BIOS (Basic Input Output System, basic input output system) to function normally, wherein the CPLD is mainly composed of three parts of logic blocks, programmable interconnection channels and I/O blocks, plays a decisive role in the starting process of the switch and the server, and the version of the CPLD needs to be updated when the function of the CPLD is changed or the known bug needs to be repaired.
The current CPLD upgrade test mode mainly carries out hundred upgrades directly according to scripts provided by research and development, but does not judge whether the upgrade is successful in the middle, and only carries out unified CPLD upgrade first, and restarts in a time period which does not affect normal work to enable the upgraded CPLD to take effect, so as to see whether the upgrade is successful, thereby completing the CPLD upgrade test.
Disclosure of Invention
In view of this, the purpose of the present application is to provide a CPLD upgrade test method, device, equipment, and medium, which can perform full-automatic CPLD upgrade test, without requiring much personnel and labor force, reduce cost, and enable the upgrade result to be seen after each upgrade. The specific scheme is as follows:
in a first aspect, the present application discloses a CPLD upgrade test method applied to a SecureCRT tool on a computer device for upgrade testing, including:
executing a CPLD update script so as to upgrade the CPLD of the switch to be upgraded, which is connected with the SecureCRT tool, and enabling the CPLD after upgrade to be effective;
judging whether sound logic information is captured on a screen of the computer equipment;
if the sonic logic information is captured on the screen, judging that the CPU terminal enters the switch to be upgraded, and switching to the BMC terminal of the switch to be upgraded;
judging whether BMC logic information is captured on the screen;
if BMC logic information is captured on the screen, judging whether the BMC terminal enters the switch to be upgraded, updating the cycle upgrading times, and judging whether the cycle upgrading times after updating meet the preset requirement or not;
and if the number of the updated cyclic upgrades does not reach the preset requirement, re-executing the steps from executing the CPLD updating script.
Optionally, before the CPLD update script is executed to upgrade the CPLD of the switch to be upgraded connected to the SecureCRT tool and validate the CPLD after upgrade, the method further includes:
and connecting with the serial port of the switch to be upgraded in a telenet mode so that the SecureCRT tool sends an instruction to the switch to be upgraded.
Optionally, the executing the CPLD update script to upgrade the CPLD of the switch to be upgraded connected to the SecureCRT tool and validate the CPLD after upgrade includes:
executing a CPLD updating script to send an updating instruction to a switch to be updated, which is connected with the SecureCRT tool, so that the switch to be updated executes the CPLD updating script under a preset path, and the CPLD mirror image under the preset path is utilized to complete the CPLD updating of the switch to be updated;
executing the CPLD updating script to generate an effective instruction under the switch to be upgraded so that the switch to be upgraded executes the CPLD effective script under the preset path to enable the CPLD to be effective after upgrading, wherein the preset path is under the var/log/flash path of the BMC of the switch to be upgraded.
Optionally, the updating the number of cyclic upgrades and determining whether the number of cyclic upgrades after updating reaches a preset requirement includes:
subtracting 1 from the current cycle number to obtain updated cycle upgrading times;
and judging whether the number of the updated cyclic upgrades is less than 1.
Optionally, the updating the number of cyclic upgrades and determining whether the number of cyclic upgrades after updating reaches a preset requirement includes:
adding 1 to the current circulation times to obtain updated circulation upgrading times;
and judging whether the updated cycle upgrading times are not smaller than a preset cycle times threshold.
Optionally, the determining whether the sound logic information is captured on the screen of the computer device further includes:
and if the sound logic information is not captured on the screen, throwing an exception and stopping upgrading the switch to be upgraded.
Optionally, the CPLD upgrading method further includes:
recording log information of upgrading production of the CPLD in the switch to be upgraded each time;
and storing the log information so as to analyze the reason of the upgrade failure according to the log information when the CPLD upgrade fails.
In a second aspect, the present application discloses a CPLD upgrade test apparatus, applied to a SecureCRT tool on a computer device for upgrade testing, comprising:
the upgrade and validation module is used for executing a CPLD upgrade script so as to upgrade the CPLD of the switch to be upgraded, which is connected with the SecureCRT tool, and validate the CPLD after upgrade;
the first judging module is used for judging whether sound logic information is captured on a screen of the computer equipment;
the switching module is used for judging that the CPU terminal of the switch to be upgraded is entered when the sound logic information is captured on the screen, and switching the CPU terminal to the BMC terminal of the switch to be upgraded;
the second judging module is used for judging whether BMC logic information is captured on the screen;
the third judging module is used for judging whether the BMC end entering the switch to be upgraded updates the cycle upgrading times and judging whether the cycle upgrading times after updating reach the preset requirement or not when the BMC logic information is captured on the screen;
and the circulation module is used for re-executing the steps from executing the CPLD updating script when the number of circulation upgrading times after updating does not reach the preset requirement.
In a third aspect, the present application discloses an electronic device comprising:
a memory and a processor;
wherein the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the CPLD upgrade test method disclosed above.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the CPLD upgrade test method disclosed above.
As can be seen, the present application discloses a CPLD upgrade test method, which is applied to a SecureCRT tool on a computer device for upgrade test, and first executes a CPLD upgrade script so as to upgrade a CPLD of a switch to be upgraded, which is connected to the SecureCRT tool, and to enable the CPLD to be effective after upgrade. It is determined whether sound logic information is captured on a screen of the computer device. And if the sound logic information is captured on the screen, judging that the CPU terminal enters the switch to be upgraded, and switching to the BMC terminal of the switch to be upgraded. Then judging whether BMC logic information is captured on the screen; if BMC logic information is captured on the screen, judging whether the BMC terminal enters the switch to be upgraded, updating the cycle upgrading times, and judging whether the cycle upgrading times after updating meet the preset requirement or not; and if the number of the updated cyclic upgrades does not reach the preset requirement, re-executing the steps from executing the CPLD updating script. Therefore, the SecureCRT tool in the application enables the CPLD to be effective after each upgrade is completed, and can judge whether the CPU end is successful or not by capturing sound logic information on the screen, if so, the BMC logic information on the screen can be captured, so that whether the BMC end is successful or not is judged, the upgrade is successfully performed, the number of times of cyclic upgrade can be automatically updated, and then whether the number of times of cyclic upgrade after the update reaches the preset requirement is judged, so that whether the upgrade test is finished or not is determined, if not, the next upgrade test can be automatically started, so that the full-automatic CPLD upgrade test can be realized, more personnel and labor are not needed, the cost is reduced, and after each upgrade is completed and effective, the upgrade result can be confirmed by capturing the sound logic information and the BMC logic information on the screen, so that the upgrade result can be seen after each upgrade is completed, and the upgrade result can be checked in time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
Fig. 1 is a flowchart of a CPLD upgrade test method disclosed in the present application;
fig. 2 is a flowchart of a specific CPLD upgrade test method disclosed in the present application;
fig. 3 is a flowchart of a specific CPLD upgrade test method disclosed in the present application;
fig. 4 is a schematic structural diagram of a CPLD upgrade test device disclosed in the present application;
fig. 5 is a schematic structural diagram of an electronic device disclosed in the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
At present, the CPLD upgrade test mode mainly carries out hundred upgrades directly according to scripts provided by research and development, but does not judge whether the upgrade is successful in the middle, and only carries out unified CPLD upgrade first, and restarts in a time period which does not affect normal work to enable the upgraded CPLD to take effect, so as to see whether the upgrade is successful, thereby completing the CPLD upgrade test. In view of this, the present application provides a CPLD upgrade test method, which can perform full-automatic CPLD upgrade test, does not require much personnel and labor force, reduces cost, and can see upgrade results after each upgrade is completed.
Referring to fig. 1, an embodiment of the application discloses a CPLD upgrade test method applied to a securcrt tool on a computer device for upgrade test, the method comprising:
step S11: and executing a CPLD updating script so as to upgrade the CPLD of the switch to be upgraded, which is connected with the SecureCRT tool, and enabling the CPLD after upgrade to be effective.
In practice, a SecureCRT tool is installed on the end of a computer device for upgrade testing, typically a PC (Personal Computer ), and can be connected to a switch to be upgraded so that the SecureCRT tool can send relevant data to the switch to be upgraded. The SecureCRT tool needs to execute CPLD upgrade script first to finish upgrade of CPLD in the switch to be upgraded, and make the CPLD effective after the CPLD is effective.
Specifically, the secureCRT tool executes a CPLD update script to upgrade a CPLD of a switch to be upgraded connected with the secureCRT tool and enable the upgraded CPLD to be effective, including: executing a CPLD updating script to send an updating instruction to a switch to be updated, which is connected with the SecureCRT tool, so that the switch to be updated executes the CPLD updating script under a preset path, and the CPLD mirror image under the preset path is utilized to complete the CPLD updating of the switch to be updated; executing the CPLD updating script to generate an effective instruction under the switch to be upgraded so that the switch to be upgraded executes the CPLD effective script under the preset path to enable the CPLD to be effective after upgrading, wherein the preset path is under the var/log/flash path of the BMC of the switch to be upgraded.
That is, the secureCRT tool needs to execute a CPLD update script, when executing the CPLD update script, the secureCRT tool sends an upgrade instruction to the switch to be upgraded, after receiving the upgrade instruction, the switch to be upgraded executes a CPLD update script stored under a preset path, and in the process of executing the CPLD update script, the switch to be upgraded can complete upgrading of the CPLD by using a CPLD mirror image under the preset path. And then, when the secure CRT tool executes the CPLD updating script again, a validation instruction is sent to the switch to be upgraded, and after the switch to be upgraded acquires the validation instruction, the CPLD validating script under the preset path is executed, so that the CPLD in the switch to be upgraded is validated, wherein the preset path can be under a var/log/flash path of the BMC of the switch to be upgraded, and can be other paths under the switch to be upgraded, and only the CPLD updating script, the CPLD image and the CPLD validating script can be prevented from being lost when the BMC is restarted.
Step S12: it is determined whether sound logic information is captured on a screen of the computer device.
After the switch to be upgraded completes CPLD upgrading and takes effect after upgrading, whether the upgrading is successful or not needs to be judged. That is, it is also necessary to determine whether sound logic information is captured on the screen of the computer device.
Step S13: and if the sound logic information is captured on the screen, judging that the CPU terminal enters the switch to be upgraded, and switching to the BMC terminal of the switch to be upgraded.
It can be understood that the capturing of the sound logic information on the screen indicates that the CPU end of the switch to be upgraded can be accessed, the CPU end of the switch to be upgraded is determined to be accessed, and the switch is switched to the BMC end of the switch to be upgraded, so as to determine whether the CPU end of the switch to be upgraded can be accessed.
Step S14: and judging whether BMC logic information is captured on the screen.
It can be appreciated that after switching to the BMC end of the switch to be upgraded, it is further required to determine whether BMC logic information is captured on the screen.
Step S15: if BMC logic information is captured on the screen, judging whether the BMC terminal enters the switch to be upgraded, updating the cycle upgrading times, and judging whether the cycle upgrading times after updating meet the preset requirement or not.
If BMC logic information is captured on the screen, the BMC terminal entering the switch to be upgraded is judged, the CPLD upgrading is completed at this time, a cyclic upgrading test is required to be updated, and then whether the number of cyclic upgrading times after updating reaches a preset requirement or not is judged, namely whether the upgrading test is completed or not is judged, wherein the preset requirement can be set according to actual conditions.
Step S16: and if the number of the updated cyclic upgrades does not reach the preset requirement, re-executing the steps from executing the CPLD updating script.
If the number of the cyclic upgrades after the update does not reach the preset requirement, the upgrade test is not completed, so that the step from executing the CPLD update script needs to be re-executed, and the next upgrade test is performed.
As can be seen, the present application discloses a CPLD upgrade test method, which is applied to a SecureCRT tool on a computer device for upgrade test, and first executes a CPLD upgrade script so as to upgrade a CPLD of a switch to be upgraded, which is connected to the SecureCRT tool, and to enable the CPLD to be effective after upgrade. It is determined whether sound logic information is captured on a screen of the computer device. And if the sound logic information is captured on the screen, judging that the CPU terminal enters the switch to be upgraded, and switching to the BMC terminal of the switch to be upgraded. Then judging whether BMC logic information is captured on the screen; if BMC logic information is captured on the screen, judging whether the BMC terminal enters the switch to be upgraded, updating the cycle upgrading times, and judging whether the cycle upgrading times after updating meet the preset requirement or not; and if the number of the updated cyclic upgrades does not reach the preset requirement, re-executing the steps from executing the CPLD updating script. Therefore, the SecureCRT tool in the application enables the CPLD to be effective after each upgrade is completed, and can judge whether the CPU end is successful or not by capturing sound logic information on the screen, if so, the BMC logic information on the screen can be captured, so that whether the BMC end is successful or not is judged, the upgrade is successfully performed, the number of times of cyclic upgrade can be automatically updated, and then whether the number of times of cyclic upgrade after the update reaches the preset requirement is judged, so that whether the upgrade test is finished or not is determined, if not, the next upgrade test can be automatically started, so that the full-automatic CPLD upgrade test can be realized, more personnel and labor are not needed, the cost is reduced, and after each upgrade is completed and effective, the upgrade result can be confirmed by capturing the sound logic information and the BMC logic information on the screen, so that the upgrade result can be seen after each upgrade is completed, and the upgrade result can be checked in time.
Referring to fig. 2, an embodiment of the present application discloses a specific CPLD upgrade test method applied to a securcrt tool on a computer device for upgrade testing, where the method includes:
step S21: and connecting with the serial port of the switch to be upgraded in a telenet mode so that the SecureCRT tool sends an instruction to the switch to be upgraded.
Before the upgrade test, the secureCRT tool needs to be connected with the switch to be upgraded, specifically, the secureCRT tool can be connected with a serial port of the switch to be upgraded in a telenet mode, so that the secureCRT tool sends an instruction to the switch to be upgraded.
Step S22: and executing a CPLD updating script so as to upgrade the CPLD of the switch to be upgraded, which is connected with the SecureCRT tool, and enabling the CPLD after upgrade to be effective.
Step S23: it is determined whether sound logic information is captured on a screen of the computer device.
Step S24: and if the sound logic information is captured on the screen, judging that the CPU terminal enters the switch to be upgraded, and switching to the BMC terminal of the switch to be upgraded.
After judging whether the sound logic information is captured on the screen of the computer equipment, if the sound logic information is not captured on the screen, the upgrade test is abnormal, and the abnormality needs to be thrown out and the upgrade operation of the switch to be upgraded is stopped.
Step S25: and judging whether BMC logic information is captured on the screen.
Step S26: if BMC logic information is captured on the screen, judging whether the BMC terminal enters the switch to be upgraded, updating the cycle upgrading times, and judging whether the cycle upgrading times after updating meet the preset requirement or not.
And judging whether BMC logic information is captured on the screen, if the BMC logic information is not captured on the screen, indicating that the upgrade test is abnormal, and throwing the abnormality and stopping the upgrade operation of the switch to be upgraded.
If BMC logic information is captured on the screen, judging whether the BMC terminal of the switch to be updated is entered, updating the cycle upgrading times is needed, and judging whether the cycle upgrading times after updating reach the preset requirement or not.
The method for updating the cycle upgrade times and judging whether the cycle upgrade times after updating reach the preset requirement comprises the following steps: subtracting 1 from the current cycle number to obtain updated cycle upgrading times; and judging whether the number of the updated cyclic upgrades is less than 1. That is, the number of cyclic upgrade tests is reduced by 1 each time the upgrade test is successful, so as to obtain the number of cyclic upgrade tests after updating, until the number of cyclic upgrade tests after updating is less than 1.
The updating the cycle upgrade times and judging whether the cycle upgrade times after updating reach the preset requirement or not comprises the following steps: adding 1 to the current circulation times to obtain updated circulation upgrading times; judging whether the updated cycle number is not less than a preset cycle number threshold, wherein the preset cycle number threshold can be determined according to actual conditions and is not particularly limited herein.
Step S27: and if the number of the updated cyclic upgrades does not reach the preset requirement, re-executing the steps from executing the CPLD updating script.
In the whole CPLD upgrading test process, log information of upgrading production of the CPLD in the switch to be upgraded each time is required to be recorded; and storing the log information so as to analyze the reason of the upgrade failure according to the log information when the CPLD upgrade fails.
Referring to fig. 3, a CPLD upgrade test flow chart is shown. Firstly uploading a CPLD image, a CPLD upgrading script and a CPLD effective script to a BMC appointed path of a switch to be upgraded, then entering the BMC appointed path to endow authority to the CPLD image, the CPLD upgrading script and the CPLD effective script, checking the current CPLD version, executing the CPLD upgrading script when the switch to be upgraded receives an upgrading instruction sent by a SecureCRT tool, then executing the CPLD effective script when receiving an effective instruction sent by the SecureCRT tool, waiting for a CPU and BMC to restart automatically, judging whether sound logic information is captured on a screen of a computer device where the SecureCRT tool is located, if not, judging that the BMC end entering the switch to be upgraded is abnormally stopped, if not, switching to the BMC end of the switch to be upgraded, and judging whether logic information is captured on the screen; if not, the SecureCRT tool throws out the abnormal stop upgrade, if so, the BMC end entering the switch to be upgraded is judged, the cycle upgrade times are updated, whether the cycle upgrade times after the update are less than 1 is judged, and if not less than 1, the step of starting from the current CPLD version is re-executed.
Referring to fig. 4, an embodiment of the application discloses a CPLD upgrade test device, which is applied to a securcrt tool on a computer device for upgrade test, and includes:
an upgrade and validation module 11, configured to execute a CPLD upgrade script, so as to upgrade a CPLD of a switch to be upgraded, which is connected to the SecureCRT tool, and validate the CPLD after upgrade;
a first judging module 12, configured to judge whether sonic logic information is captured on a screen of the computer device;
the switching module 13 is configured to determine that the sound logic information is captured on the screen, and switch the sound logic information to the BMC end of the switch to be upgraded;
a second judging module 14, configured to judge whether BMC logic information is captured on the screen;
the third judging module 15 is configured to, when BMC logic information is captured on the screen, judge that the BMC terminal of the switch to be upgraded is entered, update the number of cyclic upgrades, and judge whether the number of cyclic upgrades after updating reaches a preset requirement;
and the loop module 16 is configured to re-execute the steps from executing the CPLD update script when the number of post-update loop upgrades does not reach the preset requirement.
As can be seen, the present application discloses a CPLD upgrade test method, which is applied to a SecureCRT tool on a computer device for upgrade test, and first executes a CPLD upgrade script so as to upgrade a CPLD of a switch to be upgraded, which is connected to the SecureCRT tool, and to enable the CPLD to be effective after upgrade. It is determined whether sound logic information is captured on a screen of the computer device. And if the sound logic information is captured on the screen, judging that the CPU terminal enters the switch to be upgraded, and switching to the BMC terminal of the switch to be upgraded. Then judging whether BMC logic information is captured on the screen; if BMC logic information is captured on the screen, judging whether the BMC terminal enters the switch to be upgraded, updating the cycle upgrading times, and judging whether the cycle upgrading times after updating meet the preset requirement or not; and if the number of the updated cyclic upgrades does not reach the preset requirement, re-executing the steps from executing the CPLD updating script. Therefore, the SecureCRT tool in the application enables the CPLD to be effective after each upgrade is completed, and can judge whether the CPU end is successful or not by capturing sound logic information on the screen, if so, the BMC logic information on the screen can be captured, so that whether the BMC end is successful or not is judged, the upgrade is successfully performed, the number of times of cyclic upgrade can be automatically updated, and then whether the number of times of cyclic upgrade after the update reaches the preset requirement is judged, so that whether the upgrade test is finished or not is determined, if not, the next upgrade test can be automatically started, so that the full-automatic CPLD upgrade test can be realized, more personnel and labor are not needed, the cost is reduced, and after each upgrade is completed and effective, the upgrade result can be confirmed by capturing the sound logic information and the BMC logic information on the screen, so that the upgrade result can be seen after each upgrade is completed, and the upgrade result can be checked in time.
In a specific implementation process, the CPLD upgrade test device further includes:
and the communication connection module is used for connecting with the serial port of the switch to be upgraded in a telenet mode so that the SecureCRT tool sends an instruction to the switch to be upgraded.
In a specific implementation, the upgrade and validation module 11 is configured to:
executing a CPLD updating script to send an updating instruction to a switch to be updated, which is connected with the SecureCRT tool, so that the switch to be updated executes the CPLD updating script under a preset path, and the CPLD mirror image under the preset path is utilized to complete the CPLD updating of the switch to be updated;
executing the CPLD updating script to generate an effective instruction under the switch to be upgraded so that the switch to be upgraded executes the CPLD effective script under the preset path to enable the CPLD to be effective after upgrading, wherein the preset path is under the var/log/flash path of the BMC of the switch to be upgraded.
In a specific implementation process, the third determining module 15 is configured to:
subtracting 1 from the current cycle number to obtain updated cycle upgrading times;
and judging whether the number of the updated cyclic upgrades is less than 1.
In a specific implementation process, the third determining module 15 is configured to:
adding 1 to the current circulation times to obtain updated circulation upgrading times;
and judging whether the updated cycle upgrading times are not smaller than a preset cycle times threshold.
In a specific implementation process, the CPLD upgrade test device further includes:
and the exception handling module is used for throwing out an exception and stopping upgrading the switch to be upgraded if the sound logic information is not captured on the screen.
In a specific implementation process, the CPLD upgrade test device further includes:
the diary recording module is used for recording log information of upgrading production of the CPLD in the switch to be upgraded each time; and storing the log information so as to analyze the reason of the upgrade failure according to the log information when the CPLD upgrade fails.
Fig. 5 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application, where the electronic device 20 may specifically include, but is not limited to, a notebook computer or a desktop computer.
Generally, the electronic apparatus 20 in the present embodiment includes: a processor 21 and a memory 22.
Processor 21 may include one or more processing cores, such as a four-core processor, an eight-core processor, or the like, among others. The processor 21 may be implemented using at least one hardware selected from DSP (digital signal processing ), FPGA (field-programmable gate array, field programmable array), PLA (programmable logic array ). The processor 21 may also comprise a main processor, which is a processor for processing data in an awake state, also called CPU (central processing unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a GPU (graphics processing unit, image processor) for taking care of rendering and drawing of images that the display screen is required to display. In some embodiments, the processor 21 may include an AI (artificial intelligence ) processor for processing computing operations related to machine learning.
Memory 22 may include one or more computer-readable storage media, which may be non-transitory. Memory 22 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 22 is at least used for storing a computer program 221, which, when loaded and executed by the processor 21, is capable of implementing the CPLD upgrade test method steps disclosed in any of the foregoing embodiments.
In some embodiments, the electronic device 20 may further include a display screen 23, an input-output interface 24, a communication interface 25, a sensor 26, a power supply 27, and a communication bus 28.
It will be appreciated by those skilled in the art that the structure shown in fig. 5 is not limiting of the electronic device 20 and may include more or fewer components than shown.
Further, the embodiment of the application also discloses a computer readable storage medium for storing a computer program, wherein the computer program realizes the CPLD upgrade test method disclosed in any one of the previous embodiments when being executed by a processor.
The specific process of the CPLD upgrade test method may refer to the corresponding content disclosed in the foregoing embodiment, and will not be described herein.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a list of processes, methods, articles, or apparatus that comprises other elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The method, the device, the equipment and the medium for testing CPLD upgrading provided by the application are described in detail, and specific examples are applied to the description of the principle and the implementation of the application, and the description of the above examples is only used for helping to understand the method and the core idea of the application; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (9)

1. A CPLD upgrade test method, applied to a SecureCRT tool on a computer device for upgrade testing, comprising:
executing a CPLD update script so as to upgrade the CPLD of the switch to be upgraded, which is connected with the SecureCRT tool, and enabling the CPLD after upgrade to be effective;
judging whether sound logic information is captured on a screen of the computer equipment;
if the sonic logic information is captured on the screen, judging that the CPU terminal enters the switch to be upgraded, and switching to the BMC terminal of the switch to be upgraded;
judging whether BMC logic information is captured on the screen;
if BMC logic information is captured on the screen, judging whether the BMC terminal enters the switch to be upgraded, updating the cycle upgrading times, and judging whether the cycle upgrading times after updating meet the preset requirement or not;
if the number of the updated cyclic upgrades does not reach the preset requirement, re-executing the steps from executing the CPLD updating script;
wherein the executing the CPLD update script to upgrade and validate the CPLD of the switch to be upgraded connected to the SecureCRT tool comprises:
executing a CPLD updating script to send an updating instruction to a switch to be updated, which is connected with the SecureCRT tool, so that the switch to be updated executes the CPLD updating script under a preset path, and the CPLD mirror image under the preset path is utilized to complete the CPLD updating of the switch to be updated;
executing the CPLD updating script to generate an effective instruction under the switch to be upgraded so that the switch to be upgraded executes the CPLD effective script under the preset path to enable the CPLD to be effective after upgrading, wherein the preset path is under the var/log/flash path of the BMC of the switch to be upgraded.
2. The CPLD upgrade test method according to claim 1, wherein said executing a CPLD upgrade script to upgrade a CPLD of a switch to be upgraded connected to said securcrt tool and to validate the upgraded CPLD, further comprises:
and connecting with the serial port of the switch to be upgraded in a telenet mode so that the SecureCRT tool sends an instruction to the switch to be upgraded.
3. The CPLD upgrade test method according to claim 1, wherein the updating the number of cyclic upgrades and determining whether the number of cyclic upgrades after the updating meets a preset requirement comprises:
subtracting 1 from the current cycle number to obtain updated cycle upgrading times;
and judging whether the number of the updated cyclic upgrades is less than 1.
4. The CPLD upgrade test method according to claim 1, wherein the updating the number of cyclic upgrades and determining whether the number of cyclic upgrades after the updating meets a preset requirement comprises:
adding 1 to the current circulation times to obtain updated circulation upgrading times;
and judging whether the updated cycle upgrading times are not smaller than a preset cycle times threshold.
5. The CPLD upgrade testing method according to claim 1, wherein said determining whether sound logic information is captured on a screen of said computer device further comprises:
and if the sound logic information is not captured on the screen, throwing an exception and stopping upgrading the switch to be upgraded.
6. The CPLD upgrade testing method according to claim 1, further comprising:
recording log information of upgrading production of the CPLD in the switch to be upgraded each time;
and storing the log information so as to analyze the reason of the upgrade failure according to the log information when the CPLD upgrade fails.
7. A CPLD upgrade test apparatus, applied to a SecureCRT tool on a computer device for upgrade testing, comprising:
the upgrade and validation module is used for executing a CPLD upgrade script so as to upgrade the CPLD of the switch to be upgraded, which is connected with the SecureCRT tool, and validate the CPLD after upgrade;
the first judging module is used for judging whether sound logic information is captured on a screen of the computer equipment;
the switching module is used for judging that the CPU terminal of the switch to be upgraded is entered when the sound logic information is captured on the screen, and switching the CPU terminal to the BMC terminal of the switch to be upgraded;
the second judging module is used for judging whether BMC logic information is captured on the screen;
the third judging module is used for judging whether the BMC end entering the switch to be upgraded updates the cycle upgrading times and judging whether the cycle upgrading times after updating reach the preset requirement or not when the BMC logic information is captured on the screen;
the circulation module is used for re-executing the step from executing the CPLD updating script when the circulation upgrading times after updating do not reach the preset requirement;
the upgrading and validating module specifically comprises:
the first script execution unit is used for executing a CPLD updating script to send an updating instruction to a switch to be updated, which is connected with the SecureCRT tool, so that the switch to be updated executes the CPLD updating script under a preset path, and the CPLD mirror image under the preset path is utilized to complete the CPLD updating of the switch to be updated;
and the second script execution unit is used for executing the CPLD updating script to generate an effective instruction under the switch to be upgraded so that the switch to be upgraded executes the CPLD effective script under the preset path to enable the CPLD to be effective after upgrading, wherein the preset path is under the var/log/flash path of the BMC of the switch to be upgraded.
8. An electronic device, comprising:
a memory and a processor;
wherein the memory is used for storing a computer program;
the processor configured to execute the computer program to implement the CPLD upgrade test method of any one of claims 1 to 6.
9. A computer readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the CPLD upgrade test method according to any one of claims 1 to 6.
CN202110930468.0A 2021-08-13 2021-08-13 CPLD upgrading test method, device, equipment and medium Active CN113722212B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110930468.0A CN113722212B (en) 2021-08-13 2021-08-13 CPLD upgrading test method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110930468.0A CN113722212B (en) 2021-08-13 2021-08-13 CPLD upgrading test method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN113722212A CN113722212A (en) 2021-11-30
CN113722212B true CN113722212B (en) 2023-07-14

Family

ID=78675834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110930468.0A Active CN113722212B (en) 2021-08-13 2021-08-13 CPLD upgrading test method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113722212B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116225890A (en) * 2022-09-06 2023-06-06 中科可控信息产业有限公司 Firmware update test method, device, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017041499A1 (en) * 2015-09-08 2017-03-16 中兴通讯股份有限公司 Software upgrade method and system, and computer-readable storage medium
CN112118132A (en) * 2020-09-11 2020-12-22 苏州浪潮智能科技有限公司 Method, device and equipment for upgrading switch firmware and readable medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017041499A1 (en) * 2015-09-08 2017-03-16 中兴通讯股份有限公司 Software upgrade method and system, and computer-readable storage medium
CN112118132A (en) * 2020-09-11 2020-12-22 苏州浪潮智能科技有限公司 Method, device and equipment for upgrading switch firmware and readable medium

Also Published As

Publication number Publication date
CN113722212A (en) 2021-11-30

Similar Documents

Publication Publication Date Title
CN107122321B (en) Hardware repair method, hardware repair system, and computer-readable storage device
US9152544B2 (en) Method and system for upgrading a firmware of a chip and baseboard management controller by waiting until an idle state of a connected system to finish upgrade
US8782643B2 (en) Device and method for controlling communication between BIOS and BMC
CN107111595B (en) Method, device and system for detecting early boot errors
CN110673936B (en) Breakpoint continuous operation method and device for arrangement service, storage medium and electronic equipment
WO2016206514A1 (en) Startup processing method and device
CN108121842B (en) Method and device for verifying low-power-consumption working mode of multiprocessor system chip
US11579977B2 (en) Data storage device restoring method
CN113722212B (en) CPLD upgrading test method, device, equipment and medium
CN113986635B (en) BIOS testing method, system, storage medium and device
CN111480142A (en) Seamless and secure upgrade of software intensive systems during runtime
CN113315675B (en) White box switch U-Boot automatic testing method, system and storage medium
CN113672306B (en) Server component self-checking abnormity recovery method, device, system and medium
CN103475514B (en) Node, group system and BIOS without BMC repair and upgrade method
CN111383704B (en) Built-in self-test circuit of memory and test method for memory
CN111400997A (en) Processor core verification method, system and medium based on synchronous execution
US8060778B2 (en) Processor controller, processor control method, storage medium, and external controller
CN113377586B (en) Automatic detection method and device for server and storage medium
US20190286544A1 (en) Method, device and server for checking a defective function
CN106909382B (en) Method and device for outputting different types of system starting information
US9953293B2 (en) Method for controlling changes of replication directions in a multi-site disaster recovery environment for high available application
CN116501343A (en) Program upgrading method, power supply and computing device
CN114461142B (en) Method, system, device and medium for reading and writing Flash data
CN110134456A (en) For managing the method, apparatus, equipment and storage medium of operating system
CN115204081A (en) Chip simulation method, chip simulation platform, chip simulation system, and computer-readable 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