CN111934945B - BMC sharelink network port plugging test method and system - Google Patents

BMC sharelink network port plugging test method and system Download PDF

Info

Publication number
CN111934945B
CN111934945B CN202010662644.2A CN202010662644A CN111934945B CN 111934945 B CN111934945 B CN 111934945B CN 202010662644 A CN202010662644 A CN 202010662644A CN 111934945 B CN111934945 B CN 111934945B
Authority
CN
China
Prior art keywords
sharelink
network
test
bmc
network port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010662644.2A
Other languages
Chinese (zh)
Other versions
CN111934945A (en
Inventor
戴林青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN202010662644.2A priority Critical patent/CN111934945B/en
Publication of CN111934945A publication Critical patent/CN111934945A/en
Application granted granted Critical
Publication of CN111934945B publication Critical patent/CN111934945B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports

Abstract

The invention provides a testing method for plugging and unplugging a BMC sharelink network port, which comprises the following steps: connecting a server to be tested with a test server through a network, and setting first static IP of a plurality of sharelink network ports of the BMC in the test server; the test server sets the plugging test times, and sequentially drops sharelink network ports according to the sharelink network port sequence; the invention further provides a test system for plugging and unplugging the BMC sharelink network ports, which effectively improves test efficiency, reduces test cost and saves test time.

Description

BMC sharelink network port plugging test method and system
Technical Field
The invention relates to the field of network port testing, in particular to a method and a system for testing plugging of a BMC sharelink network port.
Background
Python is a computer programming language, and the most stable version is Python3.0 or more. The network cable plugging test of a plurality of sharelink (shared port) network ports of the server is used for testing whether packet sending errors exist or not and whether normal communication can be realized or not.
The existing sharelink network port network cable plugging test process is relatively complicated, whether the network communication functions of a plurality of sharelink ports are affected by network cable plugging is tested, one end of the network cable needs to be manually connected to a server, the other end of the network cable is connected to a computer or another server, the IP addresses of the server network port and the computer are manually configured, the network cable plugging action of the sharelink network port is repeatedly performed, and the network communication condition is checked.
Because of manual configuration of the IP address and frequent plugging of the network cable, the test efficiency of plugging of the sharelink network port of the BMC (Basebo ard Management Controller ) is low, which is not beneficial to reducing the test cost.
Disclosure of Invention
In order to solve the problems in the prior art, the invention innovatively provides a test method and a test system for plugging and unplugging a BMC sharelink network port, which effectively solve the problem of low test efficiency of plugging and unplugging the BMC sharelink network port caused by manually configuring an IP address and frequently plugging and unplugging a network cable, effectively improve the test efficiency and reduce the test cost.
The first aspect of the invention provides a method for testing plugging of a BMC sharelink network port, which comprises the following steps:
connecting a server to be tested with a test server through a network, and setting first static IP of a plurality of sharelink network ports of the BMC in the test server;
the test server sets the plugging test times, and sequentially drops sharelink network ports according to the sharelink network port sequence;
setting a second static IP of a plurality of sharelink network ports in the server to be tested, executing up operation, circularly inquiring the connection state of the plurality of sharelink network ports after the first time period, executing corresponding network port ping operation, and outputting a test result.
Optionally, a plurality of sharelink network ports of the BMC in the server to be tested are connected with a plurality of sharelink network ports of the BMC in the test server in a one-to-one correspondence manner.
Further, the first static IP is in the same network segment as the second static IP.
Optionally, the test server controls the test process of the server to be tested to terminate according to the acquired user instruction.
The second aspect of the present invention provides a test system for plugging and unplugging a BMC sharelink network port, including:
the connection module is used for connecting the server to be tested with the test server through a network and setting first static IP of a plurality of sharelink network ports of the BMC in the test server;
the setting module is used for setting the plugging test times by the test server and sequentially dropping sharelink network ports according to the sharelink network port sequence;
the setting and inquiring module is used for setting second static IP of the plurality of sharelink network ports in the server to be tested, executing up operation, circularly inquiring the connection state of the plurality of sharelink network ports after the first time period is spaced, executing corresponding network port ping operation and outputting a test result.
Optionally, a plurality of sharelink network ports of the BMC in the server to be tested are connected with a plurality of sharelink network ports of the BMC in the test server in a one-to-one correspondence manner.
Further, the first static IP is in the same network segment as the second static IP.
Optionally, the test server controls the test process of the server to be tested to terminate according to the acquired user instruction.
The technical scheme adopted by the invention comprises the following technical effects:
1. the invention effectively solves the problem of low testing efficiency of plugging and unplugging the BMC sharelink network port caused by manually configuring the IP address and frequently plugging and unplugging the network cable, effectively improves the testing efficiency, reduces the testing cost and saves the testing time.
2. According to the technical scheme, the test server controls the test process of the server to be tested to terminate according to the acquired user instruction, so that the test process can be adjusted in time according to the actual situation of the user.
3. The invention can display the test result to the user through the webpage or other forms, and is convenient for the user to know the test condition.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention as claimed.
Drawings
For a clearer description of embodiments of the invention or of the solutions of the prior art, reference will be made to the accompanying drawings, which are used in the description of the embodiments or of the prior art, and it will be obvious to those skilled in the art that other drawings can be obtained from these without inventive labour.
FIG. 1 is a schematic flow chart of a method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a second system according to an embodiment of the present invention.
Detailed Description
In order to clearly illustrate the technical features of the present solution, the present invention will be described in detail below with reference to the following detailed description and the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different structures of the invention. In order to simplify the present disclosure, components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and processes are omitted so as to not unnecessarily obscure the present invention.
Example 1
As shown in fig. 1, the invention provides a method for testing plugging of a BMC sharelink network port, comprising the following steps:
s1, connecting a server to be tested with a test server through a network, and setting first static IP of a plurality of sharelink network ports of a BMC in the test server;
s2, the test server sets the plugging test times, and the sharelink network ports are sequentially down according to the sharelink network port sequence;
s3, setting second static IP of a plurality of sharelink network ports in the server to be tested, executing up operation, circularly inquiring connection states of the plurality of sharelink network ports after a first time period, executing corresponding network port ping operation, and outputting test results.
In step S1, a plurality of sharelink ports of the BMC in the server to be tested and a plurality of sharelink ports of the BMC in the test server are connected in one-to-one correspondence through a network. Specifically, the connection may be through a network cable, or may be through other manners, which are not limited herein. In the whole test process, the network cable is not required to be manually plugged and pulled out. For convenience in description, the embodiment of the invention is illustrated by taking 4 shareink interfaces of the BMC as an example, and the shareink interfaces of the BMC in the four servers to be tested are in one-to-one correspondence connection with a plurality of shareink interfaces of the BMC in the test server: eno0 vs eno0, eno1 vs eno1, eno2 vs eno2, eno3 vs eno3.
The four interfaces sharelink in the test server are provided with first static IP, for example, the interfaces eno0 to eno3 can be respectively set to 192.168.1.100, 192.168.2.100, 192.168.3.100 and 192.168.4.100, and the implementation can be realized through program commands.
In step S2, the test server determines the test times, defaults to 500 times, and can flexibly adjust according to the actual situation of the user, the test is performed in a cyclic manner, the test times and the corresponding test results are output in the form of a log and stored in a designated path, specifically in the table of the test server user, so that the user can check the results conveniently. According to the sequence of the sharelink network ports eno0, eno1, eno2 and eno3, four network ports of the sharelink are automatically down, which is equivalent to that no network cable is inserted, and the network port lamp is extinguished; specifically, it can command: ip_down=cm.geteutput ("iffonfig eno% d down"% i) implementation.
In step S3, when setting the second static IP of the plurality of sharelink ports in the server to be tested, the second static IP needs to be in the same network segment with the first static IP, and specifically, the second static IP of the 4 sharelink ports may be: eno0 to eno3 are 192.168.1.20, 192.168.2.20, 192.168.3.20 and 192.168.4.20, respectively.
After the four sharelink network ports in the server BMC to be tested acquire the static IP, the up operation is automatically executed, and the eno1 to eno3 ports are sequentially up, which is equivalent to reinserting a network cable, and the method specifically can be realized by a command: ip_set=cm.getutput ("iffonfig eno% d 192.168.% d.20up"% (i, i+1)).
Because the network cable is plugged and unplugged with short delay, the network cable is used for acquiring the network signal, so that the first time period needs to be spaced, the first time period can be 10 seconds, and the network cable can be flexibly adjusted according to actual conditions, and the invention is not limited in this regard.
Circularly checking the connection states of four sharelink network ports eno0, eno1, eno2 and eno 3; if the portal status is yes (connectable), a portal ping operation is performed and the time at which the ping operation starts is recorded. The ping operation is specifically that 4 sharelink network ports of the test server are ping 4 sharelink network ports of the server to be tested in a one-to-one correspondence. Checking whether the network port communication is normal or not, wherein the checking time in the actual operation can be 120 seconds, and can be adjusted according to the actual situation. If the portal status is no (connection is disconnected, connection is not possible), a portal ping operation is also performed, and the time at which the ping operation starts is recorded. Checking whether the network port communication is normal or not, wherein the checking time in the actual operation can be 120 seconds, and can be adjusted according to the actual situation. After the up operation is executed, displaying yes in the connection state of the sharelink network port of the network cable, and carrying out ping communication in the presence of network communication; before the up operation is executed, displaying no on the connection state of the sharelink network port of the network cable, wherein no network communication exists, and the network communication cannot be performed by ping, so that the test of plugging and unplugging of the sharelink network port by the BMC is passed, and otherwise, the test is not passed.
The time and the communication result in the step S3 are output in the form of log files and stored in the appointed position, and the example is stored in a user desktop, so that the test result is convenient for a tester to check.
It should be noted that, in the embodiment of the present invention, steps S1 to S3 may all be implemented by programming a program script, specifically may be implemented by Python language, and the script name may be net_share_test.py: first, the script is copied to the test server OS (operating system) desktop, the python version is 2.7.16; opening a test server OS terminal, switching to a user with corresponding authority, inputting a command \net_sharelink_test.py, and testing; checking the log file of the appointed storage position, and confirming the communication results after different internet access up, wherein the time record of each ping operation is provided; because the static IP distributed to the four interfaces of the sharelink is unchanged in each cycle test in the script, the communication result of which interface is easy to identify, a tester can check how many times the test is performed, and at which time the test is started, the communication result of the corresponding time is what; the pressure test time is conveniently estimated or defined, and test results of all time points are checked.
The user can input < ctrl c > to terminate the test process at any time, and the test server controls the test process of the server to be tested to terminate according to the acquired user instruction.
It should be noted that, in the embodiment of the present invention, the BMC includes 4 sharelink ports as an example, and in the actual test, other numbers of sharelink ports may also be used, which is not limited herein.
The invention effectively solves the problem of low testing efficiency of plugging and unplugging the BMC sharelink network port caused by manually configuring the IP address and frequently plugging and unplugging the network cable, effectively improves the testing efficiency, reduces the testing cost and saves the testing time.
According to the technical scheme, the test server controls the test process of the server to be tested to terminate according to the acquired user instruction, so that the test process can be adjusted in time according to the actual situation of the user.
The invention can display the test result to the user through the webpage or other forms, and is convenient for the user to know the test condition.
Example two
As shown in fig. 2, the technical solution of the present invention further provides a test system for plugging and unplugging a BMC sharelink network port, including:
the connection module 101 is used for connecting a server to be tested with the test server through a network cable and setting first static IP of a plurality of sharelink network ports of the BMC in the test server;
the setting module 102 is used for setting the plugging test times by the test server and sequentially dropping sharelink network ports according to the sharelink network port sequence;
the setting and querying module 103 sets second static IPs of the plurality of sharelink interfaces in the server to be tested, executes up operation, circularly queries connection states of the plurality of sharelink interfaces after a first time period, executes corresponding interface ping operation, and outputs a test result.
And a plurality of sharelink network ports of the BMC in the server to be tested are correspondingly connected with a plurality of sharelink network ports of the BMC in the test server one by one.
The first static IP and the second static IP are in the same network segment.
And the test server controls the test process of the server to be tested to terminate according to the acquired user instruction.
The invention effectively solves the problem of low testing efficiency of plugging and unplugging the BMC sharelink network port caused by manually configuring the IP address and frequently plugging and unplugging the network cable, effectively improves the testing efficiency, reduces the testing cost and saves the testing time.
According to the technical scheme, the test server controls the test process of the server to be tested to terminate according to the acquired user instruction, so that the test process can be adjusted in time according to the actual situation of the user.
The invention can display the test result to the user through the webpage or other forms, and is convenient for the user to know the test condition.
While the foregoing description of the embodiments of the present invention has been presented in conjunction with the drawings, it should be understood that it is not intended to limit the scope of the invention, but rather, it is intended to cover all modifications or variations within the scope of the invention as defined by the claims of the present invention.

Claims (8)

1. A testing method for plugging and unplugging a BMC sharelink network port is characterized by comprising the following steps:
connecting a server to be tested with a test server through a network, and setting first static IP of a plurality of sharelink network ports of the BMC in the test server;
the test server sets the plugging test times, and sequentially drops sharelink network ports according to the sharelink network port sequence;
setting a second static IP of a plurality of sharelink network ports in a server to be tested, executing up operation, circularly inquiring the connection state of the plurality of sharelink network ports after a first time period, executing corresponding network port ping operation, and outputting a test result; the method comprises the steps of circularly inquiring connection states of a plurality of sharelink network ports, executing a corresponding network port ping operation, and outputting a test result specifically as follows: cyclically checking the connection states of a plurality of sharelink network ports; if the network port state is yes, executing network port ping operation to check whether network port communication is normal or not; if the network port state is no, executing network port ping operation to check whether network port communication is normal, and after the up operation is executed, displaying yes in the sharelink network port connection state of the network cable, wherein network communication exists, and the communication can be ping-passed; before the up operation is executed, displaying no on the connection state of the sharelink network port of the network cable, wherein no network communication exists, and the network communication cannot be performed by ping, so that the test of plugging and unplugging of the sharelink network port by the BMC is passed, and otherwise, the test is not passed.
2. The method for testing plugging and unplugging of the BMC sharelink network ports of claim 1, wherein a plurality of sharelink network ports of the BMC in the server to be tested are connected with a plurality of sharelink network ports of the BMC in the test server in a one-to-one correspondence manner.
3. The method for testing plugging of a BMC sharelink network port according to claim 2, wherein the first static IP and the second static IP are in a same network segment.
4. The method for testing plugging and unplugging of the BMC sharelink network port according to claim 1, wherein the test server controls the termination of the test process of the server to be tested according to the acquired user command.
5. A BMC sharelink network port plug test system is characterized by comprising:
the connection module is used for connecting the server to be tested with the test server through a network and setting first static IP of a plurality of sharelink network ports of the BMC in the test server;
the setting module is used for setting the plugging test times by the test server and sequentially dropping sharelink network ports according to the sharelink network port sequence;
the setting and inquiring module is used for setting second static IP of the plurality of sharelink network ports in the server to be tested, executing up operation, circularly inquiring the connection state of the plurality of sharelink network ports after the first time period is spaced, executing corresponding network port ping operation and outputting a test result; the method comprises the steps of circularly inquiring connection states of a plurality of sharelink network ports, executing a corresponding network port ping operation, and outputting a test result specifically as follows: cyclically checking the connection states of a plurality of sharelink network ports; if the network port state is yes, executing network port ping operation to check whether network port communication is normal or not; if the network port state is no, executing network port ping operation to check whether network port communication is normal, and after the up operation is executed, displaying yes in the sharelink network port connection state of the network cable, wherein network communication exists, and the communication can be ping-passed; before the up operation is executed, displaying no on the connection state of the sharelink network port of the network cable, wherein no network communication exists, and the network communication cannot be performed by ping, so that the test of plugging and unplugging of the sharelink network port by the BMC is passed, and otherwise, the test is not passed.
6. The system for testing plug-in of a BMC sharelink network port according to claim 5, wherein a plurality of sharelink network ports of a BMC in the server to be tested are connected with a plurality of sharelink network ports of a BMC in the test server in a one-to-one correspondence manner.
7. The system for testing plugging of a BMC sharelink port according to claim 6, wherein the first static IP and the second static IP are in a same network segment.
8. The system for testing plug-in of a BMC sharelink network port according to claim 5, wherein the test server controls the termination of the test process of the server to be tested according to the acquired user command.
CN202010662644.2A 2020-07-10 2020-07-10 BMC sharelink network port plugging test method and system Active CN111934945B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010662644.2A CN111934945B (en) 2020-07-10 2020-07-10 BMC sharelink network port plugging test method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010662644.2A CN111934945B (en) 2020-07-10 2020-07-10 BMC sharelink network port plugging test method and system

Publications (2)

Publication Number Publication Date
CN111934945A CN111934945A (en) 2020-11-13
CN111934945B true CN111934945B (en) 2023-07-21

Family

ID=73312951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010662644.2A Active CN111934945B (en) 2020-07-10 2020-07-10 BMC sharelink network port plugging test method and system

Country Status (1)

Country Link
CN (1) CN111934945B (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101800669A (en) * 2009-02-06 2010-08-11 英业达股份有限公司 Network port test system and method
CN102799504A (en) * 2011-05-23 2012-11-28 鸿富锦精密工业(深圳)有限公司 Power supply testing system and method
CN105024849A (en) * 2015-06-02 2015-11-04 浪潮电子信息产业股份有限公司 Method for a high-density equipment cabinet server to perform bulk operation on each node BMC
CN107220061A (en) * 2017-06-16 2017-09-29 郑州云海信息技术有限公司 A kind of method of testing by script remote control exchanger port break-make
CN107995068B (en) * 2017-12-20 2020-04-07 北京百度网讯科技有限公司 Network port testing method, equipment and computer readable storage medium
CN109450682B (en) * 2018-11-07 2022-04-26 郑州云海信息技术有限公司 IB network card communication configuration method and device, terminal and storage medium
CN109802867B (en) * 2019-01-02 2022-04-26 郑州云海信息技术有限公司 Method and system for testing connection stability of network card NCSI
CN110890995B (en) * 2019-05-14 2021-08-13 研祥智能科技股份有限公司 Network port testing method and network port testing device

Also Published As

Publication number Publication date
CN111934945A (en) 2020-11-13

Similar Documents

Publication Publication Date Title
CN107783873B (en) Method for realizing automatic testing platform of burner
US9348771B1 (en) Cloud-based instrument driver system
CN108809755B (en) Automatic testing method and system for home gateway compatible with command line and WEB interface
CN103731663B (en) The testing method of a kind of intelligent television and device
CN111610393A (en) Automatic test system and method for multi-channel broadband microwave integrated component
CN111404779A (en) Method, device and system for testing role switching of router nodes
CN111130924A (en) Test method, test device and test equipment for Ethernet port of equipment
CN107590037A (en) A kind of method that EDPP tests are carried out to server GPU
CN112073263A (en) Method, system, equipment and medium for testing and monitoring reliability of white box switch
CN116107893A (en) Heterogeneous platform embedded software test verification system and method
CN111934945B (en) BMC sharelink network port plugging test method and system
US20110099426A1 (en) System for injecting protocol specific errors during the certification of components in a storage area network
CN106598793B (en) Test system and test method based on BIOS serial port log data
CN109660386A (en) A kind of semiconductor memory aging testing system method for upgrading software
CN107733740B (en) VEE-based communication equipment automatic test method
CN104899122A (en) Mobile terminal testing system and method
CN113572521A (en) Automatic testing method compatible with multi-manufacturer OLT intercommunication testing
CN109362015B (en) Volume test method, control end device, storage medium and volume test system
CN111611148B (en) Compatibility concurrent test method and system for iOS system application software
CN113419955A (en) Software version automatic test system, method, medium and device
CN109981394B (en) Communication method and device based on enhanced CAN bus protocol analyzer
CN106199303B (en) Expected harness relationship creation system and its creation method in harness test
CN211296736U (en) Two-out-of-two hardware platform function test system based on network communication
CN116610511B (en) Storage test equipment and test method thereof
CN103308844A (en) Testing template, fault location method and debugging methods of control board and clamping apparatus

Legal Events

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