A device testing method, apparatus, device, and medium

By modifying the server's BIOS and OS configuration files and adjusting the configuration information according to the test scenario, the problem of high cost and high variability in CXL protocol device testing in existing technologies has been solved, achieving low-cost and comprehensive testing results.

CN119336559BActive Publication Date: 2025-12-09NINGCHANG INFORMATION TECH (HANGZHOU) CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411407382.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-12-09
Estimated Expiration
2044-10-09

AI Technical Summary

Technical Problem

In the existing technology, using dedicated analyzer hardware testing equipment to test devices that support the CXL protocol is costly and inefficient, and it differs greatly from actual customer application scenarios.

Method used

By modifying the server's BIOS and OS configuration files and adjusting the configuration information according to the test scenario, testing of devices that support the CXL protocol can be achieved, including detecting the effectiveness of configuration information and the existence and status of devices, thus avoiding the use of dedicated analyzer hardware testing equipment.

Benefits of technology

It achieves convenient and low-cost testing results, meets the testing needs of real-world application scenarios, and improves the comprehensiveness and accuracy of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336559B_ABST
    Figure CN119336559B_ABST
Patent Text Reader

Abstract

The application discloses a device testing method, device, equipment and medium, which is used for more conveniently realizing testing of a device supporting a CXL protocol in a server, saving cost, having better testing effect and meeting testing requirements. The method comprises the following steps: determining a BIOS configuration file in the server, wherein the BIOS configuration file comprises configuration information supported by a target device to be tested in the server, and the target device is a device supporting the CXL protocol; modifying the BIOS configuration file according to a testing scene, obtaining a modified BIOS configuration file, and restarting the server; the modified BIOS configuration file comprises configuration information of the target device when the target device runs in the testing scene; when the server is restarted successfully, detecting whether the configuration information in the modified BIOS configuration file takes effect, obtaining a first detection result, and outputting first testing information of whether BIOS of the server supports the target device based on the first detection result.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of electronics, and in particular to a device testing method and device, equipment and medium. BACKGROUND

[0002] The Compute eXpress Link (CXL) technology is a new high-speed interconnection technology that can improve data throughput and reduce latency to meet the needs of larger computing and storage systems. CXL is an open standard that can be used as a high-speed serial protocol, including a block input / output protocol (CXL.io) based on the Peripheral Component Interconnect Express (PCIe) standard, and a new cache coherence protocol for accessing system memory (CXL.cache) and device memory (CXL.mem). Devices using the CXL protocol have high-speed interconnection technology that can provide high-speed, high-capacity connections between central processing units (CPUs) and devices, CPUs and memories, and devices.

[0003] In a server, a device supporting the CXL protocol is provided, so that the customer's demand for memory bandwidth and capacity expansion can be met. However, before the server is shipped, the device supporting the CXL protocol needs to be tested. The current testing method is to use a special analyzer hardware testing device for testing, but the analyzer hardware testing device not only has high cost and low efficiency, but also may have large differences from the actual customer application scenario. SUMMARY

[0004] The embodiments of the present application provide a device testing method, device, equipment and medium, which can more conveniently realize the testing of the device supporting the CXL protocol in the server, save cost, have good testing effect, and meet the testing demand.

[0005] The device testing method provided by the embodiments of the present application comprises:

[0006] determining a basic input / output system (BIOS) configuration file in a server, wherein the BIOS configuration file comprises configuration information supported by a target device to be tested in the server, and the target device is a device supporting a Compute eXpress Link (CXL) protocol;

[0007] modifying the BIOS configuration file according to a test scenario to obtain a modified BIOS configuration file, and restarting the server; wherein the modified BIOS configuration file comprises configuration information of the target device when the target device is running under the test scenario;

[0008] When the server is successfully restarted, it is detected whether the configuration information in the modified BIOS configuration file is effective, a first detection result is obtained, and based on the first detection result, first test information about whether the BIOS of the server supports the target device is output.

[0009] The method provided by the embodiments of the present application can determine a basic input output system (BIOS) configuration file in a server, wherein the BIOS configuration file includes configuration information supported by a target device to be tested in the server, and the target device is a device supporting a compute express link (CXL) protocol; and the BIOS configuration file is modified according to a test scenario, a modified BIOS configuration file is obtained, and the server is restarted, wherein the modified BIOS configuration file includes configuration information of the target device when the target device is running under the test scenario, so that the modified BIOS configuration file is effective; therefore, when the server is successfully restarted, it is detected whether the configuration information in the modified BIOS configuration file is effective, a first detection result is obtained, and based on the first detection result, first test information about whether the BIOS of the server supports the target device is output, so that the test of the target device supporting the CXL protocol in the server can be more conveniently realized based on the BIOS configuration file, without the need of using a special analyzer hardware test device for testing, so that the test cost is saved, and the test effect is better, and the test of the target device supporting the CXL protocol in the server based on the modified BIOS configuration file can better meet the test demand of the test scenario in an actual application.

