CN117135075A - Network equipment testing method and device, computer equipment and storage medium - Google Patents

Network equipment testing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN117135075A
CN117135075A CN202310859628.6A CN202310859628A CN117135075A CN 117135075 A CN117135075 A CN 117135075A CN 202310859628 A CN202310859628 A CN 202310859628A CN 117135075 A CN117135075 A CN 117135075A
Authority
CN
China
Prior art keywords
test
control module
information
test information
detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310859628.6A
Other languages
Chinese (zh)
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 CN202310859628.6A priority Critical patent/CN117135075A/en
Publication of CN117135075A publication Critical patent/CN117135075A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level

Landscapes

  • Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present application relates to the field of network services, and in particular, to a method and apparatus for testing a network device, a computer device, and a storage medium. The test method of the network equipment comprises the following steps: detecting at least one type of test item for the network device; the first control module acquires test results of the at least one type of test items to form first test information; the second control module obtains the test results of the at least one type of test items to form second test information; checking the first test information and the second test information; and responding to the first test information and the second test information to be matched, judging that the network equipment passes the test, otherwise judging that the network equipment is abnormal in test. The method can utilize the first control module and the second control module to check each other, and is beneficial to improving the reliability of the test result.

Description

Network equipment testing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of network device testing technologies, and in particular, to a network device testing method, a network device testing apparatus, a computer device, and a computer storage medium.
Background
The reliability test of network equipment such as switches and servers can generally simulate different conditions such as climate, temperature, altitude, vibration and the like through environments such as a temperature box and a vibrating table so as to simulate the environment in the transportation process or the working process of the network equipment. Under the simulated environment, the network equipment is tested under the pressure of full-load operation, and the environmental stress is changed or increased to accelerate the hardware loss of the network equipment, accelerate the exposure defect and the deficiency of the network equipment, and be favorable for providing an improvement direction, so that the performance of the network equipment is more stable.
Then, in related technologies such as switch reliability test, a script under an OS (Operating System) is generally used to run on a CPU (Central Processing Unit ) to implement function detection, and the test process is affected by the state of the CPU to a high degree, so that an abnormality but failure to detect in the test process easily occurs, which affects the reliability of the test result.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method for testing a network device, a device for testing a network device, a computer device, and a computer storage medium, which are capable of verifying each other by using a first control module and a second control module, and are advantageous for improving the reliability of the test result.
In one aspect, a method for testing a network device is provided, where the method for testing a network device includes: detecting at least one type of test item for the network device; the first control module acquires test results of the at least one type of test items to form first test information; the second control module obtains the test results of the at least one type of test items to form second test information; checking the first test information and the second test information; and responding to the first test information and the second test information to be matched, judging that the network equipment passes the test, otherwise judging that the network equipment is abnormal in test.
In an embodiment of the present application, the verifying the first test information and the second test information includes: the first control module acquires the second test information and compares the second test information with the first test information; the second control module acquires the first test information and compares the first test information with the second test information; and in response to the first control module and the second control module both judging that the first test information is matched with the second test information, judging that the first test information is matched with the second test information.
In an embodiment of the present application, the first control module obtains a test result of the at least one type of test item, and forming the first test information includes: the first control module acquires a test result of the first detection module to form first test information; the first detection module comprises a plurality of detection modules and is used for detecting at least one type of test items to form a test result; the second control module obtains the test result of the at least one type of test item, and forming second test information includes: the second control module obtains a test result of the second detection module to form second test information; the second detection module comprises a plurality of detection modules and is used for detecting at least one type of test items to form a test result; wherein, the first detection module is independent with the second detection module.
In an embodiment of the application, the test method further includes: the first control module and the second control module respectively acquire process information of a test process, and process verification is carried out on the process information acquired by the first control module and the second control module; and in response to the process verification, judging that the test result is reliable, and otherwise, performing debugging treatment on the test process.
In an embodiment of the present application, the process check includes at least one of an event sub-check, a run sub-check, and a detect sub-check; the event sub-check includes: the first control module and the second control module record event information in the test process respectively, and compare the event information obtained by the first control module and the second control module respectively; if the event information acquired by the event sub-inspection and the event information acquired by the event sub-inspection are matched, judging that the test process is abnormal; the operation sub-check includes: detecting whether the first control module and the second control module are in normal operation or not, resetting one of the operation abnormalities by using the other one in response to the abnormal operation of the first control module and the second control module, and judging that the test process is abnormal; the detector check includes: when the first test information and the second test information are tested, whether the error between the test results of the same test item obtained by the first control module and the second control module is larger than a preset error value or not is judged, and if the error is larger than the preset error value for a plurality of times, the abnormality of the test process is judged.
In an embodiment of the application, the first control module includes a first clock unit, and the second control module includes a second clock unit; the test method further comprises the following steps: taking the time of the second clock unit at the initial time of testing or the external input time as the initial time of the first clock unit and the second clock unit; comparing the time of both the first clock unit and the second clock unit; in response to a difference in the two, synchronizing the time of the first clock unit with the time of the second clock unit using a relatively forward time of the two.
In an embodiment of the application, the at least one type of test item comprises: at least one of firmware detection, pressure detection, link detection, sensor detection; respectively presetting a debugging rule for each test item so as to carry out debugging treatment according to the preset debugging rule when the test is abnormal; the test method further comprises the following steps: in response to monitoring that one of the first control module and the second control module is abnormal in operation, resetting one of the abnormal operation by the debugging module through the other; the first control module is a central processing unit, and the second control module is a baseboard management controller.
On the other hand, a testing device of network equipment is provided, and the testing device of network equipment includes: the detection module and the plurality of control modules; the detection module is used for detecting at least one type of test items of the network equipment; the plurality of control modules at least comprise a first control module and a second control module, and the first control module and the second control module are respectively connected with the detection module; the first control module is used for acquiring a test result of the at least one test item to form first test information; the second control module is used for obtaining the test result of the at least one test item to form second test information; the first control module is connected with the second control module and is used for checking the first test information and the second test information; and responding to the first test information and the second test information to be matched, judging that the network equipment passes the test, otherwise judging that the network equipment is abnormal in test.
In yet another aspect, a computer device is provided comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of: detecting at least one type of test item for the network device; the first control module acquires test results of the at least one type of test items to form first test information; the second control module obtains the test results of the at least one type of test items to form second test information; checking the first test information and the second test information; and responding to the first test information and the second test information to be matched, judging that the network equipment passes the test, otherwise judging that the network equipment is abnormal in test.
In yet another aspect, a computer readable storage medium is provided, having stored thereon a computer program which when executed by a processor performs the steps of: detecting at least one type of test item for the network device; the first control module acquires test results of the at least one type of test items to form first test information; the second control module obtains the test results of the at least one type of test items to form second test information; checking the first test information and the second test information; and responding to the first test information and the second test information to be matched, judging that the network equipment passes the test, otherwise judging that the network equipment is abnormal in test.
The network equipment testing method, the network equipment testing device, the computer equipment and the computer storage medium detect at least one type of test items for the network equipment. The first control module and the second control module respectively form first test information and second test information based on the test result. By checking the first test information and the second test information, whether the test process, the test result, the first control module and the second control module are normal or not in the test process can be checked. And if the test process is normal, the first test information formed by the first control module is matched with the second test information formed by the second control module. In view of this, when the first test information matches the second test information, the test procedure can be considered as reliable and the test result as reliable. If so, the application can utilize the first control module and the second control module to check each other, thereby being beneficial to improving the reliability of the test result.
Drawings
FIG. 1 is a flow chart of a first embodiment of a method for testing a network device according to the present application;
FIG. 2 is a schematic structural diagram of an embodiment of a testing apparatus of a network device according to the present application;
FIG. 3 is a flow chart of a second embodiment of a testing method of the network device of the present application;
FIG. 4 is a flowchart of a third embodiment of a testing method of a network device according to the present application;
FIG. 5 is a schematic structural diagram of another embodiment of a testing apparatus of the network device of the present application;
FIG. 6 is a schematic diagram of a computer device according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In an embodiment, as shown in fig. 1, a method for testing a network device is provided, and fig. 1 is a flowchart of a first embodiment of the method for testing a network device according to the present application.
S101: at least one type of test item is detected for the network device.
In this embodiment, the network device may be a white-box switch, a normal switch, a server, or the like, which is a device for implementing a network service.
To improve the reliability of the network device during operation, at least one type of test item detection is typically performed on the network device to verify the performance and/or reliability of the network device.
S102: the first control module acquires test results of at least one type of test items to form first test information; the second control module obtains test results of at least one type of test items to form second test information.
In this embodiment, the test apparatus of the network device includes a plurality of control modules. The plurality of control modules at least comprise a first control module and a second control module. The first control module and the second control module are mutually independent control modules, and the first control module and the second control module can cooperate to complete other functions.
The first control module obtains test results of at least one type of test items to form first test information.
The second control module obtains test results of at least one type of test items to form second test information.
In other words, the first control module and the second control module are utilized to acquire and analyze the test results of at least one type of test item respectively, so as to form the first test information and the second test information respectively.
The first control module and the second control module may be selected from control modules carried by the network device itself, such as a CPU (Central Processing Unit ), a BMC (baseboard management controller, baseboard management controller), etc.; alternatively, a control module dedicated to the test may be additionally added, such as an MCU (Microcontroller Unit, micro control unit), a CPLD (Complex Programmable logic device ), or the like.
S103: and checking the first test information and the second test information.
In this embodiment, by checking the first test information and the second test information, it is possible to check whether the test process, the test result, the first control module, and the second control module are normal in the test process.
Alternatively, the format of the first test information and the second test information may be predefined to be consistent, so as to compare whether the first test information and the second test information are matched. Or, for the class-by-class test item, it may be checked whether the test result recorded in the first test information is consistent with the test result recorded in the second test information.
S104: and responding to the matching of the first test information and the second test information, judging that the network equipment passes the test, and otherwise, judging that the network equipment is abnormal in test.
In this embodiment, in response to the matching of the first test information and the second test information, it may be considered that there is an abnormality in the test process and a risk of abnormality in the test result is small, and it is determined that the network device passes the test. Otherwise, judging that the network equipment is abnormal in test if the conditions such as abnormal test process, abnormal test result reading and the like are considered to exist.
The first test information and the second test information may be matched by requiring the two to be identical. Or, the accuracy of the first control module and the second control module can be combined to set an error threshold, and when the difference index of the first test information and the second test information is smaller than or equal to the error threshold, the first test information and the second test information can be considered to be matched, so that the risk of frequently judging the abnormal test of the network equipment due to errors can be reduced.
Therefore, in this embodiment, the first control module and the second control module form the first test information and the second test information based on the test result, and the first control module and the second control module are used to check each other. And if the test process is normal, the first test information formed by the first control module is matched with the second test information formed by the second control module. In view of this, when the first test information matches the second test information, the test procedure can be considered as reliable and the test result as reliable. Thus, the application can be beneficial to improving the reliability of the test result.
In an embodiment, as shown in fig. 2, a testing apparatus of a network device is provided, and fig. 2 is a schematic structural diagram of an embodiment of the testing apparatus of a network device according to the present application.
The test device of the network device includes a detection module 20 and a plurality of control modules.
The detection module 20 is configured to detect at least one type of test item of the network device. There may be a set of detection modules 20, with the detection modules connected to the first control module 31 and the second control module 32 being the same detection module. Alternatively, the detection module 20 may include a first detection module and a second detection module, which are respectively connected to the first control module 31 and the second control module 32, which is not limited herein.
The plurality of control modules includes at least a first control module 31 and a second control module 32.
The first control module 31 and the second control module 32 are respectively connected with the detection module 20. The first control module 31 is configured to obtain a test result of at least one test item, and form first test information. The second control module 32 is configured to obtain a test result of at least one test item, and form second test information.
The first control module 31 is connected to the second control module 32, and is used for checking the first test information and the second test information. And responding to the matching of the first test information and the second test information, judging that the network equipment passes the test, and otherwise, judging that the network equipment is abnormal in test.
In this embodiment, the test device of the network device is a specific structure for implementing the test method of the network device, and the specific limitation of the test device of the network device may refer to the limitation of the test method of the network device hereinabove, which is not repeated herein. In this embodiment, the reliability of the first control module and the second control module can be checked by using the test results obtained by the first control module and the second control module respectively. And the test process and the detection module can be checked, so that the reliability of the test result can be improved.
At present, the test of the reliability of the switch is usually realized by detecting the functions through scripts under the OS, wherein the scripts under the OS are operated on a CPU and are influenced by the state of the CPU in the test process. The common problems in the test are as follows:
1. the CPU load is large, and the CPU FAILs, so that the running of a test script, such as script blocking, can be influenced, and the test can be continued, but the script cannot report errors, so that the test FAIL wastes test time.
2. When a problem occurs in the CPU or the communication bus, it is assumed that information such as a sensor cannot be read, but it cannot be determined which part of the problem is caused by the failure.
3. Serious conditions such as CPU jamming can cause script jamming and subsequent interruption of reliability test, and if a tester fails to find a problem in time and deal with the problem in time, more time is wasted.
4. When the RTC part has the problems of delay, interruption and the like, the timeliness of the test is error.
5. Errors such as packet loss error code occur in the test, and the test is finished to discover that the debug site environment is possibly lost.
6. The problem that the error report in the test process cannot be solved in time, and the test is possibly interrupted, etc. can be caused.
7. After the test data and the problems are required to be summarized, the test data, the environmental data and the like cannot be collected in time when the problems occur in the test, and the debug efficiency when the test and the problems occur is reduced.
In order to overcome the above-mentioned problems in the related art, in the test apparatus of the network device of the present application, the first control module includes a first clock unit, the second control module includes a second clock unit, and both the first clock unit and the second clock unit are used for providing a time reference. The first Clock unit and the second Clock unit may be RTC (real_time Clock), etc.
Further, the detection module may include a first detection module and a second detection module.
The first control module is connected with the first detection module, the second control module is connected with the second detection module, and the first detection module and the second detection module detect at least one type of test item respectively. The first detection module and the second detection module comprise at least partially identical detection modules. The specific working principle is illustrated below.
In an embodiment, as shown in fig. 3, a testing method of another network device is provided, and fig. 3 is a flowchart of a second embodiment of the testing method of the network device of the present application.
S401: and taking the time of the second clock unit at the initial time of the test or the external input time as the initial time of the first clock unit and the second clock unit.
In this embodiment, the first control module includes a first clock unit, and the second control module includes a second clock unit. The first control module is more easily considered to operate than the second control module. Therefore, in order to facilitate the synchronization of the first control module and the second control module on the time plane at the initial time of the test, the risk of abnormality in the test process due to misjudgment of the time difference is reduced, the reliability of the test result and the reliability of the verification are improved, and the time of the first clock unit and the time of the second clock unit are synchronized.
S402: the times of both the first clock unit and the second clock unit are compared.
In the present embodiment, step S404 is performed in response to the time matches of both the first clock unit and the second clock unit during the test. In response to the time mismatch of both the first clock unit and the second clock unit, step S403 is performed.
S403: the time of the first clock unit is synchronized with the time of the second clock unit using the relatively forward time of both the first clock unit and the second clock unit.
In this embodiment, the clock unit may be affected by temperature (e.g., in a high temperature state), which may slow down the timing of the clock unit. Thus, it may be considered that the relatively faster/relatively earlier time is closer to the real time, which may be used to synchronize the first clock unit with the second clock unit to improve the reliability of the time recorded by the first clock unit and the second clock unit.
For example, if the time of the first clock unit is shown as 6:00am, the time of the second clock unit is shown as 7:30am, the time of the first clock unit is synchronized to 7:30am.
Further, when the test device of the network apparatus is in a state where connection to the external network is disabled, the time of the first clock unit and the time of the second clock unit may be synchronized by using the relatively preceding time of both the first clock unit and the second clock unit. When the testing device of the network equipment is in a state of being capable of being connected with an external network, the network time is accessed to correct the time of the first clock unit and the second clock unit so as to improve the accuracy of the first clock unit and the second clock unit.
S404: at least one type of test item detected on the network device.
In this embodiment, the at least one type of test item includes: at least one of firmware detection, pressure detection, link detection, sensor detection. The debug rules may be preset for each test item, so that when an abnormality is tested, the debug process is performed according to the preset debug rules, and the specific debug process will be described later, which will not be repeated here.
S405: the first control module obtains test results of at least one type of test items to form first test information.
In this embodiment, the first control module may be connected to the first detection module, the second control module may be connected to the second detection module, and the first detection module and the second detection module are independent of each other.
Optionally, the first control module obtains a test result of the first detection module to form first test information. The first detection module comprises a plurality of detection modules and is used for detecting at least one type of test items to form a test result.
Alternatively, the first control module may be a central processing unit, such as a CPU (Central Processing Unit ) or the like.
S406: the second control module obtains test results of at least one type of test items to form second test information.
In this embodiment, the second control module obtains a test result of the second detection module to form second test information; the second detection module comprises a plurality of detection modules and is used for detecting at least one type of test items to form a test result.
Alternatively, the second control module may be a baseboard management controller.
That is, in this embodiment, the central processing unit and the baseboard management controller of the network device may be selected, so that the functionality and the utilization rate of the controller of the network device are improved, and the test device and the network device of the network device are simplified compared with the mode of adding the control device.
S407: the first control module acquires second test information and compares the second test information with the first test information.
S408: the second control module acquires the first test information and compares the first test information with the second test information.
In this embodiment, the first control module and the second control module may both verify the first test information and the second test information, which is favorable for improving the reliability of the verification results for verifying the first test information and the second test information, and may further verify the verification results obtained by the first control module and the second control module respectively, thereby significantly improving the verification reliability.
In an alternative embodiment, the first control module may only acquire the second test information, and compare the second test information with the first test information; or, the second control module may only acquire the first test information, and compare the first test information with the second test information.
S409: and judging whether the first control module and the second control module are matched with each other or not.
In this embodiment, the first control module and the second control module both check the first test information and the second test information.
In response to the first control module and the second control module determining that the first test information matches the second test information, step S410 is performed. In response to the first control module and the second control module not both determining that the first test information and the second test information match, step S411 is performed.
S410: and judging that the network equipment passes the test.
In this embodiment, in response to the first test information matching the second test information, it is determined that the network device passes the test.
S411: and judging that the network equipment is abnormal in test, and performing debugging treatment.
In this embodiment, in response to the first control module and the second control module not both determining that the first test information and the second test information match, determining that the network device is abnormal in test, and performing debugging processing.
Further, the first control module and the second control module respectively acquire the process information of the test process, and process verification is carried out on the process information acquired by the first control module and the second control module, so that timely response to process abnormality is facilitated, and useless test loss which is continuously tested in an abnormal state is reduced. And if the test result passes the process verification, judging that the test result is reliable, otherwise, debugging the test process.
Optionally, the process check includes at least one of an event sub-check, a run sub-check, and a detect sub-check.
Specifically, the event sub-check includes:
the first control module and the second control module record event information in the test process respectively, and the event information obtained by the first control module and the second control module are compared. And if the event information acquired by the event sub-verification and the event information acquired by the event sub-verification are matched, judging that the event sub-verification is passed, otherwise, judging that the testing process is abnormal.
The operation sub-check includes:
detecting whether the first control module and the second control module are in normal operation or not, resetting one of the operation abnormalities by using the other in response to the abnormal operation of one of the first control module and the second control module, and judging that the test process is abnormal.
The detecting sub-check includes:
when the first test information and the second test information are tested, whether the error between the test results of the same test item obtained by the first control module and the second control module is larger than a preset error value or not is judged, and if the error is larger than the preset error value for a plurality of times, the abnormality of the test process is judged.
Alternatively, the first control module and the second control module may also be reset with each other in the present embodiment.
Specifically, in response to monitoring that one of the first control module and the second control module is operating abnormally, the debugging module resets one of the operating abnormally with the other.
Examples of which are described below in connection with fig. 4 and 5.
In an embodiment, as shown in fig. 4, a testing method of another network device is provided, and fig. 4 is a flowchart of a third embodiment of the testing method of the network device according to the present application.
The method can firstly check whether the detected firmware is the version to be tested or not, and reduces time waste and calculation resources for error testing. The version to be tested may be the latest version, the designated previous version, or the version still in the development process, which is not limited herein.
And then, various test items can be detected sequentially, and when detection failure occurs, a debugging module is utilized to carry out preliminary debugging treatment. If serious fault problems occur, the user can be fed back in time or the current test can be interrupted. An embodiment of firmware detection by the firmware detection module, pressure detection by the pressure detection module, link detection by the link detection module, sensor detection by the sensor detection module, and clock detection by the clock detection module are illustrated in fig. 4.
In alternative embodiments, the detection sequence may be different from that illustrated in this embodiment and in fig. 4, and is not limited herein.
In one embodiment, as shown in fig. 5, a testing apparatus of another network device is provided, and fig. 5 is a schematic structural diagram of another embodiment of the testing apparatus of the network device of the present application.
The network test device comprises a first detection module, a second detection module, a first control module, a second control module and a debugging module.
The first detection module comprises a first firmware detection module, a first pressure detection module, a first link detection module, a first sensor detection module and a first clock detection module.
The second detection module comprises a second firmware detection module, a second pressure detection module, a second link detection module, a second sensor detection module and a second clock detection module.
Specifically, a detection module corresponding to the test item is selected through the first control module and/or the second control module, and the test is started. For example, when performing firmware detection, a first firmware detection module and a second firmware detection module are selected.
In the test, the first control module and the second control module record events along with time, log (log) is summarized after the test is finished, and corresponding test results can be checked and exported under the first control module or the second control module.
The debugging module can monitor the operation of each module in the testing process, take corresponding measures according to different problems of different modules when error reporting occurs, record testing time, temperature, humidity, sensor information and the like and is used for debugging by research personnel; testing that one end of the first control module part or the second control module part is abnormal, and after error reporting is carried out on the debugging module, adopting retry measures to continue testing and continuously recording by the other end; debug processing details are described in detail in connection with the following modules
The firmware detection module is used for detecting and updating firmware information and the like.
In the initial stage of testing, firstly, the firmware detection module acquires the latest firmware version list from the server. And then the first control module and the second control module detect the version of the local firmware, compare with the latest version of the firmware of the server, and if the version of the local firmware is different, update the latest firmware under the first control module and then carry out subsequent tests. If the local firmware version is the same as the latest firmware version of the server, the subsequent test is directly carried out. In the test stage, the first control module and the second control module periodically detect the local firmware version, the first control module and the second control module can acquire firmware version information, and the two sides of the firmware version information are the same as the latest firmware version information of the server to indicate that the test change wheel test passes, and the test is continued after the next detection period
If there is an error, the debug module intervenes: if there is a failure in the acquisition of version information of one or more firmware, the read is retried first, and if the read is normal after the retry, it may be that the read fails due to link congestion. Then, if the firmware version information still fails to be read after retried reading, the firmware or the driver is possibly failed to be loaded or blocked, whether the loading operation time of the firmware is normal or not is checked, whether the firmware functions are normal or not is checked, and if the firmware functions are normal, the communication bus is possibly congested or abnormal; if all firmware version information can be obtained, and the first control module is identical to the second control module version, but different from the latest firmware version of the server, the firmware update may fail; if the entire firmware version information can be obtained, only one party is the same as the latest firmware version of the server, and the communication bus of the different party is abnormal
The pressure detection module may include a traffic module, a first control module, a memory module, an SSD (Solid State Disk/Solid State Drive) module, and may be configured to pressurize the switch chip, the first control module, the memory, the hard Disk, etc., and check the pressurization result.
For the traffic module, a part of script of the first control module is started to be pressurized, the traffic at full line speed is forwarded through an internal loop or an external cable, and the first control module and the second control module monitor the traffic state in real time through driving; if the packet is lost, the debugging module records the state of the packet loss port in time, and the number of the received and transmitted packets can correct errors, uncorrectable errors and the like; if the port is down (offline), the debugging module checks the internal link state in time, preliminarily judges whether the internal link is an internal link problem or an external cable problem, and timely reports errors and feeds back the errors to a tester.
For the first control module and the memory module, the pressurization is started through part of the script of the first control module, and the first control module and the second control module monitor the pressurization state in real time through the script; if the first control module is blocked in the pressurizing process, the debugging module resets the first control module in time through the second control module, and after resetting, the debugging module judges whether the memory is a problem caused by the blocking of the first control module chip or the problem caused by the blocking of the first control module chip through the information recorded by the script before the blocking, and then the test is restarted.
For the SSD module, the pressurization is started through a part of the script of the first control module, and the first control module and the second control module monitor the pressurization state in real time through the script; if the problem of error reporting occurs in the pressurizing process, the debugging module records error reporting information, then the hard disk is mounted again, and then the test is restarted;
the link detection module may include an I2C (Inter-Integrated Circuit, bidirectional two-wire synchronous serial bus) module, mgmt (management) module.
The first control module and the second control module are used for detecting whether the i2c link and the external network are normally communicated in a serial and periodic mode, and detecting the internal communication function and the external communication function in an omnibearing coverage mode. If errors such as different links or communication errors occur in the test, the debugging module retries in time. If the communication is normal after retry, the problem caused by link congestion may be caused, if the communication is still wrong after retry, the test is continued, and if the communication is still wrong after one period, the damage may be caused to the communication link.
The sensor detection modules may include SFP (Small Form Pluggables, interface device) modules, FAN (fixed access network) modules, PSU modules.
The first control module and the second control module can periodically detect whether the current and the voltage of each board card, a fan power supply and the like are normal or not, and the optical power of the optical module and the like are normal or not, and the two modules detect and compare the values in sequence; the debugging module allows the error to be within 5%, if the error exceeds 5%, the comparison is detected again, and if the error exceeds 5% continuously, the error is reported.
The clock detection module is mainly used for monitoring the clock. Alternatively, the first clock detection module may be a first clock unit of the first control module and/or the second clock detection module may be a second clock unit of the second control module.
The first control module and the second control module compare time at the beginning of the test, if different, the debugging module prompts testers to input time for correction, after a detection period, if the testers do not input, the time is set according to the time of the second control module uniformly, the first control module and the second control module compare time periodically in the test, if the problem that the time of the first control module and the time of the second control module are different, the clock is reset or delayed due to factors such as environment and mechanical stress, and the debugging module compares the modules of the first control module and the second control module, and the clock time of the first control module and the second control module is used.
In summary, the test of each detection module adds a second control module part based on the first control module part, the first control module part is used as a main part, the second control module part is used as an auxiliary part, and the first control module and the second control module can access and record system information through a serial bus to realize information sharing and mutual verification. In addition, one of the first control module and the second control module is abnormal, the other control module can report errors in time, corresponding measures can be adopted according to problems in time, data after testing are mutually inspected from two parties, and the overall and reliability of a test result is improved. Meanwhile, a debugging module is added, different debugging measures are adopted for aiming at the problems in the test, and research personnel are assisted to carry out preliminary problem positioning; the efficiency and the quality of the reliability test can be obviously improved.
It should be understood that, although the steps in the flowcharts of fig. 1, 3, and 4 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1, 3, and 4 may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of execution of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with at least some of the other steps or sub-steps of other steps.
For specific limitations of the test apparatus of the network device, reference may be made to the above limitation of the test method of the network device, which is not repeated here. The modules in the test device of the network equipment can be realized in whole or in part by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, as shown in fig. 6, and fig. 6 is a schematic structural diagram of an embodiment of the computer device according to the present application.
The computer device may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing test data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of testing a network device.
In some alternative embodiments, the computer device may also be a switch, a white-box switch, or the like, as the specific internal structure is not limited herein.
In one embodiment, a computer device is provided comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of when executing the computer program:
s101: at least one type of test item is detected for the network device.
S102: the first control module acquires test results of at least one type of test items to form first test information; the second control module obtains test results of at least one type of test items to form second test information.
S103: and checking the first test information and the second test information.
S104: and responding to the matching of the first test information and the second test information, judging that the network equipment passes the test, and otherwise, judging that the network equipment is abnormal in test.
In one embodiment, the processor when executing the computer program further performs the steps of:
s401: and taking the time of the second clock unit at the initial time of the test or the external input time as the initial time of the first clock unit and the second clock unit.
In this embodiment, the first control module includes a first clock unit, and the second control module includes a second clock unit.
S402: the times of both the first clock unit and the second clock unit are compared.
In the present embodiment, in response to the time matches of both the first clock unit and the second clock unit, step S404 is performed. In response to the time mismatch of both the first clock unit and the second clock unit, step S403 is performed.
S403: the time of the first clock unit is synchronized with the time of the second clock unit using the relatively forward time of both the first clock unit and the second clock unit.
S404: at least one type of test item detected on the network device.
In this embodiment, the at least one type of test item includes: at least one of firmware detection, pressure detection, link detection, sensor detection; and presetting debugging rules for each test item respectively so as to carry out debugging processing according to the preset debugging rules when the test is abnormal.
S405: the first control module obtains test results of at least one type of test items to form first test information.
In this embodiment, the first control module may be connected to the first detection module, the second control module may be connected to the second detection module, and the first detection module and the second detection module are independent of each other.
Optionally, the first control module obtains a test result of the first detection module to form first test information. The first detection module comprises a plurality of detection modules and is used for detecting at least one type of test items to form a test result.
Alternatively, the first control module may be a central processor.
S405: the second control module obtains test results of at least one type of test items to form second test information.
In this embodiment, the second control module obtains a test result of the second detection module to form second test information; the second detection module comprises a plurality of detection modules and is used for detecting at least one type of test items to form a test result.
Alternatively, the second control module may be a baseboard management controller.
S406: the first control module acquires second test information and compares the second test information with the first test information.
S407: the second control module acquires the first test information and compares the first test information with the second test information.
S408: and judging whether the first control module and the second control module are matched with each other or not.
In this embodiment, the first control module and the second control module both check the first test information and the second test information.
And in response to the first control module and the second control module determining that the first test information and the second test information match, executing step S409. In response to the first control module and the second control module not both determining that the first test information matches the second test information, step S410 is performed.
S409: and judging that the network equipment passes the test.
In this embodiment, in response to the first test information matching the second test information, it is determined that the network device passes the test.
S410: and judging that the network equipment is abnormal in test, and performing debugging treatment.
In this embodiment, in response to the first control module and the second control module not both determining that the first test information and the second test information match, determining that the network device is abnormal in test, and performing debugging processing.
Further, the first control module and the second control module respectively acquire process information of the test process, and process verification is carried out on the process information acquired by the first control module and the second control module. And if the test result passes the process verification, judging that the test result is reliable, otherwise, debugging the test process.
Optionally, the process check includes at least one of an event sub-check, a run sub-check, and a detect sub-check.
Specifically, the event sub-check includes:
the first control module and the second control module record event information in the test process respectively, and the event information obtained by the first control module and the second control module are compared. And if the event information acquired by the event sub-verification and the event information acquired by the event sub-verification are matched, judging that the event sub-verification is passed, otherwise, judging that the testing process is abnormal.
The operation sub-check includes:
detecting whether the first control module and the second control module are in normal operation or not, resetting one of the operation abnormalities by using the other in response to the abnormal operation of one of the first control module and the second control module, and judging that the test process is abnormal.
The detecting sub-check includes:
when the first test information and the second test information are tested, whether the error between the test results of the same test item obtained by the first control module and the second control module is larger than a preset error value or not is judged, and if the error is larger than the preset error value for a plurality of times, the abnormality of the test process is judged.
Alternatively, the first control module and the second control module may also be reset with each other in the present embodiment.
Specifically, in response to monitoring that one of the first control module and the second control module is operating abnormally, the debugging module resets one of the operating abnormally with the other.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
s101: at least one type of test item is detected for the network device.
S102: the first control module acquires test results of at least one type of test items to form first test information; the second control module obtains test results of at least one type of test items to form second test information.
S103: and checking the first test information and the second test information.
S104: and responding to the matching of the first test information and the second test information, judging that the network equipment passes the test, and otherwise, judging that the network equipment is abnormal in test.
In one embodiment, the computer program when executed by the processor further performs the steps of:
s401: and taking the time of the second clock unit at the initial time of the test or the external input time as the initial time of the first clock unit and the second clock unit.
In this embodiment, the first control module includes a first clock unit, and the second control module includes a second clock unit.
S402: the times of both the first clock unit and the second clock unit are compared.
In the present embodiment, in response to the time matches of both the first clock unit and the second clock unit, step S404 is performed. In response to the time mismatch of both the first clock unit and the second clock unit, step S403 is performed.
S403: the time of the first clock unit is synchronized with the time of the second clock unit using the relatively forward time of both the first clock unit and the second clock unit.
S404: at least one type of test item detected on the network device.
In this embodiment, the at least one type of test item includes: at least one of firmware detection, pressure detection, link detection, sensor detection; and presetting debugging rules for each test item respectively so as to carry out debugging processing according to the preset debugging rules when the test is abnormal.
S405: the first control module obtains test results of at least one type of test items to form first test information.
In this embodiment, the first control module may be connected to the first detection module, the second control module may be connected to the second detection module, and the first detection module and the second detection module are independent of each other.
Optionally, the first control module obtains a test result of the first detection module to form first test information. The first detection module comprises a plurality of detection modules and is used for detecting at least one type of test items to form a test result.
Alternatively, the first control module may be a central processor.
S405: the second control module obtains test results of at least one type of test items to form second test information.
In this embodiment, the second control module obtains a test result of the second detection module to form second test information; the second detection module comprises a plurality of detection modules and is used for detecting at least one type of test items to form a test result.
Alternatively, the second control module may be a baseboard management controller.
S406: the first control module acquires second test information and compares the second test information with the first test information.
S407: the second control module acquires the first test information and compares the first test information with the second test information.
S408: and judging whether the first control module and the second control module are matched with each other or not.
In this embodiment, the first control module and the second control module both check the first test information and the second test information.
And in response to the first control module and the second control module determining that the first test information and the second test information match, executing step S409. In response to the first control module and the second control module not both determining that the first test information matches the second test information, step S410 is performed.
S409: and judging that the network equipment passes the test.
In this embodiment, in response to the first test information matching the second test information, it is determined that the network device passes the test.
S410: and judging that the network equipment is abnormal in test, and performing debugging treatment.
In this embodiment, in response to the first control module and the second control module not both determining that the first test information and the second test information match, determining that the network device is abnormal in test, and performing debugging processing.
Further, the first control module and the second control module respectively acquire process information of the test process, and process verification is carried out on the process information acquired by the first control module and the second control module. And if the test result passes the process verification, judging that the test result is reliable, otherwise, debugging the test process.
Optionally, the process check includes at least one of an event sub-check, a run sub-check, and a detect sub-check.
Specifically, the event sub-check includes:
the first control module and the second control module record event information in the test process respectively, and the event information obtained by the first control module and the second control module are compared. And if the event information acquired by the event sub-verification and the event information acquired by the event sub-verification are matched, judging that the event sub-verification is passed, otherwise, judging that the testing process is abnormal.
The operation sub-check includes:
Detecting whether the first control module and the second control module are in normal operation or not, resetting one of the operation abnormalities by using the other in response to the abnormal operation of one of the first control module and the second control module, and judging that the test process is abnormal.
The detecting sub-check includes:
when the first test information and the second test information are tested, whether the error between the test results of the same test item obtained by the first control module and the second control module is larger than a preset error value or not is judged, and if the error is larger than the preset error value for a plurality of times, the abnormality of the test process is judged.
Alternatively, the first control module and the second control module may also be reset with each other in the present embodiment.
Specifically, in response to monitoring that one of the first control module and the second control module is operating abnormally, the debugging module resets one of the operating abnormally with the other.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (10)

