CN115422048A - Link stability testing method and device, computer equipment and storage medium - Google Patents

Link stability testing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115422048A
CN115422048A CN202211008588.6A CN202211008588A CN115422048A CN 115422048 A CN115422048 A CN 115422048A CN 202211008588 A CN202211008588 A CN 202211008588A CN 115422048 A CN115422048 A CN 115422048A
Authority
CN
China
Prior art keywords
test
module
data packet
program
test data
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
CN202211008588.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.)
Dawning Information Industry Co Ltd
Original Assignee
Dawning Information Industry 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 Dawning Information Industry Co Ltd filed Critical Dawning Information Industry Co Ltd
Priority to CN202211008588.6A priority Critical patent/CN115422048A/en
Publication of CN115422048A publication Critical patent/CN115422048A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a link stability test method, a device, computer equipment and a storage medium, wherein a first module in a computer sends a test data packet to a second module, and the first module receives the test data packet returned by the second module and compares the consistency of the sent test data packet and the returned test data packet; the first module determines the stability test result of the LAN over USB data link of Redfish according to the comparison result; the first module is one of the BIOS and the BMC, and the second module is the other of the BIOS and the BMC; the stability test of the Redfish LAN over USB data link is realized through the data transceiving test between the BIOS and the BMC, an achievable technical scheme is provided for the stability test of the Redfish LAN over USB data link, and the comprehensiveness of the Redfish stability test is improved.

Description