[0010] In some embodiments, the method further includes:

[0011] determining an operating system (OS) configuration file in the server, wherein the OS configuration file includes OS kernel version information;

[0012] based on the OS configuration file, detecting whether the OS kernel version of the server is higher than or equal to a preset version, obtaining a second detection result, and based on the second detection result, outputting second test information about whether the OS of the server supports the target device; wherein the preset version is an OS kernel version supporting the target device.

[0013] Therefore, the embodiments of the present application can also realize more comprehensive test of the target device supporting the CXL protocol in the server based on the OS configuration file, so that not only the cost is saved, but also better test effect is obtained, and more test demands are met.

[0014] In some embodiments, the method further includes:

[0015] detecting whether the target device exists in the server, obtaining a third detection result;

[0016] based on the second detection result, outputting second test information of whether the OS of the server supports the target device, including:

[0017] based on the second detection result and the third detection result, outputting second test information of whether the OS of the server supports the target device.

[0018] Therefore, the embodiments of the present application can further implement more comprehensive test information for the target device supporting the CXL protocol in the server based on the OS configuration file and the detection result of whether the target device exists in the server, which not only saves cost but also further obtains better test effect and meets more test requirements.

[0019] In some embodiments, the method further includes:

[0020] when it is detected that the target device exists in the server, recording address information of the target device in the server.

[0021] Therefore, the embodiments of the present application can record the address information of the target device in the server when it is detected that the target device supporting the CXL protocol exists in the server, which facilitates testing and other operations.

[0022] In some embodiments, the method further includes:

[0023] based on the address information of the target device in the server, detecting state information of the target device, obtaining a fourth detection result, and based on the fourth detection result, outputting third test information of whether the hardware of the server supports the target device.

[0024] Therefore, the embodiments of the present application can further implement detection of the state information of the target device supporting the CXL protocol based on the recorded address information of the target device in the server when it is detected that the target device supporting the CXL protocol exists in the server, which further obtains more comprehensive test information for the target device.

[0025] In some embodiments, the OS configuration file includes the following three configuration files:

[0026] a function test configuration file, a performance test configuration file, and a stress test configuration file.

[0027] Therefore, the embodiments of the present application can meet different types of test requirements and implement more comprehensive test functions.

[0028] In some embodiments, the BIOS configuration file includes the following three configuration files:

[0029] a function test configuration file, a performance test configuration file, and a stress test configuration file.

[0030] Therefore, the embodiments of the present application can meet different types of test requirements and realize more comprehensive test functions.

[0031] An apparatus testing device provided by an embodiment of the present application includes:

[0032] A configuration file determination unit is configured to determine a basic input output system (BIOS) configuration file in a server, wherein the BIOS configuration file includes configuration information supported by a target device to be tested in the server, and the target device is a device supporting a compute express link (CXL) protocol.

[0033] A configuration file modification unit is configured to modify the BIOS configuration file according to a test scenario, obtain a modified BIOS configuration file, and restart the server, wherein the modified BIOS configuration file includes configuration information of the target device when the target device is running under the test scenario.

[0034] A test unit is configured to, when the server is restarted successfully, detect whether the configuration information in the modified BIOS configuration file is effective, obtain a first detection result, and output first test information of whether a BIOS of the server supports the target device based on the first detection result.

[0035] Therefore, the embodiments of the present application further provide a device that can more conveniently test a device supporting a CXL protocol in a server, without using a special analyzer hardware test device for testing. The device can conveniently test a target device supporting a CXL protocol in a server based on a BIOS configuration file, save test costs, and have good test effects. The device tests a target device supporting a CXL protocol in a server based on a modified BIOS configuration file, which can better meet test requirements of a test scenario in an actual application.

[0036] Another embodiment of the present application provides an electronic device including a memory and a processor, wherein the memory is configured to store program instructions, and the processor is configured to invoke the program instructions stored in the memory to execute any of the above methods according to obtained programs.

[0037] Therefore, the electronic device provided by the embodiment of the present application can more conveniently realize the testing of the device supporting the CXL protocol in the server, for example, can be the server itself or an electronic device inside the server, without using a special analyzer hardware testing device to test, based on the BIOS configuration file, the testing of the target device supporting the CXL protocol in the server can be conveniently realized, the testing cost is saved, and the testing effect is better, and the testing of the testing scene in the actual application can be better met.

[0038] Another embodiment of the present application provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are used to make the computer execute any one of the above methods.

[0039] Therefore, the electronic device provided by the embodiment of the present application can more conveniently realize the testing of the device supporting the CXL protocol in the server, for example, can be the server itself or an electronic device inside the server, without using a special analyzer hardware testing device to test, based on the BIOS configuration file, the testing of the target device supporting the CXL protocol in the server can be conveniently realized, the testing cost is saved, and the testing effect is better, and the testing of the testing scene in the actual application can be better met. BRIEF DESCRIPTION OF DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0041] Figure 1 A flowchart of a device testing method provided by an embodiment of the present application is shown in the figure;

