A testing method, system and device
By conducting hot-plug testing and abnormality judgment on multiple GPUs in the server, the problem of independent hot-plug control is solved, the stability and reliability of the server are improved, and the normal operation of the GPU is ensured.
Patent Information
- Application Number
- CN202210611213.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-05-31
AI Technical Summary
In servers, independent hot-plug control of multiple GPUs is difficult to achieve, which affects the stable operation of the server. There is also a lack of effective testing methods to ensure that the hot-plug function of each GPU is normal.
Provide a testing method and system that performs hot-swap testing on multiple GPUs to determine their abnormal conditions during the test process and output test exception information to locate and control the hot-swapping operation of the GPU and improve hot-swapping. Control reliability.
It realizes the testing and abnormal location of each GPU hot-swappable function in the server, improves the reliability and safety of the server during operation, and ensures the normal operation of GPU hot-swappable operations.
Smart Images

Figure CN114880178B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server testing, and in particular to a testing method, system and device. Background Art
[0002] A server is usually equipped with multiple GPUs (Graphics Processing Units) to meet the needs of the server. When a GPU fails or needs to be upgraded, the entire server needs to be powered off when the server is not busy to process the GPU that fails or needs to be upgraded, which affects the normal operation of the remaining GPUs. Therefore, it is necessary to provide a control method to achieve independent hot-swap control of each GPU. However, in this process, whether each GPU can reliably complete the independent hot-swap process plays a vital role in the stable operation of the server. Therefore, it is necessary to provide a test method to test whether the independent hot-swap function of each GPU is normal. Summary of the invention
[0003] The purpose of the present application is to provide a testing method, system and device, which can not only test the hot-swap function of each GPU in a server and obtain test results, but also locate the abnormal GPU, so as to control the GPU to perform hot-swap operations according to the status of each GPU, thereby improving the reliability of hot-swap control of the GPU, and further improving the reliability of the server during operation.
[0004] To solve the above technical problems, the present application provides a testing method, which is applied to a server including multiple GPUs. The testing method includes:
[0005] Performing hot-swap tests on the multiple GPUs respectively;
[0006] Determine whether each GPU has an abnormality during the hot-swap test;
[0007] If so, it is determined that the hot-swap function of the GPU where the abnormality occurred is abnormal, and the test abnormality information is output.
[0008] Preferably, performing hot-plug tests on the multiple GPUs respectively and determining whether an abnormality occurs in each GPU during the hot-plug test includes:
[0009] Control the current GPU to perform hot unplug operation;
[0010] After the hot unplug operation, obtaining a first working state of the current GPU, where the first working state is a current state of the current GPU after the hot unplug operation is performed;
[0011] Determining whether the first working state is normal;
[0012] If the first working state is normal, determining that the hot-plug function of the current GPU is normal, and controlling the current GPU to perform a hot-plug operation;
[0013] After the hot-plug operation, obtaining a second working state of the current GPU, where the second working state is a current state of the current GPU after the hot-plug operation is performed;
[0014] Determining whether the second working state is normal;
[0015] If the second working state is normal, determining that the hot plug function of the current GPU is normal, and entering the step of controlling the next GPU to perform a hot unplug operation;
[0016] If the second working state is abnormal, it is determined that the hot plug function of the current GPU is abnormal, the test abnormality information is output, and the step of controlling the next GPU to perform a hot unplug operation is entered.
[0017] If the first working state is abnormal, it is determined that the hot-plug function of the current GPU is abnormal, the test abnormality information is output, and the step of controlling the next GPU to perform a hot-plug operation is entered.
[0018] Preferably, before controlling the current GPU to perform the hot unplug operation, the method further includes:
[0019] Acquire a third working state of the current GPU, where the third working state is a current state of the GPU before performing a hot unplug operation;
[0020] Determining whether the third working state is normal;
[0021] If yes, then enter the step of controlling the current GPU to perform a hot unplug operation;
[0022] If not, the process proceeds to the step of outputting the test exception information.
[0023] Preferably, the third working state includes the pressure state of the current GPU and the state of the corresponding log.
[0024] Preferably, before controlling the current GPU to perform the hot unplug operation, the method further includes:
[0025] When the pressure state of the current GPU is normal, the current GPU is controlled to perform a pressure relief operation, and after the pressure relief is completed, the step of controlling the current GPU to perform a hot removal operation is entered.
[0026] Preferably, after the hot unplug operation, obtaining the first working state of the current GPU includes:
[0027] After a preset time period of the hot unplug operation, obtaining a first working state of the current GPU;
[0028] After the hot-plug operation, obtaining a second working state of the current GPU includes:
[0029] After a preset time period of the hot-plug operation, a second working state of the current GPU is obtained.
[0030] Preferably, when the first working state and the third working state both include the state of the log corresponding to the current GPU;
[0031] Determining whether the first working state is normal includes:
[0032] Determining whether the log corresponding to the first working state contains a preset keyword;
[0033] If the log corresponding to the first working state contains the preset keyword, determining that the first working state is abnormal;
[0034] If the log corresponding to the first working state does not contain the preset keyword, it is determined that the third working state is normal;
[0035] Determining whether the second working state is normal includes:
[0036] Determining whether the log corresponding to the second working state contains a preset keyword;
[0037] If the log corresponding to the second working state contains the preset keyword, determining that the second working state is abnormal;
[0038] If the log corresponding to the second working state does not contain the preset keyword, it is determined that the third working state is normal;
[0039] Determining whether the third working state is normal includes:
[0040] Determining whether the log corresponding to the third working state contains the preset keyword;
[0041] If the log corresponding to the third working state contains the preset keyword, then determining that the third working state is abnormal;
[0042] If the log corresponding to the third working state does not contain the preset keyword, it is determined that the third working state is normal.
[0043] Preferably, the step of performing hot-plug testing on the plurality of GPUs is repeated multiple times.
[0044] In order to solve the above technical problems, the present application also provides a test system, which is applied to a server including multiple GPUs, and the test system includes:
[0045] A testing unit, used for performing hot-plug testing on the plurality of GPUs respectively;
[0046] A judging unit, used to judge whether an abnormality occurs in each GPU during the hot-swap test;
[0047] The determination unit is used to determine that the hot-plug function of the GPU where the abnormality occurs is abnormal when an abnormality occurs during the hot-plug test, and output test abnormality information.
[0048] In order to solve the above technical problems, the present application also provides a testing device, comprising:
[0049] Memory for storing computer programs;
[0050] The processor is used to implement the steps of the above-mentioned testing method when storing the computer program.
[0051] The present application provides a testing method, which is applied to the server field. In this scheme, hot-plug tests are performed on the multiple GPUs respectively to determine whether each GPU is abnormal during the hot-plug test. If abnormal, the hot-plug function of the GPU is determined to be abnormal, and the test abnormality information is output. Otherwise, the hot-plug function of the GPU is determined to be normal. It can be seen that through the method in this application, not only can the hot-plug function of each GPU in the server be tested to obtain the test results, but also the abnormal GPU can be located, so as to control the GPU to perform hot-plug operations according to the status of each GPU in the subsequent control, thereby improving the reliability of hot-plug control of the GPU, and thus improving the reliability of the server during operation.
[0052] The present application also provides a testing system and device, which have the same beneficial effects as the testing method described above. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] 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 paying any creative work.
[0054] Figure 1 A flow chart of a test method provided in this application;
[0055] Figure 2 A structural block diagram of a test system provided for this application;
[0056] Figure 3 This is a structural block diagram of a test device provided in this application. DETAILED DESCRIPTION
[0057] The core of the present application is to provide a testing method, system and device, which can not only test the hot-swap function of each GPU in the server and obtain test results, but also locate the abnormal GPU, so as to control the GPU to perform hot-swap operations according to the status of each GPU in the future, thereby improving the reliability of hot-swap control of the GPU, and thus improving the reliability of the server during operation.
[0058] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0059] Please refer to Figure 1 , Figure 1 A flow chart of a test method provided in this application, which is applied to a server including multiple GPUs, and the test method includes:
[0060] S11: Hot-swap tests are performed on multiple GPUs respectively;
[0061] Specifically, when independent hot-swap control of each GPU is required, whether each GPU can reliably complete the hot-swap operation is the key to achieving independent hot-swap control of each GPU. Therefore, a test method is provided in the present application to test whether the hot-swap function of the GPU is normal.
[0062] First, in this application, hot-plug tests are first performed on multiple GPUs respectively, so as to obtain the hot-plug test results of each GPU subsequently, and then determine whether the hot-plug function of each GPU is normal.
[0063] It should be noted that, in a preferred embodiment, the specific implementation method of hot-plugging multiple GPUs is to perform hot-plugging tests on each GPU in turn according to a preset order until all GPUs are tested. Assuming that each GPU has a corresponding number, the preset order can be a number order (which can be a descending order or a descending order). Of course, the preset order can also be other orders, which is not limited in this application.
[0064] S12: Determine whether each GPU has an abnormality during the hot-swap test;
[0065] Specifically, after performing hot-plug tests on each GPU as described above, it is necessary to detect the test status (specifically, the GPU status) during the hot-plug test of each GPU to determine whether an abnormality occurs during the hot-plug test of the current GPU, so as to obtain corresponding test results.
[0066] The specific implementation method of determining whether an abnormality occurs during the hot-plug test process may not be limited to obtaining the working status of the GPU during the test process.
[0067] S13: If yes, it is determined that the hot-swap function of the abnormal GPU is abnormal, and the test abnormality information is output.
[0068] Specifically, for the GPU that has an abnormality during the hot-swap test, it is determined that the hot-swap function is abnormal, and the test abnormality information is output at the same time, so that the staff can understand the abnormality of the hot-swap function of this GPU and facilitate subsequent processing. Similarly, if no abnormality occurs during the hot-swap test, it is determined that the hot-swap function of the GPU is normal.
[0069] Furthermore, before hot-plugging each GPU in the server, the following steps are also performed:
[0070] Get the number of GPUs in the server;
[0071] Read the server's VBIOS (Vidio Basic Input Output System, motherboard basic input and output system) version to determine whether the VBIOS version is normal;
[0072] Get the GPU driver version to determine whether the GPU can be driven normally.
[0073] If the above VBIOS version is abnormal or the GPU cannot be driven normally, the function of hot-plugging each GPU will not be entered. Only when the GPU meets the preset conditions (such as the VBIOS version is normal and the GPU can be driven normally), the step of hot-plugging each GPU will be entered. It can be seen that through the above method, the reliability of the hot-plugging test of the GPU can be further improved.
[0074] In summary, the testing method in the present application can not only test the hot-swap function of each GPU in the server and obtain test results, but also locate the abnormal GPU, so as to control the GPU to perform hot-swap operations according to the status of each GPU in the future, thereby improving the reliability of hot-swap control of the GPU, and thus improving the reliability of the server during operation.
[0075] Based on the above embodiments:
[0076] As a preferred embodiment, hot-plug tests are performed on multiple GPUs respectively to determine whether an abnormality occurs in each GPU during the hot-plug test, including:
[0077] Control the current GPU to perform hot unplug operation;
[0078] After the hot unplug operation, obtaining a first working state of the current GPU, where the first working state is a current state of the current GPU after the hot unplug operation is performed;
[0079] Determining whether the first working state is normal;
[0080] If the first working state is normal, determining that the hot-plug function of the current GPU is normal, and controlling the current GPU to perform a hot-plug operation;
[0081] After the hot-plug operation, obtaining a second working state of the current GPU, where the second working state is a current state of the current GPU after the hot-plug operation is performed;
[0082] Determining whether the second working state is normal;
[0083] If the second working state is normal, it is determined that the hot plug function of the current GPU is normal, and the step of controlling the next GPU to perform a hot unplug operation is entered;
[0084] If the second working state is abnormal, it is determined that the hot plug function of the current GPU is abnormal, the test abnormality information is output, and the step of controlling the next GPU to perform the hot unplug operation is entered.
[0085] If the first working state is abnormal, it is determined that the hot-plugging function of the current GPU is abnormal, the test abnormality information is output, and the step of controlling the next GPU to perform the hot-plugging operation is entered.
[0086] Furthermore, this embodiment is intended to be a specific implementation method for hot-plugging a GPU, firstly selecting a GPU as the current GPU, and then performing a hot-plugging action on the current GPU, which is specifically controlling the current GPU to power off. Then, the first working state of the current GPU is obtained to determine whether the process of the current GPU performing the hot-plugging operation is normal. If the first working state is normal, then the above hot-plugging operation process is determined to be normal. At this time, the current GPU will be controlled to perform a hot-plugging operation to power on the current GPU again. At this time, the second working state of the current GPU is obtained to determine whether the hot-plugging function of the current GPU is normal in turn. If so, the test ends, and the hot-plugging function of the current GPU is determined to be normal, and the step of controlling the next GPU to perform the hot-plugging operation is entered (that is, the process of hot-plugging the next GPU), and the above operation is repeated until the hot-plugging test of all GPUs is completed.
[0087] Similarly, if the first working state is abnormal, the above-mentioned hot plug operation process is determined to be abnormal, that is, the hot plug function of the current GPU is determined to be abnormal. At this time, the test abnormality information will be directly output so that the staff knows the abnormal situation of the hot plug function of the current GPU. At this time, the current GPU will not be controlled to perform the hot plug operation, that is, the current GPU will not be controlled to power on again, which improves the safety and reliability of the server during use. Similarly, if the second working state is abnormal, the above-mentioned hot plug operation process is determined to be abnormal, that is, the hot plug function of the current GPU is determined to be abnormal. At this time, the test abnormality information will be directly output so that the staff knows the abnormal situation of the hot plug function of the current GPU. In addition, after outputting the test abnormality information, the next GPU is controlled to perform the hot plug operation (that is, the process of hot plug testing the next GPU is entered), and the above operation is repeated until the hot plug test of all GPUs is completed.
[0088] Among them, the test abnormality information output when determining that the hot removal function is abnormal and the test abnormality information output when determining that the hot insertion function is abnormal can be the same or different, so that the staff can distinguish them, and this application is not limited here.
[0089] As a preferred embodiment, when the first working state and the second working state include the state of the log corresponding to the current GPU;
[0090] Determining whether the first working state is normal includes:
[0091] Determine whether the log corresponding to the first working state contains a preset keyword;
[0092] If the log corresponding to the first working state contains a preset keyword, the first working state is determined to be abnormal;
[0093] If the log corresponding to the first working state does not contain the preset keyword, it is determined that the third working state is normal;
[0094] Determining whether the second working state is normal includes:
[0095] Determine whether the log corresponding to the second working state contains a preset keyword;
[0096] If the log corresponding to the second working state contains a preset keyword, the second working state is determined to be abnormal;
[0097] If the log corresponding to the second working state does not contain the preset keyword, it is determined that the third working state is normal;
[0098] For example, it is determined whether the log contains preset keywords such as error and warning. If so, it is determined that the first working state is abnormal; otherwise, it is determined that the first working state is normal.
[0099] Among them, the specific implementation method of controlling the current GPU to perform a hot unplug operation may be, but is not limited to, controlling the current GPU to perform a hot unplug operation by sending an instruction. Among them, the specific implementation form of the instruction is "ipmitool-b 0–t0x36 raw 0x38 0x3d 0x00 0x00 (GPU number on the GPU board, starting from 0)". Similarly, the specific implementation method of controlling the current GPU to perform a hot unplug operation may be, but is not limited to, controlling the current GPU to perform a hot plug operation by sending an instruction. Among them, the specific implementation form of the instruction is "ipmitool-b 0–t 0x36 raw 0x38 0x3d 0x010x00 (GPU number on the GPU board, starting from 0)".
[0100] Furthermore, the hot-insertion and hot-removal operations of the GPU may be controlled by, but not limited to, a CPLD (Complex Programmable Logic Device) and a Switch control in the server. Among them, multiple GPUs in the server are connected through Switch, and the status of GPU is monitored by BMC, while CPLD and Switch control GPU hot plug. The specific working method is as follows: (1) The BMC on the GPU Switch board is connected to the board-side CPLD through i2c, and sends the attention button signal (which can be understood as the signal for the start of hot plug test) of the corresponding GPU to the CPLD chip through i2c; (2) The CPLD chip on the GPU Switch board is connected to each Switch chip on the board through HP i2c, and sends the received attention button signal to the Switch chip of the GPU through HPi2c; (3) After receiving the attention button from CPLD, Switch starts to test the hot plug function of each GPU to determine whether power enable is turned on or off (whether power on is enabled, that is, whether the GPU is about to be controlled to be powered on (hot plugged in) or powered off (hot unplugged)), and sends a signal to notify CPLD through HP i2c; (4) CPLD controls the power on or off of GPU according to the signal received from Switch, thereby realizing the hot plug operation of GPU.
[0101] As a preferred embodiment, before controlling the current GPU to perform the hot unplug operation, the method further includes:
[0102] Obtaining a third working state of the current GPU, where the third working state is the current state of the GPU before performing a hot unplug operation;
[0103] Determining whether the third working state is normal;
[0104] If yes, then enter the step of controlling the current GPU to perform a hot unplug operation;
[0105] If not, proceed to the step of outputting test exception information.
[0106] Furthermore, in order to reduce unnecessary testing steps, this embodiment obtains the third working state of the current GPU before controlling the current GPU to perform a hot unplug operation. When the third working state is normal, the current GPU is determined to be normal, and then a hot plug test is performed on the current GPU. That is, the step of controlling the current GPU to perform a hot unplug operation is entered. Otherwise, the test exception information is directly output.
[0107] The method of the present application can avoid the step of performing a hot-plug test on a GPU with an abnormal third working state, thereby reducing the occupancy of the processor to a certain extent.
[0108] As a preferred embodiment, the third working state includes the current GPU pressure state and the corresponding log state.
[0109] Furthermore, when the third working state includes the pressure state and the corresponding log state, the pressure state of the current GPU and the corresponding log state are first obtained. Only when the pressure is normal and the log state is normal, will the current GPU be controlled to perform a hot unplug operation. Otherwise, the test exception information is directly output.
[0110] As a preferred embodiment, determining whether the third working state is normal includes:
[0111] Determine whether the log corresponding to the third working state contains a preset keyword;
[0112] If the log corresponding to the third working state contains a preset keyword, the third working state is determined to be abnormal;
[0113] If the log corresponding to the third working state does not contain the preset keyword, it is determined that the third working state is normal.
[0114] Among them, the method of judging whether the state of the log is abnormal may be but is not limited to judging whether the log contains preset keywords (for example, error, warning, etc.). If so, the third working state is judged to be abnormal; otherwise, the third working state is judged to be normal.
[0115] As a preferred embodiment, before controlling the current GPU to perform the hot unplug operation, the method further includes:
[0116] When the pressure state of the current GPU is normal, the current GPU is controlled to perform a pressure relief operation, and after the pressure relief is completed, the step of controlling the current GPU to perform a hot removal operation is entered.
[0117] Furthermore, before performing the hot unplug operation, first, if the pressure state of the current GPU is normal, the pressure relief of the current GPU is started, and after the pressure relief is completed, the hot unplug operation is performed on the current GPU.
[0118] Furthermore, before decompressing the current GPU, it may also include: judging whether the working status of the current GPU is normal, for example, whether the status of the system-side log and the monitoring logs such as the BMC are normal. When they are all normal, the decompression step is entered to ensure the reliability of decompression.
[0119] As a preferred embodiment, after the hot unplug operation, obtaining the first working state of the current GPU includes:
[0120] After a preset time period of the hot unplug operation, obtaining a first working state of the current GPU;
[0121] After the hot-plug operation, the second working state of the current GPU is obtained, including:
[0122] After a preset time period of the hot-plug operation, a second working state of the current GPU is obtained.
[0123] When the first working state and the second working state include the state of the log, considering that the generation of the log requires a certain amount of time, therefore, in the present application, after the hot unplug operation or hot plug operation of the current GPU, after a preset time period, the step of going to the first working state or the second working state of the current GPU is executed.
[0124] The preset time period may be, but is not limited to, 15 seconds. The first working state and the second working state obtained may be, but are not limited to, states including logs.
[0125] As a preferred embodiment, the step of performing hot-plug testing on multiple GPUs is repeated multiple times.
[0126] Considering that when testing a GPU, if only measuring once there may be certain errors and inaccurate test results, therefore, the test process for all GPUs in this application needs to be repeated multiple times to improve the accuracy of the test.
[0127] The number of repetitions may be, but is not limited to, 1000 times, or may be other implementations, not limited to the above examples, and is not limited in this embodiment.
[0128] Please refer to Figure 2 , Figure 2 This is a structural block diagram of a test system provided in the present application. The system is applied to a server including multiple GPUs. The test system includes:
[0129] A testing unit 21 is used to perform hot-plug testing on multiple GPUs respectively;
[0130] A determination unit 22, used to determine whether an abnormality occurs in each GPU during the hot-swap test;
[0131] The determination unit 23 is used to determine that the hot-plug function of the GPU where the abnormality occurs is abnormal, and output test abnormality information when an abnormality occurs during the hot-plug test.
[0132] As a preferred embodiment, the test unit is specifically used to control the current GPU to perform a hot unplug operation;
[0133] The judgment unit includes:
[0134] A first acquisition unit, used to acquire a first working state of the current GPU after the hot unplug operation, where the first working state is the current state of the current GPU after the hot unplug operation is performed;
[0135] A first judging unit, used to judge whether the first working state is normal;
[0136] The determination unit includes a first determination unit, which is used to determine that the hot-plug function of the current GPU is normal when the first working state is normal, and control the current GPU to perform a hot-plug operation; when the first working state is abnormal, determine that the hot-plug function of the current GPU is abnormal, output test abnormality information, and enter the step of controlling the next GPU to perform a hot-plug operation;
[0137] It also includes a second acquisition unit, which is used to acquire a second working state of the current GPU after the hot plug operation, where the second working state is the current state of the current GPU after the hot plug is performed;
[0138] Also includes a second judging unit, for judging whether the second working state is normal;
[0139] The determination unit includes a second determination unit, which is used to determine that the hot plug function of the current GPU is normal when the second working state is normal, and enter the step of controlling the next GPU to perform a hot unplug operation; when the second working state is abnormal, determine that the hot plug function of the current GPU is abnormal, output test abnormality information, and enter the step of controlling the next GPU to perform a hot unplug operation.
[0140] As a preferred embodiment, it also includes:
[0141] A third acquisition unit, used to acquire a third working state of the current GPU, where the third working state is the current state of the GPU before performing a hot unplug operation;
[0142] A third judging unit, used for judging whether the third working state is normal;
[0143] The determination unit includes a third determination unit, which is used to enter the step of controlling the current GPU to perform a hot unplug operation when the third working state is normal; and enter the step of outputting test abnormality information when the third working state is abnormal.
[0144] As a preferred embodiment, the third working state includes the current GPU pressure state and the corresponding log state.
[0145] As a preferred embodiment, it also includes:
[0146] The pressure relief unit is used to control the current GPU to perform a pressure relief operation when the pressure state of the current GPU is normal, and enter the step of controlling the current GPU to perform a hot unplug operation after the pressure relief is completed.
[0147] As a preferred embodiment, the first acquisition unit is specifically used to acquire the first working state of the current GPU after a preset time period of the hot unplug operation;
[0148] The second acquisition unit is specifically configured to acquire the second working state of the current GPU after a preset time period of the hot plug operation.
[0149] As a preferred embodiment, the first judgment unit is specifically used to judge whether the log corresponding to the first working state contains a preset keyword;
[0150] A first state determination unit is used to determine that the first working state is abnormal if the log corresponding to the first working state contains a preset keyword; and to determine that the third working state is normal if the log corresponding to the first working state does not contain the preset keyword;
[0151] The second judgment unit is specifically used to judge whether the log corresponding to the second working state contains a preset keyword;
[0152] A second state determination unit is used to determine that the second working state is abnormal when the log corresponding to the second working state contains a preset keyword; and to determine that the third working state is normal when the log corresponding to the second working state does not contain the preset keyword;
[0153] The third judgment unit is specifically used to judge whether the log corresponding to the third working state contains a preset keyword;
[0154] The third state determination unit is used to determine that the third working state is abnormal if the log corresponding to the third working state contains a preset keyword; and to determine that the third working state is normal if the log corresponding to the third working state does not contain the preset keyword.
[0155] For an introduction to the test system, please refer to the above embodiments, which will not be described in detail in this application.
[0156] Please refer to Figure 3 , Figure 3 A structural block diagram of a test device provided in this application, the device comprising:
[0157] A memory 31, used for storing computer programs;
[0158] The processor 32 is used to implement the steps of the above-mentioned testing method when storing the computer program.
[0159] For an introduction to the test system, please refer to the above embodiments, which will not be described in detail in this application.
[0160] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0161] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A testing method, characterized in that: Applied to a server including multiple GPUs, the testing method includes: Performing hot-swap tests on the multiple GPUs respectively; Determine whether each GPU has an abnormality during the hot-swap test; If yes, it is determined that the hot-swap function of the GPU where the abnormality occurred is abnormal, and the test abnormality information is output; Performing hot-swap tests on the multiple GPUs respectively to determine whether an abnormality occurs in each GPU during the hot-swap test, including: Control the current GPU to perform hot unplug operation; After the hot unplug operation, obtaining a first working state of the current GPU, where the first working state is a current state of the current GPU after the hot unplug operation is performed; Determining whether the first working state is normal; If the first working state is normal, determining that the hot-plug function of the current GPU is normal, and controlling the current GPU to perform a hot-plug operation; After the hot-plug operation, obtaining a second working state of the current GPU, where the second working state is a current state of the current GPU after the hot-plug operation is performed; Determining whether the second working state is normal; If the second working state is normal, determining that the hot plug function of the current GPU is normal, and entering the step of controlling the next GPU to perform a hot unplug operation; If the second working state is abnormal, determining that the hot plug function of the current GPU is abnormal, outputting the test abnormality information, and entering the step of controlling the next GPU to perform a hot unplug operation; If the first working state is abnormal, determining that the hot-plug function of the current GPU is abnormal, outputting the test abnormality information, and entering the step of controlling the next GPU to perform a hot-plug operation; Before controlling the current GPU to perform a hot-plug operation, it also includes: Acquire a third working state of the current GPU, where the third working state is a current state of the GPU before performing a hot unplug operation; Determining whether the third working state is normal; If yes, then enter the step of controlling the current GPU to perform a hot unplug operation; If not, then enter the step of outputting the test abnormality information; When the first working state, the second working state and the third working state all include the state of the log corresponding to the current GPU; Determining whether the first working state is normal includes: Determining whether the log corresponding to the first working state contains a preset keyword; If the log corresponding to the first working state contains the preset keyword, determining that the first working state is abnormal; If the log corresponding to the first working state does not contain the preset keyword, it is determined that the third working state is normal; Determining whether the second working state is normal includes: Determining whether the log corresponding to the second working state contains a preset keyword; If the log corresponding to the second working state contains the preset keyword, determining that the second working state is abnormal; If the log corresponding to the second working state does not contain the preset keyword, it is determined that the third working state is normal; Determining whether the third working state is normal includes: Determining whether the log corresponding to the third working state contains the preset keyword; If the log corresponding to the third working state contains the preset keyword, then determining that the third working state is abnormal; If the log corresponding to the third working state does not contain the preset keyword, it is determined that the third working state is normal.
2. The testing method according to claim 1, characterized in that: The third working state includes the pressure state of the current GPU and the state of the corresponding log.
3. The testing method according to claim 2, characterized in that: Before controlling the current GPU to perform a hot-plug operation, it also includes: When the pressure state of the current GPU is normal, the current GPU is controlled to perform a pressure relief operation, and after the pressure relief is completed, the step of controlling the current GPU to perform a hot removal operation is entered.
4. The testing method according to claim 1, characterized in that: After the hot unplug operation, obtaining a first working state of the current GPU includes: After a preset time period of the hot unplug operation, obtaining a first working state of the current GPU; After the hot-plug operation, obtaining a second working state of the current GPU includes: After a preset time period of the hot-plug operation, a second working state of the current GPU is obtained.
5. The testing method according to any one of claims 1 to 4, characterized in that: The step of performing hot-plug testing on the plurality of GPUs is repeated multiple times.
6. A testing system, characterized in that: Applied to a server including multiple GPUs, the test system includes: A testing unit, used for performing hot-plug testing on the plurality of GPUs respectively; A judging unit, used to judge whether an abnormality occurs in each GPU during the hot-swap test; A determination unit, configured to determine that the hot-swap function of the GPU having the abnormality is abnormal when an abnormality occurs during the hot-swap test, and output test abnormality information; The test unit is specifically used to control the current GPU to perform a hot unplug operation; The judgment unit includes: A first acquisition unit, configured to acquire a first working state of the current GPU after the hot unplug operation, where the first working state is a current state of the current GPU after the hot unplug operation is performed; A first judging unit, used to judge whether the first working state is normal; The determination unit includes a first determination unit, which is used to determine that the hot-plug function of the current GPU is normal when the first working state is normal, and control the current GPU to perform a hot-plug operation; when the first working state is abnormal, determine that the hot-plug function of the current GPU is abnormal, output the test abnormality information, and enter the step of controlling the next GPU to perform a hot-plug operation; It also includes a second acquisition unit, which is used to acquire a second working state of the current GPU after the hot plug operation, where the second working state is the current state of the current GPU after the hot plug is performed; Also includes a second judging unit, for judging whether the second working state is normal; The determination unit includes a second determination unit, which is used to determine that the hot plug function of the current GPU is normal when the second working state is normal, and enter the step of controlling the next GPU to perform a hot unplug operation; when the second working state is abnormal, determine that the hot plug function of the current GPU is abnormal, output the test abnormality information, and enter the step of controlling the next GPU to perform a hot unplug operation; Also includes: A third acquisition unit, used for controlling the current GPU to acquire a third working state of the current GPU before the GPU performs a hot unplug operation, wherein the third working state is a current state of the GPU before the GPU performs the hot unplug operation; A third judging unit, used to judge whether the third working state is normal; The determination unit includes a third determination unit, which is used to enter the step of controlling the current GPU to perform a hot unplug operation when the third working state is normal; and enter the step of outputting the test abnormality information when the third working state is abnormal; When the first working state, the second working state and the third working state all include the state of the log corresponding to the current GPU; The first judging unit is specifically used to judge whether the log corresponding to the first working state contains a preset keyword; A first state determination unit, configured to determine that the first working state is abnormal if the log corresponding to the first working state contains the preset keyword; and determine that the third working state is normal if the log corresponding to the first working state does not contain the preset keyword; The second judging unit is specifically used to judge whether the log corresponding to the second working state contains a preset keyword; A second state determination unit, configured to determine that the second working state is abnormal if the log corresponding to the second working state contains the preset keyword; and determine that the third working state is normal if the log corresponding to the second working state does not contain the preset keyword; The third judgment unit is specifically used to judge whether the log corresponding to the third working state contains the preset keyword; The third state determination unit is used to determine that the third working state is abnormal if the log corresponding to the third working state contains the preset keyword; and to determine that the third working state is normal if the log corresponding to the third working state does not contain the preset keyword.
7. A testing device, characterized in that: include: Memory for storing computer programs; A processor, used to implement the steps of the testing method as claimed in any one of claims 1 to 5 when storing a computer program.
Citation Information
Patent Citations
Hot-swap function testingmethod, device and related equipment
CN109308236A
Hot plug test method, device and equipment
CN112015609A