Link stability testing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of testing technologies, and in particular, to a method and an apparatus for testing link stability, a computer device, and a storage medium.
Background
Nowadays, the use of servers in various industries is increasing, and the management requirements for the servers are also increasing. The new generation of server data center management standard Redfish is used for realizing a high-level management function on a large-scale server, so that the stability of the Redfish is guaranteed to be very important.
Conventionally, the stability test for Redfish is mainly focused on the functionality test for Redfish, and a technical scheme for testing the stability of an underlying link LAN over USB (Local Area Network over Universal Serial Bus, LAN transmitted over a Universal Serial Bus) of Redfish does not exist.
Disclosure of Invention
In view of the above, it is necessary to provide a link stability testing method, an apparatus, a computer device, a computer readable storage medium, and a computer program product, which can test the stability of the LAN over USB of the underlying link of Redfish, in order to solve the above technical problems.
In a first aspect, the present application provides a method for testing link stability, including:
a first module in the computer sends a test data packet to a second module, wherein the first module is one of the BIOS and the BMC, and the second module is the other one of the BIOS and the BMC;
the first module receives the test data packet returned by the second module, and compares the consistency of the sent test data packet and the returned test data packet;
and the first module determines the stability test result of the LAN over USB data link of Redfish according to the comparison result.
In this embodiment, a first module in a computer sends a test data packet to a second module, and the first module receives the test data packet returned by the second module and compares the consistency of the sent test data packet and the returned test data packet; then, the first module determines the stability test result of the LAN over USB data link of Redfish according to the comparison result; the first module is one of the BIOS and the BMC, and the second module is the other of the BIOS and the BMC; that is to say, in the embodiment of the present application, the stability test of the LAN over USB data link of Redfish is implemented by implementing the data transceiving test between the BIOS and the BMC, and the stability test result of the LAN over USB data link of Redfish can be obtained; the technical scheme which can be realized is provided for the stability test of the LAN over USB data link of Redfish which does not exist at present in the prior art, and the comprehensiveness of the stability test of the Redfish is improved; in addition, the stability of the LAN over USB data link of Redfish is tested, so that the problems of the data link can be found in time, and the development quality of the server is ensured.
In one embodiment, the first module includes a first test program, the second module includes a second test program, and the first module sends a test packet to the second module in the computer, including:
the first module sends a test data packet to the second test program by using the first test program;
correspondingly, the first module receives the test data packet returned by the second module, and compares the consistency of the sent test data packet and the returned test data packet, including:
the first module receives the test data packet returned by the second test program by using the first test program, and compares the consistency of the sent test data packet and the returned test data packet by using the first test program.
In this embodiment, the first module includes a first test program, the second module includes a second test program, the first module in the computer sends a test data packet to the second test program by using the first test program, and the first module further receives the test data packet returned by the second test program by using the first test program, and compares the consistency of the sent test data packet and the returned test data packet by using the first test program; by independently developing a test program for testing the stability of the LAN over USB data link of Redfish, the flexibility and the portability of the test program for testing the stability of the LAN over USB data link can be improved, and the test efficiency of the stability of the LAN over USB data link of a plurality of servers Redfish can be improved.
In one embodiment, the first module receives a test data packet returned by the second test program by using the first test program, and compares the consistency of the sent test data packet and the returned test data packet by using the first test program, including:
the first module receives a plurality of test data packets returned by the second test program by using the first test program, and compares the consistency of the plurality of test data packets sent and the plurality of test data packets returned by using the first test program.
In this embodiment, a continuous test mode with multiple packets is supported, and a reliable test mode is provided for the stability test of the link.
In one embodiment, before the first module receives, by the first test program, a plurality of test packets returned by the second test program, the method further includes:
the first module sends a completion instruction to the second test program by using the first test program, wherein the completion instruction is used for indicating the second test program to return a plurality of test data packets.
In this embodiment, in the continuous test mode, after sending the test data packet, the first test program sends a completion instruction to the second test program, so that the second test program starts to return multiple test data packets, the second test program automatically sends the test data packets, and the automation degree of the test can be improved.
In one embodiment, the first module receives a test data packet returned by the second test program by using the first test program, and compares the consistency of the sent test data packet and the returned test data packet by using the first test program, including:
the first module receives the single test data packet returned by the second test program by using the first test program, and compares the consistency of the sent single test data packet and the returned single test data packet by using the first test program.
In this embodiment, a single packet test mode is supported, and another reliable test mode is provided for the stability test of the link.
In one embodiment, before the first module sends the test data packet to the second test program by using the first test program, the method further includes:
the first module sends test parameters to the second test program by using the first test program so that the second test program returns a test data packet based on the test parameters;
the test parameters include a test mode, a test packet length, and a packet transmission time interval.
In this embodiment, before the test, the test parameters of the automated test are sent to the second test program, so that the second test program can automatically execute forwarding of the test data packet according to the test parameters, thereby improving the automation degree of the test and further improving the test efficiency.
In one embodiment, before the first module sends the test parameters to the second test program by using the first test program, the method further includes:
the first module acquires a test parameter by using a first test program and judges whether the test parameter accords with a preset parameter rule or not;
and under the condition that the test parameters are judged not to accord with the preset parameter rules, outputting error information, and forbidding the first test program to send the test parameters to the second test program.
In the embodiment, before the first module sends the test parameters to the second test program by using the first test program, the first test program is used for obtaining the test parameters, whether the test parameters meet the preset parameter rule is judged, and when the test parameters do not meet the preset parameter rule, error information is output and the first test program is forbidden to send the test parameters to the second test program; the accuracy of the test parameters can be improved, and the reliability of the test process is further improved.
In one embodiment, before the first module sends the test parameters to the second test program by using the first test program, the method further includes:
the first module establishes a communication connection with a second test program in the second module by using the first test program.
In this embodiment, before the test, the communication connection between the first test program and the second test program is established, so as to provide a reliable communication channel for the test data.
In one embodiment, the first module is a BIOS, the second module is a BMC, and an operating system of the computer includes a first test script, and the method further includes:
and sending the second test program to the BMC by using the first test script.
In this embodiment, through setting up first test script, can realize the automatic start and the operation of second test program, can improve the degree of automation of test, and then can improve efficiency of software testing.
In one embodiment, the operating system of the computer further includes a second test script, and the method further includes:
inputting the test parameters into the first test program by using the second test script;
and collecting and storing the stability test result of the LAN over USB data link of Redfish by using a second test script.
In this embodiment, through setting up the second test script, can realize the automatic start and the operation of first test procedure, can improve the degree of automation of test, and then can improve efficiency of software testing.
In one embodiment, before inputting the test parameters into the first test program using the second test script, the method further comprises:
setting the network configuration of the BIOS using the second test script.
In this embodiment, the second test script automatically performs network configuration on the BIOS, and a tester does not need to manually configure a network, so that manual operation processes of the tester are reduced, and test efficiency is improved.
In a second aspect, the present application further provides a link stability testing apparatus, including:
the first sending module is used for sending the test data packet to the second module, wherein the first module is one of the BIOS and the BMC, and the second module is the other one of the BIOS and the BMC;
the receiving module is used for receiving the test data packet returned by the second module and comparing the consistency of the sent test data packet and the returned test data packet;
and the determining module is used for determining the stability test result of the LAN over USB data link of Redfish according to the comparison result.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the method of any of the first aspects described above when the computer program is executed by the processor.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of any of the above first aspects.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program that, when executed by a processor, performs the steps of the method of any of the first aspects described above.
According to the link stability testing method, the link stability testing device, the computer equipment, the storage medium and the computer program product, the first module in the computer sends the test data packet to the second module, the first module receives the test data packet returned by the second module, and the consistency of the sent test data packet and the returned test data packet is compared; then, the first module determines the stability test result of the LAN over USB data link of Redfish according to the comparison result; the first module is one of the BIOS and the BMC, and the second module is the other of the BIOS and the BMC; that is to say, in the embodiment of the present application, the stability test of the LAN over USB data link of Redfish is implemented by implementing the data transceiving test between the BIOS and the BMC, and the stability test result of the LAN over USB data link of Redfish can be obtained; the technical scheme which can be realized is provided for the stability test of the LAN over USB data link of Redfish which does not exist at present in the prior art, and the comprehensiveness of the stability test of the Redfish is improved; in addition, the stability of the LAN over USB data link of Redfish is tested, so that the problems of the data link can be found in time, and the development quality of the server is ensured.
Drawings
FIG. 1 is a diagram of an exemplary implementation of a method for link stability testing;
FIG. 2 is a flow diagram illustrating a method for link stability testing in one embodiment;
FIG. 3 is a flow chart illustrating a method for link stability testing in another embodiment;
fig. 4 is a block diagram of a link stability testing apparatus according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
The link stability testing method provided by the embodiment of the application can be applied to computer equipment, wherein the computer equipment can be a server, and the internal structure diagram of the computer equipment is shown in fig. 1. In addition, the server manages the server by adopting an open industry standard specification (Redfish) issued by a distributed Management task group, and the server also comprises a Basic Input Output System (BIOS) and a substrate Management Controller (BMC); when the Redfish is adopted to manage the server, a Local Area Network over Universal Serial Bus (LAN) USB (Local Area Network over Universal Serial Bus) which is a bottom layer is a USB protocol, and an upper layer is an Ethernet protocol) is a Redfish communication path between the BIOS and the BMC, and is used for realizing data communication between the BIOS and the BMC. In the prior art, the stability of the LAN over USB of the bottom link of Redfish is also important on the basis that the specific function of Redfish is usually tested to ensure that Redfish is stable.
The computer device includes a processor, a memory, and a network interface 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, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing the test data packets. 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 link stability testing.
Those skilled in the art will appreciate that the architecture shown in fig. 1 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, as shown in fig. 2, a link stability testing method is provided, which is described by taking the method as an example applied to the computer device in fig. 1, and includes the following steps:
step 201, a first module in a computer sends a test data packet to a second module.
The first module is one of the BIOS and the BMC, and the second module is the other one of the BIOS and the BMC. That is, the first module may be a BIOS, and the second module is a BMC; alternatively, the first module may be a BMC and the second module may be a BIOS.
When the first module is the BIOS and the second module is the BMC, the BIOS sends a test data packet to the BMC; and under the condition that the first module is the BMC and the second module is the BIOS, the BMC sends a test data packet to the BIOS.
Optionally, the test data packet may include at least one test data packet, that is, one test data packet may be sent and received between the BIOS and the BMC, and a data link stability test may be performed through the one test data packet, which may be referred to as a single packet test mode; a multi-packet test can also be performed, that is, a plurality of test data packets are sent and received between the BIOS and the BMC, and a data link stability test is performed through the plurality of test data packets, which may be referred to as a multi-packet test mode (or a continuous test mode); in the multi-packet test mode, the first module may continuously send a plurality of test data packets to the second module.
Step 202, the first module receives the test data packet returned by the second module, and compares the consistency of the sent test data packet and the returned test data packet.
Optionally, when performing a single-packet test, after the first module sends the test data packet to the second module, the second module may directly return the received test data packet to the first module, and then the first module may compare the sent test data packet with the received test data packet, and determine whether the two test data packets are consistent, that is, determine the integrity of the test data packet in the transceiving process.
Optionally, when performing a multi-packet test, the first module may continuously send a plurality of test data packets to the second module, and the second module may sequentially return the plurality of test data packets to the first module after receiving the plurality of test data packets; then, the first module can compare the returned test data packets with the corresponding test data packets sent out, and judge the data consistency between the two. In addition, when returning the test data packets, the second module may return the test data packets in sequence after receiving the completion instruction sent by the first module, or the second module may return a plurality of test data packets received within a preset time period in sequence to the first module according to a preset interval duration.
Step 203, the first module determines the stability test result of the LAN over USB data link of Redfish according to the comparison result.
Optionally, the first module of the computer may determine that the LAN over USB data link of Redfish is stable when comparing that the test packet sent between the BIOS and the BMC is consistent with the returned test packet; optionally, when performing a multi-packet test, in a case that it needs to determine that a test packet sent by each test packet is consistent with a returned test packet, it may be determined that the LAN over USB data link of Redfish is stable.
Optionally, when a multi-packet test is performed, the stable rate of the LAN over USB data link of Redfish may be determined according to a test result of each test data packet, and the stable rate of the LAN over USB data link of Redfish may be calculated by a manner of using a number of the test data packets in the plurality of test data packets that is consistent with a number of the test data packets/using a number of the plurality of test data packets.
In the link stability test method, a first module in a computer sends a test data packet to a second module, and the first module receives the test data packet returned by the second module and compares the consistency of the sent test data packet and the returned test data packet; then, the first module determines the stability test result of the LAN over USB data link of Redfish according to the comparison result; the first module is one of the BIOS and the BMC, and the second module is the other of the BIOS and the BMC; that is to say, in the embodiment of the present application, the stability test of the LAN over USB data link of Redfish is implemented by implementing the data transceiving test between the BIOS and the BMC, and the stability test result of the LAN over USB data link of Redfish can be obtained; the technical scheme which can be realized is provided for the stability test of the LAN over USB data link of Redfish which does not exist at present in the prior art, and the comprehensiveness of the stability test of the Redfish is improved; in addition, the stability of the LAN over USB data link of Redfish is tested, so that the problems of the data link can be found in time, and the development quality of the server is ensured.
In an alternative embodiment of the present application, as shown in fig. 3, the first module of the computer may include a first test program, the second module of the computer may include a second test program, and the step 201 may include:
step 301, the first module sends a test data packet to the second test program by using the first test program.
Correspondingly, the step 202 may include:
step 302, the first module receives the test data packet returned by the second test program by using the first test program, and compares the consistency of the sent test data packet and the returned test data packet by using the first test program.
Optionally, in a case that the first module is a BIOS and the second module is a BMC, the first test program may be an application program at a BIOS end, for example, an application program under UEFI shell (Unified Extensible Firmware Interface shell) in the BIOS, and the second test program may be an application program under a BMC-end Linux operating system.
Optionally, when the first module is a BMC and the second module is a BIOS, the first test program may be an application program under a Linux operating system at a BMC end, and the second test program may be an application program under a UEFI shell in the BIOS.
Specifically, when a first test program in the first module and a second test program in the second module are used to perform a stability test on the LAN over USB data link of Redfish, the above single-packet test mode and continuous test mode may also be used; in the continuous test mode, the first module receives a plurality of test data packets returned by the second test program by using the first test program, and compares the consistency of the plurality of test data packets sent and the plurality of test data packets returned by using the first test program. Such as: the first module uses the first test program to continuously send 3 test data packets, namely a test data packet A, a test data packet B and a test data packet C, to the second test program in the second module, and then the first module uses the first test program to receive 3 test data packets returned by the second test program, namely the test data packet A corresponding to the test data packet A And a test data packet B corresponding to the test data packet B And a test data packet C corresponding to the test data packet C (ii) a Then, the first test program respectively compares the test data packet A with the test data packet A Consistency of (D), test data packet B and test data packet B And test data packet C The consistency of (c).
In another case, namely in the single-packet test mode, the first module receives a single test data packet returned by the second test program by using the first test program, and compares the consistency of the sent single test data packet and the returned single test data packet by using the first test program; that is, the first test program sends a test packet to the second test program, which immediately returns the test packet to the first test program.
In this embodiment, the first module includes a first test program, the second module includes a second test program, the first module in the computer sends a test data packet to the second test program by using the first test program, and the first module further receives the test data packet returned by the second test program by using the first test program, and compares the consistency of the sent test data packet and the returned test data packet by using the first test program; by independently developing a test program for testing the stability of the LAN over USB data link of Redfish, the flexibility and the portability of the test program for testing the stability of the LAN over USB data link can be improved, and the test efficiency of the stability of the LAN over USB data link of a plurality of servers Redfish can be improved.
In an optional embodiment of the present application, in the continuous test mode, before the first module receives, by using the first test program, the plurality of test data packets returned by the second test program, the first module may further send, by using the first test program, a completion instruction to the second test program, where the completion instruction is used to instruct the second test program to return the plurality of test data packets; that is, in the continuous test mode, the first test program continuously sends a plurality of test data packets to the second test program, and after sending the plurality of test data packets, continues to send a completion instruction to the second test program to inform the second test program of completion of sending, and may return to the plurality of test data packets; furthermore, after receiving the completion instruction, the second test program starts to return the plurality of test data packets to the first test program in sequence; the automatic test degree of the continuous test mode can be improved, and the test efficiency is improved.
In an optional embodiment of the present application, before the first module sends the test data packet to the second test program by using the first test program in step 301, the first module may further send the test parameter to the second test program by using the first test program, so that the second test program returns the test data packet based on the test parameter; the test parameters include a test mode, a test packet length, and a packet transmission time interval.
Alternatively, the test mode may include the above-described single-packet test mode and multi-packet test mode (the multi-packet test mode may also be referred to as a continuous test mode).
Specifically, before the first test program sends the test data packet to the second test program, the first test program sends the test parameters to the second test program, and then the first test program sends the test data packet to the second test program according to the test mode, the length of the test data packet and the data packet sending time interval. If the test mode is a single-packet test mode, the first test program is converted into a receiving state after sending the test data packet to the second test program, and the test data packet returned by the second test program is ready to be received; and under the condition that the second test program determines that the test is in the single-packet test mode according to the test parameters, after receiving the test data packet sent by the first test program, the second test program is converted into a sending state, and returns the test data packet to the first test program.
If the test mode is a continuous test mode, after the first test program sends the test data packet to the second test program, continuing to send the next test data packet to the second test program according to the length of the test data packet and the data packet sending time interval until the sending of the plurality of test data packets is finished; finally, sending a completion instruction to the second test program; and under the condition that the second test program determines that the test is in a continuous test mode according to the test parameters, after receiving the completion instruction, starting to return each received test data packet to the first test program in sequence according to the length of the test data packet and the data packet sending time interval.
In this embodiment, before the test, the test parameters of the automated test are sent to the second test program, so that the second test program can automatically execute forwarding of the test data packet according to the test parameters, thereby improving the automation degree of the test and further improving the test efficiency.
In an optional embodiment of the present application, before the first module sends the test parameter to the second test program by using the first test program, the first module further obtains the test parameter by using the first test program, and determines whether the test parameter meets a preset parameter rule; and under the condition that the test parameters are judged not to accord with the preset parameter rules, outputting error information, and forbidding the first test program to send the test parameters to the second test program.
Optionally, the first test program may obtain the test parameters input by the user, and may also obtain the test parameters from other devices, where the other devices may be a control device connected to the computer through a wired/wireless connection, a server connected to the computer in a communication manner, and the like, and the obtaining manner of the test parameters is not specifically limited in the present application.
Further, after the first test program acquires the test parameters, the first test program can also judge the acquired test parameters, for example, judge the type of the test parameters, judge the rationality of the test parameter data, and the like, and different test parameters correspond to different judgment rules; therefore, for different test parameters, preset parameter rules corresponding to the test parameters can be preset; for example: the corresponding preset parameter rules can be test modes including a single-packet test mode and a continuous test mode, and if the obtained test modes are not the two test modes, error information can be output; another example is: and testing the length of the data packet, wherein the corresponding preset parameter rule can be a preset length range, and if the obtained length of the test data packet is not in the preset length range, outputting error information. It should be noted that, in the embodiment of the present application, the preset parameter rules corresponding to different test parameters are not specifically limited, and may be flexibly set and adjusted in practical application.
Furthermore, after the first test program obtains each test parameter, whether the test parameter meets a preset parameter rule or not can be judged for each test parameter; optionally, when the test parameter is determined not to meet the preset parameter rule, an error message may be output to prompt the user to re-input the correct test parameter, and the first test program is further required to be prohibited from sending the test parameter to the second test program, so as to avoid sending the incorrect and unreasonable test parameter to the second test program.
In the embodiment, before the first module sends the test parameters to the second test program by using the first test program, the first test program is used for obtaining the test parameters, whether the test parameters accord with the preset parameter rule is judged, and when the test parameters do not accord with the preset parameter rule, error information is output and the first test program is forbidden to send the test parameters to the second test program; the accuracy of the test parameters can be improved, and the reliability of the test process is further improved.
In an optional embodiment of the present application, before the first module sends the test parameters to the second test program by using the first test program, the first module further establishes a communication connection with the second test program in the second module by using the first test program.
Optionally, the first test program may establish a TCP (Transmission Control Protocol) communication connection with the second test program, the first test program may serve as a client end of socket (socket is an intermediate software abstraction layer for communication between an application layer and a TCP/IP Protocol suite, and is a group of interfaces) communication, and the second test program may serve as a server end of socket communication; that is to say, under the condition that the first module is the BIOS and the second module is the BMC, the BIOS serves as a client end of socket communication, and the BMC serves as a server end of socket communication; under the condition that the first module is BMC and the second module is BIOS, the BMC is used as a client end of socket communication, and the BIOS is used as a server end of socket communication.
Alternatively, for the first test program, it may create a client end of socket communication according to the flow of TCP communication, and connect to a server end. For the second test program, it may create a server end of socket communication according to the flow of TCP communication, and wait for the connection of the client end. It should be noted that the connection method of TCP communication is the prior art, and the description is not made herein.
In an optional embodiment of the present application, the first module may be a BIOS, the second module may be a BMC, and an operating system of the computer may further include a first test script, based on which the method further includes: and sending the second test program to the BMC by using the first test script. Optionally, the first test script may be a script running in a Linux system on a Central Processing Unit (CPU), and the first test script may be configured to send a first test program to the BMC and start the first test program at the BMC; optionally, the first test script may adopt an except command to implement that the first test program is sent to a specified directory of the BMC end through an SCP instruction, and the BMC is connected through the SSH and the first test program is started. Optionally, the first test script may also control restarting after the operations are completed, and directly enter the UEFI shell after the restarting is designated, and automatically run the first test program.
In an optional embodiment of the present application, based on the above embodiment, the operating system of the computer may further include a second test script, based on which the method further includes: inputting the test parameters into the first test program by using the second test script; and collecting and storing the stability test result of the LAN over USB data link of Redfish by using a second test script.
Optionally, after controlling the restart, the first test script may specify that the first test script directly enters the UEFI shell after the restart, and may automatically run the second test script after entering the UEFI shell, and the second test script sets the network configuration of the BIOS, including but not limited to an IP address, a subnet mask, and a gateway, through an ifconfig instruction under the UEFI shell; then, after the network configuration is successful, a first test procedure is executed, where test parameters of the first test procedure, including but not limited to a test mode, a test packet length, a packet transmission time interval, and a test number, may be configured according to test requirements.
The stability test of the LAN over USB data link of Redfish can be automatically controlled through the second test script, and the stability test result of the LAN over USB data link of Redfish can be collected and stored through the second test script; after the first test program compares the consistency of the sent test data packet and the returned test data packet to obtain a comparison result and determines the stability test result of the LAN over USB data link of Redfish according to the comparison result, the first test program can send the stability test result of the LAN over USB data link of Redfish to the second test script and store the stability test result of the LAN over USB data link of Redfish by the second test script, and the test results can be stored in a unified storage path after being summarized; or, the stability test result of the LAN over USB data link of Redfish may also be sent to the tester terminal through the second test script, such as: and sending the test result to a tester through an email.
In the embodiment, through the first test script and the second test script, an automatic test process of the stability of the LAN over USB data link of Redfish can be realized, a tester does not need to manually control the test process, and the test efficiency can be greatly improved.
A complete test flow is illustrated below, in which the first module is a BIOS, the second module is a BMC, the first module includes a first test program, the second module includes a second test program, and an operating system of the computer includes a first test script for controlling the second test program and a second test script for controlling the first test program, and the method includes the following steps:
(1) Starting a server, running a first test script, sending a second test program to a specified directory of a BMC (baseboard management controller) end through an SCP (service control point) instruction by adopting an except command, then connecting the BMC through an SSH (service state indicator) and starting the second test program;
(2) The second test program creates a server end of socket communication according to the flow of TCP communication and waits for the connection of a client end;
(3) The first test script controls the server to restart, and directly enters UEFI shell after the server is appointed to restart;
(4) Automatically running a second test script after entering UEFI shell, and setting network configuration including an IP address, a subnet mask and a gateway in the second test script through an ifconfig instruction under the UEFI shell;
(5) The second test script controls and executes the first test program, and the first test program obtains test parameters;
(6) The first test program judges whether the test parameters accord with preset parameter rules, outputs error information under the condition that the test parameters do not accord with the preset parameter rules, and forbids the first test program to send the test parameters to the second test program;
(7) Under the condition that the test parameters are judged to accord with the preset parameter rules, a client end of socket communication is established according to the flow of TCP communication, and is connected with a server end;
(8) After the socket communication is established between the first test program and the second test program, the first test program sends the test parameters to the second test program;
(9) If the test mode in the test parameters is a single-packet test mode, the first test program reads a test data packet from a test source file according to the test parameters and sends the test data packet to the second test program; after the transmission is finished, the first test program is converted into a receiving state, and at the moment, the second test program returns the test data packet to the first test program; the first test program compares the sent test data packet with the received test data packet, and if the test data packet is consistent with the received test data packet, the first test program records that the test result is successful; if not, recording the test result as failure; then, the single-packet testing process is repeatedly executed until all the data in the test source file are tested, so that the test in a single-packet mode can be finished; further, the above process may be executed in a loop according to the number of times of testing in the testing parameters until the testing corresponding to the number of times of testing is completed.
(10) If the test mode in the test parameters is a continuous test mode, the first test program reads a plurality of test data packets from the test source file in sequence according to the test parameters and sends the test data packets to the second test program; until the data in the whole test source file is sent, then the first test program continues to send a completion instruction to the second test program, and the first test program is converted into a receiving state; after receiving each test data packet sent by the first test program, the second test program locally caches each test data packet, and after receiving a completion instruction sent by the first test program, the second test program is converted into a sending state; then, sequentially returning each test data packet to the first test program according to the test parameters until all the received test data packets are sent completely, and then, continuously sending a completion instruction to the first test program by the second test program; after the first test program receives the completion instruction, the first test program judges the consistency of every two test data packets according to the sent test data packets and the received test data packets; if the data in the two test data packets are not consistent, recording the test result as success, otherwise, recording the test result as failure; thus, completing one test; further, the above process may be executed in a loop according to the number of times of testing in the testing parameters until the testing corresponding to the number of times of testing is completed.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides a link stability testing apparatus for implementing the above-mentioned link stability testing method. The implementation scheme for solving the problem provided by the apparatus is similar to the implementation scheme described in the above method, so specific limitations in one or more embodiments of the link stability testing apparatus provided below may refer to the limitations in the above link stability testing method, and details are not described herein again.
In one embodiment, as shown in fig. 4, there is provided a link stability testing apparatus, including: a first sending module 401, a receiving module 402 and a determining module 403, wherein:
a first sending module 401, configured to send a test data packet to a second module, where the first module is one of the BIOS and the BMC, and the second module is the other of the BIOS and the BMC;
a receiving module 402, configured to receive the test data packet returned by the second module, and compare consistency between the sent test data packet and the returned test data packet;
and a determining module 403, configured to determine, according to the comparison result, a stability test result of the LAN over USB data link of Redfish.
In one embodiment, the first module includes a first test program, the second module includes a second test program, and the first sending module 401 is specifically configured to send a test data packet to the second test program by using the first test program; the receiving module 402 is specifically configured to receive, by using the first test program, the test data packet returned by the second test program, and compare the consistency between the sent test data packet and the returned test data packet by using the first test program.
In one embodiment, the receiving module 402 is specifically configured to receive, by using the first test program, a plurality of test data packets returned by the second test program, and compare, by using the first test program, consistency between the sent plurality of test data packets and the plurality of returned test data packets.
In one embodiment, the first sending module 401 is further configured to send, by the first test program, a completion instruction to the second test program, where the completion instruction is used to instruct the second test program to return the plurality of test data packets, before the receiving module 402 receives, by the first test program, the plurality of test data packets returned by the second test program.
In one embodiment, the receiving module 402 is specifically configured to receive, by using the first test program, a single test data packet returned by the second test program, and compare, by using the first test program, consistency of the sent single test data packet and the returned single test data packet.
In one embodiment, the first sending module 401 is further configured to send the test parameters to the second test program by using the first test program before sending the test data packet to the second test program by using the first test program, so that the second test program returns the test data packet based on the test parameters; the test parameters include a test mode, a test packet length, and a packet transmission time interval.
In one embodiment, the first sending module 401 is further configured to, before sending the test parameter to the second test program by using the first test program, obtain the test parameter by using the first test program, and determine whether the test parameter meets a preset parameter rule; and outputting error information and prohibiting the first test program from sending the test parameters to the second test program under the condition that the test parameters are judged not to accord with the preset parameter rules.
In one embodiment, the first sending module 401 is further configured to establish a communication connection with a second test program in the second module by using the first test program before sending the test parameters to the second test program by using the first test program.
In one embodiment, the first module is a BIOS, the second module is a BMC, and an operating system of the computer includes a first test script, and the apparatus further includes a second sending module, configured to send a second test program to the BMC using the first test script.
In one embodiment, the operating system of the computer further includes a second test script, and the apparatus further includes: the third sending module is used for inputting the test parameters to the first test program by using the second test script; and collecting and storing the stability test result of the LAN over USB data link of Redfish by using a second test script.
In one embodiment, the third sending module is further configured to set the network configuration of the BIOS using the second test script before the test parameters are input to the first test program using the second test script.
All or part of each module in the link stability testing device can be implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In an embodiment, referring to fig. 1, there is provided a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the link stability testing method in the above embodiments when executing the computer program.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, realizes the steps of the link stability testing method in the above-mentioned various embodiments.
In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the link stability testing method in the various embodiments described above.
It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, databases, or other media used in the embodiments provided herein can include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), magnetic Random Access Memory (MRAM), ferroelectric Random Access Memory (FRAM), phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), for example. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, and these are all within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A method for link stability testing, the method comprising:
a first module in a computer sends a test data packet to a second module, wherein the first module is one of a BIOS and a BMC, and the second module is the other of the BIOS and the BMC;
the first module receives the test data packet returned by the second module, and compares the consistency of the sent test data packet and the returned test data packet;
and the first module determines the stability test result of the LAN over USB data link of Redfish according to the comparison result.
2. The method of claim 1, wherein the first module comprises a first test program and the second module comprises a second test program, and wherein sending the test packets from the first module to the second module in the computer comprises:
the first module sends a test data packet to the second test program by using the first test program;
correspondingly, the receiving, by the first module, the test data packet returned by the second module, and comparing the consistency of the sent test data packet and the returned test data packet includes:
and the first module receives the test data packet returned by the second test program by using the first test program, and compares the consistency of the sent test data packet and the returned test data packet by using the first test program.
3. The method of claim 2, wherein the first module receives the test data packet returned by the second test program by using the first test program, and compares the consistency of the sent test data packet and the returned test data packet by using the first test program, comprising:
and the first module receives a plurality of test data packets returned by the second test program by using the first test program, and compares the consistency of the sent test data packets and the returned test data packets by using the first test program.
4. The method of claim 2, wherein the first module receives the test data packet returned by the second test program by using the first test program, and compares the consistency of the sent test data packet and the returned test data packet by using the first test program, and the method comprises:
and the first module receives the single test data packet returned by the second test program by using the first test program, and compares the consistency of the sent single test data packet and the returned single test data packet by using the first test program.
5. The method of claim 2, wherein before the first module sends a test packet to the second test program using the first test program, the method further comprises:
the first module sends test parameters to the second test program by using the first test program, so that the second test program returns a test data packet based on the test parameters;
the test parameters comprise a test mode, a test data packet length and a data packet sending time interval.
6. The method of claim 5, wherein the first module is a BIOS and the second module is a BMC, and wherein the operating system of the computer includes a first test script, the method further comprising:
and sending the second test program to the BMC by using the first test script.
7. The method of claim 6, wherein the operating system of the computer further comprises a second test script, the method further comprising:
inputting the test parameters into the first test program by using the second test script;
and collecting and storing the stability test result of the LAN over USB data link of the Redfish by using the second test script.
8. A link stability testing apparatus, the apparatus comprising:
the device comprises a first sending module and a second sending module, wherein the first sending module is used for sending a test data packet to the second module, the first module is one of the BIOS and the BMC, and the second module is the other one of the BIOS and the BMC;
the receiving module is used for receiving the test data packet returned by the second module and comparing the consistency of the sent test data packet and the returned test data packet;
and the determining module is used for determining the stability test result of the LAN over USB data link of Redfish according to the comparison result.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202211008588.6A 2022-08-22 2022-08-22 Link stability testing method and device, computer equipment and storage medium Pending CN115422048A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211008588.6A CN115422048A (en) 2022-08-22 2022-08-22 Link stability testing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211008588.6A CN115422048A (en) 2022-08-22 2022-08-22 Link stability testing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115422048A true CN115422048A (en) 2022-12-02