[0042] Figure 2 A flowchart of a device testing method provided by an embodiment of the present application is shown in the figure;

[0043] Figure 3 A flowchart of a device testing method provided by an embodiment of the present application is shown in the figure;

[0044] Figure 4 A flowchart of a device testing method provided by an embodiment of the present application is shown in FIG. 1.

[0045] Figure 5 A flowchart of a device testing method provided by an embodiment of the present application is shown in FIG. 1.

[0046] Figure 6 A flowchart of a device testing method provided by an embodiment of the present application is shown in FIG. 1.

[0047] Figure 7 A structural diagram of an electronic device provided by an embodiment of the present application is shown in FIG. 1.

[0048] Figure 8 A structural diagram of a device testing apparatus provided by an embodiment of the present application is shown in FIG. 1. DETAILED DESCRIPTION

[0049] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0050] The embodiments of the present application provide a device testing method, apparatus, device and medium, so as to more conveniently realize testing of a device supporting a CXL protocol in a server, save cost, and achieve better testing effect, thereby meeting testing requirements.

[0051] The method and the apparatus, device and medium are based on the same application concept. Since the principles of the method and the apparatus, device and medium for solving problems are similar, the implementation of the apparatus, device and medium and the method can be mutually referred to, and the repeated parts will not be described again.

[0052] The terms "first", "second", and the like (if any) in the specification and claims of the embodiments of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.

[0053] The following examples and embodiments will be understood only as illustrative examples. Although the present description can refer to “a”, “one”, or “some” example or embodiment at several locations, this does not mean that each such reference is related to the same example or embodiment, nor does it mean that the feature only applies to a single example or embodiment. Individual features of different embodiments can also be combined to provide other embodiments. In addition, terms such as “comprise” and “include” should be understood as not limiting the described embodiments to only those consisting of the features mentioned; such examples and embodiments can also include features, structures, units, modules, etc. that are not specifically mentioned.

[0054] The various embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the order of display of the embodiments of the present application only represents the order of the embodiments, and does not represent the advantages and disadvantages of the technical solutions provided by the embodiments.

[0055] Referring to Figure 1 The device testing method provided by the embodiments of the present application comprises:

[0056] S101, determining a basic input output system (BIOS) configuration file in a server, wherein the BIOS configuration file comprises configuration information supported by a target device to be tested in the server, and the target device is a device supporting a compute express link (CXL) protocol (which can also be referred to as a CXL device).

[0057] The CXL protocol supports the following three types of devices:

[0058] The first type of device is an accelerator without local memory, such as a network card.

[0059] The first type of device is integrated with an existing system through PCIe (Peripheral Component Interconnect express, which is a high-speed serial computer expansion bus standard) and directly communicates with the CPU through the CXL protocol.

[0060] The second type of device is a general-purpose accelerator, such as a graphics processing unit (GPU), an application specific integrated circuit (ASIC), and a field programmable gate array (FPGA).

[0061] Such accelerators usually have local memory of graphics double data rate (GDDR) or high bandwidth memory. The main CPU can directly access the local memory of such accelerators through the CXL protocol.

[0062] Third type of device: memory expansion board and persistent memory.

[0063] The third type of device directly communicates with the host processor and can use the CXL protocol to achieve low-latency, high-throughput data transmission.

[0064] Embodiments of the present application provide an automatic testing method for CXL devices from the perspective of server vendors, ensuring good compatibility with CXL devices before the server is delivered to users, and better meeting the application needs of users.

[0065] The BIOS configuration file in the server is determined, for example, a BIOS configuration file BIOS_Conf.txt is created under the OS of the server, which contains CXL device supported options 1-n (i.e. configuration information supported by the target device), for example: BIOS control options (type, function, etc.) supported by the CXL device.

[0066] In some embodiments, the BIOS configuration file, for example, includes:

[0067] CXL security level (Security Level) option, used to control whether the operating system (Operating System, OS) can perform read and write operations on the CXL device through the CXL memory (cxl.mem) protocol, supported options include for example: Auto (automatic), Fully Trusted (fully trusted), Untrusted (untrusted).

[0068] In the firmware layer of the server in the embodiments of the present application, the BIOS control options (such as type, function, etc.) supported by the CXL device are set in the pre-configured BIOS configuration file (for example, named BIOS_Conf.txt).

[0069] S102, modify the BIOS configuration file according to the test scenario to obtain a modified BIOS configuration file, and restart the server; wherein the modified BIOS configuration file includes: configuration information of the target device when the target device runs under the test scenario;

[0070] The test scenario, i.e., the actual application requirement of the user (not specifically limited), in the embodiment of the application, the BIOS configuration file can be modified according to the actual application requirement of the user on the CXL device, to obtain the modified BIOS configuration file.

