Multi-operating system switch chip test method, device, equipment and medium
By establishing communication connections between operating systems in the switch chip, and using system control scripts and test execution scripts for automated testing, the problem of difficult to test switch chips in the existing technology is solved, and the testing efficiency and data are improved Collecting capability.
Patent Information
- Application Number
- CN202411423893.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-01-14
AI Technical Summary
It is difficult to implement functional testing of switch chips connected to different operating systems, especially to realize automatic switching and transmission and reception of test data between multiple operating systems.
The communication connection between the first operating system and at least one second operating system is established in the switch chip to be tested through a remote connection tool, and the system control script and test execution scripts are used to automatically switch and test the operating system to realize the functional testing of the switch chip.
It improves the testing efficiency between multiple operating systems, solves the problem that functional testing of switch chips connected to different operating systems cannot be achieved in the prior art, and realizes rapid testing and data collection between different operating systems.
Smart Images

Figure CN119316332A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of switch chip testing, and in particular to a switch chip testing method, device, equipment and medium for multiple operating systems. Background Art
[0002] The switch chip can connect to different operating systems to achieve cross-system communication and data interaction between different operating systems. In order to prevent problems when the switch chip connects to multiple operating systems, the switch chip needs to be tested to verify the functional integrity of the switch chip. Since the switch chip connects to multiple different operating systems, it is necessary to constantly switch the operating system for testing operations during the test process, and multiple operating systems need to operate synchronously to achieve synchronous operations. After the test is completed, the operating system needs to be constantly switched to send and receive test data. In the prior art, the test of the switch chip is often to write a test script to test the function of an operating system alone, which makes it difficult to achieve automatic switching and testing of multiple operating systems. Summary of the invention
[0003] The present invention provides a method, device, equipment and medium for testing a switch chip of multiple operating systems, so as to solve the technical problem in the prior art that it is impossible to implement functional testing on switch chips connected to different operating systems.
[0004] According to one aspect of the present invention, a switch chip testing method for multiple operating systems is provided, comprising:
[0005] Establishing a communication connection between the first operating system and at least one second operating system in the switch chip to be tested through a remote connection tool;
[0006] Start the test execution script through the system control script, and perform switch chip test on the first operating system and each second operating system through the test execution script to obtain chip test information;
[0007] The chip test result of the switch chip to be tested is determined according to the chip test information.
[0008] According to another aspect of the present invention, a switch chip testing device for multiple operating systems is provided, comprising:
[0009] A communication module, used to establish a communication connection between the first operating system and at least one second operating system in the switch chip to be tested through a remote connection tool;
[0010] A test module, used to start a test execution script through the system control script, and perform a switch chip test on the first operating system and each second operating system through the test execution script to obtain chip test information;
[0011] The analysis module is used to determine the chip test result of the switch chip to be tested according to the chip test information.
[0012] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0013] at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the switch chip testing method for multiple operating systems described in any embodiment of the present invention.
[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the switch chip testing method for multiple operating systems described in any embodiment of the present invention when executed.
[0017] The technical solution of the embodiment of the present invention establishes a communication connection between a first operating system and at least one second operating system in a switch chip to be tested through a remote connection tool, and automatically establishes a communication connection between two different operating systems through a system control script, thereby establishing a basis for testing the switch chip to be tested and effectively improving the test efficiency; starting a test execution script through the system control script, performing switch chip tests on the first operating system and each second operating system through the test execution script to obtain chip test information, controlling the implementation of the test execution script through the system control script, and performing switch chip tests through the test execution script, the cooperation of two different scripts realizes mutual switching of different operating systems, test operations and test information collection, realizes rapid testing between different operating systems, and effectively improves the test efficiency between different operating systems; determining the chip test result of the switch chip to be tested according to the chip test information solves the technical problem in the prior art that it is impossible to realize functional testing of switch chips connected to different operating systems, achieves switching of different operating systems for testing and data collection, and effectively improves the test efficiency between multiple operating systems.
[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 A flow chart of a switch chip testing method for multiple operating systems is provided for an embodiment of the present invention;
[0021] Figure 2 A flow chart of a switch chip testing method for multiple operating systems provided by an embodiment of the present invention;
[0022] Figure 3 A structural block diagram of a switch chip testing system for multiple operating systems disclosed in the present invention;
[0023] Figure 4 A flow chart of performing a flow test on a switch chip of a multi-operating system disclosed in the present invention;
[0024] Figure 5 A schematic diagram of the structure of a switch chip testing device for multiple operating systems provided by an embodiment of the present invention;
[0025] Figure 6 A schematic structural diagram of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Figure 1 A flowchart of a switch chip testing method for multiple operating systems is provided for an embodiment of the present invention. This embodiment is applicable to the case of functional testing of switch chips connected to different operating systems. The method can be executed by a switch chip testing device for multiple operating systems. The switch chip testing device for multiple operating systems can be implemented in the form of hardware and / or software. The switch chip testing device for multiple operating systems can be configured in an electronic device. Figure 1 As shown, the method includes:
[0029] S110: Establish a communication connection between a first operating system and at least one second operating system in a switch chip to be tested by using a remote connection tool.
[0030] The first operating system may be an operating system for running the remote connection tool; the second operating system may be an operating system completely different from the first operating system. For example, the first operating system may be a Windows operating system, and the second operating system may be a Linux operating system; the first operating system may be a Linux operating system, and the second operating system may be a Windows operating system; the remote testing tool may be SecureCRT software, Tabby software, Electerm software, and WindTerm software.
[0031] Optionally, a remote connection tool is run in the first operating system, and the remote connection tool configures the host address and port of the connection based on the first operating system, and establishes a communication connection with the second operating system through the switch chip to be tested; or a remote connection tool is run in the second operating system, and the remote connection tool configures the host address and port of the connection based on the second operating system, and establishes a communication connection with the first operating system through the switch chip to be tested. Exemplarily, the first operating system is a Windows operating system, the remote connection tool is SecureCRT, and the second operating system is a Linux server. The specific connection method is: create a session for connection in the SecureCRT software; set the name of the session and the connection protocol SSH2; configure the host address and port of the Linux server; perform remote communication connection verification after setting the login information of the Linux server, and after successful verification, realize the communication connection between the Windows operating system and the Linux server.
[0032] Specifically, a communication connection is established between the first operating system and at least one second operating system in the switch chip to be tested through a remote connection tool.
[0033] S120: Start the test execution script through the system control script, and control the first operating system and the second operating system through the test execution script to test the switch chip to be tested, so as to obtain chip test information.
[0034] The system control script may be a program that controls the operating system to perform specific actions. It should be noted that the system control script can automatically switch and control different operating systems to perform corresponding specific actions. Exemplarily, when the first operating system is a Windows operating system, the system control script may be a vbs script written in vbsScript (Visual BasicScript, Visual Basic scripting language).
[0035] Among them, the test execution script can be a program for the operating system to perform functional testing. It should be noted that the test execution script is activated by the system control script, and parameters are distributed to the test execution script through the system control script. After receiving the parameters, the test execution script controls the operating system to perform test actions based on the received parameters. Exemplarily, when the first operating system is a Windows operating system, the system control script can be a vbs script, and the test execution script can be a Shell Script. Optionally, the test execution script includes a system restart script, a system switching script, a test operation script, and a test data acquisition script; the system restart script can be used to control the central processing unit of the operating system to restart the operating system; the system switching script can be a switching controlled operating system; the test operation script can be used to control the operating system to perform test operations; the test data acquisition script can be a test data generated after the operating system is tested.
[0036] The switch chip under test can be used to process and control forwarding data between multiple different operating systems. The switch chip under test is the core component of the switch. The switch system is run through the switch chip under test to realize the function of processing and controlling forwarding data.
[0037] The chip test information may be data generated by the first operating system and the second operating system when testing the chip to be tested. It should be noted that different chip test information is generated when different tests are performed on the chip to be tested. For example, when a flow test is performed on the chip to be tested, the chip test information is the amount of flow data.
[0038] Specifically, after the first operating system and the second operating system establish a communication connection, the test execution script is started through the system control script, the test execution script controls the first operating system and the second operating system to test the switch chip to be tested, and the chip test result after the test is obtained through the test execution script.
[0039] S130: Determine a chip test result of the switch chip to be tested according to the chip test information.
[0040] Among them, the chip test result can be the test result of the switch chip to be tested. It should be noted that different tests are performed on the switch chip to be tested to generate corresponding chip test information, and the chip test information is analyzed to obtain corresponding test results. For example, when the data forwarding function test is performed on the switch chip to be tested, the chip test result can be that data forwarding cannot be performed; when the data forwarding performance test is performed on the switch chip to be tested, the chip test result can be that the data conversion function delay is too high; when the operating temperature test of the switch chip to be tested is fully loaded, the chip test result can be that the operating temperature of the switch chip to be tested is too high.
[0041] Specifically, after the chip test information is obtained, the chip test information is analyzed to obtain the chip test result of the switch chip to be tested.
[0042] The technical solution of the embodiment of the present invention establishes a communication connection between a first operating system and at least one second operating system in a switch chip to be tested through a remote connection tool, and automatically establishes a communication connection between two different operating systems through a system control script, thereby establishing a basis for testing the switch chip to be tested and effectively improving the test efficiency; starting a test execution script through the system control script, performing switch chip tests on the first operating system and each second operating system through the test execution script to obtain chip test information, controlling the implementation of the test execution script through the system control script, and performing switch chip tests through the test execution script, the cooperation of two different scripts realizes mutual switching of different operating systems, test operations and test information collection, realizes rapid testing between different operating systems, and effectively improves the test efficiency between different operating systems; determining the chip test result of the switch chip to be tested according to the chip test information solves the technical problem in the prior art that it is impossible to realize functional testing of switch chips connected to different operating systems, achieves switching of different operating systems for testing and data collection, and effectively improves the test efficiency between multiple operating systems.
[0043] Figure 2 The flowchart of a switch chip testing method for multiple operating systems provided by an embodiment of the present invention is a detailed explanation of the specific method of testing the switch chip to be tested through the system control script and the test execution script. Figure 2 As shown, the method includes:
[0044] S210: Establish a communication connection between a first operating system and at least one second operating system in a switch chip to be tested by using a remote connection tool.
[0045] S220: Restart the first operating system through the system control script, and start the system restart script and the system switching script to restart the second operating systems one by one.
[0046] Optionally, a system control script is started in the first operating system, and the system restart function of the system control script is used to control the central processing unit corresponding to the first operating system to restart, and the first operating system is restarted. At the same time, a system switching script is started through the system control script to switch to a second operating system, and the central processing unit corresponding to the second operating system is made to execute the restart operation through the system restart script, and then switch to other second operating systems, and the central processing unit corresponding to the second operating system is made to execute the restart operation through the system restart script, thereby making both the first operating system and the second operating system enter the restart state.
[0047] S230: When the first operating system and the second operating system are both successfully restarted and the preset waiting time is satisfied, start the system switching script and the test operation script through the system control script to test the switch chip to be tested according to the first operating system and the second operating system.
[0048] Among them, the preset waiting time can be a pre-set time for waiting for the first operating system and the second operating system to restart. By setting the preset waiting time, it can be ensured that the first operating system and the second operating system are both in a startup state to prevent the second operating system from starting too slowly and the test cannot be performed synchronously during the system restart process.
[0049] Specifically, after the first operating system and the second operating system are restarted, wait for the first operating system and the second operating system to restart. After the first operating system and the second operating system are all restarted successfully, wait for a preset waiting time. After waiting for the preset waiting time, start the system switching script and the test operation script through the system control script, and test the switch chip to be tested according to the first operating system and the second operating system through the system switching script and the test operation script.
[0050] Optionally, in another optional embodiment of the present invention, starting the system switching script and the test operation script through the system control script to test the switch chip to be tested according to the first operating system and the second operating system includes: sending the operating system identifier and the system test item to the system switching script and the test operation script respectively through the system control script to start the system switching script and the test operation script; determining the second operating system as the target operating system according to the operating system identifier through the system switching script; controlling the first operating system and the target operating system to execute the system test item through the system control script and the test operation script, and storing the test data corresponding to the system test item in the preset storage directory of the target operating system.
[0051] Among them, the operating system identifier can be parameter information that specifies the operating system. The operating system identifier can be used to specify the operating system as the object for executing the script. It should be noted that the operating system identifier can identify one operating system, and the operating system identifier can also identify all operating systems. You can select one operating system or all operating systems through the operating system identifier. Exemplarily, when the operating system identifier is one operating system, the operating system identifier can be the central processor number of an operating system; when the operating system identifier is all operating systems, the operating system identifier can be the set identification information, for example: "All".
[0052] Among them, the system test items can be test instruction information corresponding to the functions of the switch chip to be tested that is pre-set; it should be noted that, since the functions of the switch chip to be tested are usually implemented by a combination of hardware and software, when debugging the functions of the switch chip to be tested, it is impossible to directly verify the functions of the switch chip to be tested, and the first operating system and the second operating system are required to execute the functions of the switch chip to be tested, and then collect data when executing the functions of the switch chip to be tested, so as to determine the operation status of the functions of the switch chip to be tested. Furthermore, when testing the functions of the switch chip to be tested, the first operating system and the second operating system are selected to execute the system test items corresponding to the functions of the switch chip to be tested. Exemplarily, when the function of the switch chip to be tested is a data forwarding function, the system test item can be that the first operating system performs a flow operation on the second operating system, and after executing the system test item, the test data of the flow operation, i.e., the test log, is collected to determine whether there is a problem with the data forwarding function of the switch chip to be tested.
[0053] Optionally, the system test project includes a test preparation instruction and at least one test parameter instruction; wherein the test preparation instruction may be an instruction for controlling the target operating system to prepare for the test; the test parameter instruction may be a parameter instruction for controlling the first operating system to start testing the target test system; the test preparation instruction enables the target operating system to meet the test prerequisites of the system test project and supports the test between the first operating system and the target operating system. Exemplarily, when the system test project is a streaming operation, the test preparation instruction may be to control the target operating system to become a streaming server, and the specific preparation instructions are as follows: check the network configuration, start the server software, install the required dependencies, start the streaming server, and configure the log output path of the streaming server to a preset storage directory; the test parameter instruction may specify the first operating system to perform a streaming operation on a target operating system.
[0054] The target operating system may be an operating system specified by an operating system identifier. In an embodiment of the present invention, the first operating system usually generates an operating system identifier through a system control script to specify the operating system as the target operating system in the second operating system. Optionally, when the operating system identifier is all second operating systems, all second operating systems are determined as target operating systems.
[0055] The preset storage directory may be a file path pre-set in the second operating system for storing test data. It should be noted that by pre-specifying the preset storage directory in the second operating system for storing files and data during the test, and opening the remote access permission of the preset storage target, other operating systems can remotely access the preset storage directory and operate the data in the preset storage directory.
[0056] Specifically, the operating system identifier and the system test item are sent to the system switching script and the test operation script respectively by executing the system control script to start the system switching script and the test operation script, and the second operating system corresponding to the operating system identifier is selected as the target operating system in the second operating system according to the operating system identifier by the system switching script, and the system test item is executed between the first operating system and the target operating system by the system control script and the test operation script to implement the test of the switch chip to be tested, and the test data corresponding to the system test item is stored in a preset storage directory pre-specified by the target operating system.
[0057] Optionally, in another optional embodiment of the present invention, controlling the first operating system and the target operating system to execute the system test item through the system control script and the test operation script includes:
[0058] The test operation script is started through the system control script to execute the test preparation instruction, and the target operating system is determined as the test target object; at least one test parameter instruction is started in the first operating system through the system control script to control the first operating system to perform the test on the test target object.
[0059] Among them, the test target object can be a target operating system that completes the test preparation instructions of the system test project; it should be noted that since the target operating system needs to be prepared for testing when the first operating system and the target operating system are tested, the target operating system that has completed the test preparation will be used as the test target object that can be tested.
[0060] Specifically, the system control script continues to execute, and the test operation script is started to control the target operating system to prepare for the test when executing the test preparation instruction. After the execution is completed, the target operating system becomes the test target object. The system control script starts at least one test parameter instruction in the first operating system to control the first operation object to perform a test on the test target object.
[0061] S240: Start a test data acquisition script in the switch system of the switch chip to be tested through the system control script to collect statistics on the test data and determine chip test information.
[0062] Optionally, after the system switching script and the test operation script complete the test of the switch chip to be tested in the first operating system and the second operating system, the switch chip to be tested will generate corresponding test data, the system control script controls the switch system of the switch chip to be tested through the first operating system, starts the test data acquisition script in the switch system of the switch chip to be tested, and performs statistics on the test data in the switch system of the switch chip to be tested to obtain chip test information.
[0063] Optionally, in another optional embodiment of the present invention, starting a test data acquisition script in a switch system of a switch chip to be tested through the system control script to count the test data and determine the chip test information includes:
[0064] The system control script sends a switch chip identifier to a system switching script to start the system switching script; the system switching script updates the switch system of the switch chip to be tested to a target operating system according to the switch chip identifier; the system control script starts a test data acquisition script in the target operating system, and the test data is acquired and counted in the second operating system by the test data acquisition script to determine chip test information.
[0065] The switch chip identifier may be identification information of the switch chip to be tested, and can be used to specify the switch chip to be tested to control the switch system corresponding to the switch chip to be tested.
[0066] Optionally, the system switching script can be started by sending the switch chip identifier to the system switching script through the system control script, and the switch system of the switch chip to be tested is updated to a new target operating system through the system switching script switch chip identifier to control the switch system of the switch chip to be tested, and then the test data acquisition script is started in the target operating system through the system control script, and the chip test information is determined by acquiring and counting the test data in the second operating system through the test data acquisition script.
[0067] S250, determine the chip test result of the switch chip to be tested according to the chip test information.
[0068] Optionally, in another optional embodiment of the present invention, determining the chip test result of the switch chip to be tested according to the chip test information includes:
[0069] The chip test information is sent to the first operating system through the system control script; and the chip test result is determined according to the chip test information through the first operating system.
[0070] Specifically, the chip test information collected by the switch system of the switch chip to be tested is uploaded to the first operating system through the system control script. After the first operating system receives the chip test information, the chip test information is analyzed by the first operating system to determine the chip test result.
[0071] The embodiment of the present invention realizes the switching, control and operation of the first operating system, the operating system of the switch chip to be tested and the second operating system through the system control script and the test operation script, realizes the synchronous operation under multiple operating systems and the automatic switching of the operating systems, and effectively improves the test efficiency between multiple operating systems.
[0072] Figure 3 FIG. 1 is a structural block diagram of a switch chip test system for multiple operating systems disclosed in the present invention; Figure 3 As shown: the first operating system is connected to the switch chip to be tested, the switch chip to be tested is connected to multiple second operating systems, and the first operating system and the second operating system run in their respective processors. For example, the first operating system runs in the CPU (Central Processing Unit), and the second operating system runs in the SOC (System on Chip). The switch system runs on the switch chip to be tested, the first operating system accesses the switch system of the switch chip through the serial port, and communicates with multiple second operating systems through the SSH file transfer protocol (Secure Shell File Transfer Protocol), and can access the second operating system. Figure 4 A flow chart of a switch chip for performing a flow test on a multi-operating system disclosed in the present invention; Figure 4As shown: before starting the test, connect to the first operating system through a remote connection tool; switch the operating system through the system control script, and switch to all the second operating systems for restarting; let the first operating system restart through the system control script; wait for the first operating system and the second operating system to start up completely in a loop, and wait for 20 seconds; the system control script starts the test execution script by distributing control parameters, so that all the second operating systems start the streaming server; the system control script sends a plurality of control instructions of the streaming client to the first operating system, and starts the test execution script to perform streaming operations on all the second operating systems; after the streaming is completed, the switch system of the switch chip to be tested is controlled by the system control script to execute the test execution script, and the test data is obtained from the second operating system; the system control script starts the test execution script by distributing control parameters, so that the first operating system starts the streaming server; the system control script sends the control instructions of the streaming client to all the second operating systems, and starts the test execution script to perform streaming operations on all the first operating systems; after the streaming is completed, the switch system of the switch chip to be tested is controlled by the system control script to execute the test execution script, and the test data is obtained from the second operating system; return to the step of restarting all the second operating systems, and repeat the streaming test.
[0073] Figure 5 The present invention provides a schematic diagram of the structure of a switch chip testing device for multiple operating systems. Figure 5 As shown, the device includes: a communication module 510, a test module 520 and an analysis module 530; wherein,
[0074] The communication module 510 is used to establish a communication connection between the first operating system and at least one second operating system in the switch chip to be tested through a remote connection tool;
[0075] A test module 520 is used to start a test execution script through the system control script, and perform a switch chip test on the first operating system and each second operating system through the test execution script to obtain chip test information;
[0076] The analysis module 530 is used to determine the chip test result of the switch chip to be tested according to the chip test information.
[0077] The technical solution of the embodiment of the present invention establishes a communication connection between a first operating system and at least one second operating system in a switch chip to be tested through a remote connection tool, and automatically establishes a communication connection between two different operating systems through a system control script, thereby establishing a basis for testing the switch chip to be tested and effectively improving the test efficiency; starting a test execution script through the system control script, performing switch chip tests on the first operating system and each second operating system through the test execution script to obtain chip test information, controlling the implementation of the test execution script through the system control script, and performing switch chip tests through the test execution script, the cooperation of two different scripts realizes mutual switching of different operating systems, test operations and test information collection, realizes rapid testing between different operating systems, and effectively improves the test efficiency between different operating systems; determining the chip test result of the switch chip to be tested according to the chip test information solves the technical problem in the prior art that it is impossible to realize functional testing of switch chips connected to different operating systems, achieves switching of different operating systems for testing and data collection, and effectively improves the test efficiency between multiple operating systems.
[0078] Optionally, the test module is specifically used for: the test execution script includes a system restart script, a system switching script, a test operation script and a test data acquisition script.
[0079] Optionally, the test module is further configured to: execute a restart operation on the first operating system through the system control script, and start a system restart script and a system switching script to restart the second operating system one by one;
[0080] When the first operating system and the second operating system are both successfully restarted and the preset waiting time is satisfied, starting the system switching script and the test operation script through the system control script to test the switch chip to be tested according to the first operating system and the second operating system;
[0081] The system control script is used to start a test data acquisition script in the switch system of the switch chip to be tested to collect statistics on the test data and determine chip test information.
[0082] Optionally, the test module is further specifically used to: send an operating system identifier and a system test item to a system switching script and a test operation script respectively through the system control script to start the system switching script and the test operation script;
[0083] determining the second operating system as a target operating system according to the operating system identifier by the system switching script;
[0084] The system control script and the test operation script are used to control the first operating system and the target operating system to execute the system test items, and the test data corresponding to the system test items are stored in a preset storage directory of the target operating system.
[0085] Optionally, the test module is further specifically used to: start the test operation script through the system control script to execute the test preparation instruction, and determine the target operating system as the test target object;
[0086] At least one test parameter instruction is started in the first operating system through the system control script to control the first operating system to perform a test on the test target object.
[0087] Optionally, the test module is further configured to: send a switch chip identifier to a system switching script through the system control script to start the system switching script;
[0088] The switch system of the switch chip to be tested is updated to the target operating system according to the switch chip identifier by the system switching script;
[0089] The test data acquisition script is started in the target operating system through the system control script, and the test data is acquired and counted in the second operating system through the test data acquisition script to determine the chip test information.
[0090] Optionally, the analysis module is specifically used for:
[0091] Sending chip test information to the first operating system through the system control script;
[0092] The chip test result is determined according to the chip test information by the first operating system.
[0093] The switch chip testing device for multiple operating systems provided in the embodiment of the present invention can execute the switch chip testing method for multiple operating systems provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0094] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their modes are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0095] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0096] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer grid such as the Internet and / or various telecommunication grids.
[0097] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a switch chip testing method for multiple operating systems.
[0098] In some embodiments, the switch chip testing method for multiple operating systems can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the switch chip testing method for multiple operating systems described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the switch chip testing method for multiple operating systems in any other appropriate manner (for example, by means of firmware).
[0099] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0100] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the modes / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0101] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0102] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0103] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a grid browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication grid). Examples of communication grids include: a local area network (LAN), a wide area network (WAN), a blockchain grid, and the Internet.
[0104] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication grid. The client and server relationship is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0105] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0106] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of the switch chip testing method for multiple operating systems provided in any embodiment of the present invention are implemented. The method includes:
[0107] Establishing a communication connection between the first operating system and at least one second operating system in the switch chip to be tested through a remote connection tool;
[0108] Start the test execution script through the system control script, control the first operating system and the second operating system through the test execution script to test the switch chip to be tested, and obtain chip test information;
[0109] The chip test result of the switch chip to be tested is determined according to the chip test information.
[0110] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0111] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0112] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0113] Computer program code for performing the operation of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of grid, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0114] It should be understood by those skilled in the art that the above modules or steps of the present invention can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a grid composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0115] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0116] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A switch chip testing method for multiple operating systems, characterized in that: include: Establishing a communication connection between the first operating system and at least one second operating system in the switch chip to be tested through a remote connection tool; Starting a test execution script through a system control script, and controlling the first operating system and the second operating system through the test execution script to test the switch chip to be tested, to obtain chip test information; A chip test result of the switch chip to be tested is determined according to the chip test information.
2. The method according to claim 1, characterized in that The test execution script includes a system restart script, a system switching script, a test operation script and a test data acquisition script.
3. The method according to claim 2, characterized in that The step of controlling the first operating system and the second operating system to test the switch chip to be tested by the test execution script to obtain chip test information includes: Restarting the first operating system by using the system control script, and starting the system restart script and the system switching script to restart the second operating system one by one; When the first operating system and the second operating system are all restarted successfully and the preset waiting time is satisfied, starting the system switching script and the test operation script through the system control script to test the switch chip to be tested according to the first operating system and the second operating system; The test data acquisition script is started in the switch system of the switch chip to be tested through the system control script to perform statistics on the test data and determine the chip test information.
4. The method according to claim 3, characterized in that The step of starting the system switching script and the test operation script through the system control script to test the switch chip to be tested according to the first operating system and the second operating system includes: Sending an operating system identifier and a system test item to the system switching script and the test operation script respectively through the system control script to start the system switching script and the test operation script; Determining the second operating system as a target operating system according to the operating system identifier by using the system switching script; The first operating system and the target operating system are controlled to execute the system test items through the system control script and the test operation script, and the test data corresponding to the system test items are stored in a preset storage directory of the target operating system.
5. The method according to claim 4, characterized in that The system test item includes a test preparation instruction and at least one test parameter instruction; the controlling the first operating system and the target operating system to execute the system test item through the system control script and the test operation script includes: Initiating the test operation script through the system control script to execute the test preparation instruction, and determining the target operating system as a test target object; At least one of the test parameter instructions is started in the first operating system through the system control script to control the first operating system to perform a test on the test target object.
6. The method according to claim 4, wherein the step of starting the test data acquisition script in the switch system of the switch chip to be tested through the system control script to collect statistics on the test data and determine the chip test information comprises: Sending the switch chip identifier to the system switching script through the system control script to start the system switching script; updating the switch system of the switch chip to be tested to the target operating system according to the switch chip identifier by using the system switching script; The test data acquisition script is started in the target operating system through the system control script, and the test data is acquired and counted in the second operating system through the test data acquisition script to determine the chip test information.
7. The method according to claim 1, characterized in that The step of determining the chip test result of the switch chip to be tested according to the chip test information includes: Sending the chip test information to the first operating system through the system control script; The chip test result is determined according to the chip test information by the first operating system.
8. A switch chip testing device for multiple operating systems, characterized in that: include: A communication module, used to establish a communication connection between the first operating system and at least one second operating system in the switch chip to be tested through a remote connection tool; A test module, configured to start a test execution script through a system control script, and control the first operating system and the second operating system through the test execution script to test the switch chip to be tested, so as to obtain chip test information; The analysis module is used to determine the chip test result of the switch chip to be tested according to the chip test information.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the switch chip testing method for multiple operating systems according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the switch chip testing method for multiple operating systems according to any one of claims 1 to 4 when executed.