CN113722212A - CPLD upgrade test method, device, equipment and medium - Google Patents

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

Info

Publication number
CN113722212A
CN113722212A CN202110930468.0A CN202110930468A CN113722212A CN 113722212 A CN113722212 A CN 113722212A CN 202110930468 A CN202110930468 A CN 202110930468A CN 113722212 A CN113722212 A CN 113722212A
Authority
CN
China
Prior art keywords
cpld
upgraded
switch
upgrading
upgrade
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
CN202110930468.0A
Other languages
Chinese (zh)
Other versions
CN113722212B (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)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a CPLD upgrade test method, a device, equipment and a medium, wherein the method comprises the following steps: executing the CPLD updating script so as to upgrade the CPLD of the switch to be upgraded and enable the upgraded CPLD to take effect; judging whether sonic logic information is captured on a screen or not; if yes, judging to enter a CPU end of the switch to be upgraded, and switching to a BMC end; judging whether BMC logic information is captured on a screen or not; if so, judging that the BMC end of the switch to be upgraded enters, updating the cycle upgrading times, and judging whether the updated cycle upgrading times meet the preset requirement; and if the number of the cyclic upgrading times after the updating does not reach the preset requirement, re-executing the steps from the execution of the CPLD updating script. Therefore, the full-automatic CPLD upgrading test can be carried out, the labor force of a plurality of personnel is not needed, the cost is reduced, and the upgrading result can be seen after the upgrading is finished every time.

Description