[0071] The configuration information of the target device, for example, includes the usage mode, bandwidth, rate and the like of the CXL device.

[0072] In some embodiments, the BIOS configuration file is modified, for example:

[0073] It is assumed that the access path of the BIOS configuration file is. / scelnx / o / s bios.txt, and the file name of the BIOS configuration file is bios.txt.

[0074] The BIOS configuration file bios.txt under. / scelnx / o / s bios.txt can be exported by using a tool, and the option configuration in bios.txt is modified, for example, the control option 1 of the BIOS supported by the CXL device is modified to off, then the modified configuration information is imported by using. / scelnx / I / s bios.txt, the server is restarted, and the modified configuration information can take effect.

[0075] S103, when the server is successfully restarted, whether the configuration information in the modified BIOS configuration file takes effect is detected, a first detection result is obtained, and based on the first detection result, first test information whether the BIOS of the server supports the target device is output.

[0076] After the server is successfully restarted and enters the OS of the server, the modified BIOS configuration file BIOS_Conf_modify.txt can be exported by using a BIOS configuration modification tool, and whether the options in the BIOS_Conf_modify.txt are modified successfully is detected, for example, whether the control option 1 of the BIOS supported by the CXL device is off is checked.

[0077] The first detection result, i.e., the detection result whether the configuration information in the modified BIOS configuration file takes effect, if yes, it indicates that the BIOS of the server supports the target device, and the first test information prompts the detection result (for example, BIOS is support CXL), otherwise, it indicates that the BIOS of the server does not support the target device, and the first test information prompts the detection result (for example, BIOS is not support CXL).

[0078] In some embodiments, referring to Figure 2, the method further comprising:

[0079] S201, determining an operating system (OS) configuration file in the server, wherein the OS configuration file comprises operating system kernel version information;

[0080] In some embodiments, the OS configuration file, for example, comprises an operating system kernel (kernel) startup configuration file, and the access path of the OS configuration file is, for example, nano / etc / default / grub.

[0081] In some embodiments, the configuration of the OS can be modified by editing the content of the OS configuration file in the nano / etc / default / grub path.

[0082] S202, based on the OS configuration file, detecting whether the operating system kernel version of the server is higher than or equal to a preset version, to obtain a second detection result;

[0083] In some embodiments, based on the OS configuration file, the operating system kernel version of the server is detected, for example, comprising:

[0084] The kernel version in the OS configuration file can be queried by the instruction (uname-r) to be 5.14, but the operating system kernel version actually supporting the CXL device needs to be above 6.6, therefore, based on this detection result, it can be judged whether the OS in the current server can be used for the test of the CXL device.

[0085] The second detection result is whether the operating system kernel version of the server is higher than or equal to the preset version.

[0086] S203, based on the second detection result, outputting second test information of whether the OS of the server supports the target device, wherein the preset version is the operating system kernel version supporting the target device.

[0087] If the operating system kernel version of the server is higher than or equal to the preset version, the second test information generates corresponding prompt information (such as OS is support CXL) based on the detection result.

[0088] If the operating system kernel version of the server is lower than the preset version, the second test information generates corresponding prompt information (such as OS is not support CXL) based on the detection result.

[0089] In some embodiments, referring to Figure 3 , the method further comprising:

[0090] S301, determine an operating system (OS) profile in the server, which includes operating system kernel version information;

[0091] S302, based on the OS profile, detect whether the operating system kernel version of the server is higher than or equal to a preset version, to obtain a second detection result;

[0092] S303, detect whether the target device exists in the server, to obtain a third detection result;

[0093] For example, by executing a PCI device query instruction (lspci -tv), it is detected whether the CXL device exists in the local server.

[0094] The third detection result, that is, the detection result of whether the target CXL device exists in the server.

[0095] S304, based on the second detection result and the third detection result, output second test information of whether the OS of the server supports the target device.

[0096] That is, in the embodiment, the second test information of whether the OS of the server supports the target device is determined based on the detection result of whether the operating system kernel version of the server is higher than or equal to a preset version, and the detection result of whether the target device exists in the server. For example:

[0097] If the operating system kernel version of the server is higher than or equal to a preset version, and the target device exists in the server, the output second test information prompts that the OS of the server supports the target device (for example, OS is support CXL), otherwise, the output second test information prompts that the OS of the server does not support the target device (for example, OS is not support CXL).

[0098] In some embodiments, referring to Figure 4 , the method further includes:

[0099] S401, determine an operating system (OS) profile in the server, which includes operating system kernel version information;

[0100] S402, based on the OS profile, detect whether the operating system kernel version of the server is higher than or equal to a preset version, to obtain a second detection result;

[0101] S403, detect whether the target device exists in the server, to obtain a third detection result;

[0102] S404, when it is detected that the target device exists in the server, record address information of the target device in the server;