Family

ID=84199225

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211008588.6A Pending CN115422048A (en) 2022-08-22 2022-08-22 Link stability testing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115422048A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116132666A (en) * 2023-04-13 2023-05-16 四川赛狄信息技术股份公司 FPGA-based video image processing method and system
CN117194334A (en) * 2023-11-07 2023-12-08 苏州元脑智能科技有限公司 Log storage method, device, equipment and medium of distributed log storage system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116132666A (en) * 2023-04-13 2023-05-16 四川赛狄信息技术股份公司 FPGA-based video image processing method and system
CN117194334A (en) * 2023-11-07 2023-12-08 苏州元脑智能科技有限公司 Log storage method, device, equipment and medium of distributed log storage system
CN117194334B (en) * 2023-11-07 2024-02-09 苏州元脑智能科技有限公司 Log storage method, device, equipment and medium of distributed log storage system

Similar Documents

Publication Publication Date Title
CN110928774B (en) Automatic test system based on node type
CN115422048A (en) Link stability testing method and device, computer equipment and storage medium
US7496815B2 (en) Method and apparatus for automatic generation of system test libraries
WO2019095580A1 (en) Test method and apparatus, computer device, and readable storage medium
US20080205286A1 (en) Test system using local loop to establish connection to baseboard management control and method therefor
CN110908909A (en) Automatic testing method and device, storage medium and equipment
CN110798376A (en) Interface testing method and device, computer equipment and storage medium
WO2017028574A1 (en) Router testing method and testing device
US8751868B2 (en) Control server and method for switching running of test programs stored in multiple storage mediums of test server
CN114374632B (en) Internet of things data platform multi-protocol test efficiency improvement method
CN109474459A (en) Domain name configuring management method, device, computer equipment and storage medium
EP4177735A1 (en) Novel portable program upgrading method
CN115542875A (en) Vehicle detection method based on SOA service and related equipment
CN116056126A (en) Simulation test method, simulation test device, computer equipment and computer readable storage medium
CN109388420A (en) Application upgrade test method, device, computer equipment and storage medium
CN113342500A (en) Task execution method, device, equipment and storage medium
CN110620695B (en) Data processing method and related equipment
WO2016201997A1 (en) Automatic testing method, device and system
CN111782447A (en) Batch test updating method and device based on SSH service and computer equipment
US20090083747A1 (en) Method for managing application programs by utilizing redundancy and load balance
CN115408220A (en) CPU fault testing method, server and storage medium
CN112650666B (en) Software testing system, method, device, control equipment and storage medium
JP5913155B2 (en) Packet replay device and packet replay method
JP4208494B2 (en) Load test system for network server
CN117743061B (en) FTTR-based FPGA key wireless static test method, FTTR-based FPGA key wireless static test device, FTTR-based FPGA key wireless static test equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination