Method and device for testing remote hardware debugging function and computer equipment
By automatically processing simulation error notes and repair results in the server BMC, the problems of low efficiency and high cost of remote hardware debugging function testing are solved, and efficient testing and cost savings are achieved.
Patent Information
- Application Number
- CN202510546731.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-12
AI Technical Summary
The testing method of remote hardware debugging functions in the prior art is inefficient and costly, resulting in a shortage of AMD hardware debugging tools, affecting testing efficiency and increasing project costs.
By automatically processing simulated error-calling instructions and repair results in the BMC of the server, including obtaining target device information, generating simulated error-calling instructions, determining error-calling results, obtaining PCIE device error logs and determining repair results based on the logs, finally determining whether the BIOS supports remote hardware debugging function.
Improve testing efficiency, expand the scope of testing application, save project costs, and avoid dependence on high-cost AMD hardware debugging tools.
Smart Images

Figure CN120469880A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a testing method, apparatus, computer equipment, and storage medium for remote hardware debugging functions. Background Art
[0002] With the rapid development of computer technology, servers have gradually become high-performance computers in network platforms. Their widespread application and continuous technological advancement have continuously demanded upgraded server performance. PCIE (Peripheral Component Interconnect Express) devices are used for data input and output in servers. The quality of PCIE devices directly affects the integrity of data transmission, and the implementation of their error reporting mechanisms depends largely on the advanced management functions of the motherboard's Basic Input and Output System (BIOS).
[0003] Currently, the AMD Hardware Debug Tool (HDT) is required to verify the error mechanism function of server plug-in devices. However, due to the high purchase cost of the AMD hardware debugging tool, the equipment is in short supply in various projects, and the turnover time is slow, which seriously affects the testing efficiency. If the BIOS has a remote hardware debugging function, it can effectively solve the problem of verifying the PCIE error mechanism function when the hardware debugging tool is in short supply, thereby improving testing efficiency and greatly saving project costs.
[0004] However, current testing methods for remote hardware debugging functions have problems such as low efficiency and high cost. Summary of the Invention
[0005] The present application provides a testing method, apparatus, computer equipment and storage medium for remote hardware debugging functions, in order to at least solve the problems of low efficiency or high cost in related technologies.
[0006] The present application provides a method for testing a remote hardware debugging function, which is applied to a server's BMC and includes:
[0007] In response to a test environment verification result of the server being successful, target device information is obtained, a simulated error injection instruction is generated according to the target device information, the simulated error injection instruction is executed, current printing information of the BMC is obtained, and an error injection result is determined according to the current printing information; the target device information is difference information between the first device information and the second device information; the first device information is PCIE device information recorded when the BMC removes all external PCIE devices; and the second device information is PCIE device information recorded when the BMC connects all external PCIE devices;
[0008] In response to the error injection result being success, obtaining a PCIE device error log, and determining a repair result according to the PCIE device error log;
[0009] In response to the repair result being a repair success, it is determined that the BIOS supports a remote hardware debugging function.
[0010] In one embodiment, the method further includes: verifying the target environment of the server to obtain a test environment verification result; the target environment is the environment required for the server to support the remote hardware debugging function; the test environment verification result includes verification success or verification failure; in response to the test environment verification result being verification failure, outputting a test environment verification failure prompt message.
[0011] In one embodiment, verifying a target environment of a server to obtain a test environment verification result includes: obtaining memory capacity and hard disk capacity of the server; in response to the memory capacity being greater than or equal to a memory capacity threshold and the hard disk capacity being greater than or equal to a hard disk capacity threshold, sending a motherboard adaptation test signal to a motherboard of the server, receiving a test signal feedback value fed back by the motherboard of the server, and determining an adaptation result of the motherboard of the server based on the test signal feedback value; the adaptation result includes adaptation success or adaptation failure; in response to the adaptation result being adaptation success, sending an identity acquisition instruction to a link module of a BMC, receiving a register value required for the identity acquisition instruction fed back by a register of the BMC, and determining a software interaction function test result between the BMC and the link module based on the register value; the software interaction function test result includes test pass or test fail; in response to the software interaction function test result being test pass, checking the security encryption status of the CPU of the server through a hardware debugging tool; the security encryption status includes an encrypted state or a non-encrypted state; in response to the security encryption status being the non-encrypted state, checking the interface status of a log reporting function management interface in a kernel symbol table through the operating system; the interface status includes an open state or a closed state; and in response to the interface status being the open state, determining the test environment verification result as verification success.
[0012] In one embodiment, obtaining target device information includes: controlling all external PCIE devices to be removed from the BMC, and executing a first device information output instruction in the operating system to obtain first device information according to the first device information output instruction; controlling all external PCIE devices to be connected to the BMC, and executing a second device information output instruction in the operating system to obtain second device information according to the second device information output instruction; and performing a difference comparison between the first device information and the second device information to obtain target device information.
[0013] In one embodiment, determining the error injection result based on the printed information includes: performing an information query on the current printed information based on the first target keyword to obtain the error injection result; the error injection result includes successful injection or failed injection; the first target keyword is the keyword used to query the error injection result; in response to the error injection result being failed injection, returning to the step of executing the simulated error injection instruction until the error injection result is successful injection.
[0014] In one embodiment, a PCIE device error log is obtained, and a repair result is determined based on the PCIE device error log, including: controlling a server to automatically restart; re-executing a simulated error injection instruction, updating current printing information, and receiving a PCIE device error log reported by an operating system; performing an information query on the PCIE device error log based on a second target keyword to obtain a repair result; the repair result includes a repair success or a repair failure; and the second target keyword is a keyword used to query the repair result.
[0015] In one embodiment, the method further includes: in response to the repair result being a repair failure, determining that the BIOS does not support a remote hardware debugging function.
[0016] The present application also provides a testing device for remote hardware debugging function, which is applied to the BMC of a server and includes a simulation error injection module, a repair result determination module and a function determination module.
[0017] Among them, the simulation error injection module is used to respond to the server's test environment verification result as successful verification, obtain target device information, generate a simulation error injection instruction based on the target device information, execute the simulation error injection instruction, obtain the current printing information of the BMC, and determine the error injection result based on the current printing information; the target device information is the difference information between the first device information and the second device information; the first device information is the PCIE device information recorded when the BMC removes all external PCIE devices; the second device information is the PCIE device information recorded when the BMC connects all external PCIE devices; the repair result determination module is used to respond to the error injection result as successful error injection, obtain the PCIE device error log, and determine the repair result based on the PCIE device error log; the function judgment module is used to respond to the repair result as successful repair, and determine that the BIOS supports remote hardware debugging function.
[0018] The present application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of any method in the above method embodiments are implemented.
[0019] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of any one of the methods in the above method embodiments are implemented.
[0020] Through this application, in response to the test environment verification result of the server being a successful verification, the target device information is obtained, a simulated error injection instruction is generated according to the target device information, the simulated error injection instruction is executed, the current printing information of the BMC is obtained, and the error injection result is determined according to the current printing information; the target device information is the difference information between the first device information and the second device information; the first device information is the PCIE device information recorded when the BMC removes all external PCIE devices; the second device information is the PCIE device information recorded when the BMC connects all external PCIE devices; then, in response to the error injection result being a successful error injection, the PCIE device error log is obtained, and the repair result is determined according to the PCIE device error log; then, in response to the repair result being a successful repair, it is determined that the BIOS supports the remote hardware debugging function. Therefore, it can solve the high purchase cost of AMD hardware debugging tools, resulting in a shortage of equipment in various projects, slow turnover time, and serious impact on test efficiency, thereby improving test efficiency, increasing the scope of test applicability, and saving project costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0022] Figure 1 A diagram illustrating an application environment of a method for testing a remote hardware debugging function in one embodiment;
[0023] Figure 2 A first flow chart of a method for testing a remote hardware debugging function in one embodiment;
[0024] Figure 3 A second flow chart of a method for testing a remote hardware debugging function in one embodiment;
[0025] Figure 4 A schematic diagram of a process for verifying a target environment of a server and obtaining a test environment verification result in one embodiment;
[0026] Figure 5 A schematic diagram of a process for obtaining target device information in one embodiment;
[0027] Figure 6 A schematic diagram of a process for determining an injection error result based on printed information in one embodiment;
[0028] Figure 7 A flowchart of obtaining a PCIE device error log and determining a repair result based on the PCIE device error log in one embodiment is shown;
[0029] Figure 8 FIG. 4 is a structural block diagram of a test device for remote hardware debugging function in one embodiment. DETAILED DESCRIPTION
[0030] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0031] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0032] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0033] The test method of remote hardware debugging function provided by this application can be applied to Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. Terminal 102 may be, but is not limited to, various personal computers, laptops, smartphones, tablet computers, and portable wearable devices. Server 104 may be implemented as a standalone server or a server cluster consisting of multiple servers. Server 104 includes a BMC (Baseboard Management Controller).
[0034] First, as Figure 2 As shown, a method for testing a remote hardware debugging function is provided, which is described by taking the method applied to the BMC in the server 104 as an example, and includes the following steps 201 to 203.
[0035] Step 201, in response to the test environment verification result of the server being successful, obtain target device information, generate a simulated error injection instruction based on the target device information, execute the simulated error injection instruction, obtain current printing information of the BMC, and determine the error injection result based on the current printing information.
[0036] Among them, the target device information is the difference information between the first device information and the second device information; the first device information is the PCIE device information recorded when the BMC removes all external PCIE devices; the second device information is the PCIE device information recorded when the BMC connects all external PCIE devices.
[0037] Specifically, when the BMC in the server 104 recognizes that the test environment verification result of the server is successful, it obtains the target device information, generates a simulated error injection instruction according to the target device information, executes the simulated error injection instruction, obtains the current printing information of the BMC, and determines the error injection result according to the current printing information.
[0038] In one embodiment, Figure 3 As shown, the method further includes steps 301 to 302.
[0039] Step 301 , verifying the target environment of the server to obtain a test environment verification result; the target environment is the environment required for the server to support the remote hardware debugging function.
[0040] Step 302: In response to the test environment verification result being a verification failure, outputting a test environment verification failure prompt message.
[0041] The test environment verification result includes verification success or verification failure. Specifically, the BMC in the server 104 verifies the target environment of the server and obtains the test environment verification result. Then, in response to the test environment verification result being verification failure, a test environment verification failure prompt message is output, thereby improving the efficiency and accuracy of obtaining the test environment verification result.
[0042] In one embodiment, Figure 4 As shown, the target environment of the server is verified to obtain the test environment verification result, including steps 401 to 406.
[0043] Step 401: Obtain the memory capacity and hard disk capacity of the server.
[0044] Step 402, in response to the memory capacity being greater than or equal to the memory capacity threshold and the hard disk capacity being greater than or equal to the hard disk capacity threshold, sending a motherboard adaptation test signal to the server's motherboard, receiving a test signal feedback value fed back by the server's motherboard, and determining an adaptation result of the server's motherboard based on the test signal feedback value.
[0045] The adaptation result includes adaptation success or adaptation failure. Specifically, the BMC in server 104 obtains the server's memory capacity and hard disk capacity; then, in response to the memory capacity being greater than or equal to a memory capacity threshold and the hard disk capacity being greater than or equal to a hard disk capacity threshold, sends a motherboard adaptation test signal to the server's motherboard, receives a test signal feedback value from the server's motherboard, and determines the server's motherboard adaptation result based on the test signal feedback value, thereby accurately determining whether the memory space conditions and motherboard adaptation conditions in the target environment are met.
[0046] In one specific example, verifying the target environment of the server and obtaining a test environment verification result further includes: in response to the memory capacity being less than a memory capacity threshold or the hard disk capacity being less than a hard disk capacity threshold, outputting a server capacity expansion prompt message and determining that the test environment verification result is a verification failure. The above is merely a specific example, and in actual applications, the configuration may be flexible based on user needs and is not limited here.
[0047] In a specific example, the server's memory capacity and hard disk capacity are obtained. If the memory capacity is greater than or equal to 32GB and the hard disk capacity is greater than or equal to 1TB, the server's memory space is determined to be sufficient. If the memory capacity is less than 32GB and the hard disk capacity is less than 1TB, the server's memory space is determined to be insufficient. The above is only a specific example. In actual applications, the settings can be flexibly adjusted based on user needs and are not limited here.
[0048] In a specific example, the motherboard adaptation test signal includes a motherboard adaptation test sub-signal 1 and a motherboard adaptation test sub-signal 2; the test signal feedback value includes a test sub-signal feedback value 1 and a test sub-signal feedback value 2. That is, by sending the motherboard adaptation test sub-signal 1 to the server's motherboard, the test sub-signal feedback value 1 corresponding to the server's motherboard feedback can be received and recorded; by sending the motherboard adaptation test sub-signal 2 to the server's motherboard, the test sub-signal feedback value 2 corresponding to the server's motherboard feedback can be received and recorded. When the test sub-signal feedback value 1 is 1, it indicates that there is signal feedback; when the test sub-signal feedback value 1 is 0, it indicates that there is no signal feedback; when the test sub-signal feedback value 2 is 1, it indicates that there is signal feedback; when the test sub-signal feedback value 2 is 0, it indicates that there is no signal feedback. Only when the test sub-signal feedback value 1 and the test sub-signal feedback value 2 are both 1, can the adaptation result of the server's motherboard be determined to be successful; when the test sub-signal feedback value 1 or the test sub-signal feedback value 2 is 0, can the adaptation result of the server's motherboard be determined to be unsuccessful. The above are only specific examples, and in actual applications, they can be flexibly set according to user needs and are not limited here.
[0049] Step 403: In response to the adaptation result being successful, an identity acquisition instruction is sent to the link module of the BMC, a register value required by the identity acquisition instruction fed back by the BMC register is received, and a software interaction function test result between the BMC and the link module is determined based on the register value.
[0050] The software interaction function test result includes a pass or fail. When the BMC in the server 104 recognizes that the adaptation result is successful, it sends an identity acquisition instruction to the link module of the BMC, receives the register value required by the identity acquisition instruction fed back by the BMC register, and determines the software interaction function test result between the BMC and the link module based on the register value, thereby accurately determining whether the software interaction function conditions in the target environment are met.
[0051] In a specific example, the target environment of the server is verified to obtain a test environment verification result, which also includes: in response to the adaptation result being an adaptation failure, determining that the test environment verification result is the verification failure. The above is only a specific example. In actual application, it is flexibly set according to user needs and is not limited here.
[0052] In a specific example, the identity acquisition instruction includes an identity acquisition sub-instruction 1 and an identity acquisition sub-instruction 2; the register value includes a register value 1 and a register value 2; the identity acquisition sub-instruction 1 is sent to the link module (BMC APML module) of the BMC, and the register value 1 fed back by the register of the BMC is received and recorded; the identity acquisition sub-instruction 2 is sent to the link module (BMCAPML module) of the BMC, and the register value 2 fed back by the register of the BMC is received and recorded; when the register value 1 and the register value 2 are both 1, it indicates that the identification identifier of the link module (BMC APML module) of the BMC exists, indicating that the software interaction function test result is passed at this time, and the BMC supports the software interaction function; when the register value 1 or the register value 2 is both 0, it indicates that the identification identifier of the link module (BMCAPML module) of the BMC is missing, indicating that the software interaction function test result is failed at this time, and the BMC does not support the software interaction function; the above is only a specific example, and it is flexibly set according to user needs in actual applications and is not limited here.
[0053] Step 404 : In response to the software interaction function test result being a pass, the security encryption status of the server's CPU is checked through a hardware debugging tool.
[0054] Specifically, the security encryption status includes an encrypted state or a non-encrypted state; when the BMC in the server 104 identifies the software interaction function test result as passed, the security encryption status of the server's CPU can be checked through the hardware debugging tool to accurately determine whether the security encryption status conditions of the CPU in the target environment are met.
[0055] In a specific example, the target environment of the server is verified to obtain a test environment verification result, which also includes: in response to the software interaction function detection result being a detection failure, determining that the test environment verification result is the verification failure. The above is only a specific example. In actual application, it is flexibly set according to user needs and is not limited here.
[0056] In a specific example, the security encryption status of the CPU of the AMD platform hardware debugging tool is used. When the unlock value is 1, the security encryption status is the encryption state; when the unlock value is 0, the security encryption state is the non-encryption state. The above is only a specific example. In actual application, it can be flexibly set according to user needs and is not limited here.
[0057] Step 405 : In response to the security encryption state being the non-encrypted state, the operating system checks the interface state of the log reporting function management interface in the kernel symbol table.
[0058] Specifically, when the BMC in the server 104 identifies that the security encryption state is the non-encrypted state, it checks the interface state of the log reporting function management interface (ACPI_APEI_EINJ interface) in the kernel symbol table (kernel table) through the operating system to accurately determine whether the log reporting function conditions in the kernel symbol table in the target environment are met.
[0059] In a specific example, the target environment of the server is verified to obtain a test environment verification result, which also includes: in response to the security encryption state being an encrypted state, the security encryption state is updated to a non-encrypted state. The above is only a specific example. In actual application, it is flexibly set according to user needs and is not limited here.
[0060] In a specific example, the OS is accessed and the interface status of the ACPI_APEI_EINJ interface in the kernel table is checked and recorded. If the interface status is 0, it indicates that the interface is in a disabled state and does not have a log reporting function. If the interface status is 1, it indicates that the interface is in an enabled state and has a log reporting function. The above is only a specific example. In actual applications, the settings can be flexibly adjusted according to user needs and are not limited here.
[0061] Step 406: In response to the interface status being in the open state, determine that the test environment verification result is successful.
[0062] Specifically, in response to the interface status being in the open state, the BMC in the server 104 determines that the test environment verification result is successful, thereby improving the comprehensiveness and accuracy of the verification of the server's target environment and thus improving the test efficiency of the remote hardware debugging function.
[0063] In a specific example, the target environment of the server is verified to obtain a test environment verification result, which also includes: in response to the interface status being a closed state, determining that the test environment verification result is the verification failure. The above is only a specific example. In actual application, it is flexibly set according to user needs and is not limited here.
[0064] In this embodiment, the memory capacity and hard disk capacity of the server are obtained; then, in response to the memory capacity being greater than or equal to a memory capacity threshold and the hard disk capacity being greater than or equal to a hard disk capacity threshold, a mainboard adaptation test signal is sent to the mainboard of the server, a test signal feedback value fed back by the mainboard of the server is received, and an adaptation result of the mainboard of the server is determined based on the test signal feedback value; then, in response to the adaptation result being successful, an identity acquisition instruction is sent to the link module of the BMC, a register value required for the identity acquisition instruction fed back by the register of the BMC is received, and a software interaction function test result between the BMC and the link module is determined based on the register value; then, in response to the software interaction function test result being passed, the security encryption status of the CPU of the server is checked through a hardware debugging tool; and, in response to the security encryption status being a non-encrypted state, the interface status of the log reporting function management interface in the kernel symbol table is checked through the operating system; finally, in response to the interface status being in an open state, the test environment verification result is determined to be successful, thereby improving the comprehensiveness and accuracy of the verification of the target environment of the server, and thus improving the testing efficiency of the remote hardware debugging function.
[0065] In this embodiment, the target environment of the server is verified to obtain a test environment verification result; then, in response to the test environment verification result being a verification failure, a test environment verification failure prompt message is output, thereby improving the efficiency and accuracy of obtaining the test environment verification result.
[0066] In one embodiment, Figure 5 As shown, obtaining target device information includes steps 501 to 503.
[0067] Step 501: Control all external PCIE devices to be removed from the BMC, and execute a first device information output instruction in the operating system to obtain first device information according to the first device information output instruction.
[0068] Step 502: Control all external PCIE devices to connect to the BMC, and execute a second device information output instruction in the operating system to obtain second device information according to the second device information output instruction.
[0069] Step 503: Compare the first device information and the second device information to obtain target device information.
[0070] Specifically, the BMC in the server 104 controls all external PCIE devices to be removed from the BMC, and executes a first device information output instruction in the operating system to obtain first device information according to the first device information output instruction; then, controls all external PCIE devices to be connected to the BMC, and executes a second device information output instruction in the operating system to obtain second device information according to the second device information output instruction; then, a difference comparison is performed based on the first device information and the second device information to obtain the target device information, thereby improving the efficiency and convenience of obtaining the target device information.
[0071] In a specific example, the BMC outputs an external device removal instruction to control the removal of all external PCIE devices from the BMC, and executes a first device information output instruction in the operating system to receive the first device information and record it as data X. The BMC outputs an external device connection instruction to control the connection of all external PCIE devices to the BMC, and executes a second device information output instruction in the operating system to receive the second device information and record it as data Y. By comparing data X and data Y for differences, the target device information, i.e., the newly added PCIE device NBIO information, is obtained and recorded as data Z. Using the AMD hardware debugging tool with the CScripts preset script, data Z is input into the simulated error injection command template to generate a simulated error injection instruction. The above is only a specific example. In actual applications, it can be flexibly set according to user needs and is not limited here.
[0072] In this embodiment, all external PCIE devices are controlled to be removed from the BMC, and a first device information output instruction is executed in the operating system to obtain first device information according to the first device information output instruction; then, all external PCIE devices are controlled to be connected to the BMC, and a second device information output instruction is executed in the operating system to obtain second device information according to the second device information output instruction; then, a difference comparison is performed based on the first device information and the second device information to obtain target device information, thereby improving the efficiency and convenience of obtaining the target device information.
[0073] In one embodiment, Figure 6 As shown, determining the error injection result according to the printing information includes steps 601 and 602.
[0074] Step 601: perform information query on the current printing information according to the first target keyword to obtain an error result.
[0075] Step 602 : In response to the error injection result being an injection failure, return to the step of executing the simulated error injection instruction until the error injection result is an injection success.
[0076] The error-annotation result includes either a successful or failed error-annotation; the first target keyword is a keyword used to query the error-annotation result. Specifically, the BMC in server 104 queries the current print information based on the first target keyword to obtain the error-annotation result. Then, in response to the error-annotation result being a failed error-annotation, the BMC returns to the step of executing the simulated error-annotation instruction until the error-annotation result is a successful error-annotation, thereby improving the efficiency and convenience of obtaining the error-annotation result.
[0077] In a specific example, after executing the simulated error injection instruction, the BMC serial port keeps printing information, which is the current printing information. The current printing information is queried according to the first target keyword "error injection passed" or "error injection successful" to obtain the error injection result; in response to the error injection result being successful, the PCIE device error log can be obtained, that is, the PCIE uncorrectable error log. The above is only a specific example. In actual application, it is flexibly set according to user needs and is not limited here.
[0078] In this embodiment, an information query is performed on the current printing information based on the first target keyword to obtain an error-annotation result; then, in response to the error-annotation result being an error-annotation failure, the process returns to the step of executing the simulated error-annotation instruction until the error-annotation result is an error-annotation success, thereby improving the efficiency and convenience of obtaining the error-annotation result.
[0079] Step 202: In response to the error injection result being successful, obtaining a PCIE device error log, and determining a repair result according to the PCIE device error log.
[0080] Specifically, when the BMC in the server 104 identifies that the injection error result is successful, it obtains the PCIE device error log and determines the repair result according to the PCIE device error log.
[0081] In one embodiment, Figure 7 As shown, obtaining a PCIE device error log and determining a repair result according to the PCIE device error log include steps 701 to 703.
[0082] Step 701: Control the server to automatically restart.
[0083] Step 702: re-execute the simulated error injection instruction, update the current printing information, and receive the PCIE device error log reported by the operating system.
[0084] Step 703: perform information query on the PCIE device error log according to the second target keyword to obtain a repair result.
[0085] The repair result includes repair success or repair failure, and the second target keyword is a keyword used to query the repair result. Specifically, the BMC in server 104 controls the server to automatically restart; then, it re-executes the simulated error injection instruction, updates the current printing information, and receives the PCIE device error log reported by the operating system. Finally, the PCIE device error log is queried based on the second target keyword to obtain the repair result, thereby improving the accuracy and efficiency of obtaining the repair result.
[0086] In one specific example, after re-executing the simulated error injection command, the BMC serial port continues printing information, updating the current printed information, and receives the PCIE device error log reported by the operating system. Based on the second target keyword "repair passed" or "repair successful," the PCIE device error log is queried to obtain the repair result. If the repair result is successful, the repair log is also obtained. The above is only a specific example. In actual applications, flexible settings can be set based on user needs and are not limited here.
[0087] In this embodiment, the control server performs an automatic restart operation; then, the simulated error injection instruction is re-executed, the current printing information is updated, and the PCIE device error log reported by the operating system is received; finally, the PCIE device error log is queried according to the second target keyword to obtain the repair result, thereby improving the accuracy and efficiency of obtaining the repair result.
[0088] Step 203: In response to the repair result being a successful repair, it is determined that the BIOS supports the remote hardware debugging function.
[0089] Specifically, when the BMC in server 104 recognizes that the repair result is successful, it determines that the BIOS supports the remote hardware debugging function, avoiding the high cost caused by using AMD hardware debugging equipment, improving test efficiency, and also expanding the scope of test application, saving project costs.
[0090] In one embodiment, the method further comprises:
[0091] In response to the repair result being repair failure, it is determined that the BIOS does not support the remote hardware debugging function.
[0092] Specifically, when the BMC in the server 104 identifies that the repair result is a repair failure, it can determine that the BIOS does not support the remote hardware debugging function, thereby improving test efficiency, increasing the test application scope, and saving project costs.
[0093] In this embodiment, in response to the repair result being repair failure, it is determined that the BIOS does not support the remote hardware debugging function, thereby improving test efficiency, increasing the test application scope, and saving project costs.
[0094] Based on this, the above-mentioned testing method for the remote hardware debugging function, in response to the server's test environment verification result being successful verification, obtains the target device information, generates a simulated error injection instruction based on the target device information, executes the simulated error injection instruction, obtains the current printing information of the BMC, and determines the error injection result based on the current printing information; the target device information is the difference information between the first device information and the second device information; the first device information is the PCIE device information recorded when the BMC removes all external PCIE devices; the second device information is the PCIE device information recorded when the BMC connects all external PCIE devices; then, in response to the error injection result being successful, obtains the PCIE device error log, and determines the repair result based on the PCIE device error log; then, in response to the repair result being successful, determines that the BIOS supports the remote hardware debugging function, which can well solve the problem of verifying the PCIE error mechanism function in the case of a shortage of hardware debugging tools, improves test efficiency, increases the scope of test applicability, and saves project costs.
[0095] It should be understood that although Figure 2-7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 2-7 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0096] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0097] This application also provides a test device for remote hardware debugging function, such as Figure 8 As shown, the device is applied to the BMC of the server, and the device includes an injection error simulation module 810, a repair result determination module 820 and a function determination module 830.
[0098] Among them, the simulation error injection module 810 is used to respond to the server's test environment verification result as successful verification, obtain target device information, generate a simulation error injection instruction based on the target device information, execute the simulation error injection instruction, obtain the current printing information of the BMC, and determine the error injection result based on the current printing information; the target device information is the difference information between the first device information and the second device information; the first device information is the PCIE device information recorded when the BMC removes all external PCIE devices; the second device information is the PCIE device information recorded when the BMC connects all external PCIE devices; the repair result determination module 820 is used to respond to the error injection result as successful error injection, obtain the PCIE device error log, and determine the repair result based on the PCIE device error log; the function judgment module 830 is used to respond to the repair result as successful repair, and determine that the BIOS supports the remote hardware debugging function.
[0099] In one embodiment, the device further includes an environment verification module.
[0100] Among them, the environment verification module is used to verify the target environment of the server and obtain the test environment verification result; the target environment is the environment required for the server to support the remote hardware debugging function; the test environment verification result includes verification success or verification failure; the environment verification module is used to respond to the test environment verification result being verification failure, and output a test environment verification failure prompt message.
[0101] In one embodiment, the environment verification module includes an environment verification unit.
[0102] Among them, the environment verification unit is used to obtain the memory capacity and hard disk capacity of the server; the environment verification unit is used to send a motherboard adaptation test signal to the server's motherboard in response to the memory capacity being greater than or equal to the memory capacity threshold and the hard disk capacity being greater than or equal to the hard disk capacity threshold, receive the test signal feedback value fed back by the server's motherboard, and determine the adaptation result of the server's motherboard according to the test signal feedback value; the adaptation result includes adaptation success or adaptation failure; the environment verification unit is used to send an identity identification acquisition instruction to the link module of the BMC in response to the adaptation result being adaptation success, receive the register value required for the identity identification acquisition instruction fed back by the BMC's register, and determine the adaptation result according to the register value Determine the software interaction function test result between the BMC and the link module; the software interaction function test result includes a test pass or a test fail; the environment verification unit is used to view the security encryption status of the server's CPU through a hardware debugging tool in response to the software interaction function test result being a test pass; the security encryption status includes an encrypted state or a non-encrypted state; the environment verification unit is used to view the interface status of the log reporting function management interface in the kernel symbol table through the operating system in response to the security encryption status being a non-encrypted state; the interface status includes an open state or a closed state; the environment verification unit is used to determine that the test environment verification result is a successful verification in response to the interface status being an open state.
[0103] In one embodiment, the injection error simulation module 810 includes a target device information acquisition unit.
[0104] Among them, the target device information acquisition unit is used to control all external PCIE devices to be removed from the BMC, and execute the first device information output instruction in the operating system to obtain the first device information according to the first device information output instruction; the target device information acquisition unit is used to control all external PCIE devices to be connected to the BMC, and execute the second device information output instruction in the operating system to obtain the second device information according to the second device information output instruction; the target device information acquisition unit is used to compare the differences between the first device information and the second device information to obtain the target device information.
[0105] In one embodiment, the mis-injection simulation module 810 includes a mis-injection result determination unit.
[0106] Among them, the error annotation result determination unit is used to perform information query on the current printing information according to the first target keyword to obtain the error annotation result; the error annotation result includes successful error annotation or failed error annotation; the first target keyword is the keyword used to query the error annotation result; the error annotation result determination unit is used to respond to the error annotation result being failed error annotation, return to the step of executing the simulated error annotation instruction, until the error annotation result is successful error annotation.
[0107] In one embodiment, the repair result determination module 820 includes a repair result determination unit.
[0108] Among them, the repair result determination unit is used to control the server to perform an automatic restart operation; the repair result determination unit is used to re-execute the simulated error injection instruction, update the current printing information, and receive the PCIE device error log reported by the operating system; the repair result determination unit is used to query the PCIE device error log according to the second target keyword to obtain the repair result; the repair result includes repair success or repair failure; the second target keyword is the keyword used to query the repair result.
[0109] In one embodiment, the function determination module 830 is further configured to determine that the BIOS does not support the remote hardware debugging function in response to the repair result being a repair failure.
[0110] For the description of the features in the embodiment corresponding to the testing device for remote hardware debugging function, please refer to the relevant description of the embodiment corresponding to the testing method for remote hardware debugging function, which will not be repeated here.
[0111] The present application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of any method in the above method embodiments are implemented.
[0112] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of any one of the methods in the above method embodiments are implemented.
[0113] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0114] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned test method embodiments for remote hardware debugging function are implemented.
[0115] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in any of the above-mentioned test method embodiments for remote hardware debugging function.
[0116] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0117] The above is a detailed introduction to a test method for a remote hardware debugging function provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A method for testing a remote hardware debugging function, the method being applied to a server's BMC, the method comprising: In response to a test environment verification result of the server being successful, obtaining target device information, generating a simulated error injection instruction based on the target device information, executing the simulated error injection instruction, obtaining current printing information of the BMC, and determining an error injection result based on the current printing information; the target device information being difference information between the first device information and the second device information; The first device information is the PCIE device information recorded when the BMC removes all external PCIE devices; The second device information is the PCIE device information recorded when the BMC is connected to all the external PCIE devices; In response to the error injection result being a successful error injection, obtaining a PCIE device error log, and determining a repair result according to the PCIE device error log; In response to the repair result being a successful repair, it is determined that the BIOS supports the remote hardware debugging function.
2. The method according to claim 1, characterized in that The method further comprises: Verifying the target environment of the server to obtain the test environment verification result; the target environment is the environment required by the server to support the remote hardware debugging function; the test environment verification result includes verification success or verification failure; In response to the test environment verification result being the verification failure, outputting a test environment verification failure prompt message.
3. The method according to claim 2, characterized in that The verifying the target environment of the server to obtain the test environment verification result includes: Obtaining the memory capacity and hard disk capacity of the server; In response to the memory capacity being greater than or equal to a memory capacity threshold and the hard disk capacity being greater than or equal to a hard disk capacity threshold, sending a motherboard adaptation test signal to a motherboard of the server, receiving a test signal feedback value fed back by the motherboard of the server, and determining an adaptation result of the motherboard of the server according to the test signal feedback value; the adaptation result including adaptation success or adaptation failure; In response to the adaptation result being that the adaptation is successful, sending an identity identification acquisition instruction to the link module of the BMC, receiving a register value required by the identity identification acquisition instruction fed back by a register of the BMC, and determining a software interaction function test result between the BMC and the link module according to the register value; the software interaction function test result includes a test pass or a test fail; In response to the software interactive function test result being a pass, checking the security encryption state of the CPU of the server through a hardware debugging tool; the security encryption state includes an encrypted state or a non-encrypted state; In response to the security encryption state being the non-encrypted state, checking the interface state of the log reporting function management interface in the kernel symbol table through the operating system; the interface state includes an open state or a closed state; In response to the interface state being the open state, determining the test environment verification result as verification success.
4. The method according to claim 1, wherein The obtaining of target device information includes: Controlling all the external PCIE devices to be removed from the BMC, and executing a first device information output instruction in the operating system to obtain the first device information according to the first device information output instruction; controlling all the external PCIE devices to connect to the BMC, and executing a second device information output instruction in the operating system to obtain the second device information according to the second device information output instruction; The target device information is obtained by performing a difference comparison based on the first device information and the second device information.
5. The method according to claim 1, wherein The step of determining the error injection result according to the printed information includes: An information query is performed on the current printing information according to the first target keyword to obtain the error-annotation result; the error-annotation result includes the error-annotation success or the error-annotation failure; the first target keyword is a keyword used to query the error-annotation result; in response to the error-annotation result being the error-annotation failure, the process returns to the step of executing the simulated error-annotation instruction until the error-annotation result is the error-annotation success.
6. The method according to claim 1, wherein The obtaining of a PCIE device error log and determining a repair result according to the PCIE device error log includes: Controlling the server to automatically restart; Re-execute the simulated error injection instruction, update the current printing information, and receive the PCIE device error log reported by the operating system; An information query is performed on the PCIE device error log according to the second target keyword to obtain the repair result; the repair result includes the repair success or repair failure; the second target keyword is a keyword used to query the repair result.
7. The method according to claim 1, characterized in that The method further comprises: In response to the repair result being repair failure, it is determined that the BIOS does not support the remote hardware debugging function.
8. A device for testing a remote hardware debugging function, the device being applied to a server's BMC, the device comprising: a simulation error injection module, configured to, in response to a test environment verification result of the server being successful, obtain target device information, generate a simulation error injection instruction based on the target device information, execute the simulation error injection instruction, obtain current printing information of the BMC, and determine an error injection result based on the current printing information; the target device information being difference information between the first device information and the second device information; The first device information is the PCIE device information recorded when the BMC removes all external PCIE devices; The second device information is the PCIE device information recorded when the BMC is connected to all the external PCIE devices; a repair result determination module, configured to, in response to the error injection result being a successful error injection, obtain a PCIE device error log, and determine a repair result according to the PCIE device error log; The function determination module is configured to determine, in response to the repair result being a successful repair, whether the BIOS supports the remote hardware debugging function.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Method for verifying autonomous debugging data collection function and electronic equipment
CN120704938A