[0103] Record the address information of the target device in the server, for example, record the PCI device address information (such as bb:dd.f) of the CXL device in the local server.

[0104] S405, based on the second detection result and the third detection result, output the second test information of whether the OS of the server supports the target device.

[0105] In some embodiments, referring to Figure 5 , the method further comprises:

[0106] S501, determine the operating system OS configuration file in the server, which includes operating system kernel version information;

[0107] S502, based on the OS configuration file, detect whether the operating system kernel version of the server is higher than or equal to the preset version, to obtain a second detection result;

[0108] S503, detect whether the target device exists in the server, to obtain a third detection result;

[0109] S504, based on the second detection result and the third detection result, output the second test information of whether the OS of the server supports the target device.

[0110] S505, when it is detected that the target device exists in the server, record address information of the target device in the server;

[0111] S506, based on the address information of the target device in the server, detect the state information of the target device, to obtain a fourth detection result;

[0112] For example, based on the PCI device address information (such as bb:dd.f) of the CXL device in the local server, execute the PCI device state query instruction lspci-vvs bb:dd.f to detect the state of the CXL device, such as the link status and link speed of the CXL device.

[0113] S507, based on the fourth detection result, output the third test information of whether the hardware of the server supports the target device.

[0114] In some embodiments, based on the fourth detection result, output whether the hardware of the server supports the third test information of the target device, for example, including:

[0115] Based on the address information of the target CXL device in the server, the instruction (lspci|grep-i cxl) can be used to detect whether there is the following information in the state information of the target CXL device:

[0116] d7:00.0 CXL: Montage Technology Co., Ltd. Device c001 (rev 01);

[0117] If yes, it means that the hardware environment of the current server supports the target CXL device, and the third test information of the server supporting the target device is output (for example: Hardware is support CXL);

[0118] If not, it means that the hardware environment of the current server does not support the target CXL device, and the third test information of the server not supporting the target device is output (for example: Hardware is not support CXL).

[0119] The following gives an example of a specific process.

[0120] Referring to Figure 6 , the device test method provided by the embodiments of the present application comprises:

[0121] S601, determine the basic input and output system (BIOS) configuration file in the server, wherein the BIOS configuration file comprises configuration information supported by a target device to be tested in the server, and the target device is a device supporting the compute express link (CXL) protocol;

[0122] S602, modify the BIOS configuration file according to a test scenario to obtain a modified BIOS configuration file, and restart the server; wherein the modified BIOS configuration file comprises configuration information of the target device when the target device is running under the test scenario;

[0123] S603, when the server is restarted successfully, detect whether the configuration information in the modified BIOS configuration file is effective to obtain a first detection result, and based on the first detection result, output first test information of whether the BIOS of the server supports the target device.

[0124] S604, determine the operating system (OS) configuration file in the server, which comprises operating system kernel version information;

[0125] S605, detecting, based on the OS configuration file, whether a kernel version of an operating system of the server is higher than or equal to a preset version, to obtain a second detection result;

[0126] S606, detecting whether the target device exists in the server, to obtain a third detection result;

[0127] S607, outputting, based on the second detection result and the third detection result, second test information about whether the OS of the server supports the target device.

[0128] S608, when it is detected that the target device exists in the server, recording address information of the target device in the server;

[0129] S609, detecting, based on the address information of the target device in the server, state information of the target device, to obtain a fourth detection result;

[0130] S610, outputting, based on the fourth detection result, third test information about whether hardware of the server supports the target device.

[0131] In the embodiment, the steps S601-S603 and the steps S604-S610 can be executed in parallel or sequentially, and the specific sequence is not limited.

[0132] In order to perform different types of tests to illustrate that the target CXL device is fully supported in the server and does not affect the application of the customer's actual business system:

[0133] In some embodiments, the OS configuration file includes the following three configuration files:

[0134] a function test configuration file, a performance test configuration file, and a stress test configuration file.

[0135] In some embodiments, the BIOS configuration file includes the following three configuration files:

[0136] a function test configuration file, a performance test configuration file, and a stress test configuration file.

[0137] For the function test configuration file, for example:

[0138] For the BIOS configuration file, modify the corresponding BIOS options according to the actual function test requirements to obtain a function test configuration file (for example, bios1.txt);

[0139] For the OS configuration file, according to the actual functional test requirements, for example, modifying the parameters in the OS configuration file under the path etc / default / grub, the corresponding functional test configuration file is obtained, and the tool used may be, for example, cxlcvtest.

[0140] Regarding the performance test configuration file, the stress test configuration file, according to the above functional test configuration file, the BIOS configuration file and the OS configuration file are modified accordingly according to the actual test requirements.