1. A method for testing a network device, the method comprising:
detecting at least one type of test item for the network device;
the first control module acquires test results of the at least one type of test items to form first test information; the second control module obtains the test results of the at least one type of test items to form second test information;
checking the first test information and the second test information;
And responding to the first test information and the second test information to be matched, judging that the network equipment passes the test, otherwise judging that the network equipment is abnormal in test.
2. The method of testing of claim 1, wherein the verifying the first test information and the second test information comprises:
the first control module acquires the second test information and compares the second test information with the first test information; the second control module acquires the first test information and compares the first test information with the second test information;
and in response to the first control module and the second control module both judging that the first test information is matched with the second test information, judging that the first test information is matched with the second test information.
3. The method of claim 2, wherein the first control module obtains test results of the at least one type of test item, and forming the first test information includes:
the first control module acquires a test result of the first detection module to form first test information; the first detection module comprises a plurality of detection modules and is used for detecting at least one type of test items to form a test result;
The second control module obtains the test result of the at least one type of test item, and forming second test information includes:
the second control module obtains a test result of the second detection module to form second test information; the second detection module comprises a plurality of detection modules and is used for detecting at least one type of test items to form a test result;
wherein, the first detection module is independent with the second detection module.
4. The test method of claim 1, wherein the test method further comprises:
the first control module and the second control module respectively acquire process information of a test process, and process verification is carried out on the process information acquired by the first control module and the second control module;
and in response to the process verification, judging that the test result is reliable, and otherwise, performing debugging treatment on the test process.
5. The test method of claim 4, wherein the process check comprises at least one of an event sub-check, a run sub-check, and a detect sub-check;
the event sub-check includes:
the first control module and the second control module record event information in the test process respectively, and compare the event information obtained by the first control module and the second control module respectively;
If the event information acquired by the event sub-inspection and the event information acquired by the event sub-inspection are matched, judging that the test process is abnormal;
the operation sub-check includes:
detecting whether the first control module and the second control module are in normal operation or not, resetting one of the operation abnormalities by using the other one in response to the abnormal operation of the first control module and the second control module, and judging that the test process is abnormal;
the detector check includes:
when the first test information and the second test information are tested, whether the error between the test results of the same test item obtained by the first control module and the second control module is larger than a preset error value or not is judged, and if the error is larger than the preset error value for a plurality of times, the abnormality of the test process is judged.
6. The test method of claim 1, wherein the first control module comprises a first clock unit and the second control module comprises a second clock unit; the test method further comprises the following steps:
taking the time of the second clock unit at the initial time of testing or the external input time as the initial time of the first clock unit and the second clock unit;
Comparing the time of both the first clock unit and the second clock unit;
in response to a difference in the two, synchronizing the time of the first clock unit with the time of the second clock unit using a relatively forward time of the two.
7. The method of testing according to claim 1, wherein the at least one type of test item comprises: at least one of firmware detection, pressure detection, link detection, sensor detection; respectively presetting a debugging rule for each test item so as to carry out debugging treatment according to the preset debugging rule when the test is abnormal; the test method further comprises the following steps:
in response to monitoring that one of the first control module and the second control module is abnormal in operation, resetting one of the abnormal operation by the debugging module through the other; the first control module is a central processing unit, and the second control module is a baseboard management controller.
8. A test apparatus for a network device, the test apparatus comprising:
the detection module is used for detecting at least one type of test items of the network equipment;
the plurality of control modules at least comprise a first control module and a second control module, and the first control module and the second control module are respectively connected with the detection module; the first control module is used for acquiring a test result of the at least one test item to form first test information; the second control module is used for obtaining the test result of the at least one test item to form second test information;
The first control module is connected with the second control module and is used for checking the first test information and the second test information; and responding to the first test information and the second test information to be matched, judging that the network equipment passes the test, otherwise judging that the network equipment is abnormal in test.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method for testing a network device according to any of claims 1 to 7 when the computer program is executed by the processor.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of the method of testing a network device according to any one of claims 1 to 7.
CN202310859628.6A 2023-07-13 2023-07-13 Network equipment testing method and device, computer equipment and storage medium Pending CN117135075A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310859628.6A CN117135075A (en) 2023-07-13 2023-07-13 Network equipment testing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310859628.6A CN117135075A (en) 2023-07-13 2023-07-13 Network equipment testing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117135075A true CN117135075A (en) 2023-11-28

