Drive package testing methods and related apparatus
By creating virtual machines in the server pool and passing PCIe devices directly to the virtual machines, the driver package testing is fully automated, solving the problems of hardware resource waste and high maintenance costs, and improving the utilization rate of hardware resources.
Patent Information
- Application Number
- CN202211281116.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-19
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2042-10-19
AI Technical Summary
In the testing process of existing driver packages, there is a serious waste of hardware resources and high maintenance costs. Hardware cannot be fully reused, the testing environment is easily damaged, and maintenance costs are high.
By creating virtual machines in the server pool and passing PCIe devices to the virtual machines, the mapping from driver package to OS to server to PCIe device is simplified. Using device pass-through technology, it supports device pass-through configuration for various PCIe devices such as network cards and RAID cards, and achieves fully automated testing.
This enables the reuse of PCIe devices, avoids waste of hardware resources, reduces manpower and material maintenance costs, and improves the utilization rate of hardware resources.
Smart Images

Figure CN115658493B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computers, and in particular to a driver package testing method and related device. BACKGROUND
[0002] Before the driver package is released, in order to ensure that the driver package is installable, usable, functional, etc., it is necessary to perform a test on the supported operating system (OS) to ensure reliability. In the current driver package testing process, the tester prepares multiple servers in advance, each server is installed with an OS that needs to be tested and peripheral component interconnect express (PCIe) devices such as network cards, redundant arrays of independent disks (RAID) cards, etc. A table is used to record the information of these servers and corresponding OS, network cards, RAID cards, etc. A mapping rule is formulated to let the test script match the corresponding server to perform the test. This method has at least the following defects: 1. High maintenance cost of the running environment: because there are many OS versions, each server corresponds to an OS, so the number of servers required will also be large. When the environment is damaged due to testing or other factors, such as OS cannot start normally, etc., it needs to be repaired, which is very time-consuming. 2. Waste of hardware resources: the same network card or RAID card is tested concurrently on different OS, so N servers and N combinations of network cards or RAID cards are required, which cannot fully reuse the hardware, resulting in waste of resources. If these servers are not all-weather testing, it will cause great waste. If resource sharing is performed, the test environment will inevitably be damaged, increasing the human maintenance cost. SUMMARY
[0003] The present application provides a driver package testing method and related device, which improves the full use rate of hardware resources and reduces the labor cost.
[0004] In a first aspect, an embodiment of the present application provides a driver package testing method, which is applied to a server pool, the server pool is applied to a driver testing system, the driver testing system further comprises a testing device, the server pool comprises at least one server, and the method comprises the following steps: receiving an execution testing instruction sent by the testing device, the execution testing instruction is used for instructing a target server to test a target driver package, the execution testing instruction comprises a second identifier, an identifier of the target server and a first identifier of the target driver package, the first identifier of the target driver package is used for indicating a PCIe device matched with the target driver package, and the second identifier is used for indicating an operating system corresponding to a target testing task; the target driver package is one of driver packages included in the target testing task, and the target server is one or more servers in the server pool which comprise the PCIe device indicated by the first identifier of the target driver package; creating a target virtual machine in the target server according to the second identifier and the identifier of the target server, the operating system of the target virtual machine is the operating system indicated by the second identifier; directly passing the PCIe device indicated by the first identifier of the target driver package to the target virtual machine, and testing the target driver package through the target virtual machine and the PCIe device indicated by the first identifier of the target driver package to obtain a testing result of the target driver package.
[0005] The PCIe device corresponding to the driver package is determined, the virtual machine is created on the server containing the PCIe device, and the PCIe device is directly passed to the virtual machine, so that the testing of the driver package on the virtual machine by using the PCIe device is completed. Through the function of device direct passing, the mapping of driver package->OS->server->PCIe device is simplified to driver package->PCIe device in an end-to-end form, the binding relationship among the OS, the server and the PCIe device is eliminated, the operating system can be quickly created on any server, various PCIe devices such as network cards and RAID cards support device direct passing, and the full-automatic testing of the driver is realized. The scheme of the present application takes the PCIe device as the minimum granularity, the corresponding PCIe device is matched according to the driver package, then different testing environments are selected for testing according to requirements, the PCIe device is repeatedly used, and the waste of hardware resources is avoided.
[0006] In combination with the first aspect, in a possible implementation manner, the target virtual machine is created in the target server according to the second identifier and the identifier of the target server, and the method comprises the following steps:
[0007] The target server is determined from the server pool according to the identifier of the target server; an image file of the operating system indicated by the second identifier is obtained from a virtual machine template pool according to the network file system (NFS) protocol and the second identifier; and the target virtual machine is created in the target server according to the image file of the operating system indicated by the second identifier.
[0008] The operating system image file in the virtual machine template pool is stored in the NFS, and the servers in the subsequent server pool obtain the operating system image file from the virtual machine template pool through the NFS protocol. By storing the operating system image file in the NFS, the sharing of the operating system image file can be realized.
[0009] With reference to the first aspect, in a possible implementation manner, the method of the embodiment further includes:
[0010] obtaining the test script from the test device;
[0011] testing the target driver package through the target virtual machine and the PCIe device indicated by the first identifier to obtain a test result of the target driver package, including:
[0012] In the target virtual machine, the target driver package is tested through the test script and the PCIe device indicated by the first identifier to obtain a test result of the target driver package.
[0013] By introducing the test script, the automation of the driver package testing can be realized.
[0014] With reference to the first aspect, in a possible implementation manner, the method of the embodiment further includes:
[0015] after the driver package included in the target test task completes the test, deleting the target virtual machine.
[0016] After the test is completed, the server deletes the virtual machine, which realizes the deletion after use and does not need to spend manpower and material resources to maintain the test operating system (i.e., the test environment), thereby solving the problem of high maintenance cost of the test environment
[0017] In the second aspect, the embodiment of the present application provides a driver package testing method, which is applied to a test device, and the test device is used for a driver testing system, and the driver testing system further includes a server pool. The method includes:
[0018] obtaining a target test task, the target test task comprising at least one driver package and a first identifier of each driver package in the at least one driver package, the first identifier of each driver package being used to indicate a PCIe device matched with each driver package; determining an identifier of a target server according to the first identifier of the target driver package, the target server being one or more servers in a server pool containing the PCIe device indicated by the first identifier of the target driver package; sending an execution test instruction to the server pool, the execution test instruction comprising a second identifier, the identifier of the target server, and the first identifier of the target driver package, the second identifier being used to indicate an operating system corresponding to the target test task; the execution test instruction being used to instruct the server pool to test the driver package indicated by the first identifier through the target server; and receiving a test result corresponding to the target test task fed back by the server pool, the test result corresponding to the target test task comprising a test result of the target driver package.
[0019] It can be seen that the scheme of the application takes PCIe devices as the minimum granularity, and then selects different test environments for testing according to requirements after matching the driver package to the corresponding PCIe device, thereby realizing the reuse of PCIe devices and avoiding the waste of hardware resources.
[0020] With reference to the second aspect, in a possible implementation manner, the determining of the identifier of the target server according to the first identifier of the target driver package comprises:
[0021] matching the first identifier of the target driver package with a server pool database, the server pool database comprising identifiers of PCIe devices contained in all servers in the server pool and server identifiers; and if the PCIe device indicated by the first identifier of the target driver package is matched from the server pool database, obtaining the identifier of the target server comprising the PCIe device indicated by the first identifier of the target driver package.
[0022] The server comprising the PCIe device corresponding to the driver package is determined from the server pool through the ID matching manner, which facilitates the selection of different test environments for testing according to requirements, thereby realizing the reuse of PCIe devices and avoiding the waste of hardware resources.
[0023] With reference to the second aspect, in a possible implementation manner, the method obtained by the application embodiment further comprises:
[0024] marking the PCIe device indicated by the first identifier of the target driver package as a locked state. Through this manner, test conflicts can be avoided.
[0025] With reference to the second aspect, in a possible implementation manner, the method obtained by the application embodiment further comprises:
[0026] displaying the test result corresponding to the target test task, so as to enable a tester to view the test result.
[0027] In a third aspect, an embodiment of the present application provides a drive package testing method. The method is applied to a drive testing system, and the drive testing system includes a testing device and a server pool. The method includes the following steps:
[0028] The testing device obtains a target testing task, and the target testing task includes at least one drive package and a first identifier of each drive package in the at least one drive package. The first identifier of each drive package is used to indicate a PCIe device matched with the drive package. The testing device determines an identifier of a target server according to the first identifier of the target drive package. The target server is one or more servers in the server pool that include the PCIe device indicated by the first identifier of the target drive package. The target drive package is one of the at least one drive package. The testing device sends an execution testing instruction to the server pool. The execution testing instruction is used to instruct the server pool to test the target drive package by using the target server. The execution testing instruction includes a second identifier, the first identifier of the target drive package, and the identifier of the target server. The second identifier is used to indicate an operating system corresponding to the target testing task. The server pool creates a target virtual machine in the target server according to the second identifier and the identifier of the target server. The operating system of the target virtual machine is the operating system indicated by the second identifier. The server pool directly accesses the target virtual machine by using the target virtual machine and the PCIe device indicated by the first identifier. The server pool tests the target drive package by using the target virtual machine and the PCIe device indicated by the first identifier of the target drive package, to obtain a testing result of the target drive package. The testing device receives a testing result corresponding to the target testing task sent by the server pool. The testing result corresponding to the target testing task includes the testing result of the target drive package.
[0029] In a fourth aspect, the present application provides a server pool. The server pool includes a module or unit for performing the method provided in the first aspect or any possible implementation manner of the first aspect.
[0030] In a fifth aspect, the present application provides a testing device. The testing device includes a module or unit for performing the method provided in the second aspect or any possible implementation manner of the second aspect.
[0031] In a sixth aspect, the present application provides a server pool. The server pool includes a processor and a memory. The memory is used to store program code. The processor is used to invoke the program code stored in the memory, to perform the method provided in the first aspect or any possible implementation manner of the first aspect.
[0032] In a seventh aspect, the present application provides a testing device. The testing device includes a processor and a memory. The memory is used to store program code. The processor is used to invoke the program code stored in the memory, to perform the method provided in the second aspect or any possible implementation manner of the second aspect.
[0033] Eighthly, this application provides a computer storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform a method as provided in the first aspect, the second aspect, any possible implementation of the first aspect, or any possible implementation of the second aspect.
[0034] Ninthly, this application provides a computer program product that, when run on a computer, causes the computer to perform the method provided by the first aspect, the second aspect, any possible implementation of the first aspect, or any possible implementation of the second aspect.
[0035] Understandably, the server pools described in the fourth and sixth aspects are used to execute the methods provided in any of the first aspects; the testing equipment described in the fifth and seventh aspects is used to execute the methods provided in any of the second aspects; and the computer storage medium described in the eighth and the computer program product described in the ninth aspect are both used to implement the methods provided in any of the first or second aspects. Therefore, the beneficial effects they can achieve can be referred to in the beneficial effects described in the corresponding methods, and will not be repeated here. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 A schematic diagram of a test system structure provided in an embodiment of this application;
[0038] Figure 2 This is a schematic flowchart of a driver package testing method provided in an embodiment of this application;
[0039] Figure 3 This is a schematic diagram illustrating the construction of a virtual machine template pool, as provided in an embodiment of this application.
[0040] Figure 4 This is a schematic diagram illustrating a specific driver package testing process provided in an embodiment of this application.
[0041] Figure 5 This is a schematic diagram of the structure of a testing device provided in an embodiment of this application;
[0042] Figure 6 This is a schematic diagram of the structure of a server pool provided in an embodiment of this application;
[0043] Figure 7 Another server pool structure diagram provided by an embodiment of the present application is shown in FIG. 2.
[0044] Figure 8 Another test device structure diagram provided by an embodiment of the present application is shown in FIG. 3. DETAILED DESCRIPTION
[0045] Embodiments of the present application are described below in conjunction with the accompanying drawings.
[0046] In the present application, Device Passthrough refers to a technology that provides a physical device to a virtual machine for direct access and use in a computer system. After performing Device Passthrough configuration on a PCIe device in a computer system, the use right of the device can be transferred to any virtual machine, and can only be provided to one virtual machine for use. Using the physical device in the virtual machine is equivalent to directly using the physical device on a physical host.
[0047] Memory DB refers to a database that stores all contents in memory, rather than in external storage as in traditional databases. Memory DB refers to all data access control being performed in memory, and has the characteristics of fast read and write.
[0048] Referring to Figure 1 , Figure 1 A drive test system architecture diagram provided by an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the system architecture includes a test device 101 and a server pool 102. Optionally, the drive test system further includes a virtual machine template pool 103. Figure 1
[0049] The test device 101 is a device with data processing and data storage capabilities, such as a server or a terminal device. The terminal device includes a notebook computer, a desktop computer, a tablet computer, a smart phone, etc.
[0050] The server pool 102 includes multiple servers, and one or more virtual machines can be deployed in each server. The server pool 102 can be a distributed server or a server cluster. Each server in the server pool 102 is installed with at least one PCIe device. The PCIe devices installed on different servers can be different. The test device 101 communicates with the virtual machines in the server pool 102 through a network.
[0051] It is pointed out here that different PCIe devices refer to PCIe devices with different manufacturer identifiers and / or device identifiers.
[0052] The virtual machine template pool 103 is a device storing a plurality of operating system image files. The plurality of operating system image files include some or all of different versions of CentOS, different versions of REHL, different versions of Ubuntu, different versions of Debian, different versions of SLES, and different versions of openEuler. Figure 1 Some of the operating system image files are shown in the middle.
[0053] The tester issues a test task to the test device 101, and the test device 101 saves the test task to a task list. The test task list includes a plurality of test tasks. One test task corresponds to one operating system, that is, the task needs to be completed under the corresponding operating system. One test task includes at least one driver package, which is a driver program of a PCIe device. Each driver package in the at least one driver package matches one PCIe device, that is, during the test, for each driver package, the corresponding PCIe device needs to be tested.
[0054] The test device 101 obtains a target test task from the task list in sequence. For a target driver package in the at least one driver package of the target test task, the target driver package matches a PCIe device according to a first identifier of the target driver package, and determines a target server to which the PCIe device belongs, and sends an execution test instruction to the server pool 102. The server pool 102 obtains an operating system corresponding to the target task from the virtual machine template pool 103 according to the execution test instruction, and creates a target virtual machine in the target server based on the operating system. The server pool 102 passes through the PCIe device to the target virtual machine. As shown in Figure 1 For example, the target server is server 1, and the server 1 passes through a network interface card (NIC) 1 device to a virtual machine (VM) 1-1, and the server pool 102 passes through a redundant array of independent disks (RAID) card 1 to a VM 1-2. For another example, the server pool 102 passes through a NIC 2 device to a VM 2-1. The test device 101 transmits a test script to the target virtual machine through a network. The server pool 102 tests the target driver package through the target virtual machine and the test script, and feeds back the test result to the test device 101. After the driver package included in the target test task is tested, the target server deletes the target virtual machine.
[0055] It can be seen that, in the scheme of the application, the corresponding PCIe device is determined based on the driver package, a virtual machine is created on a server containing the PCIe device, and the PCIe device is passed-through to the virtual machine to complete the test of the driver package on the virtual machine by using the PCIe device, the application realizes the mapping of driver package->OS->server->PCIe device to driver package->PCIe device through the function of device pass-through, in the form of end-to-end, the binding relationship among OS, server and PCIe device is eliminated, the operating system can be quickly created on any server, various PCIe devices such as network cards and RAID cards support device pass-through, and the full-automatic test of the driver is realized. The scheme of the application takes the PCIe device as the minimum granularity, after the corresponding PCIe device is matched according to the driver package, different test environments are selected for testing according to the requirements, the PCIe is reused, and the waste of hardware resources is avoided. After the test is completed, the server deletes the virtual machine, the use-and-delete is realized, the manpower and material resources are not needed to maintain the operating system (i.e., the test environment) for testing, and the problem of high maintenance cost of the test environment is solved.
[0056] Referring to Figure 2 , Figure 2 An interactive flowchart of a driver package test method provided by an embodiment of the application is shown in FIG. 1. As shown in FIG. 1, the method comprises the following steps. Figure 2
[0057] S201, a test device acquires a target test task.
[0058] The target test task comprises at least one driver package and a first identifier of each driver package, and the first identifier of each driver package is used to indicate a PCIe device matched with the driver package. That is to say, the target test task needs to complete the test of at least one driver package. The target test task corresponds to a test environment, that is, the target test task needs to complete the test of at least one driver package in the corresponding test environment. The test environment is an environment in which the driver package runs, such as CentOS, Ubuntu operating system, SLES operating system, etc.
[0059] It should be pointed out that the PCIe device matched with the driver package refers to the driver package being a PCIe driver package. The completion of a test task refers to that the driver packages included in the test task are all tested.
[0060] In an example, after receiving the test task of the test personnel, the test device saves the target test task to a task list, and the test device acquires the target test task from the task list in sequence. Optionally, the sequence can be "first-in first-out", "first-in last-out", random or other sequences, which are not limited herein.
[0061] S202, the test device determines a target server from the server pool according to the first identifier of the target driver package.
[0062] The target test task includes at least one driver package, the target driver package is one of the driver packages included in the target test task, and the target server is one or more servers in the server pool that contain the PCI device indicated by the first identifier of the target driver package.
[0063] The server pool includes a plurality of servers, and each server is installed with a PCIe device, such as a NIC or a RAID card. Each PCIe device has a unique identifier. In an example, the identifier of the PCIe device includes a device identifier (device ID). Optionally, the identifier of the PCIe device also includes a vendor identifier (vendor ID). In another example, the identifier of the PCIe device is a vendor device.
[0064] In an example, the test device stores a server pool database, which includes the identifiers of the servers and the identifiers of the PCIe devices included in the servers indicated by the identifiers of the servers. The test device manages the servers in the server pool through a test engine: for example, installs virtual machine dependent software for the servers in the server pool, mounts NFS for the servers, scans the PCIe devices on the servers, and records in the server pool database; the test device monitors the states of the servers in the server pool through a background task to monitor the online and offline of the servers in the server pool and the PCIe devices on the servers, thereby maintaining the server pool database.
[0065] In another example, the server pool manages the servers in the server pool: for example, installs virtual machine dependent software for the servers in the server pool, mounts NFS for the servers, scans the PCIe devices on the servers, and records in the server pool database; the server pool monitors the states of the servers in the server pool through a background task to monitor the online and offline of the servers in the server pool and the PCIe devices on the servers, thereby maintaining the server pool database. The test device acquires the server pool database from the server pool in real time.
[0066] The test device matches the first identifier of the target driver package with the identifiers of the PCIe devices in the server pool database. If the matching is successful, the test device acquires the identifier of the server that includes the PCIe device indicated by the first identifier of the target driver package, which is the identifier of the target server. The test device marks the PCIe device indicated by the first identifier as a locked state, which is to prevent test conflicts. For one PCIe device in a server, only one driver package test can be completed at one time.
[0067] If the matching fails, the test device marks the target driver package as matching failure. The test device determines whether there is any untested driver package in the target test task. If there is any untested driver package in the target test task, the test device matches the first identification of the untested driver package with the identification of the PCIe device in the server pool database, and continues to perform the subsequent operation. The above steps are repeated until the driver packages in the target test task are all executed once. After the target test task is executed and the test result of the target test task is obtained, for the driver package of matching failure, the test device feeds back the first identification of the driver package of matching failure to the test personnel, so as to notify the test personnel to increase the PCIe device in the server pool.
[0068] Optionally, the matching process can be implemented by a specific server in the server pool.
[0069] S203, the test device sends a test execution instruction to the server pool.
[0070] After the test device obtains the identification of the target server, the test device sends a test execution instruction to the target server, the test execution instruction comprising the second identification, the first identification of the target driver package, and the identification of the target server, the second identification being used to indicate the test environment corresponding to the target test task. The test execution instruction is used to instruct the server pool to test the target driver package through the target server.
[0071] In a feasible embodiment, the test execution instruction comprises the second identification and the first identification of the target driver package. After the server pool receives the test execution instruction, the server pool matches the first identification of the target driver package with the identification of the PCIe device in the server pool database.
[0072] If the matching succeeds, the server pool acquires the identity of the server of the PCIe device indicated by the first identity included in the target driver package, and the identity of the server is the identity of the target server. The server pool marks the PCIe device indicated by the first identity as locked. If the matching fails, the server pool marks the target driver package as matching failure, and feeds back the result to the test device. For the driver package of matching failure, the test device feeds back the first identity of the driver package of matching failure to the tester, to inform the tester to add the PCIe device in the server pool. The test device determines whether there is an untested driver package in the target test task, and if there is an untested driver package in the target test task, the test device sends another execution test instruction to the server pool, the execution test instruction including the first identity of the untested driver package. Since the second identity has been sent to the server pool through the previous execution test instruction, the second identity does not need to be carried in the subsequent execution test instruction. After the server pool receives the execution test instruction, the server pool matches the first identity of the untested driver package with the identities of the PCIe devices in the server pool database, and continues to perform subsequent operations. The above steps are repeated until the driver packages in the target test task are executed once.
[0073] In one example, the test device adopts the way of thread pool, and monitors the task list and the current idle threads through one thread. When it is found that there is a task in the task list that has not been executed and there is an idle thread, the test device executes the task in the task list through the idle thread; when it is found that there is a task in the task list that has not been executed and there is no idle thread, the test device waits for a thread in the thread pool to have space before executing.
[0074] In one possible embodiment, the tests on different driver packages belonging to the same test task can be performed in parallel or in series.
[0075] In one possible embodiment, the test result of the target test task includes the test results of the driver packages included in the target test task; after the test device acquires the test result of the target test task, the test result of the driver packages included in the target test task is displayed on the display interface for the tester to view, or the test result can be stored in the database.
[0076] It should be understood that different PCIe devices can be included in different servers.
[0077] S204, the server pool creates a target virtual machine in the target server according to the second identity.
[0078] In a feasible embodiment, the virtual machine template pool includes a plurality of image files of operating systems. The server pool obtains, from the virtual machine template pool, an image file of an operating system indicated by the second identifier according to the second identifier. Optionally, the server pool sends a request for obtaining to a management server managing the virtual machine template pool, the request for obtaining carrying the second identifier; the management server obtains, from the virtual machine template pool, the image file of the operating system indicated by the second identifier according to the second identifier, and sends the image file of the operating system indicated by the second identifier to the server pool in a response message for responding to the request for obtaining. The server pool creates the target virtual machine in the target server according to the image file of the operating system indicated by the second identifier.
[0079] The target server is obtained by the server pool according to the matching manner described above, or is determined by the server pool from the server pool according to the identifier of the target server carried in the test instruction.
[0080] After determining the target server, the server pool performs device passthrough configuration on the PCIe device indicated by the first identifier in the target server.
[0081] In an example, as shown in Figure 3 , the image file of the operating system in the virtual machine template pool is generated by an installation of a virtual machine by a management server, and the corresponding image file of the operating system is generated according to the installed virtual machine, and the image file of the operating system is stored in a network file system (NFS) for sharing. A plurality of image files of operating systems can constitute a virtual machine template pool. The management server can be a server in the server pool, or a server independent of the server pool.
[0082] As shown in Figure 3 , the virtual machine template pool includes an image file of Cent OS7.8, an image file of Cent OS8.2, an image file of RHEL8.6, an image file of Debian11.2, an image file of SLES 15SP2, an image file of openEuler22.03, etc. The server pool is obtained from the virtual machine template pool based on the NFS protocol.
[0083] S205, the server pool directly passes the PCIe device indicated by the first identifier to the target virtual machine, and tests the target driver package through the target virtual machine and the PCIe device indicated by the first identifier to obtain a test result of the target driver package.
[0084] After the target virtual machine is created, the server pool directly passes the PCIe device indicated by the first identifier of the target driver package to the target virtual machine, so that the target virtual machine directly calls the PCIe device indicated by the first identifier of the target driver package. The server pool tests the target driver package through the target virtual machine and the PCIe device indicated by the first identifier to obtain a test result of the target driver package.
[0085] In a possible embodiment, the server pool obtains a test script, and tests the target driver package through the test script and the PCIe device indicated by the first identifier in the target virtual machine to obtain a test result of the target driver package. By introducing the test script, the testing of the driver package can be automatically implemented.
[0086] Optionally, after the server pool creates the virtual machine and directly passes the PCIe device indicated by the first identifier to the target virtual machine, the server pool obtains the test script from the test device; or the test instruction carries the test script, and the server pool can directly use the test script when the server pool needs to use the test script.
[0087] In the above manner, the server pool can complete the testing of the driver package included in the target test task, and can obtain a test result of the target test task after completing the testing of the driver package included in the target test task. The test result of the target test task includes the test result of the target driver package.
[0088] In a possible embodiment, the server pool deletes the target virtual machine after completing the testing of the driver package included in the target test task.
[0089] In a possible embodiment, the testing of different driver packages belonging to the same test task can be performed in parallel or in series. For example, the test task includes a driver package of a NIC and a driver package of a RAID card. For the two driver packages, in order to improve the testing speed, the driver package of the NIC and the driver package of the RAID card can be simultaneously tested in the same virtual machine.
[0090] S206, the server pool sends a test result of the target test task to the test device.
[0091] As can be seen, the proposed solution uses a virtual machine to execute driver package tests, with device passthrough as a guarantee of test results. This allows for the rapid creation of a test environment (i.e., a virtual machine), which can be deleted after testing, achieving "use and delete" without requiring manpower and resources to maintain the test operating system (i.e., the test environment), thus solving the problem of high test environment maintenance costs. This application simplifies the mapping from driver package -> OS -> server -> PCIe device to driver package -> PCIe device through device passthrough, eliminating the binding relationship between the OS, server, and PCIe device in an end-to-end manner. It enables the rapid creation of an operating system on any server and supports device passthrough configuration for various PCIe devices such as network cards and RAID cards, achieving fully automated driver testing. This application's solution uses the PCIe device as the smallest granularity. After matching the corresponding PCIe device based on the driver package, different test environments are selected according to requirements, achieving PCIe reuse and avoiding waste of hardware resources. After the test is completed, the server deletes the virtual machine, realizing the "use and delete" principle. This eliminates the need to spend manpower and resources to maintain the operating system (i.e., the test environment) used for testing, thus solving the problem of high maintenance costs for the test environment.
[0092] In a specific embodiment, such as Figure 4 As shown, after receiving the start task command sent by the tester, the web backend program of the test device distributes the task to the test device's in-memory database. The test device stores an in-memory database, which includes database 0 and database 1. Database 0 stores the list of tasks to be processed, and database 1 stores the list of task processing results. The list of tasks to be processed contains the tasks to be processed and their identifiers, while the list of task processing results includes the identifiers and processing results of processed tasks. The test device's in-memory database assigns an identifier to newly received tasks and saves the assigned identifier and the newly received task to the list of tasks to be processed. The in-memory database feeds back the identifier of the newly received task to the web backend program, which saves the received task identifier to its database. This database includes a task table, which includes ID, status, test progress, process log, and task identifier. The status includes tested, untested, under test, and test failed; the test progress indicates the test progress of the task, specifically which step the test has reached; the process log records the test process of the task; the test device distributes tasks to background threads, and the test device and server pool execute tasks in the following way:
[0093] 40. The test device or server pool matches the first identifier of the target driver package with the identifier of the PCIe device in the server pool database.
[0094] The first identifier of the target driver package is used to indicate the PCIe device matched with the target driver package. The server pool database includes the identifiers of the servers in the server pool and the identifiers of the PCIe devices included in the servers.
[0095] If the PCIe device is matched, step 41 is performed; if the PCIe device is not matched, step 47 is performed.
[0096] 41. The test device or the server pool marks the matched PCIe device as a locked state.
[0097] 42. The server pool performs a device pass-through configuration on the matched PCIe device.
[0098] 43. The server pool obtains an image file of an operating system corresponding to the test task from a virtual machine template pool.
[0099] The image file of the operating system corresponding to the test task is a test environment for testing the driver package in the test task.
[0100] 44. The server pool creates a target virtual machine in a target server according to the obtained image file, and pass-throughs the matched PCIe device to the target virtual machine.
[0101] The target server is a server in the server pool including the matched PCIe device.
[0102] 45. The server pool transmits a test script from the test device to the target virtual machine to perform the test through the target virtual machine.
[0103] 46. The test device parses the test result and stores it in the database.
[0104] After the server pool obtains the test result of the target driver package, the server pool feeds back the test result of the target driver package to the test device. The test device parses the test result of the target driver package and saves the parsed result to the database. It should be understood that the matching failure is also a test result.
[0105] 47. The test device or the server pool marks the target driver package as a matching failure.
[0106] 48. The server pool sends the matching result to the test device to make the test device notify the tester.
[0107] It should be understood that if the above matching operation is performed by the test device, step 48 is not needed.
[0108] The above steps are repeated until the drive package included in the test task is executed. When the test of the test task ends, the test result corresponding to the test task is saved in the task processing result list in the database 1.
[0109] It should be noted that the specific implementation process of steps 40-48 can refer to the related description of S201-S206, which will not be described here.
[0110] In the above process, the test progress, the flow log and the test result of the task are saved in the database. The database is the same as Figure 3 The database of the service pool in the embodiment is the same as the database.
[0111] The tester can send a feedback task progress instruction to another web backend program, and the web backend program obtains the task progress from the task table of the database and feeds back to the tester.
[0112] It should be noted that for the test scene of the test item, software compilation and the like which need to be executed on a large number of different versions of OS and specific PCIe devices, the scheme of the present application can be used.
[0113] Referring to Figure 5 Fig. 5 is a structural schematic diagram of a test device provided by an embodiment of the present application. The test device is used for a drive test system. The drive test system further includes a server pool, as shown in Figure 5 The test device 500 includes:
[0114] The acquisition unit 501 acquires a target test task. The target test task includes at least one drive package and a first identifier of each drive package in the at least one drive package. The first identifier of each drive package is used to indicate a PCIe device matched with each drive package.
[0115] The determination unit 502 is configured to determine the identifier of the target server according to the first identifier of the target drive package. The target server is one or more servers in the server pool which include the PCIe device indicated by the first identifier.
[0116] The transceiver unit 503 is configured to send an execution test instruction to the target server. The execution test instruction includes a second identifier, the identifier of the target server and the first identifier of the target drive package. The second identifier is used to indicate an operating system corresponding to the target test task. The execution test instruction is used to instruct the server pool to test the target drive package through the target server. The transceiver unit 503 receives the test result of the target test task fed back by the target server. The test result of the target test task includes the test result of the target drive package.
[0117] In one possible implementation, the determination unit 502 is specifically configured to:
[0118] match the first identifier of the target driver package with a server pool database, the server pool database comprising identifiers of PCIe devices contained in all servers in a server pool and server identifiers; if the PCIe device indicated by the first identifier of the target driver package is matched from the server pool database, obtain an identifier of a target server comprising the PCIe device indicated by the first identifier.
[0119] In a possible implementation, the determining unit 502 is further configured to:
[0120] mark the PCIe device indicated by the first identifier of the target driver package as a locked state.
[0121] In a possible implementation, the testing device 500 further comprises:
[0122] The display unit 504 is configured to display a test result corresponding to the target test task, so that a tester can view the test result.
[0123] It is worth noting that the specific functional implementation of the testing device 500 can refer to the above Figure 2 The described driver package testing method, such as the obtaining unit 501 for performing the related content of S201, the determining unit 502 for performing the related content of S202 and S203, and the transceiving unit 503 and the display unit 504 for performing the related content of S203, will not be repeated here. The various units or modules in the testing device 500 can be respectively or all combined into one or several other units or modules to constitute, or some of the units or modules can be further split into a plurality of units or modules with smaller functions to constitute, which can achieve the same operation without affecting the implementation of the technical effects of the embodiments of the present application. The above units or modules are divided based on logical functions, and the functions of a unit (or module) can also be implemented by multiple units (or modules) in actual application, or the functions of multiple units (or modules) are implemented by one unit (or module).
[0124] Referring to Figure 6 FIG. 6 shows a structure schematic diagram of a server pool provided by an embodiment of the present application. The server pool is applied to a driver testing system, and the driver testing system further comprises a testing device and the server pool comprises at least one server. As Figure 6 FIG. 6 shows that the server pool 600 comprises:
[0125] The transceiving unit 601 is configured to receive an execution test instruction sent by the test device, the execution test instruction being used to instruct the target server to test a target driver package, the execution test instruction comprising a second identifier, an identifier of the target server, and a first identifier of the target driver package, the first identifier of the target driver package being used to indicate a peripheral component interconnect express (PCIe) device matched with the target driver package, and the second identifier being used to indicate an operating system corresponding to a target test task; the target driver package is one of driver packages included in the target test task; and the target server is one or more servers in a server pool and comprising the PCIe device indicated by the first identifier of the target driver package.
[0126] The creating unit 602 is configured to create a target virtual machine according to the identifier of the target driver package and the second identifier, and the operating system of the target virtual machine being the operating system indicated by the second identifier.
[0127] The testing unit 603 is configured to pass through the PCIe device indicated by the first identifier of the target driver package to the target virtual machine, and test the target driver package by using the target virtual machine and the PCIe device indicated by the first identifier of the target driver package, to obtain a test result of the target driver package.
[0128] In one possible implementation, the creating unit 602 is specifically configured to:
[0129] determine the target server from the server pool according to the identifier of the target server, obtain an image file of the operating system indicated by the second identifier from a virtual machine template pool according to the NFS protocol based on the second identifier, and create the target virtual machine in the target server according to the image file of the operating system indicated by the second identifier.
[0130] The image file of the operating system in the virtual machine template pool is stored in the NFS, and the servers in the subsequent server pool obtain the image file of the operating system from the virtual machine template pool based on the NFS protocol. By storing the image file of the operating system in the NFS, the image file of the operating system can be shared.
[0131] In one possible implementation, the transceiving unit 601 is further configured to:
[0132] obtain a test script from the test device.
[0133] The testing unit 603 is specifically configured to:
[0134] test the target driver package in the target virtual machine by using the test script and the PCIe device indicated by the first identifier, to obtain the test result of the target driver package.
[0135] By introducing the test script, the automation of the driver package testing can be implemented.
[0136] In conjunction with the first aspect, in one possible implementation, test unit 603 is also used for:
[0137] After the driver packages included in the target test task have completed testing, the target virtual machine will be deleted.
[0138] It is worth noting that the specific implementation of server pool 600 can be found in the above description. Figure 2 The description of the driver package testing method shown, such as the transceiver unit 601 executing the relevant content of S206, the creation unit 602 executing the relevant content of S204, and the testing unit 603 executing the relevant content of S205, will not be repeated here. Each unit or module in the server pool 600 can be individually or entirely merged into one or more other units or modules, or some of the units or modules can be further divided into multiple functionally smaller units or modules. This achieves the same operation without affecting the technical effect of the embodiments of the present invention. The above-mentioned units or modules are based on logical function division. In practical applications, the function of one unit (or module) can also be implemented by multiple units (or modules), or the function of multiple units (or modules) can be implemented by one unit (or module).
[0139] Based on the descriptions of the above method embodiments and server pool embodiments, please refer to... Figure 7 The present invention also provides a schematic diagram of the structure of a server pool 700. Figure 7 The server pool 700 shown includes a memory 701, a processor 702, a communication interface 703, and a bus 704. The memory 701, processor 702, and communication interface 703 are interconnected via the bus 704. As can be seen from the foregoing embodiments, the server pool 700 also includes multiple servers; for ease of illustration, ... Figure 7 Not shown.
[0140] The memory 701 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM).
[0141] The memory 701 can store programs. When the program stored in the memory 701 is executed by the processor 702, the processor 702 and the communication interface 703 are used to execute the various steps of the driver package testing method of the present application embodiment.
[0142] The processor 702 can be a general purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits that are configured to execute a program to perform the functions required by the units in the server pool 700 according to the embodiments of the present application, or to perform the drive package testing method according to the method embodiments of the present application.
[0143] The processor 702 can also be an integrated circuit chip that has the processing capability of signals. In the implementation process, each step of the drive package testing method according to the embodiments of the present application can be completed by the integrated logic circuit of hardware in the processor 702 or the instruction in the form of software. The processor 702 described above can also be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor to execute, or be executed by a combination of hardware and software modules in the code processor. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory 701, and the processor 702 reads the information in the memory 701, and combines the hardware to complete the functions required by the units included in the server pool according to the embodiments of the present application, or to execute the drive package testing method according to the method embodiments of the present application.
[0144] The communication interface 703 uses a transceiver device such as but not limited to a transceiver to realize the communication between the server pool 700 and other devices or communication networks. For example, the data can be obtained through the communication interface 703.
[0145] The bus 704 can include a path for transmitting information between the various components (for example, the memory 701, the processor 702, the communication interface 703) of the server pool 700.
[0146] It should be noted that although Figure 7The server pool 700 shown only shows the memory, processor, communication interface, but in the specific implementation process, those skilled in the art should understand that the server pool 700 also includes other devices necessary for normal operation. At the same time, according to the specific needs, those skilled in the art should understand that the server pool 700 can also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the server pool 700 can also only include devices necessary for implementing the embodiments of the present application, and does not necessarily include Figure 7 all the devices shown in the middle.
[0147] Based on the description of the above method embodiments and test equipment embodiments, please refer to Figure 8 , the embodiments of the present application also provide a structural diagram of a test equipment 800. Figure 8 The test equipment 800 shown (which can be a computer device in particular) includes a memory 801, a processor 802, a communication interface 803, and a bus 804. Among them, the memory 801, the processor 802, and the communication interface 803 are communicatively connected to each other through the bus 804.
[0148] The memory 801 can be a ROM, a static storage device, a dynamic storage device, or a RAM.
[0149] The memory 801 can store a program, and when the program stored in the memory 801 is executed by the processor 802, the processor 802 and the communication interface 803 are used to execute each step of the drive package test method of the embodiments of the present application.
[0150] The processor 802 can adopt a general-purpose CPU, a microprocessor, an ASIC, a GPU, or one or more integrated circuits, and is used to execute related programs to implement the functions required by the units in the test equipment 800 of the embodiments of the present application, or to execute the drive package test method of the method embodiments of the present application.
[0151] The processor 802 can also be an integrated circuit chip on which one or more of the above described functions are performed. In implementation, the various steps of the drive package testing method of the present application can be implemented through integrated logic circuitry of the hardware or instructions in software form of the processor 802. The processor 802 described above can also be a general purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware code processor to execute, or a combination of hardware and software modules in the code processor to execute. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory, or an electrically erasable programmable memory, a register, or other mature storage medium in the art. The storage medium is located in the memory 801, and the processor 802 reads the information in the memory 801, and combines the hardware to complete the functions required to be executed by the units included in the test device of the embodiments of the present application, or executes the drive package testing method of the method embodiments of the present application.
[0152] The communication interface 803 uses a transceiver such as but not limited to a transceiver to realize the communication between the test device 800 and other devices or communication networks. For example, data can be obtained through the communication interface 803.
[0153] The bus 804 can include a path for transmitting information between the various components of the test device 800 (e.g., the memory 801, the processor 802, the communication interface 803).
[0154] It should be noted that although Figure 8 The test device 800 shown only shows the memory, the processor, the communication interface, but in the specific implementation process, those skilled in the art should understand that the test device 800 also includes other devices necessary for normal operation. At the same time, according to the specific needs, those skilled in the art should understand that the test device 800 can also include hardware devices for realizing other additional functions. In addition, those skilled in the art should understand that the test device 800 can also only include the devices necessary for the embodiments of the present application, and does not have to include all the devices shown in the Figure 8 The test device 800 shown only shows the memory, the processor, the communication interface, but in the specific implementation process, those skilled in the art should understand that the test device 800 also includes other devices necessary for normal operation. At the same time, according to the specific needs, those skilled in the art should understand that the test device 800 can also include hardware devices for realizing other additional functions. In addition, those skilled in the art should understand that the test device 800 can also only include the devices necessary for the embodiments of the present application, and does not have to include all the devices shown in the
[0155] The embodiments of the present application also provide a chip, which includes a processor and a data interface, and the processor reads instructions stored on the memory through the data interface to realize the drive package testing method.
[0156] Optionally, as an implementation manner, the chip can further include a memory, and the memory has instructions stored therein, and the processor is configured to execute the instructions stored in the memory, and when the instructions are executed, the processor is configured to execute the drive package test method.
[0157] The embodiments of the present application further provide a computer readable storage medium, which has instructions stored therein, and when the instructions are executed on a computer or a processor, the computer or the processor executes one or more steps in any one of the above methods.
[0158] The embodiments of the present application further provide a computer program product including instructions. When the computer program product is executed on a computer or a processor, the computer or the processor executes one or more steps in any one of the above methods.
[0159] Those skilled in the art will appreciate that the functions described with reference to the various illustrative logical blocks, modules, and algorithm steps described in this specification can be implemented as hardware, software, firmware, or any combination thereof. If implemented in software, the functions described with reference to the various illustrative logical blocks, modules, and steps described in this specification can be stored on or transmitted over as one or more instructions or code on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media can include computer-readable storage media, which corresponds to a tangible medium such as data storage media, or communication media including any medium that facilitates transfer of the computer program from one place to another, e.g., according to a communication protocol. In this manner, computer-readable media generally can correspond to (1) tangible computer- readable storage media which is non-transitory or (2) a communication medium such as a signal or carrier wave. Data storage media can be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementation of the techniques described in this specification. A computer program product can include a computer-readable medium.
[0160] By way of example, and not limitation, such computer-readable storage media can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage, or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code means in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. It should be understood, however, that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but are instead directed to non-transient, tangible storage media. Disk and disc, as used herein, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0161] Instructions can be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application-specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Accordingly, the term "processor," as used herein can refer to any of the foregoing structure or any other structure suitable for implementation of the techniques described herein. In addition, in some aspects, the functionality described herein as being performed by various illustrative logical blocks, modules, and steps can be implemented in hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. Moreover, the techniques can be embodied in a
[0162] The techniques of this disclosure can be implemented in a wide variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC) or a set of ICs (e.g., a chip set). Various components, modules, or units described herein can be implemented as hardware, software, firmware or any combination thereof. Hardware implementations can include processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), programmable logic devices (PLDs), secure microprocessors, or any other hardware equivalents. Software implementations can include any software- or machine code- stored on tangible, non-transitory media, such as CD-ROMs, ROMs, RAMs, DVDs, Blu-ray discs, flash memory, or any other storage media, which when executed by a processor, software- or machine code- implements the techniques described herein. Firmware implementations can include any design mode or configurable firmware that can be read and utilized by one or more processors or microprocessors executing software or machine code, without departing from the scope of the disclosure. Moreover, the various components, modules, or units described herein can also be implemented together or separately as discrete but interoperable logic devices. Discrete logic devices can include components such as application- specific integrated circuits (ASICs), an field-programmable gate array (FPGA), or other
[0163] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the specific description of the corresponding step processes in the foregoing method embodiments, which will not be repeated here.
[0164] It should be understood that, in the description of the present application, unless otherwise specified, " / " represents that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; wherein A, B can be singular or plural. And, in the description of the present application, unless otherwise specified, "multiple" means two or more than two. "At least one of the following" or the like means any combination of the items, including any combination of single item or multiple items. For example, at least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c can be single or multiple. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the same items or similar items with basically the same function and role are distinguished by using "first", "second" and the like. Those skilled in the art can understand that "first", "second" and the like do not limit the quantity and execution order, and "first", "second" and the like do not necessarily mean different. At the same time, in the embodiments of the present application, "exemplary" or "for example" means to present relevant concepts in a specific way for understanding.
[0165] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the division of the unit is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0166] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0167] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in or transmitted by a computer readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media sets. The available medium can be ROM, or random access memory (RAM), or a magnetic medium such as a floppy disk, a hard disk, a magnetic tape, a magnetic disk, or an optical medium such as a digital versatile disc (DVD), or a semiconductor medium such as a solid state disk (SSD), etc.
[0168] The above is only a specific implementation of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any change or replacement within the technical scope disclosed by the embodiments of the present application should be covered within the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application should be subject to the protection scope of the claims.
Claims
1. A method of driving a package test, characterized by, The method is applied to a server pool comprising at least one server, and the method comprises: receiving an execution test instruction sent by a test device, the execution test instruction being used to instruct a target server in the server pool to test a target driver package, the execution test instruction comprising a second identifier, an identifier of the target server, and a first identifier of the target driver package, the first identifier of the target driver package being used to indicate a Peripheral Component Interconnect Express (PCIe) device matched with the target driver package, and the second identifier being used to indicate an operating system corresponding to a target test task; the target driver package being one of driver packages included in the target test task, and the target server being one or more servers in the server pool comprising the PCIe device indicated by the first identifier of the target driver package; creating a target virtual machine in the target server according to the second identifier and the identifier of the target server, an operating system of the target virtual machine being the operating system indicated by the second identifier; passing through the PCIe device indicated by the first identifier to the target virtual machine, and testing the target driver package through the target virtual machine and the PCIe device indicated by the first identifier of the target driver package to obtain a test result of the target driver package.
2. The method of claim 1, wherein, The method of creating the target virtual machine in the target server according to the second identifier and the identifier of the target server comprises: determining the target server from the server pool according to the identifier of the target server; obtaining an image file of the operating system indicated by the second identifier from a virtual machine template pool based on a Network File System (NFS) protocol; creating the target virtual machine in the target server according to the image file of the operating system indicated by the second identifier.
3. The method according to claim 1 or 2, characterized in that, The method further comprises: obtaining a test script from the test device; testing the target driver package through the target virtual machine and the PCIe device indicated by the first identifier to obtain a test result of the target driver package, which comprises: testing the target driver package through the test script and the PCIe device indicated by the first identifier in the target virtual machine to obtain the test result of the target driver package.
4. The method of claim 1, wherein, The method further comprises: deleting the target virtual machine after the driver packages included in the target test task complete testing.
5. A method of driving a package test, characterized by, The method is applied to a test device, and the method comprises: obtaining a target test task, the target test task comprising at least one driver package and a first identifier of each driver package in the at least one driver package, the first identifier of each driver package being used to indicate a PCIe device matched with the each driver package; determining an identifier of a target server according to a first identifier of a target driver package, the target server being one or more servers in a server pool comprising the PCIe device indicated by the first identifier of the target driver package; and the target driver package being one of driver packages included in the target test task. sending an execution test instruction to the server pool, the execution test instruction comprising a second identifier, the first identifier of the target driver package, and the first identifier of the target driver package, the second identifier being used to indicate an operating system corresponding to the target test task; the execution test instruction being used to instruct the target server in the server pool to test the target driver package; receiving a test result corresponding to the target test task fed back by the server pool, the test result corresponding to the target test task comprising a test result of the target driver package.
6. The method of claim 5, wherein, The method further comprises: matching the first identifier of the target driver package with the server pool database, the server pool database comprising identifiers of PCIe devices contained in all servers in the server pool and server identifiers; if the PCIe device indicated by the first identifier is matched from the server pool database, obtaining the identifier of the target server comprising the PCIe device indicated by the first identifier of the target driver package; determining the target server according to the server identifier.
7. The method of claim 6, wherein, The method further comprises: marking the PCIe device indicated by the first identifier of the target driver package as a locked state.
8. The method according to any one of claims 5-7, characterized in that, The method further comprises: displaying the test result corresponding to the target test task.
9. A method of driving a package test, characterized by, The method comprises: a test device obtaining a target test task, the target test task comprising at least one driver package and a first identifier of each driver package in the at least one driver package, the first identifier of each driver package being used to indicate a peripheral component interconnect express (PCIe) device matched with the each driver package; the test device determining an identifier of a target server according to a first identifier of a target driver package, the target server being one or more servers in a server pool comprising the PCIe device indicated by the first identifier, the target driver package being one of the at least one driver package comprised in the target test task; the test device sending an execution test instruction to the server pool, the execution test instruction being used to instruct the target server to test the target driver package, the execution test instruction comprising a second identifier, the identifier of the target server, and the first identifier of the target driver package, the second identifier being used to indicate an operating system corresponding to the target test task; the server pool creating a target virtual machine in the target server according to the second identifier and the identifier of the target server, an operating system of the target virtual machine being the operating system indicated by the second identifier; the server pool passing through the PCIe device indicated by the first identifier of the target driver package to the target virtual machine, testing the target driver package through the target virtual machine and the PCIe device indicated by the first identifier of the target driver package to obtain a test result of the target driver package; the test device receiving a test result corresponding to the target test task fed back by the server pool, the test result corresponding to the target test task comprising a test result of the target driver package.
10. A server pool, characterized by The server pool comprises one or more servers, the server pool being configured to perform the method of any one of claims 1 to 4.
11. A test apparatus, characterized by The test device is configured to perform the method of any one of claims 5 to 8.
Citation Information
Patent Citations
Automatic test method and device for HPC (High Performance Computing) cluster
CN107135120A
Concurrent testing of PCI express devices on a server platform
CN107423169A