[0141] That is, in the embodiment of the application, the test of the CXL device can include many types (for example: function, performance, stress), and each type of test needs to configure different BIOS and / or execute different OS instructions. The corresponding test script is written by presetting the test type, the test tool to be used, the test configuration information, the test steps (the test instructions to be executed), the pass / fail test result evaluation standard, etc. through the above configuration files, so as to realize the automation of the test configuration and execution of the CXL device. Finally, in the process of automatic test execution, the corresponding configuration information can be called according to different types of tests, such as function, performance, stress, the corresponding test steps are executed, and the corresponding pass / fail test result evaluation standard is adopted, and finally the test result (i.e. test report) is output, which ensures more comprehensive test coverage of the CXL device.

[0142] In summary, the embodiment of the application can quickly verify the CXL device at the server manufacturer end, avoid the problems of missing or incorrect modification of configuration options caused by manual modification of configuration files and testing, and thus cause test errors. That is, the embodiment of the application can more conveniently realize the test of the target device supporting the CXL protocol in the server, without manual testing by using special analyzer hardware test equipment, saving test cost and achieving better test effect. Based on the modified configuration file, the target device supporting the CXL protocol in the server can be tested in multiple types and more comprehensively according to the test scene, which can better meet the test requirements of the test scene in the actual application and make up for the blank of the lack of effective test of the CXL device at the server manufacturer end. In addition, the method provided by the embodiment of the application can also be applied to the production link of the server to verify the target CXL device in batches.

[0143] The device or apparatus provided by the embodiment of the application will be introduced below, and the explanation or illustration of the same or corresponding technical features in the above method will not be repeated.

[0144] The electronic device provided by the embodiment of the application is described below with reference to Figure 7For example, including:

[0145] The processor 700 is configured to read a program in the memory 720, and execute the following process:

[0146] determining a basic input output system (BIOS) configuration file in a server, wherein the BIOS configuration file includes configuration information supported by a target device to be tested in the server, and the target device is a device supporting a compute express link (CXL) protocol;

[0147] modifying the BIOS configuration file according to a test scenario to obtain a modified BIOS configuration file, and restarting the server; wherein the modified BIOS configuration file includes configuration information of the target device when the target device is running under the test scenario;

[0148] when the server is successfully restarted, detecting whether the configuration information in the modified BIOS configuration file is effective to obtain a first detection result, and outputting first test information of whether a BIOS of the server supports the target device based on the first detection result.

[0149] In some embodiments, the processor 700 is further configured to read a program in the memory 720, and execute the following process:

[0150] determining an operating system (OS) configuration file in the server, wherein the OS configuration file includes operating system kernel version information;

[0151] detecting, based on the OS configuration file, whether an operating system kernel version of the server is higher than or equal to a preset version to obtain a second detection result, and outputting second test information of whether an OS of the server supports the target device based on the second detection result; wherein the preset version is an operating system kernel version supporting the target device.

[0152] In some embodiments, the processor 700 is further configured to read a program in the memory 720, and execute the following process:

[0153] detecting whether the target device exists in the server to obtain a third detection result;

[0154] outputting the second test information of whether the OS of the server supports the target device based on the second detection result, including:

[0155] outputting the second test information of whether the OS of the server supports the target device based on the second detection result and the third detection result.

[0156] In some embodiments, the processor 700 is further configured to read a program from the memory 720 and execute the following processes:

[0157] When the target device is detected to exist in the server, the address information of the target device in the server is recorded.

[0158] In some embodiments, the processor 700 is further configured to read a program from the memory 720 and execute the following processes:

[0159] Based on the address information of the target device in the server, the status information of the target device is detected to obtain a fourth detection result, and based on the fourth detection result, a third test information on whether the hardware of the server supports the target device is output.

[0160] In some embodiments, the OS configuration file includes the following three configuration files:

[0161] Functional test configuration file, performance test configuration file, stress test configuration file.

[0162] In some embodiments, the BIOS configuration file includes the following three configuration files:

[0163] Functional test configuration file, performance test configuration file, stress test configuration file.

[0164] Transceiver 710 is used to receive and send data under the control of processor 700.

[0165] Among them, Figure 7 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 700 and memory represented by memory 720 together. The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 710 can be multiple components, including transmitters and receivers, providing a unit for communicating with various other devices over a transmission medium, including wireless channels, wired channels, optical fibers, etc. For different user equipment, the user interface 730 can also be an interface capable of connecting external or internal devices, including but not limited to keypads, displays, speakers, microphones, joysticks, etc.

[0166] The processor 700 is responsible for managing the bus architecture and general processing, while the memory 720 can store the data used by the processor 700 during operation.