Family

ID=88851703

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310859628.6A Pending CN117135075A (en) 2023-07-13 2023-07-13 Network equipment testing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117135075A (en)

Similar Documents

Publication Publication Date Title
CN109783262B (en) Fault data processing method, device, server and computer readable storage medium
US20240012706A1 (en) Method, system and apparatus for fault positioning in starting process of server
CN108710673B (en) Method, system, computer device and storage medium for realizing high availability of database
US20190004929A1 (en) Software condition evaluation apparatus and methods
CN112783703A (en) SAS link fault positioning method, device, equipment and storage medium
CN111881014A (en) System test method, device, storage medium and electronic equipment
US8327189B1 (en) Diagnosing an incident on a computer system using a diagnostics analyzer database
CN112485572A (en) System, method, equipment and storage medium for testing radiation anti-interference degree of server
CN114385418A (en) Protection method, device, equipment and storage medium for communication equipment
US10860411B2 (en) Automatically detecting time-of-fault bugs in cloud systems
CN114510381A (en) Fault injection method, device, equipment and storage medium
CN115328814B (en) Fault injection method, device, equipment and storage medium based on mirror pair
CN111124724B (en) Node fault testing method and device of distributed block storage system
CN109885420B (en) PCIe link fault analysis method, BMC and storage medium
CN107562565A (en) A kind of method for verifying internal memory Patrol Scurb functions
CN117135075A (en) Network equipment testing method and device, computer equipment and storage medium
CN112463481B (en) Method and system for testing BMC fault diagnosis function based on remote XDP function
CN112306038B (en) Detection method, detection device and diagnosis equipment
JP6217086B2 (en) Information processing apparatus, error detection function diagnosis method, and computer program
CN114281611A (en) Method, system, equipment and storage medium for comprehensively detecting system disk
CN111865719A (en) Automatic testing method and device for fault injection of switch
CN107390115B (en) Method for detecting SC serial port and MC serial port of IO in raid memory in batch
CN116382968B (en) Fault detection method and device for external equipment
CN114816939A (en) Memory communication method, system, device and medium
CN113094221B (en) Fault injection method, device, computer equipment and 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