CPLD upgrade test method, device, equipment and medium
Technical Field
The present application relates to the field of testing technologies, and in particular, to a CPLD upgrade testing method, apparatus, device, and medium.
Background
At present, a 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; the other is a Central Processing Unit (CPU), and the CPU needs to start a CPLD (Complex Programmable logic device) and a BIOS (Basic Input Output System) to have normal functions, wherein the CPLD mainly includes a logic block, a Programmable interconnection channel, and an I/O block, and plays a decisive role in the starting process of the switch and the server, and when the function of the CPLD changes or a known bug needs to be repaired, the version of the bug needs to be upgraded.
The existing CPLD upgrade test mode is mainly to directly upgrade for hundreds of times according to a script provided by research and development, but whether the upgrade is successful or not is not judged in the middle, and only the unified CPLD upgrade is firstly carried out, the CPLD after the upgrade is effective by restarting in a time period without influencing normal work, and whether the upgrade is successful or not is seen, so that the CPLD upgrade test is completed.
Disclosure of Invention
In view of the above, an object of the present application is to provide a CPLD upgrade testing method, device, apparatus, and medium, which can perform a fully automated CPLD upgrade test, do not require much labor force, reduce the cost, and enable the upgrade result to be visible after each upgrade is completed. 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 test, including:
executing a CPLD updating script so as to update the CPLD of the switch to be updated connected with the SecureCRT tool and enable the updated CPLD to take effect;
judging whether sonic logic information is captured on a screen of the computer equipment;
if the sonic logic information is captured on the screen, judging that the sonic logic information enters the CPU end of the switch to be upgraded, and switching to the BMC end of the switch to be upgraded;
judging whether BMC logic information is captured on the screen or not;
if the BMC logic information is captured on the screen, judging that the BMC enters the BMC end of the switch to be upgraded, updating the cycle upgrading times, and judging whether the updated cycle upgrading times meet the preset requirement;
and if the number of the cyclic upgrading times after the updating does not reach the preset requirement, re-executing the steps from the execution of the CPLD updating script.
Optionally, before the executing the CPLD update script to upgrade the CPLD of the switch to be upgraded connected to the SecureCRT tool and enable the upgraded CPLD to be effective, the method further includes:
and connecting the SecureCRT tool with the serial port of the switch to be upgraded in a telenet mode so that the SecureCRT tool can send 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 enable the upgraded CPLD to be effective includes:
executing a CPLD updating script to send an updating instruction to a switch to be updated connected with the SecureCRT tool so that the switch to be updated executes the CPLD updating script under a preset path and finishes the CPLD updating of the switch by utilizing a CPLD mirror image under the preset path;
and executing the CPLD updating script to send an effective instruction to the switch to be upgraded so that the switch to be upgraded executes the CPLD effective script under the preset path to enable the upgraded CPLD to be effective, wherein the preset path is under a var/log/flash path of the BMC of the switch to be upgraded.
Optionally, the updating the number of cyclic upgrade and determining whether the updated number of cyclic upgrade meets a preset requirement includes:
subtracting 1 from the current cycle number to obtain the updated cycle upgrading number;
and judging whether the updated cycle upgrading times are less than 1.
Optionally, the updating the number of cyclic upgrade and determining whether the updated number of cyclic upgrade meets a preset requirement includes:
adding 1 to the current cycle number to obtain the updated cycle upgrading number;
and judging whether the updated cycle upgrading times are not less than a preset cycle time threshold value.
Optionally, after determining whether sonic logic information is captured on the screen of the computer device, the method further includes:
and if the sonic logic information is not captured on the screen, throwing 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 upgrading failure according to the log information when the CPLD is upgraded unsuccessfully.
In a second aspect, the present application discloses a CPLD upgrade test apparatus, which is applied to a SecureCRT tool on a computer device for upgrade test, and includes:
the upgrading and validating module is used for executing the CPLD updating script so as to upgrade the CPLD of the switch to be upgraded and connected with the SecureCRT tool and validate the upgraded CPLD;
the first judgment module is used for judging whether sonic logic information is captured on a screen of the computer equipment;
the switching module is used for judging that the switch enters the CPU end of the switch to be upgraded when the sonic logic information is captured on the screen, and switching to the BMC end of the switch to be upgraded;
the second judgment module is used for judging whether BMC logic information is captured on the screen or not;
the third judging module is used for judging that the BMC end of the switch to be upgraded enters when the BMC region information is captured on the screen, updating the cycle upgrading frequency and judging whether the updated cycle upgrading frequency reaches the preset requirement or not;
and the circulation module is used for re-executing the steps from the execution of the CPLD updating script when the circulation upgrading times after the 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 used for executing the computer program to realize the CPLD upgrade testing method disclosed in the foregoing.
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 testing method disclosed above.
The method is applied to a SecureCRT tool on computer equipment for upgrading test, and firstly, a CPLD updating script is executed so as to upgrade the CPLD of the switch to be upgraded and make the upgraded CPLD effective. And judging whether sonic logic information is captured on the screen of the computer equipment. And if the sonic logic information is captured on the screen, judging that the sonic logic information enters the CPU end of the switch to be upgraded, and switching to the BMC end of the switch to be upgraded. Then judging whether BMC logic information is captured on the screen; if the BMC logic information is captured on the screen, judging that the BMC enters the BMC end of the switch to be upgraded, updating the cycle upgrading times, and judging whether the updated cycle upgrading times meet the preset requirement; and if the number of the cyclic upgrading times after the updating does not reach the preset requirement, re-executing the steps from the execution of the CPLD updating script. Therefore, the SecureCRT tool in the application enables the CPLD after upgrading to be effective each time the upgrading is completed, and can judge whether the CPU end is successfully accessed or not by capturing the sonic logic information on the screen, if so, can judge whether the BMC logic information on the screen is successfully accessed or not by capturing the BMC logic information on the screen, so that the upgrading is successful, the cycle upgrading frequency is automatically updated, then the cycle upgrading frequency after the upgrading is judged to reach the preset requirement or not, so that whether the upgrading test is finished or not is determined, if not, the next upgrading test is automatically started, so that the fully-automatic CPLD upgrading test can be realized, the labor force of workers is not needed, the cost is reduced, and after the upgrading is completed and effective each time, the upgrading result is determined by capturing the sonic logic information and the BMC logic information on the screen, so that the upgrading result can be seen each time, 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 needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a CPLD upgrade testing method disclosed in the present application;
fig. 2 is a flowchart of a specific CPLD upgrade testing method disclosed in the present application;
fig. 3 is a flowchart of a specific CPLD upgrade testing method disclosed in the present application;
fig. 4 is a schematic structural diagram of a CPLD upgrade test apparatus disclosed in the present application;
fig. 5 is a schematic structural diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, a CPLD upgrade test mode is mainly to directly perform hundred upgrades according to a script provided by research and development, but whether the upgrade is successful or not is not judged in the middle, and only uniform CPLD upgrade is performed first, and the CPLD after upgrade is effective by restarting in a time period without affecting normal work, and whether the upgrade is successful or not is seen, so that the CPLD upgrade test is completed. In view of this, the application provides a CPLD upgrade testing method, which can perform a fully automated CPLD upgrade test, does not require much labor force, reduces the cost, and can see the upgrade result after each upgrade.
Referring to fig. 1, an embodiment of the present application discloses a CPLD upgrade testing method, which is applied to a SecureCRT tool on a computer device for upgrade testing, and the method includes:
step S11: and executing the CPLD updating script so as to update the CPLD of the switch to be updated connected with the SecureCRT tool and enable the updated CPLD to take effect.
In practical applications, a SecureCRT tool is installed on a terminal of a Computer device for upgrading test, and the SecureCRT tool may be connected to a switch to be upgraded, so that the SecureCRT tool may send related data to the switch to be upgraded, and the Computer device is typically a PC (Personal Computer). The secureCRT tool needs to execute a CPLD upgrading script first, complete the upgrading of the CPLD in the switch to be upgraded and enable the CPLD to take effect after the upgrading is effective.
Specifically, the method for updating the CPLD by the SecureCRT tool includes the steps of: executing a CPLD updating script to send an updating instruction to a switch to be updated connected with the SecureCRT tool so that the switch to be updated executes the CPLD updating script under a preset path and finishes the CPLD updating of the switch by utilizing a CPLD mirror image under the preset path; and executing the CPLD updating script to send an effective instruction to the switch to be upgraded so that the switch to be upgraded executes the CPLD effective script under the preset path to enable the upgraded CPLD to be effective, wherein the preset path is under a 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 update instruction to the switch to be updated, after receiving the update instruction, the switch to be updated executes the CPLD update script stored under the self-preset path, and the switch to be updated completes the updating of the CPLD by using the CPLD image under the preset path in the process of executing the CPLD update script. Then, when the SecureCRT tool executes the CPLD update script again, it will also send an effective instruction to the switch to be upgraded, and after the switch to be upgraded acquires the effective instruction, it will execute the CPLD effective script under the preset path, so as to make the updated CPLD in the switch to be upgraded effective, where the preset path may be under the var/log/flash path of the BMC of the switch to be upgraded, and certainly the preset path may also be under other paths under the switch to be upgraded, and it is only necessary that the CPLD update script, the CPLD mirror image, and the CPLD effective script are not lost when the BMC is restarted.
Step S12: and judging whether sonic logic information is captured on the screen of the computer equipment.
After the switch to be upgraded finishes the upgrading of the CPLD each time and makes the upgraded CPLD effective, whether the upgrading is successful needs to be judged. That is, it is also necessary to determine whether sonic logic information is captured on the screen of the computer device.
Step S13: and if the sonic logic information is captured on the screen, judging that the sonic logic information enters the CPU end of the switch to be upgraded, and switching to the BMC end of the switch to be upgraded.
It can be understood that, capturing sonic logic information on the screen indicates that the sonic logic information can enter the CPU end of the switch to be upgraded, determining that the sonic logic information enters the CPU end of the switch to be upgraded, and switching to the BMC end of the switch to be upgraded, so as to determine whether the sonic logic information can enter the BMC end of the switch to be upgraded.
Step S14: and judging whether BMC logic information is captured on the screen.
It can be understood that after the switch is switched 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: and if the BMC logic information is captured on the screen, judging that the BMC enters the BMC end of the switch to be upgraded, updating the cycle upgrading times, and judging whether the updated cycle upgrading times meet the preset requirement.
If the BMC logic information is captured on the screen, the BMC end of the switch to be upgraded is judged to enter, the CPLD is upgraded at the current time, the cyclic upgrade test needs to be updated, and then whether the number of cyclic upgrade times after updating reaches a preset requirement is judged, namely whether the upgrade test is finished is judged, wherein the preset requirement can be set according to actual conditions.
Step S16: and if the number of the cyclic upgrading times after the updating does not reach the preset requirement, re-executing the steps from the execution of the CPLD updating script.
If the number of the cyclic upgrading times after the updating does not reach the preset requirement, the upgrading test is not completed, so that the steps from the execution of the CPLD updating script need to be executed again, and the next upgrading test is started.
The method is applied to a SecureCRT tool on computer equipment for upgrading test, and firstly, a CPLD updating script is executed so as to upgrade the CPLD of the switch to be upgraded and make the upgraded CPLD effective. And judging whether sonic logic information is captured on the screen of the computer equipment. And if the sonic logic information is captured on the screen, judging that the sonic logic information enters the CPU end of the switch to be upgraded, and switching to the BMC end of the switch to be upgraded. Then judging whether BMC logic information is captured on the screen; if the BMC logic information is captured on the screen, judging that the BMC enters the BMC end of the switch to be upgraded, updating the cycle upgrading times, and judging whether the updated cycle upgrading times meet the preset requirement; and if the number of the cyclic upgrading times after the updating does not reach the preset requirement, re-executing the steps from the execution of the CPLD updating script. Therefore, the SecureCRT tool in the application enables the CPLD after upgrading to be effective each time the upgrading is completed, and can judge whether the CPU end is successfully accessed or not by capturing the sonic logic information on the screen, if so, can judge whether the BMC logic information on the screen is successfully accessed or not by capturing the BMC logic information on the screen, so that the upgrading is successful, the cycle upgrading frequency is automatically updated, then the cycle upgrading frequency after the upgrading is judged to reach the preset requirement or not, so that whether the upgrading test is finished or not is determined, if not, the next upgrading test is automatically started, so that the fully-automatic CPLD upgrading test can be realized, the labor force of workers is not needed, the cost is reduced, and after the upgrading is completed and effective each time, the upgrading result is determined by capturing the sonic logic information and the BMC logic information on the screen, so that the upgrading result can be seen each time, the upgrade result can be checked in time.
Referring to fig. 2, an embodiment of the present application discloses a specific CPLD upgrade testing method, which is applied to a SecureCRT tool on a computer device for upgrade testing, and the method includes:
step S21: and connecting the SecureCRT tool with the serial port of the switch to be upgraded in a telenet mode so that the SecureCRT tool can send an instruction to the switch to be upgraded.
Before the test of upgrading, the secureCRT instrument need first with wait to be connected between the upgrade switch, it is specific, the secureCRT instrument can pass through the telenet mode with wait to be connected to upgrade the serial ports of switch to the secureCRT instrument to wait to upgrade the switch send instruction.
Step S22: and executing the CPLD updating script so as to update the CPLD of the switch to be updated connected with the SecureCRT tool and enable the updated CPLD to take effect.
Step S23: and judging whether sonic logic information is captured on the screen of the computer equipment.
Step S24: and if the sonic logic information is captured on the screen, judging that the sonic logic information enters the CPU end of the switch to be upgraded, and switching to the BMC end of the switch to be upgraded.
After judging whether sonic logic information is captured on the screen of the computer equipment or not, if sonic logic information is not captured on the screen, the upgrading test is indicated to be abnormal, the abnormality needs to be thrown out, and the upgrading operation on the switch to be upgraded is stopped.
Step S25: and judging whether BMC logic information is captured on the screen.
Step S26: and if the BMC logic information is captured on the screen, judging that the BMC enters the BMC end of the switch to be upgraded, updating the cycle upgrading times, and judging whether the updated cycle upgrading times meet the preset requirement.
And judging whether BMC logic information is captured on the screen or not, if the BMC logic information is not captured on the screen, indicating that an upgrading test is abnormal, throwing the abnormality and stopping upgrading the switch to be upgraded.
If the BMC logic information is captured on the screen, judging that the BMC entering the to-be-upgraded switch is required to update the cycle upgrading times, and judging whether the updated cycle upgrading times meet the preset requirement.
Wherein, update the cycle upgrade number of times to judge whether the cycle upgrade number of times reaches the predetermined requirement after updating, including: subtracting 1 from the current cycle number to obtain the updated cycle upgrading number; and judging whether the updated cycle upgrading times are less than 1. That is, when the upgrade test is successful each time, the number of the cycle upgrade test is reduced by 1 to obtain the number of the cycle upgrade test after the update until the number of the cycle upgrade test after the update is less than 1.
Wherein, the updating cycle upgrade frequency and judging whether the updated cycle upgrade frequency meets the preset requirement, including: adding 1 to the current cycle number to obtain the updated cycle upgrading number; and judging whether the updated cycle upgrade frequency is not less than a preset cycle threshold, wherein the preset cycle threshold can be determined according to actual conditions, and is not particularly limited herein.
Step S27: and if the number of the cyclic upgrading times after the updating does not reach the preset requirement, re-executing the steps from the execution of the CPLD updating script.
In the whole upgrading test process of the CPLD, log information of upgrading production of the CPLD in the switch to be upgraded every time is required to be recorded; and storing the log information so as to analyze the reason of the upgrading failure according to the log information when the CPLD is upgraded unsuccessfully.
Referring to fig. 3, a flowchart of the CPLD upgrade test is shown. Uploading a CPLD mirror image, a CPLD upgrading script and a CPLD valid script to a BMC designated path of a switch to be upgraded, entering the BMC designated path to give authority to the CPLD mirror image, the CPLD upgrading script and the CPLD valid script, and checking the current CPLD version, wherein the CPLD upgrading script is executed when the switch to be upgraded receives an upgrading instruction sent by a SecureCRT tool, the CPLD valid script is executed when the valid instruction sent by the SecureCRT tool is received, the CPU and the BMC are waited to be automatically restarted, whether sonic login information is captured on a screen of computer equipment where the SecureCRT tool is located is judged, if not, the SecureCRT tool throws out an exception to stop upgrading, if so, the CPU end of the switch to be upgraded is judged to enter and is switched to a BMC end of the switch to be upgraded, and whether BMC log in information is captured on the screen is judged; and if not, the SecureCRT tool throws out the exception to stop upgrading, if so, judging to enter the BMC end of the switch to be upgraded, updating the cycle upgrading frequency, judging whether the cycle upgrading frequency after updating is less than 1, and if not, re-executing the steps from checking the current CPLD version.
Referring to fig. 4, an embodiment of the present application discloses a CPLD upgrade testing apparatus, which is applied to a SecureCRT tool on a computer device for upgrade testing, and includes:
the upgrading and validation module 11 is configured to execute a CPLD upgrading script so as to upgrade a CPLD of a switch to be upgraded connected to the SecureCRT tool and validate the upgraded CPLD;
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 switch to be upgraded enters the CPU end of the switch to be upgraded when the sonic logic information is captured on the screen, and switch 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;
a third judging module 15, configured to, when capturing BMC logic information on the screen, judge that the BMC end of the switch to be updated enters, update the cycle upgrade count, and judge whether the cycle upgrade count after update meets a preset requirement;
and the loop module 16 is configured to re-execute the steps from executing the CPLD update script when the updated loop upgrade frequency does not meet the preset requirement.
The method is applied to a SecureCRT tool on computer equipment for upgrading test, and firstly, a CPLD updating script is executed so as to upgrade the CPLD of the switch to be upgraded and make the upgraded CPLD effective. And judging whether sonic logic information is captured on the screen of the computer equipment. And if the sonic logic information is captured on the screen, judging that the sonic logic information enters the CPU end of the switch to be upgraded, and switching to the BMC end of the switch to be upgraded. Then judging whether BMC logic information is captured on the screen; if the BMC logic information is captured on the screen, judging that the BMC enters the BMC end of the switch to be upgraded, updating the cycle upgrading times, and judging whether the updated cycle upgrading times meet the preset requirement; and if the number of the cyclic upgrading times after the updating does not reach the preset requirement, re-executing the steps from the execution of the CPLD updating script. Therefore, the SecureCRT tool in the application enables the CPLD after upgrading to be effective each time the upgrading is completed, and can judge whether the CPU end is successfully accessed or not by capturing the sonic logic information on the screen, if so, can judge whether the BMC logic information on the screen is successfully accessed or not by capturing the BMC logic information on the screen, so that the upgrading is successful, the cycle upgrading frequency is automatically updated, then the cycle upgrading frequency after the upgrading is judged to reach the preset requirement or not, so that whether the upgrading test is finished or not is determined, if not, the next upgrading test is automatically started, so that the fully-automatic CPLD upgrading test can be realized, the labor force of workers is not needed, the cost is reduced, and after the upgrading is completed and effective each time, the upgrading result is determined by capturing the sonic logic information and the BMC logic information on the screen, so that the upgrading result can be seen each time, the upgrade result can be checked in time.
In a specific implementation process, the CPLD upgrade test apparatus further includes:
and the communication connection module is used for connecting the serial port of the switch to be upgraded in a telenet mode so that the SecureCRT tool can send an instruction to the switch to be upgraded conveniently.
In a specific implementation process, 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 connected with the SecureCRT tool so that the switch to be updated executes the CPLD updating script under a preset path and finishes the CPLD updating of the switch by utilizing a CPLD mirror image under the preset path;
and executing the CPLD updating script to send an effective instruction to the switch to be upgraded so that the switch to be upgraded executes the CPLD effective script under the preset path to enable the upgraded CPLD to be effective, wherein the preset path is under a 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 the updated cycle upgrading number;
and judging whether the updated cycle upgrading times are less than 1.
In a specific implementation process, the third determining module 15 is configured to:
adding 1 to the current cycle number to obtain the updated cycle upgrading number;
and judging whether the updated cycle upgrading times are not less than a preset cycle time threshold value.
In a specific implementation process, the CPLD upgrade test apparatus further includes:
and the exception handling module is used for throwing exception and stopping upgrading the switch to be upgraded if sonic logic information is not captured on the screen.
In a specific implementation process, the CPLD upgrade test apparatus further includes:
the diary recording module is used for recording the diary 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 upgrading failure according to the log information when the CPLD is upgraded unsuccessfully.
Fig. 5 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure, where the electronic device 20 may specifically include, but is not limited to, a notebook computer or a desktop computer.
In general, the electronic device 20 in the present embodiment includes: a processor 21 and a memory 22.
The processor 21 may include one or more processing cores, such as a four-core processor, an eight-core processor, and so on. The processor 21 may be implemented by at least one hardware of a DSP (digital signal processing), an FPGA (field-programmable gate array), and a PLA (programmable logic array). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); 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) which is responsible for rendering and drawing images to be displayed on the display screen. 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 the following computer program 221, wherein after being loaded and executed by the processor 31, the steps of the CPLD upgrade testing method disclosed in any one of the foregoing embodiments can be implemented.
In some embodiments, the electronic device 20 may further include a display 23, an input/output interface 24, a communication interface 25, a sensor 26, a power supply 27, and a communication bus 28.
Those skilled in the art will appreciate that the configuration shown in FIG. 5 is not limiting of electronic device 20 and may include more or fewer components than those shown.
Further, an embodiment of the present application also discloses a computer-readable storage medium, configured to store a computer program, where the computer program, when executed by a processor, implements the CPLD upgrade testing method disclosed in any of the foregoing embodiments.
For the specific process of the CPLD upgrade testing method, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
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. A software module may reside 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, herein, relational terms such as first and second, and the like may be 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The CPLD upgrade test method, device, equipment, and medium provided by the present application are introduced in detail above, and a specific example is applied in the present application to explain the principle and implementation manner of the present application, and the description of the above embodiment is only used to help understand the method and core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A CPLD upgrade test method is characterized in that a SecureCRT tool applied to a computer device for upgrade test comprises the following steps:
executing a CPLD updating script so as to update the CPLD of the switch to be updated connected with the SecureCRT tool and enable the updated CPLD to take effect;
judging whether sonic logic information is captured on a screen of the computer equipment;
if the sonic logic information is captured on the screen, judging that the sonic logic information enters the CPU end of the switch to be upgraded, and switching to the BMC end of the switch to be upgraded;
judging whether BMC logic information is captured on the screen or not;
if the BMC logic information is captured on the screen, judging that the BMC enters the BMC end of the switch to be upgraded, updating the cycle upgrading times, and judging whether the updated cycle upgrading times meet the preset requirement;
and if the number of the cyclic upgrading times after the updating does not reach the preset requirement, re-executing the steps from the execution of the CPLD updating script.
2. The CPLD upgrade testing method according to claim 1, wherein before executing the CPLD update script to upgrade the CPLD of the switch to be upgraded connected to the SecureCRT tool and validate the upgraded CPLD, the method further comprises:
and connecting the SecureCRT tool with the serial port of the switch to be upgraded in a telenet mode so that the SecureCRT tool can send an instruction to the switch to be upgraded.
3. The CPLD upgrade testing method according to claim 1, wherein said executing CPLD update script to upgrade the CPLD of the switch to be upgraded connected to the SecureCRT tool and validate the upgraded CPLD comprises:
executing a CPLD updating script to send an updating instruction to a switch to be updated connected with the SecureCRT tool so that the switch to be updated executes the CPLD updating script under a preset path and finishes the CPLD updating of the switch by utilizing a CPLD mirror image under the preset path;
and executing the CPLD updating script to send an effective instruction to the switch to be upgraded so that the switch to be upgraded executes the CPLD effective script under the preset path to enable the upgraded CPLD to be effective, wherein the preset path is under a var/log/flash path of the BMC of the switch to be upgraded.
4. The CPLD upgrade testing method according to claim 1, wherein the updating cycle upgrade count and determining whether the updated cycle upgrade count meets a preset requirement includes:
subtracting 1 from the current cycle number to obtain the updated cycle upgrading number;
and judging whether the updated cycle upgrading times are less than 1.
5. The CPLD upgrade testing method according to claim 1, wherein the updating cycle upgrade count and determining whether the updated cycle upgrade count meets a preset requirement includes:
adding 1 to the current cycle number to obtain the updated cycle upgrading number;
and judging whether the updated cycle upgrading times are not less than a preset cycle time threshold value.
6. The CPLD upgrade test method according to claim 1, wherein said determining whether sonic logic information is captured on the screen of the computer device further comprises:
and if the sonic logic information is not captured on the screen, throwing exception and stopping upgrading the switch to be upgraded.
7. The CPLD upgrade test 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 upgrading failure according to the log information when the CPLD is upgraded unsuccessfully.
8. A CPLD upgrade test device applied to a SecureCRT tool on a computer device for upgrade test, comprising:
the upgrading and validating module is used for executing the CPLD updating script so as to upgrade the CPLD of the switch to be upgraded and connected with the SecureCRT tool and validate the upgraded CPLD;
the first judgment module is used for judging whether sonic logic information is captured on a screen of the computer equipment;
the switching module is used for judging that the switch enters the CPU end of the switch to be upgraded when the sonic logic information is captured on the screen, and switching to the BMC end of the switch to be upgraded;
the second judgment module is used for judging whether BMC logic information is captured on the screen or not;
the third judging module is used for judging that the BMC end of the switch to be upgraded enters when the BMC region information is captured on the screen, updating the cycle upgrading frequency and judging whether the updated cycle upgrading frequency reaches the preset requirement or not;
and the circulation module is used for re-executing the steps from the execution of the CPLD updating script when the circulation upgrading times after the updating does not reach the preset requirement.
9. 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 testing method according to any one of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the CPLD upgrade testing method according to any one of claims 1 to 7.
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 true CN113722212A (en) 2021-11-30
CN113722212B 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)