[0167] In some embodiments, the processor 700 can be a CPU (Central Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a CPLD (Complex Programmable Logic Device), and the processor can also adopt a multi-core architecture.

[0168] The processor is configured to execute any of the methods provided by the embodiments of the present application by invoking the computer program stored in the memory.

[0169] It should be noted that the above device provided by the embodiments of the present application can realize all the method steps achieved by the above method embodiments and achieve the same technical effects, and here the same parts and beneficial effects of the method embodiments in the embodiments will not be described in detail.

[0170] Referring to Figure 8 The device testing apparatus provided by the embodiments of the present application comprises:

[0171] The configuration file determining unit 801 is configured to determine a BIOS (Basic Input Output System) configuration file in a server, wherein the BIOS configuration file comprises configuration information supported by a target device to be tested in the server, and the target device is a device supporting a CXL (Compute Express Link) protocol.

[0172] The configuration file modifying unit 802 is configured to modify the BIOS configuration file according to a test scenario, to obtain a modified BIOS configuration file, and to restart the server, wherein the modified BIOS configuration file comprises configuration information of the target device when the target device is running under the test scenario.

[0173] The testing unit 803 is configured to, when the server is restarted successfully, detect whether the configuration information in the modified BIOS configuration file is effective, to obtain a first detection result, and to output first test information of whether a BIOS of the server supports the target device based on the first detection result.

[0174] In some embodiments:

[0175] The configuration file determining unit 801 is further configured to determine an OS (Operating System) configuration file in the server, wherein the OS configuration file comprises OS kernel version information.

[0176] The test unit 803 is further configured to: based on the OS configuration file, detect whether the operating system kernel version of the server is higher than or equal to a preset version, to obtain a second detection result, and based on the second detection result, output second test information about whether the OS of the server supports the target device; wherein the preset version is an operating system kernel version that supports the target device.

[0177] In some embodiments, the test unit 803 is further configured to:

[0178] detect whether the target device exists in the server, to obtain a third detection result;

[0179] based on the second detection result, output second test information about whether the OS of the server supports the target device, including:

[0180] based on the second detection result and the third detection result, output second test information about whether the OS of the server supports the target device.

[0181] In some embodiments, the test unit 803 is further configured to:

[0182] when it is detected that the target device exists in the server, record address information of the target device in the server.

[0183] In some embodiments, the test unit 803 is further configured to:

[0184] based on the address information of the target device in the server, detect state information of the target device, to obtain a fourth detection result, and based on the fourth detection result, output third test information about whether the hardware of the server supports the target device.

[0185] In some embodiments, the OS configuration file includes the following three configuration files:

[0186] a function test configuration file, a performance test configuration file, and a stress test configuration file.

[0187] In some embodiments, the BIOS configuration file includes the following three configuration files:

[0188] a function test configuration file, a performance test configuration file, and a stress test configuration file.

[0189] It should be noted that the division of the unit in the embodiments of the present application is illustrative, and is only a logical function division. In actual implementation, another division manner can be used. In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0190] When the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, the integrated unit can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0191] Any of the devices or apparatuses provided in the embodiments of the present application can be specifically a desktop computer, a portable computer, a smart phone, a tablet computer, a personal digital assistant (PDA), etc. The devices or apparatuses can include a central processing unit (CPU), a memory, an input / output device, etc. The input device can include a keyboard, a mouse, a touch screen, etc. The output device can include a display device, such as a liquid crystal display (LCD), a cathode ray tube (CRT), etc.

[0192] The memory can include a read-only memory (ROM) and a random access memory (RAM), and provide the processor with program instructions and data stored in the memory. In the embodiments of the present application, the memory can be used to store the programs of any of the methods provided in the embodiments of the present application.

[0193] The processor calls the program instructions stored in the memory. The processor is used to execute any of the methods provided in the embodiments of the present application according to the obtained program instructions.

[0194] The embodiments of the present application further provide a computer program product or computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform any of the methods described in the above embodiments. The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium may, for example, be but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0195] The embodiments of the present application provide a computer readable storage medium for storing computer program instructions for the apparatus provided in the above embodiments of the present application, which contains programs for executing any of the methods provided in the above embodiments of the present application. The computer readable storage medium can be a non-transitory computer readable medium.

[0196] The computer readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to a magnetic storage (such as a floppy disk, a hard disk, a magnetic tape, a magneto-optical disk (MO), etc.), an optical storage (such as a CD, a DVD, a BD, a HVD, etc.), and a semiconductor storage (such as a ROM, an EPROM, an EEPROM, a non-volatile memory (NAND FLASH), a solid state disk (SSD)), etc.

[0197] It should be understood that:

[0198] The access technology via which entities in a communication network communicate traffic to and from each other can be any suitable current or future technology, such as WLAN (Wireless Local Access Network), WiMAX (Worldwide Interoperability for Microwave Access), LTE, LTE-A, 5G, Bluetooth, infrared, etc. can be used; in addition, embodiments can also apply wired technologies, for example, IP-based access technologies, such as wired networks or fixed lines.

[0199] Embodiments suitable for being implemented as software code or parts thereof and being run using a processor or processing functionality are independent of the software code and can be specified using any known or future developed programming language, such as a high-level programming language, such as objective-C, C, C++, C#, Java, Python, Javascript, other scripting languages, etc., or a low-level programming language, such as a machine language or assembler.

[0200] Embodiments are independent of hardware and can be implemented using any known or future developed hardware technology or any hybrids of these, such as a microprocessor or CPU (Central Processing Unit), MOS (Metal Oxide Semiconductor), CMOS (Complementary Metal-Oxide Semiconductor), BiMOS (Bipolar MOS), BiCMOS (Bipolar CMOS), ECL (Emitter Coupled Logic), and / or TTL (Transistor-Transistor Logic).

[0201] Embodiments can be implemented as a single device, apparatus, unit, component, or function, or in a distributed manner as distributed, e.g., one or more processors or processing functionality can be used or shared in processing, or one or more processing segments or processing portions can be used and shared in processing, wherein one physical processor or more than one physical processor can be used for implementing one or more processing portions dedicated to specific processing as described.

[0202] An apparatus can be implemented by a semiconductor chip, a chipset, or a (hardware) module including such chip or chipset.

[0203] Embodiments can also be implemented as any combination of hardware and software, such as an ASIC (Application Specific IC (Integrated Circuit)) component, a FPGA (Field-Programmable Gate Array) or CPLD (Complex Programmable Logic Device) component, or a DSP (Digital Signal Processor) component.

[0204] Embodiments can also be implemented as a computer program product comprising a computer usable medium having a computer readable program code embodied therein, the computer readable program code adapted to be executed by a computer to perform processes as described in embodiments, wherein the computer usable medium can be a non-transitory medium.

[0205] Those skilled in the art will appreciate that embodiments of the present application can be further implemented as a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, magnetic disks or optical storage) embodying computer readable program code, for example, computer program code executable by a processor or processing functionality.

[0206] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart

[0207] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart

[0208] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart

[0209] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.

Claims

1. A device testing method, characterized by, The method comprises: determining a basic input output system (BIOS) configuration file in a server, wherein the BIOS configuration file comprises configuration information supported by a target device to be tested in the server, and the target device is a device supporting a compute express link (CXL) protocol; modifying the BIOS configuration file according to a test scenario to obtain a modified BIOS configuration file, and restarting the server; wherein the modified BIOS configuration file comprises configuration information of the target device when the target device runs under the test scenario; when the server is successfully restarted, detecting whether the configuration information in the modified BIOS configuration file takes effect to obtain a first detection result, and outputting first test information of whether a BIOS of the server supports the target device based on the first detection result.

2. The method of claim 1, wherein, The method further comprises: determining an operating system (OS) configuration file in the server, wherein the OS configuration file comprises OS kernel version information; based on the OS configuration file, detecting whether an OS kernel version of the server is higher than or equal to a preset version to obtain a second detection result, and outputting second test information of whether the OS of the server supports the target device based on the second detection result; wherein the preset version is an OS kernel version supporting the target device.

3. The method of claim 2, wherein, The method further comprises: detecting whether the target device exists in the server to obtain a third detection result; based on the second detection result, outputting the second test information of whether the OS of the server supports the target device, comprising: based on the second detection result and the third detection result, outputting the second test information of whether the OS of the server supports the target device.

4. The method of claim 3, wherein, The method further comprises: when it is detected that the target device exists in the server, recording address information of the target device in the server.

5. The method of claim 4, wherein, The method further comprises: based on the address information of the target device in the server, detecting state information of the target device to obtain a fourth detection result, and outputting third test information of whether hardware of the server supports the target device based on the fourth detection result.

6. The method of claim 2, wherein, The OS configuration file comprises three configuration files as follows: a function test configuration file, a performance test configuration file, and a stress test configuration file.

7. The method of claim 1, wherein, The BIOS configuration file comprises three configuration files as follows: a function test configuration file, a performance test configuration file, and a stress test configuration file.

8. An apparatus testing device, characterized by The apparatus comprises: a configuration file determination unit configured to determine a basic input output system (BIOS) configuration file in a server, wherein the BIOS configuration file comprises configuration information supported by a target device to be tested in the server, and the target device is a device supporting a compute express link (CXL) protocol; A configuration file modification unit is configured to modify the BIOS configuration file according to a test scenario, to obtain a modified BIOS configuration file, and to restart the server; wherein the modified BIOS configuration file comprises configuration information of the target device when the target device runs under the test scenario; A test unit is configured to, when the server is restarted successfully, detect whether the configuration information in the modified BIOS configuration file takes effect, to obtain a first detection result, and based on the first detection result, output first test information of whether the BIOS of the server supports the target device.

9. An electronic device, comprising: Comprise: A memory is configured to store program instructions; A processor is configured to invoke the program instructions stored in the memory, and execute the method according to any one of claims 1 to 7 according to the obtained program execution right.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions, and the computer executable instructions are used to make the computer execute the method according to any one of claims 1 to 7. The computer readable storage medium stores computer executable instructions, and the computer executable instructions are used to make the computer execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • CPU activation core number setting test method and related device

    CN110377468A

  • KR20240040653A