Cited By (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

Cited By (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

Also Published As

Publication number Publication date
CN113722212B (en) 2023-07-14

Similar Documents

Publication Publication Date Title
CN112948157B (en) Server fault positioning method, device and system and computer readable storage medium
WO2023115999A1 (en) Device state monitoring method, apparatus, and device, and computer-readable storage medium
WO2016206514A1 (en) Startup processing method and device
CN104572387A (en) Method and device for debugging terminal in engineering mode
US20110197193A1 (en) Device and method for controlling communication between bios and bmc
CN107111595B (en) Method, device and system for detecting early boot errors
CN112000351A (en) Updating method, updating device, updating equipment and storage medium of BMC (baseboard management controller) firmware
CN114138644A (en) BMC (baseboard management controller) debugging method, monitoring method, system, device, equipment and medium
CN113315675B (en) White box switch U-Boot automatic testing method, system and storage medium
CN113722212A (en) CPLD upgrade test method, device, equipment and medium
CN113377586B (en) Automatic detection method and device for server and storage medium
CN106909382B (en) Method and device for outputting different types of system starting information
CN116662050A (en) Error injection support function verification method, device, terminal and medium
CN115145381A (en) Method, system, storage medium and equipment for remotely resetting BMC chip
CN114265786A (en) Automatic testing method and device, computer equipment and readable storage medium
CN113434353A (en) Server testing method and device, electronic equipment and storage medium
CN113760631A (en) Page loading duration determination method, device, equipment and storage medium
CN114860611B (en) BIOS upgrading test method, device and medium
CN113986635B (en) BIOS testing method, system, storage medium and device
CN114189441B (en) Method for upgrading nodes in blockchain and related products
CN111310172B (en) Method and control unit for verifying processor execution traces by disassembling
CN115858433A (en) Method, system, device, equipment and storage medium for controlling retimer mode
CN116679968A (en) Firmware upgrading method, system and device of storage device and storage medium
CN117389863A (en) ECC fault strategy self-checking method, system, medium and electronic equipment
CN113687998A (en) Control method for eliminating abnormal operation of management engine

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