Method, device, electronic device and storage medium for testing a processor
By storing test scripts and use cases on the processor test platform and using the hardware connection of the power switch module to the startup platform, automated testing independent of the network environment is realized, testing instability problems caused by network dependencies is solved, and the test accuracy is ensured. Sexual and persistent.
Patent Information
- Application Number
- CN202410874033.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-07-02
AI Technical Summary
Existing processor testing technology relies on network connections, and the accuracy and sustainability of the test cannot be guaranteed when the network is unstable or maintained.
By storing CBD test scripts and VAL test cases on the test platform, and using the hardware connection of the switch module to start the test platform, it realizes automated testing and is independent of the network environment.
Ensures the accuracy and sustainability of processor testing, improves testing efficiency, and can continue testing when the network is unstable or maintained.
Smart Images

Figure CN118409920B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of processor testing technology, and in particular to a method, device, electronic device and storage medium for testing a processor. Background Art
[0002] With the popularization of dynamic voltage and frequency adjustment (DVFS) for processor low-power design, it is necessary to analyze the relationship between voltage and frequency of a large number of processors for modeling.
[0003] The related technology proposes to realize the automated testing of the processor by controlling the test platform of the tested processor through the server. During the test process, the server needs to repeatedly ping the current test platform, or the test platform needs to feedback to the server through the network to determine whether the test platform is down; and the server needs to control the test platform to run the test case by sending network commands. It can be seen that the implementation of the related technical solution is completely dependent on the network conditions between the test platform and the server. If the network is unstable or the network is under maintenance, this solution that relies on the network for testing cannot guarantee the accuracy and continuity of the test. Summary of the invention
[0004] In view of this, the present application provides a method, apparatus, electronic device and storage medium for testing a processor, which can realize automated testing of the processor without being affected by the network, thereby ensuring the accuracy and continuity of testing the processor.
[0005] To solve the above technical problems, the technical solution of this application is implemented as follows:
[0006] In one embodiment, a method for testing a processor is provided, which is applied to a test platform of a processor under test, wherein the test platform stores a CBD test script, a CBD test case, a VAL test script, a VAL test case, and a configuration file; the method comprises:
[0007] The test platform is started by a power on / off module; the power on / off module is connected to the test platform by hardware and is used to start the test platform when it is detected that the test platform is not started;
[0008] Calling and executing the CBD test script through the boot-up file, and executing the CBD test case based on the configuration file to complete the CBD test of the processor under test;
[0009] After determining that the CBD test is completed, calling and executing the VAL test script, and executing the VAL test case based on the CBD test result file to complete the VAL test of the processor under test;
[0010] The CBD test result file is a test result file recorded during the CBD test process.
[0011] in,
[0012] The executing the CBD test case based on the configuration file to complete the CBD test of the processor under test includes:
[0013] Determine the voltage point and frequency to be tested according to the configuration file and the CBD test result file;
[0014] Executing the CBD test case to test the processor under test based on the voltage point to be tested and the frequency to be tested, obtaining a test result, and maintaining the CBD test result file according to the test result;
[0015] The executing the VAL test case based on the CBD test result file to complete the VAL test on the processor under test includes:
[0016] Determine the voltage point to be tested and the frequency to be tested according to the CBD test result file and the VAL test result file;
[0017] The VAL test case is executed based on the voltage point to be stress tested and the frequency to be stress tested to perform stress testing on the processor under test, a stress testing result is obtained, and the VAL test result file is maintained according to the stress testing result.
[0018] The configuration file specifies a test voltage point and an initial test frequency corresponding to the test voltage point; and the step of determining the voltage point to be tested and the frequency to be tested according to the configuration file and the CBD test result file includes:
[0019] The following judgment is performed on each of the test voltage points according to the order of the test voltage points specified in the configuration file:
[0020] If there is no test record for the test voltage point in the CBD test result file, determining that the test voltage point is the voltage point to be tested, and the initial test frequency corresponding to the test voltage point is the frequency to be tested;
[0021] If there is a test record for the test voltage point in the CBD test result file, and the test status in the test record is in the testing process, and the test result of the last test is successful, the test voltage point is determined to be the voltage point to be tested, and the frequency to be tested used for the last test is increased by a first preset step size as the frequency to be tested for the current test;
[0022] If there is a test record for the test voltage point in the CBD test result file, and the test status in the test record is in the testing process, and the test result of the last test is unsuccessful, then the test voltage point is determined to be the voltage point to be tested, and the frequency to be tested used for the last test is reduced by a second preset step size as the frequency to be tested for the current test;
[0023] If there is a test record for the test voltage point in the CBD test result file, and the test status in the test record is that the test is completed, then the next test voltage point specified in the configuration file is determined.
[0024] Wherein, the configuration file sets a maximum frequency test value and a minimum frequency test value for each test voltage point;
[0025] After determining the voltage point to be tested and the frequency to be tested according to the configuration file and the CBD test result file, and before executing the CBD test case to test the processor under test based on the voltage point to be tested and the frequency to be tested, the method further includes:
[0026] Compare the determined frequency to be tested with the maximum value of the frequency test and the minimum value of the frequency test:
[0027] If it is determined that the frequency to be tested is less than the minimum value of the frequency test, and the last test result is unsuccessful, then the test result is recorded as complete failure in the CBD test result file, and the test status is completed test; and the shutdown command is used to shut down;
[0028] If it is determined that the frequency to be tested is not less than the minimum value of the frequency test and not greater than the maximum value of the frequency test, executing the CBD test case based on the voltage point to be tested and the frequency to be tested to test the processor to be tested;
[0029] If it is determined that the frequency to be tested is greater than the maximum frequency test value, the test result is recorded as success in the CBD test result file, the test status is that the test is completed, and the frequency of the completed test is the maximum frequency test value, and the shutdown command is used to shut down.
[0030] Before executing the CBD test case to test the processor under test based on the voltage point to be tested and the frequency to be tested, the method further comprises: pre-recording the test result corresponding to the voltage point to be tested and the frequency to be tested as unsuccessful in the CBD test result file;
[0031] When the CBD test case is executed based on the voltage point to be tested and the frequency to be tested to test the processor to be tested and the test result is obtained, the method further comprises:
[0032] If the test result is downtime, restart through the power on / off module;
[0033] If the test result is failure or timeout, use the shutdown command to shut down the machine;
[0034] If the test result is successful, the test result in the CBD test result file is updated from unsuccessful to successful; and it is determined whether the test status of the last test corresponding to the voltage to be tested is successful;
[0035] If successful, the current frequency to be tested is increased by a first preset step size;
[0036] If it is unsuccessful, the test status is recorded in the CBD test result file as the test completed, and the frequency of completing the test is the maximum frequency of successful test, and the shutdown command is used to shut down.
[0037] Wherein, after increasing the current frequency to be measured by a first preset step length, the method further comprises:
[0038] Determine whether the frequency to be tested after increasing the first preset step size is greater than the maximum frequency test value. If so, record the test status in the CBD test result file as the test completed, and the frequency of the completed test is the maximum frequency test value, and use the shutdown command to shut down; otherwise, execute the CBD test case based on the voltage point to be tested and the frequency to be tested to test the processor under test.
[0039] Wherein, determining the voltage point to be stress tested and the frequency to be stress tested according to the CBD test result file and the VAL test result file includes:
[0040] According to the order of the voltage points to be tested recorded in the CBD test result file, the following judgment is made on each voltage point to be tested:
[0041] If it is determined that the test result corresponding to the voltage point to be tested in the CBD test result file is a complete failure, then the pressure test result corresponding to the voltage point to be tested is recorded as a failure in the VAL test result file, and the pressure test status is that the pressure test is completed; if there is a next voltage point to be tested, then the next voltage point to be tested in the CBD test result file is judged; otherwise, it is determined that the VAL test is completed;
[0042] If it is determined that there is no stress test record corresponding to the voltage point to be tested in the VAL test result file, and the test result corresponding to the voltage point to be tested in the CBD test result file is successful, then the voltage point to be tested is determined to be the voltage point to be stress tested, and the frequency of completing the test is the frequency to be stress tested;
[0043] If it is determined that there is a stress test record corresponding to the voltage point to be tested in the VAL test result file, and the stress test result is unsuccessful, the stress test frequency to be tested of the last unsuccessful stress test is reduced by a third step length as the stress test frequency to be tested of the current stress test;
[0044] If it is determined that there is a stress test record corresponding to the voltage point to be tested in the VAL test result file, and the stress test result of the last stress test is successful, then the stress test status is recorded in the VAL test result file as the stress test completed, and the frequency of the completed stress test is the stress test frequency of the last stress test; if there is a next voltage point to be tested, then the next voltage point to be tested in the CBD test result file is judged; otherwise, it is determined that the VAL test is completed;
[0045] Wherein, after determining the voltage point to be stress tested and the frequency to be stress tested according to the CBD test result file and the VAL test result file, and before executing the VAL test case to stress test the processor under test based on the voltage point to be stress tested and the frequency to be stress tested, the method further includes:
[0046] Determine whether the frequency to be stress tested is less than the minimum value of the frequency test. If so, record the stress test result as complete failure in the VAL test result file, and the stress test status of the voltage point to be stress tested is that the stress test is completed; otherwise, execute the VAL test case based on the voltage point to be stress tested and the frequency to be stress tested to perform stress testing on the processor under test.
[0047] Before executing the VAL test case to stress test the processor under test based on the voltage point to be stress tested and the frequency to be stress tested, the method further comprises: pre-recording in the VAL test result file the stress test result corresponding to the frequency point to be stress tested and the frequency to be stress tested as unsuccessful;
[0048] When the VAL test case is executed based on the voltage point to be stress tested and the frequency to be stress tested to perform stress testing on the processor to be tested to obtain a stress testing result, the method further includes:
[0049] If the stress test result is confirmed to be a downtime, restart it through the power on / off module;
[0050] If the stress test result is determined to be a failure or timeout, use the shutdown command to shut down the system.
[0051] If the stress test result is determined to be successful, the stress test result in the VAL test result file is updated from unsuccessful to successful; and the stress test status is recorded as the stress test completed, and the frequency that passed the stress test is the stress test frequency to be tested successfully; if there is a next voltage point to be tested, use the shutdown command to shut down; otherwise, it is determined that the VAL test is completed.
[0052] In another embodiment, a device for testing a processor is provided, which is applied to a test platform of a processor under test, and the device includes:
[0053] A storage unit, used for storing CBD test scripts, CBD test cases, VAL test scripts, VAL test cases and configuration files;
[0054] A starting unit, used to start the test platform through a power on / off module; the power on / off module is connected to the test platform through hardware, and is used to start the test platform when it is detected that the test platform is not started;
[0055] A testing unit, configured to call and execute the CBD test script through a startup file, and execute the CBD test case based on the configuration file to complete the CBD test of the processor under test;
[0056] The stress testing unit is used to call and execute the VAL test script after determining that the CBD test is completed, and execute the VAL test case based on the CBD test result file to complete the VAL test of the processor under test; wherein the CBD test result file is a test result file recorded during the CBD test process.
[0057] In another embodiment, an electronic device is provided, comprising:
[0058] processor;
[0059] a memory for storing executable instructions for the processor;
[0060] The processor is configured to execute the executable instructions to implement the method for testing a processor as described in any one of the above items.
[0061] In another embodiment, a computer-readable storage medium is provided. When at least one instruction in the computer-readable storage medium is executed by a processor of an electronic device, the electronic device can implement any of the above methods for testing a processor.
[0062] It can be seen from the above technical scheme that in the above embodiment, the CBD test script, CBD test case, VAL test script, VAL test case and configuration file used for testing are stored on the test platform of the processor under test; the test platform that is not started (downtime or shut down) is started through the power on / off module connected to the test platform hardware to assist the test platform in realizing automated testing; and the test script is called through the startup file of the test platform to start the test; the CBD test and VAL test of the processor under test are completed based on the locally stored test cases and configuration files. This solution can realize automated testing of the processor without being affected by the network, thereby ensuring the accuracy and continuity of the processor test. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. 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 creative work.
[0064] Figure 1 This is a flow chart of a method for testing a processor in an embodiment of the present application;
[0065] Figure 2 A schematic diagram of a process of executing a CBD test case based on a configuration file to complete a CBD test on a processor under test in an embodiment of the present application;
[0066] Figure 3 A schematic diagram of a process of executing a VAL test case based on a CBD test result file to complete a VAL test on a processor under test in an embodiment of the present application;
[0067] Figure 4 This is a schematic diagram of the CBD test process in the embodiment of this application;
[0068] Figure 5 This is a schematic diagram of the VAL test process in the embodiment of the present application;
[0069] Figure 6 Schematic diagram of the structure of a device for testing a processor in an embodiment of the present application;
[0070] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only 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.
[0072] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe the order or precedence of the objects. It should be understood that the data used in this way can be interchanged where appropriate, so that the implementation of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0073] In the related art, the testing of processors in the post-silicon state is mostly done manually, and the testers must be in the test platform laboratory in real time, and the testers may be required to operate at any time; thus, the number of test platforms that each tester can operate at the same time is limited, such as 1-3. Therefore, this testing method is inefficient and has high labor costs;
[0074] With the popularization of DVFS for processor low power design, the popularization of DVFS is mainly used for DVFS modeling. A large number of processors in the post-silicon state need to be tested, and the obtained test results are used for DVFS modeling. Then, methods for automated testing of processors are gradually proposed.
[0075] The content of testing the processor mainly includes: specifying several voltage points of the processor and finding the highest frequency it can run in the worst application scenario.
[0076] In this testing process, there are two stages: CBD (Clock Break Down) test and VAL (Validation) test;
[0077] Among them, CBD test: After the voltage of the processor under test is set to a certain specified voltage point, in the worst application scenario, through a series of frequency increases or decreases, the highest frequency that can pass the test is quickly found and recorded.
[0078] VAL test, also known as "safety stress test": after the voltage point of the processor under test is set to the voltage point obtained by the CBD test, a long-term stress test is performed on the frequency found by the CBD test under the worst application scenario to ensure that the highest frequency found in the CBD stage can run stably. If the test fails, the frequency is reduced and the stress test is continued until a frequency that can stably pass the stress test is found. This frequency is the highest frequency corresponding to this voltage point and is recorded.
[0079] The contents recorded for the VAL test can be used for DVFS modeling, but are not limited to DVFS modeling.
[0080] For example, to realize the automated testing of the processor by controlling the test platform of the tested processor through the server, during the test, the server needs to repeatedly ping the current test platform, or the test platform needs to feedback to the server through the network to determine whether the test platform is down; and the server needs to control the test platform to run the test case by sending network commands. It can be seen that the implementation of the relevant technical solution is completely dependent on the network conditions between the test platform and the server. If the network is unstable or the network is under maintenance, this solution that relies on the network for testing cannot guarantee the accuracy and continuity of the test.
[0081] Based on the above technical problems, a method for testing a processor is disclosed in an embodiment of the present application, wherein the CBD (Clock Breakdown, frequency fast point finding phase) test script, CBD test case, VAL (Validation, stress testing phase) test script, VAL test case and configuration file used for testing are stored on the test platform of the processor under test; the unstarted (downtime or shut down) test platform is started by the power on / off module connected to the test platform hardware to assist the test platform in realizing automated testing; and the test script is called to start the test through the startup file of the test platform; the CBD test and VAL test of the processor under test are completed based on the locally stored test cases and configuration files. This solution can realize automated testing of the processor without being affected by the network, thereby ensuring the accuracy and continuity of the processor test.
[0082] The processor under test in the embodiment of the present application may be any one of the following processors:
[0083] CPU (Central Processing Unit), GPU (Graphics Processing Unit), TPU (Tensor Processing Unit), NPU (Neural network Processing Unit), DPU (Deep learning Processing Unit), APU (Accelerated Processing Unit), and GPGPU (General-Purpose computing on Graphics Processing Unit).
[0084] The preparations before testing are as follows, and there is no restriction on the order of the preparations:
[0085] 1. The processor under test is installed on a test platform, which may be a SUT (System Under Test) or a test platform or a machine, etc. The embodiment of the present application is not limited to a specific installation method, such as a press-on card type, a welding method, etc.
[0086] 2. Generate test scripts, test cases and configuration files for testing in advance; and store them on the test platform.
[0087] The tests on the processor under test include CBD tests and VAL tests. Therefore, the test scripts used for testing include CBD test scripts and VAL test scripts. These two test scripts can be merged into one script file or divided into two script files. There is no restriction on this. The test cases used for testing include CBD test cases and VAL test cases. These two test cases can be merged into one case file or divided into two test cases. There is no restriction on this. The configuration files used for testing include CBD configuration files and VAL configuration files. These two configuration files can be merged into one configuration file or separated into two configuration files.
[0088] The relevant contents of the test script include calling the configuration file to execute the test case, and also include sending a shutdown command when shutdown is required during the test process to make the test platform shut down normally.
[0089] In the specific implementation, since the configuration information in the configuration files used in the CBD test and the VAL test will have the same part, therefore, in the specific implementation in the embodiment of the present application, the configuration file used for the CBD test and the configuration file used for the VAL test are implemented through one configuration file, and the test script and the test case are implemented through two files respectively. This is only an example implementation scheme for the convenience and clarity of description in the embodiment of the present application, and the specific implementation is not limited to this implementation method.
[0090] The contents of the configuration file to be configured are as follows:
[0091] Specify the test voltage point and the initial test frequency corresponding to each test voltage point; the test voltage point specified here is one or more. If there are multiple test voltage points, the subsequent tests will be performed in the specified order;
[0092] A maximum frequency test value and a minimum frequency test value are set for each test voltage point to define a frequency test range, which may also be referred to as a frequency test range or a frequency search range. In specific implementation, the maximum frequency test value and the minimum frequency test value set for each test voltage point may be the same or different. In specific implementation, the values are set according to actual needs and are not limited thereto.
[0093] Security settings are used to set up safe operation of the test platform when the test platform is initialized;
[0094] The first preset step length for increasing the frequency in the CBD test, and the second preset step length for decreasing the frequency; the third preset step length for decreasing the frequency in the VAL test; the size relationship of each step length here is not limited.
[0095] Usually the step size used in the VAL test process is different from the step size used in the CBD test process, and generally the step size used in the VAL test process is smaller than the step size used in the CBD test process, that is to say, the CBD test is relatively rough, and the VAL test is relatively more precise.
[0096] The loop conditions in the CBD test process and the loop conditions in the VAL test process are described in detail in the following execution process through the judgment execution in the test process;
[0097] Set the path of the tool used for voltage and frequency, the path to save the VAL test result file and log file in the VAL test, the path to save the CBD test file in the CBD test, etc.
[0098] After the test script, test case and configuration file are generated, they can be stored on the device under test. There is no restriction on the storage location of the test platform, as long as they can be called during the test. In the embodiment of the present application, the storage of CBD test scripts, CBD test cases, VAL test scripts, VAL test cases and configuration files is taken as an example.
[0099] 3. Connect the power on / off module through hardware; the power on / off module is used to monitor the test platform and start the test platform when it is not started; this startup method is not restricted by the network.
[0100] The situations where the test platform fails to start include initial failure to start, automatic shutdown during the test, and downtime during the test.
[0101] 4. Add a command to start the CBD test in the startup file of the test platform so that the test platform starts the CBD test when running the startup file. The specific implementation is to call and execute the CBD test script to start the CBD test file.
[0102] At this point, the relevant preparations for the test platform are completed. If the test platform is in the power-on state, turn it off and start preparing for the test.
[0103] The process of implementing the method for testing a processor in an embodiment of the present invention is described in detail below with reference to the accompanying drawings.
[0104] See also Figure 1 , Figure 1 This is a flow chart of a method for testing a processor in an embodiment of the present application. The specific steps are:
[0105] Step 101, start the test platform through the power on / off module.
[0106] The power on / off module is connected to the test platform through hardware to start or restart the test platform to achieve full automation of the test.
[0107] When preparing to start the processor test, the power on / off module can be started manually or by other devices. The power on / off module monitors the test platform. If it is determined that the test platform is down, the test platform is restarted; if it is determined that the test platform is shut down normally, the test platform is started.
[0108] Step 102, calling and executing the CBD test script through the startup file, and executing the CBD test case based on the configuration file to complete the CBD test of the processor under test.
[0109] The CBD test script is called and executed by the boot-up file to enable the test platform to start the CBD test. When the CBD test script is executed, the CBD test case is executed based on the configuration file to complete the CBD test of the processor under test.
[0110] Step 103, after determining that the CBD test is completed, call and execute the VAL test script, and execute the VAL test case based on the CBD test result file to complete the VAL test of the processor under test.
[0111] When all test voltage points in the configuration file are tested, it is determined that the CBD test is completed.
[0112] The VAL test is started by calling the VAL test script and executing it; when executing the VAL test script, the VAL test case is executed based on the CBD test result file to complete the VAL test of the processor under test; wherein, the CBD test result file is a test result file recorded during the CBD test process, and is used to assist in completing the CBD test and the VAL test.
[0113] In the embodiment of the present application, the CBD test script, CBD test case, VAL test script, VAL test case and configuration file used for testing are stored on the test platform of the processor under test; the unstarted (downtime or shut down) test platform is started by the switch module connected to the test platform hardware to assist the test platform in realizing automated testing; and the test script is called to start the test through the startup file of the test platform; the CBD test and VAL test of the processor under test are completed based on the locally stored test cases and configuration files. This solution can realize automated testing of the processor without being affected by the network, thereby ensuring the accuracy and continuity of the test processor.
[0114] In one embodiment,
[0115] The specific implementation of executing the CBD test case based on the configuration file in step 102 to complete the CBD test of the processor under test is composed of multiple groups of voltage point and frequency tests. For the specific implementation of each group of voltage point and frequency test, see Figure 2 .
[0116] Figure 2 This is a flow chart of executing CBD test cases based on configuration files to complete CBD testing of the processor under test in an embodiment of the present application. The specific steps are:
[0117] Step 201, determining a voltage point to be tested and a frequency to be tested according to a configuration file and a CBD test result file.
[0118] When determining the voltage point and frequency to be tested, if the current test is the first test, the content of the CBD test result file is empty; if the current test is not the first test, the content of the CBD test result file is all the contents recorded from the beginning of the CBD test.
[0119] In specific implementation, a CBD test result file with empty content may be generated in advance to determine the voltage point and frequency to be tested for the first CBD test;
[0120] Alternatively, when there is no CBD test result file, it may be determined that the content of the CBD test result file is empty, so as to determine the voltage point to be tested and the frequency to be tested of the first CBD test.
[0121] The specific implementation of this step is:
[0122] According to the order of the test voltage points specified in the configuration file, the following judgment is made for each test voltage point to determine the voltage point and frequency to be tested:
[0123] If there is no test record for the test voltage point in the CBD test result file, the test voltage point is determined to be the voltage point to be tested, and the initial test frequency corresponding to the test voltage point is the frequency to be tested;
[0124] If there is a test record for the test voltage point in the CBD test result file, and the test status in the test record is in the test process, and the test result of the last test is successful, the test voltage point is determined to be the voltage point to be tested, and the frequency to be tested used for the last test is increased by a first preset step length as the frequency to be tested for the current test;
[0125] If there is a test record for the test voltage point in the CBD test result file, and the test status in the test record is in the test process, and the test result of the previous test is unsuccessful, then the test voltage point is determined to be the voltage point to be tested, and the frequency to be tested used for the previous test is reduced by a second preset step length as the frequency to be tested for the current test;
[0126] If there is a test record for the test voltage point in the CBD test result file, and the test status in the test record is that the test is completed, then the next test voltage point specified in the configuration file is determined.
[0127] When determining the frequency to be tested in step 201, there will be cases of increasing step length and decreasing step length, and since the maximum value and minimum value of the frequency test are set for each test voltage point in the configuration file, it is necessary to further determine whether the frequency to be tested exceeds the test range to determine whether to set and test it as the real frequency to be tested. The specific judgment process is as follows:
[0128] Compare the determined frequency to be tested with the maximum value of the frequency test and the minimum value of the frequency test:
[0129] If it is determined that the frequency to be tested is less than the minimum value of the frequency test, and the last test result is unsuccessful, the test result is recorded as complete failure in the CBD test result file, and the test status is completed; and the shutdown command is used to shut down;
[0130] If it is determined that the frequency to be tested is greater than the maximum value of the frequency test, the test result is recorded as successful in the CBD test result file, the test status is that the test has been completed, and the frequency of the completed test is the maximum value of the frequency test, and the shutdown command is used to shut down;
[0131] If it is determined that the frequency to be tested is not less than the minimum value of the frequency test and not greater than the maximum value of the frequency test, the currently determined frequency to be tested is used as the frequency to be tested; that is, if it is determined that the frequency to be tested is within the frequency test range, the frequency to be tested is used as the frequency to be tested;
[0132] After determining the actual frequency to be tested, set the voltage to be tested and the frequency to be tested; and pre-record the test result corresponding to the voltage to be tested and the frequency to be tested as unsuccessful in the CBD test result file;
[0133] The tool for setting the voltage to be measured and the frequency to be measured is obtained by specifying the path of the tool in the configuration file.
[0134] The failure here can include test results caused by downtime, failure or timeout; such records are mainly to prevent the test platform from downtime during the test, and there is no time to record the CBD test result file, and thus it is impossible to judge the voltage, frequency, and whether to test the next time.
[0135] After the voltage point to be tested and the frequency to be tested are pre-recorded in the CBD test result file, step 202 is executed.
[0136] Step 202: Execute the CBD test case to test the processor under test based on the voltage point to be tested and the frequency to be tested to obtain the test result; and maintain the CBD test result file according to the test result.
[0137] The voltage point to be measured and the frequency to be measured in this step are the voltage point to be measured and the frequency to be measured determined in step 201 .
[0138] The maintenance of test result files here includes recording and updating test result files.
[0139] In step 202, the CBD test case is executed based on the voltage point to be tested and the frequency to be tested to test the processor to be tested. When the test result is obtained, the method further includes:
[0140] If the test result is downtime, restart it through the power on / off module;
[0141] If the test result is failure or timeout, use the shutdown command to shut down the machine;
[0142] If the test result is successful, the test result in the CBD test result file is updated from unsuccessful to successful; and it is determined whether the test result of the last test corresponding to the voltage point to be tested is successful;
[0143] If successful, increase the current frequency to be tested by a first preset step size; and determine whether the frequency to be tested after increasing by the first preset step size is greater than the maximum frequency test value. If so, record the test status as completed in the CBD test result file, and the frequency of the completed test is the maximum frequency test value, and use the shutdown command to shut down; otherwise, execute step 202 again, and execute the CBD test case based on the voltage point to be tested and the frequency to be tested to test the processor under test.
[0144] If it is unsuccessful, the test status is recorded in the CBD test result file as the test completed, and the frequency of completing the test is the maximum frequency of successful tests, and the shutdown command is used to shut down.
[0145] The CBD test is determined to be completed until all test voltage points in the configuration file have completed the test.
[0146] This embodiment provides in detail the start-up conditions of the CBD test, and how to test each test voltage point during the start-up process until all test voltage points are tested to complete the CBD test of the processor under test. During the entire test process, if the platform under test crashes, or is shut down and restarted to perform the next test frequency test, it is automatically implemented through the power on / off module without human intervention, and fully realizes the automated test of the processor under test.
[0147] In step 103, the VAL test case is executed based on the CBD test result file to complete the specific implementation of the VAL test of the processor under test, which is composed of stress tests of multiple groups of voltage points to be tested and frequencies to be tested. For the specific implementation of stress tests of each group of voltage points to be tested and frequencies to be tested, see Figure 3 .
[0148] Figure 3 This is a flow chart of executing VAL test cases based on CBD test result files to complete VAL testing of the processor under test in an embodiment of the present application. The specific steps are:
[0149] Step 301, determining a voltage point to be stress tested and a frequency to be stress tested according to a CBD test result file and a VAL test result file.
[0150] When determining the voltage point and frequency to be tested, if the current stress test is the first stress test, the content of the VAL test result file is empty; if the current stress test is not the first stress test, the content of the VAL test result file is all the contents recorded from the beginning of the VAL test.
[0151] In specific implementation, a VAL test result file with empty content may be generated in advance to determine the voltage point to be tested and the frequency to be tested for the first VAL test;
[0152] Alternatively, when there is no VAL test result file, it may be determined that the content of the VAL test result file is empty, so as to determine the voltage point to be tested and the frequency to be tested for the first VAL test.
[0153] The specific implementation of this step includes:
[0154] According to the order of the voltage points to be tested recorded in the CBD test result file, the following judgment is performed on each voltage point to be tested to determine the voltage point to be tested and the frequency point to be tested:
[0155] If it is determined that the test result corresponding to the voltage point to be tested in the CBD test result file is a complete failure, then the pressure test result corresponding to the voltage point to be tested is recorded as a failure in the VAL test result file, and the pressure test status is that the pressure test is completed; if there is a next voltage point to be tested, then the next voltage point to be tested in the CBD test result file is judged; otherwise, it is determined that the VAL test is completed;
[0156] If there is no tested frequency that passes the test for a voltage point to be tested during the CBD test, then during the VAL test, no stress test will be performed on the voltage point and the stress test will be directly recorded as a complete failure.
[0157] If it is determined that there is no stress test record corresponding to the voltage point to be tested in the VAL test result file, and the test result corresponding to the voltage point to be tested in the CBD test result file is successful, then the voltage point to be tested is determined to be the voltage point to be stress tested, and the frequency of completing the test is the frequency to be stress tested;
[0158] If it is determined that there is a stress test record corresponding to the voltage point to be tested in the VAL test result file, and the stress test result is unsuccessful, the stress test frequency to be tested of the last unsuccessful stress test is reduced by a third preset step length as the stress test frequency to be tested of the current stress test;
[0159] If it is determined that there is a stress test record corresponding to the voltage point to be tested in the VAL test result file, and the stress test result of the previous stress test is successful, then the stress test status is recorded in the VAL test result file as the stress test completed, and the frequency of the completed stress test is the stress test frequency to be tested in the previous stress test; if there is a next voltage point to be tested, then the next voltage point to be tested in the CBD test result file is judged; otherwise, it is determined that the VAL test is completed.
[0160] When determining the frequency to be stress tested in step 301, there is a case of reducing the step length, and since the maximum value and the minimum value of the frequency test are set for each test voltage point in the configuration file, it is necessary to further determine whether the frequency to be stress tested exceeds the test range to determine whether to set and test it as the real frequency to be stress tested. The specific judgment process is as follows:
[0161] Determine whether the frequency to be stress tested is less than the minimum value of the frequency test. If so, record the stress test result as complete failure in the VAL test result file, and the stress test status of the voltage point to be stress tested is stress test completed; otherwise, execute step 302, and execute the VAL test case to stress test the processor under test based on the voltage point to be stress tested and the frequency to be stress tested.
[0162] After determining the frequency to be tested, set the voltage and frequency to be tested; and pre-record the test results corresponding to the voltage and frequency to be tested as unsuccessful in the VAL test result file;
[0163] The tool for setting the voltage and frequency to be tested is obtained by specifying the tool path in the configuration file.
[0164] The failure here can include test results caused by downtime, failure or timeout; such records are mainly to prevent the test platform from downtime during the stress test, and there is no time to record the VAL test result file, and thus it is impossible to judge the voltage, frequency, and whether to perform the stress test for the next time.
[0165] After the pre-recording is completed, step 302 is executed.
[0166] Step 302: execute the VAL test case to perform stress testing on the processor under test based on the voltage point to be stress tested and the frequency to be stress tested, and obtain the stress testing result; and maintain the VAL test result file according to the stress testing result.
[0167] The maintenance of VAL test result files here includes recording, updating, etc.
[0168] In this step, the VAL test case is executed based on the voltage point to be tested and the frequency to be tested to perform stress testing on the processor under test and obtain the stress testing result;
[0169] If the stress test result is confirmed to be a downtime, restart it through the power on / off module;
[0170] If the stress test result is determined to be a failure or timeout, use the shutdown command to shut down the system.
[0171] If the stress test result is determined to be successful, the stress test result in the VAL test result file is updated from unsuccessful to successful; and the stress test status is recorded as completed, and the frequency of passing the stress test; if there is a next voltage point to be tested, the shutdown command is used to shut down; otherwise, the VAL test is determined to be completed.
[0172] After completing the stress test at a voltage point to be tested, determine whether there is a next voltage point to be tested that has not completed the stress test. If so, use the shutdown command to shut down the computer and perform the stress test on the next voltage point to be tested. If not, it means that all voltage points to be tested have completed the stress test, then the VAL test is completed and the test of the processor under test is ended.
[0173] When the test is completed, the power on / off module needs to stop monitoring the test platform, or the power on / off module needs to be turned off directly.
[0174] In the specific implementation of the VAL test process in the embodiment of the present application, a log file can also be recorded, and modeling and relationship analysis between voltage points and frequencies can be performed through the log file.
[0175] This embodiment provides in detail the start-up conditions of the VAL test, and if each voltage point to be tested is subjected to stress testing during the startup process, the VAL test of the processor under test is completed until all voltage points to be tested are subjected to stress testing. During the entire stress testing process, if the platform under test crashes, or is shut down and restarted to perform the stress test of the next stress testing frequency, it is automatically implemented through the power on / off module without human intervention, and fully realizes the automated stress testing of the processor under test.
[0176] By automating the CBD test and VAL test of the processor under test, the efficiency of testing the processor under test is greatly improved, and it is not limited by network conditions, and the accuracy and sustainability of the test can be guaranteed.
[0177] The following describes in detail the process of testing the processor from the two stages of CBD testing and VAL testing in conjunction with the accompanying drawings.
[0178] See also Figure 4 , Figure 4 This is a schematic diagram of the CBD test process in the embodiment of this application. The specific steps are:
[0179] Step 401: The test platform is started through the power on / off module.
[0180] The power on / off module monitors the startup status of the test platform, and if it detects that the test platform is not started, it starts the test platform.
[0181] The failure of the test platform to start here may be due to normal shutdown or downtime during the test. If it is normal shutdown, start it directly; if it is downtime, restart the test platform to start it.
[0182] Step 402: The test platform calls the CBD test script through the startup file and executes it.
[0183] The startup file will configure commands to start the CBD test by calling and executing the CBD test script.
[0184] Step 403, determine whether the test platform was shut down normally last time, if yes, execute step 404; otherwise, execute step 424.
[0185] Step 404 , determining whether the CBD test is completed based on the configuration file and the CBD test result file, if so, executing 425 ; otherwise, executing step 405 .
[0186] Step 405: Initialize and perform security settings based on the configuration file.
[0187] The initialization here includes: loading firmware driver; loading product restriction files, etc.;
[0188] There will be some limitations or definitions when designing a product. These definitions or limitations will be written into a file called a product limitation file; this file includes: the maximum supported frequency, minimum supported frequency, maximum power consumption, maximum temperature, etc.
[0189] Step 406 , judging each test voltage point according to the order of the test voltage points specified in the configuration file.
[0190] Step 407 , if there is no test record for the test voltage point in the CBD test result file, determine that the test voltage point is the voltage point to be tested, and the initial test frequency corresponding to the test voltage point is the frequency to be tested; and execute step 411 .
[0191] This indicates that the CBD test has not been performed on this test voltage point, and the test is performed using the corresponding initial test frequency.
[0192] Step 408, if there is a test record for the test voltage point in the CBD test result file, and the test status in the test record is in the test process, and the test result of the previous test is successful, then the test voltage point is determined to be the voltage point to be tested, and the frequency to be tested used for the previous test is increased by a first preset step size as the frequency to be tested for the current test; execute step 411.
[0193] This means that the initially set frequency is relatively small, and it is necessary to test the frequency from small to large to find the maximum frequency.
[0194] Normally this situation does not occur. In the embodiment of the present application, if the test passes and the maximum frequency test value is not reached, the test process will be continued by directly increasing the step size, and the device will not be restarted to test again. Therefore, it may be caused by human or external reasons that the test platform is shut down or restarted.
[0195] Step 409, if there is a test record for the test voltage point in the CBD test result file, and the test status in the test record is in the test process, and the test result of the previous test is unsuccessful, then the test voltage point is determined to be the voltage point to be tested, and the frequency to be tested used for the previous test is reduced by a second preset step size as the frequency to be tested for the current test; execute step 411.
[0196] This means that the initially set frequency is relatively large, and it is necessary to test the frequencies from large to small to find the maximum frequency that can pass the test.
[0197] Step 410 , if there is a test record for the test voltage point in the CBD test result file, and the test status in the test record is that the test is completed, then the next test voltage point specified in the configuration file is determined, and step 406 is executed.
[0198] Usually, there is a next test voltage point. If not, and the test state has not been changed for any voltage point to be tested, the CBD test will be directly terminated at step 404 .
[0199] Step 411, comparing the determined frequency to be tested with the maximum value of the frequency test and the minimum value of the frequency test.
[0200] When determining the frequency to be tested in step 408 and step 409, there may be an increase step size and a decrease step size, and since the maximum frequency test value and the minimum frequency test value are set for each test voltage point in the configuration file, it is necessary to further determine whether the frequency to be tested exceeds the test range to determine whether it should be set and tested as the actual frequency to be tested.
[0201] Step 412, if it is determined that the frequency to be tested is less than the minimum value of the frequency test, and the last test result is unsuccessful, then the test result is recorded as complete failure in the CBD test result file, and the test status is completed test; execute step 424.
[0202] This means that when the frequency to be tested has been reduced to the minimum value of the frequency test, the test still fails, so it is no longer tested.
[0203] Step 413, if it is determined that the frequency to be tested is greater than the maximum value of the frequency test, the test result is recorded as success in the CBD test result file, the test status is that the test has been completed, and the frequency of the completed test is the maximum value of the frequency test, and step 424 is executed.
[0204] In the embodiment of the present application, when increasing or decreasing the frequency step, the frequency step is usually set so that there is a situation where the frequency test maximum value and the frequency test minimum value are the same. Therefore, the maximum frequency that passes the test is the maximum frequency test value; the frequency that fails the test is tested to the minimum frequency test value. There will not be a situation where the previous frequency is less than the maximum frequency value, but becomes greater than the maximum frequency test value after increasing the step size, and there will not be a situation where the previous frequency is greater than the minimum frequency value, but becomes less than the minimum frequency test value after decreasing the step size.
[0205] Step 414: If it is determined that the frequency to be tested is not less than the minimum value of the frequency test and not greater than the maximum value of the frequency test, the currently determined frequency to be tested is determined as the frequency to be tested.
[0206] That is to say, when it is determined that the frequency to be tested is within the test frequency range, the frequency to be tested will be used as the frequency to be tested.
[0207] Step 415, setting the voltage point to be tested and the frequency to be tested, and pre-recording the test result corresponding to the voltage to be tested and the frequency to be tested as unsuccessful in the CBD test result file.
[0208] The failure here includes the test results of downtime, failure and timeout; such records are mainly to prevent the test platform from downtime during the test, and there is no time to record the CBD test result file, and then it is impossible to judge the voltage, frequency and whether to test the next time.
[0209] Step 416: Execute the CBD test case based on the determined voltage point to be tested and the frequency to be tested to test the processor to obtain a test result.
[0210] Step 417, if the test result is downtime, restart through the power on / off module and execute step 402.
[0211] Step 418: If the test result is failure or timeout, execute step 424.
[0212] Step 419: If the test result is successful, the test status in the CBD test result file is updated from unsuccessful to successful.
[0213] Step 420 , determining whether the test result of the last test corresponding to the voltage point to be tested is successful, if yes, executing step 421 ; otherwise, executing step 423 .
[0214] Step 421, increase the current frequency to be tested by a first preset step length, and determine whether the frequency to be tested after increasing by the first preset step length is greater than the maximum frequency test value. If yes, execute step 422; otherwise, execute step 415.
[0215] Step 422 , record in the CBD test result file that the test status is completed, and the frequency of the completed test is the maximum value of the frequency test, and execute step 424 .
[0216] Step 423, record in the CBD test result file that the test status is completed, and the frequency of completed test is the maximum frequency of successful test.
[0217] Step 424: Shut down the computer using a shutdown command. Execute step 401.
[0218] Step 425, start the VAL test.
[0219] Starting the VAL test indicates that the CBD test has been completed.
[0220] See also Figure 5 , Figure 5 This is a schematic diagram of the VAL test process in the embodiment of this application. The specific steps are:
[0221] Step 501: The test platform is started through the power on / off module.
[0222] The power on / off module monitors the startup status of the test platform, and if it detects that the test platform is not started, it starts the test platform.
[0223] The failure to start the test platform here may be due to normal shutdown or failure to start the test platform during the test. If it is due to normal shutdown, start it directly; if it is due to a crash, you need to restart to start the test platform.
[0224] Step 502, calling the CBD test script through the startup file and executing it.
[0225] The startup file will configure commands to start the CBD test by calling and executing the CBD test script.
[0226] Step 503, determine whether the test platform was shut down normally last time, if yes, execute step 504; otherwise, execute step 520.
[0227] Step 504: If it is determined based on the configuration file and the CBD test result file that the CBD test has been completed, the VAL test script is called and executed.
[0228] In specific implementation, if the VAL test has been entered, it means that the CBD test must have been completed. Therefore, this embodiment only provides the process of completing the CBD test and performing the VAL test.
[0229] The CBD test result file records the test results of each voltage point to be tested. The test results of each voltage point to be tested include:
[0230] The voltage point to be tested, the test result and the test status; the test results include: success and complete failure, and the tested frequency that successfully passed the test; the test status is in the test process and the test has been completed. During the VAL test process, the test status corresponding to the voltage point to be tested is the test has been completed.
[0231] When the test statuses of the voltage points to be tested corresponding to the test voltage points in the configuration file in the CBD are all completed, it is determined that the CBD test is completed.
[0232] Step 505 , determining whether the VAL test has been completed based on the CBD test result file and the VAL test result file, if so, executing step 521 ; otherwise, executing step 506 .
[0233] The VAL test result file records the test results of each voltage point to be tested. The test results of each voltage to be tested include:
[0234] Voltage to be tested, test results, and status: The test results include success and complete failure. The test status includes during and completed. If the test is completed, the frequency of the test to be tested that has successfully passed the test is also recorded.
[0235] If the pressure test statuses corresponding to the voltage points to be tested in the CBD test result file in the VAL test result file are all pressure test completed, it is determined that the VAL test has been completed; otherwise, it is determined that the VAL test has not been completed.
[0236] The test voltage points in the configuration file, the voltage points to be tested in the CBD test result file, and the voltage points to be tested in the VAL test result file are all corresponding voltage points. Different names are used in different files only to avoid confusion during description.
[0237] Step 506: Initialize and perform security settings based on the configuration file.
[0238] The initialization here includes: loading firmware driver; loading product restriction file, etc.
[0239] Step 507 , judging each voltage point to be tested according to the order of the voltage points to be tested recorded in the CBD test result file.
[0240] If the test voltage points recorded in the CBD test result file are: A, B, C, D, then the judgment starts from the voltage point A to be tested. If the corresponding stress test result in the VAL test result file is that the test is completed, the judgment of the next voltage point B to be tested is carried out. If the stress test result is that the stress test is in progress, or there is no stress test record, then the relevant judgment on whether the voltage point A to be tested is stress tested is carried out.
[0241] Step 508, if it is determined that the test result corresponding to the voltage point to be tested in the CBD test result file is a complete failure, then the stress test result corresponding to the voltage point to be stress tested is recorded in the VAL test result file as failure, and the stress test status is that the stress test has been completed; execute step 519.
[0242] This step determines that the voltage point to be tested has not found a frequency that can complete the test during the CBD test, so no pressure test is performed on it.
[0243] Step 509, if it is determined that there is no stress test record corresponding to the voltage point to be tested in the VAL test result file, and the test result corresponding to the voltage point to be tested in the CBD test result file is successful, then the voltage point to be tested is determined to be the voltage point to be stress tested, and the frequency of the completed test is the frequency to be stress tested; execute step 512.
[0244] This indicates that the voltage point to be tested has not been stress tested and the test was successful during the CBD test. Therefore, a stress test operation needs to be performed on the voltage point to be tested.
[0245] Step 510, if it is determined that there is a stress test record corresponding to the voltage point to be tested in the VAL test result file, and the stress test result is unsuccessful, then the stress test frequency to be tested of the last unsuccessful stress test is reduced by a third step length as the stress test frequency to be tested of the current stress test; and step 512 is executed.
[0246] This indicates that the maximum frequency obtained by the voltage point to be tested during the CBD test process did not pass the stress test during the VAL test process, and the frequency step size needs to be reduced to continue the stress test.
[0247] Step 511, if it is determined that there is a stress test record corresponding to the voltage point to be tested in the VAL test result file, and the stress test result of the previous stress test is successful, then the stress test status is recorded in the VAL test result file as the stress test completed, and the frequency of the completed stress test is the frequency to be tested of the previous stress test, and step 519 is executed.
[0248] This situation is not a common occurrence. It may be caused by the test platform being restarted manually or for external reasons during a successful test.
[0249] Step 512, determine whether the frequency to be stress-tested is less than the minimum value of the frequency test, if so, execute step 513; otherwise, execute step 514.
[0250] Because when determining the frequency to be stress tested, there is a situation where the step size is reduced, so this step needs to be performed to determine whether to continue stress testing the frequency after the step size is reduced; and in the VAL stage, the frequency to be stress tested will not exceed the maximum value of the frequency test, and there is no situation where the step size is increased. Therefore, here, it is no longer judged whether the frequency to be stress tested exceeds the maximum value of the frequency test.
[0251] Step 513 , record in the VAL test result file that the stress test result is completely failed, and the stress test status of the voltage point to be stress tested is that the stress test is completed. Execute step 519 .
[0252] Step 514: pre-record the test result corresponding to the voltage point to be stress tested and the frequency to be stress tested as unsuccessful in the VAL test result file, and start to collect logs.
[0253] Unsuccessful tests include downtime, failure, and timeout.
[0254] Step 515: Execute the VAL test case to perform stress testing on the processor under test based on the voltage point to be stress tested and the frequency to be stress tested to obtain a test result.
[0255] Step 516, if it is determined that the stress test result is a shutdown, restart the system through the power on / off module and execute step 502.
[0256] Step 517: If it is determined that the stress test result is a failure or a timeout, execute step 520.
[0257] Step 518, if it is determined that the stress test result is successful, the stress test result in the VAL test result file is updated from unsuccessful to successful, the stress test status is recorded as completed, and the frequency of passing the stress test, and log recording is stopped.
[0258] Step 519 , determining whether the current voltage point to be tested is the last voltage point to be tested, if so, executing step 521 ; otherwise, executing step 520 .
[0259] Step 520, shut down using a shutdown command, and execute step 501.
[0260] Step 521, stop the execution of the CBD test script and the VAL test script.
[0261] Stopping the execution of the script means that no more testing is performed. Whether the test platform is shut down is not restricted in the embodiments of the present application.
[0262] Compared with manual testing, the solution for testing processors provided in the embodiments of the present application can completely free up testers, and continuous testing is possible at night and on holidays. In addition, the number of processors tested at the same time is not limited, and tests can be performed simultaneously according to actual needs, greatly improving test efficiency.
[0263] Furthermore, since the test solution provided in the embodiment of the present application does not rely on the network, the influence of network instability can be eliminated to ensure the accuracy of the test results; and during network maintenance, the test can still be performed to ensure the sustainability of the test;
[0264] The test solution provided in the embodiment of the present application only needs to store the test scripts, test cases and corresponding configuration files on the test platform of the corresponding processor under test, which is more convenient to maintain and will not cause misoperation of other devices under test.
[0265] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.
[0266] Based on the same inventive concept, an embodiment of the present application also provides a device for testing a processor, which is applied to a test platform of a processor under test. Figure 6 , Figure 6 The following is a schematic diagram of the structure of a device for testing a processor in an embodiment of the present application. The device includes:
[0267] Storage unit 601, used to store CBD test scripts, CBD test cases, VAL test scripts, VAL test cases and configuration files;
[0268] The startup unit 602 is used to start the test platform through the power-on / off module; the power-on / off module is connected to the test platform through hardware, and is used to start the test platform when it is detected that the test platform is not started;
[0269] The testing unit 603 is used to call and execute the CBD test script through the boot file, and execute the CBD test case based on the configuration file to complete the CBD test of the processor under test;
[0270] The stress testing unit 604 is used to call and execute the VAL test script after determining that the CBD test is completed, and execute the VAL test case based on the CBD test result file to complete the VAL test of the processor under test; wherein the CBD test result file is a test result file recorded during the CBD test process.
[0271] In one embodiment,
[0272] The test unit 603 is specifically used to execute the CBD test case based on the configuration file to complete the CBD test of the processor under test, determine the voltage point and the frequency to be tested according to the configuration file and the CBD test result file; execute the CBD test case based on the voltage point and the frequency to be tested to test the processor under test, obtain the test result, and maintain the CBD test result file according to the test result;
[0273] The stress testing unit 604 is specifically used to execute the VAL test case based on the CBD test result file to complete the VAL test of the processor under test, determine the voltage point to be stress tested and the frequency to be stress tested according to the CBD test result file and the VAL test result file; execute the VAL test case based on the voltage point to be stress tested and the frequency to be stress tested to stress test the processor under test, obtain the stress testing result, and maintain the VAL test result file according to the stress testing result.
[0274] In one embodiment,
[0275] The storage unit 601 is specifically used to store the test voltage point specified in the configuration file and the initial test frequency corresponding to the test voltage point;
[0276] The test unit 603 is specifically used to determine the voltage point to be tested and the frequency to be tested according to the configuration file and the CBD test result file, and to make the following judgment on each test voltage point according to the order of the test voltage points specified in the configuration file: if there is no test record of the test voltage point in the CBD test result file, then determine the test voltage point as the voltage point to be tested, and the initial test frequency corresponding to the test voltage point is the frequency to be tested; If there is a test record for the test voltage point in the CBD test result file, and the test status in the test record is in test process, and the test result of the previous test is successful, then the test voltage point is determined to be the voltage point to be tested, and the frequency to be tested used for the previous test is increased by a first preset step size as the frequency to be tested for the current test; if there is a test record for the test voltage point in the CBD test result file, and the test status in the test record is in test process, and the test result of the previous test is unsuccessful, then the test voltage point is determined to be the voltage point to be tested, and the frequency to be tested used for the previous test is reduced by a second preset step size as the frequency to be tested for the current test; if there is a test record for the test voltage point in the CBD test result file, and the test status in the test record is that the test is completed, then the next test voltage point specified in the configuration file is judged.
[0277] In one embodiment,
[0278] The storage unit 601 is specifically used to set the maximum value and the minimum value of the frequency test for each test voltage point in the stored configuration file;
[0279] The test unit 603 is specifically used to determine the voltage point to be tested and the frequency to be tested according to the configuration file and the CBD test result file, and before executing the CBD test case to test the processor under test based on the voltage point to be tested and the frequency to be tested, compare the determined frequency to be tested with the maximum value of the frequency test and the minimum value of the frequency test: if it is determined that the frequency to be tested is less than the minimum value of the frequency test, and the previous test result is unsuccessful, then the test result is recorded in the CBD test result file as a complete failure, and the test status is that the test has been completed; and the shutdown command is used to shut down; if it is determined that the frequency to be tested is not less than the minimum value of the frequency test, and not greater than the maximum value of the frequency test, then the CBD test case is executed based on the voltage point to be tested and the test step of the processor under test is performed; if it is determined that the frequency to be tested is greater than the maximum value of the frequency test, then the test result is recorded in the CBD test result file as success, the test status is that the test has been completed, and the frequency of the completed test is the maximum value of the frequency test, and the shutdown command is used to shut down.
[0280] In one embodiment,
[0281] The storage unit 601 is further used to pre-record the test result corresponding to the voltage point to be tested and the frequency to be tested as unsuccessful in the CBD test result file;
[0282] The test unit 603 is further used to execute the CBD test case to test the processor under test based on the voltage point to be tested and the frequency to be tested. When obtaining the test result, if the test result is a downtime, the power on / off module is used to restart; if the test result is a failure or a timeout, the shutdown command is used to shut down; if the test result is successful, the test result in the CBD test result file is updated from unsuccessful to successful; and it is determined whether the test status of the last test corresponding to the voltage to be tested is successful; if it is successful, the current frequency to be tested is increased by a first preset step size; if it is unsuccessful, the test status is recorded in the CBD test result file as the test completed, and the frequency of the completed test is the maximum frequency of the successful test, and the shutdown command is used to shut down.
[0283] In one embodiment,
[0284] The test unit 603 is further used to determine whether the frequency to be tested after increasing the first preset step length is greater than the maximum frequency test value after the frequency to be tested is increased by the first preset step length. If so, the test status is recorded in the CBD test result file as the test completed, and the frequency of the completed test is the maximum frequency test value, and the shutdown command is used to shut down; otherwise, the operation of executing the CBD test case based on the voltage point to be tested and the frequency to be tested is performed to test the processor to be tested.
[0285] In one embodiment,
[0286] The stress test unit 604 is specifically used to determine the voltage point to be stress tested and the frequency to be stress tested according to the CBD test result file and the VAL test result file, and to make the following judgments on each voltage point to be tested according to the order of the voltage points to be tested recorded in the CBD test result file: if it is determined that the test result corresponding to the voltage point to be tested in the CBD test result file is completely failed, then the stress test result corresponding to the voltage point to be stress tested is recorded in the VAL test result file as failure, and the stress test status is that the stress test is completed; if there is a next voltage point to be tested, then the next voltage point to be tested in the CBD test result file is judged; otherwise, it is determined that the VAL test is completed; if it is determined that there is no stress test record corresponding to the voltage point to be tested in the VAL test result file, and the voltage point to be tested in the CBD test result file is not completely failed, then the voltage point to be tested is recorded in the VAL test result file as failed, and the stress test status is that the stress test is completed; if there is a next voltage point to be tested, then the next voltage point to be tested in the CBD test result file is judged; otherwise, it is determined that the VAL test is completed; if it is determined that there is no stress test record corresponding to the voltage point to be tested in the VAL test result file, and the voltage point to be tested in the CBD test result file is not completely failed, then the voltage point to be tested in the CBD test result file is not completely failed, and the voltage point to be tested in the CBD test result file is completely failed, then the voltage point to be tested in the VAL test result file is completely failed, and the stress test status is that the stress test is completed; if there is a next voltage point to be tested, then the voltage point to be tested in the CBD test result file is judged; otherwise, it is determined that the VAL test is completed; if it is determined that there is no stress test record corresponding to the voltage point to be tested in the VAL test result file, and the voltage point to be tested in the CBD test result file is completely failed, then the voltage If the test result corresponding to the voltage point is successful, the voltage point to be tested is determined to be the voltage point to be stress tested, and the frequency of the completed test is the frequency to be stress tested; if it is determined that there is a stress test record corresponding to the voltage point to be tested in the VAL test result file, and the stress test result is unsuccessful, the frequency to be stress tested of the last unsuccessful stress test is reduced by the third step as the frequency to be stress tested of the current stress test; if it is determined that there is a stress test record corresponding to the voltage point to be tested in the VAL test result file, and the stress test result of the last stress test is successful, the stress test status is recorded in the VAL test result file as the stress test completed, and the frequency of the completed stress test is the frequency to be stress tested of the last stress test; if there is a next voltage point to be tested, the next voltage point to be tested in the CBD test result file is judged; otherwise, it is determined that the VAL test is completed.
[0287] In one embodiment,
[0288] The stress testing unit 604 is further used to determine the voltage point to be stress tested and the frequency to be stress tested according to the CBD test result file and the VAL test result file, and before executing the VAL test case based on the voltage point to be stress tested and the frequency to be stress tested to perform stress testing on the processor under test, determine whether the frequency to be stress tested is less than the minimum value of the frequency test; if so, record the stress testing result as complete failure in the VAL test result file, and the stress testing status of the voltage point to be stress tested is that the stress testing is completed; otherwise, execute the VAL test case based on the voltage point to be stress tested and the frequency to be stress tested to perform stress testing on the processor under test.
[0289] In one embodiment,
[0290] The storage unit 601 is further used to pre-record the stress test result corresponding to the stress test frequency point to be stress tested and the stress test frequency to be stress tested as unsuccessful in the VAL test result file;
[0291] The stress testing unit 604 is further used to execute the VAL test case to perform stress testing on the processor under test based on the voltage point to be stress tested and the frequency to be stress tested to obtain the stress testing result. The method further includes: if it is determined that the stress testing result is a downtime, restarting through the power on / off module; if it is determined that the stress testing result is a failure or a timeout, shutting down using the shutdown command; if it is determined that the stress testing result is successful, updating the stress testing result in the VAL test result file from unsuccessful to successful; and recording the stress testing status as completed, and the frequency that passed the stress testing as the frequency to be tested for successful stress testing; if there is a next voltage point to be tested, shutting down using the shutdown command; otherwise, determining that the VAL test is completed.
[0292] The units in the above-mentioned embodiments may be integrated into one body or deployed separately; they may be combined into one unit or further divided into multiple sub-units.
[0293] Figure 7 It is a structural diagram of an electronic device provided in an embodiment of the present application. In some embodiments, the electronic device is a test platform. The electronic device 700 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 701 and one or more memories 702, wherein at least one program code is stored in the memory 702, and the at least one program code is loaded and executed by the processor 701 to implement the method for testing the processor provided in the above-mentioned various embodiments. Of course, the electronic device 700 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The electronic device 700 may also include other components for implementing device functions, which will not be repeated here.
[0294] In an exemplary embodiment, a computer-readable storage medium including at least one instruction is also provided, such as a memory including at least one instruction. The at least one instruction can be executed by a processor in a computer device to complete the method for testing the processor in the above embodiment.
[0295] Optionally, the above-mentioned computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may include ROM (Read-Only Memory), RAM (Random-Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk and optical data storage device, etc.
[0296] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0297] The flow chart and block diagram in the accompanying drawings of the present application show the possible architecture, function and operation of the system, method and computer program product according to the various embodiments disclosed in the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in the order of the standards in different figures. For example, the boxes represented by two connections can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0298] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims disclosed in this application may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in this application. In particular, without departing from the spirit and teachings of this application, the features described in the various embodiments and / or claims of this application may be combined and / or combined in a variety of ways, and all of these combinations and / or combinations fall within the scope disclosed in this application.
[0299] Specific embodiments are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas, and is not used to limit the present application. For those skilled in the art, changes can be made in the specific implementation methods and application scopes according to the ideas, spirits and principles of the present invention, and any modifications, equivalent substitutions, improvements, etc. made therein should be included in the scope of protection of this application.
Claims
1. A method for testing a processor, applied on a test platform of a processor under test, characterized in that: The test platform stores CBD test scripts, CBD test cases, VAL test scripts, VAL test cases and configuration files; the method comprises: The test platform is started by a power on / off module; the power on / off module is connected to the test platform by hardware and is used to start the test platform when it is detected that the test platform is not started; Calling and executing the CBD test script through the boot-up file, and executing the CBD test case based on the configuration file to complete the CBD test of the processor under test; After determining that the CBD test is completed, calling and executing the VAL test script, and executing the VAL test case based on the CBD test result file to complete the VAL test of the processor under test; Wherein, the CBD test result file is a test result file recorded during the CBD test process; if it is the first test, the CBD test result file is empty; The executing the CBD test case based on the configuration file to complete the CBD test of the processor under test includes: Determine the voltage point to be tested and the frequency to be tested according to the configuration file and the CBD test result file; execute the CBD test case to test the processor under test based on the voltage point to be tested and the frequency to be tested, obtain the test result, and maintain the CBD test result file according to the test result; The executing the VAL test case based on the CBD test result file to complete the VAL test on the processor under test includes: Determine the voltage point to be tested and the frequency to be tested according to the CBD test result file and the VAL test result file; Executing the VAL test case to perform stress testing on the processor under test based on the voltage point to be stress tested and the frequency to be stress tested, obtaining stress testing results, and maintaining the VAL test result file according to the stress testing results; if it is the first stress test, the VAL test result file is empty; The configuration file specifies a test voltage point and an initial test frequency corresponding to the test voltage point; and the step of determining the voltage point to be tested and the frequency to be tested according to the configuration file and the CBD test result file includes: The following judgment is performed on each of the test voltage points according to the order of the test voltage points specified in the configuration file: If there is no test record for the test voltage point in the CBD test result file, determining that the test voltage point is the voltage point to be tested, and the initial test frequency corresponding to the test voltage point is the frequency to be tested; If there is a test record for the test voltage point in the CBD test result file, and the test status in the test record is in the testing process, and the test result of the last test is unsuccessful, then the test voltage point is determined to be the voltage point to be tested, and the frequency to be tested used for the last test is reduced by a second preset step size as the frequency to be tested for the current test; The determining the voltage point to be stress tested and the frequency to be stress tested according to the CBD test result file and the VAL test result file includes: According to the order of the voltage points to be tested recorded in the CBD test result file, the following judgment is performed on each voltage point to be tested: If it is determined that there is no stress test record corresponding to the voltage point to be tested in the VAL test result file, and the test result corresponding to the voltage point to be tested in the CBD test result file is successful, then the voltage point to be tested is determined to be the voltage point to be stress tested, and the frequency of completing the test is the frequency to be stress tested; If it is determined that there is a stress test record corresponding to the voltage point to be tested in the VAL test result file, and the stress test result is unsuccessful, the stress test frequency to be tested of the last unsuccessful stress test is reduced by a third step length as the stress test frequency to be tested of the current stress test.
2. The method according to claim 1, characterized in that: The method further comprises: If there is a test record for the test voltage point in the CBD test result file, and the test status in the test record is in the testing process, and the test result of the last test is successful, the test voltage point is determined to be the voltage point to be tested, and the frequency to be tested used for the last test is increased by a first preset step size as the frequency to be tested for the current test; If there is a test record for the test voltage point in the CBD test result file, and the test status in the test record is that the test is completed, then a judgment is made on the next test voltage point specified in the configuration file.
3. The method according to claim 2, characterized in that The configuration file sets a maximum frequency test value and a minimum frequency test value for each test voltage point; After determining the voltage point to be tested and the frequency to be tested according to the configuration file and the CBD test result file, and before executing the CBD test case for testing based on the voltage point to be tested and the frequency to be tested, the method further includes: Compare the determined frequency to be tested with the maximum value of the frequency test and the minimum value of the frequency test: If it is determined that the frequency to be tested is less than the minimum value of the frequency test, and the last test result is unsuccessful, then the test result is recorded as complete failure in the CBD test result file, and the test status is completed test; and the shutdown command is used to shut down; If it is determined that the frequency to be tested is not less than the minimum value of the frequency test and not greater than the maximum value of the frequency test, then executing the test step of executing the CBD test case based on the voltage point to be tested and the frequency to be tested; If it is determined that the frequency to be tested is greater than the maximum frequency test value, the test result is recorded as success in the CBD test result file, the test status is that the test is completed, and the frequency of the completed test is the maximum frequency test value, and the shutdown command is used to shut down.
4. The method according to claim 3, characterized in that Before executing the CBD test case based on the voltage point to be tested and the frequency to be tested to test the processor to be tested, the method further comprises: pre-recording the test result corresponding to the voltage point to be tested and the frequency to be tested as unsuccessful in the CBD test result file; When the CBD test case is executed based on the voltage point to be tested and the frequency to be tested to obtain a test result, the method further includes: If the test result is downtime, restart through the power on / off module; If the test result is failure or timeout, use the shutdown command to shut down the machine; If the test result is successful, the test result in the CBD test result file is updated from unsuccessful to successful; and it is determined whether the test status of the last test corresponding to the voltage to be tested is successful; If successful, the current frequency to be tested is increased by a first preset step size; If it is unsuccessful, the test status is recorded in the CBD test result file as the test completed, and the frequency of completing the test is the maximum frequency of successful test, and the shutdown command is used to shut down.
5. The method according to claim 4, characterized in that After increasing the frequency to be measured by a first preset step length, the method further comprises: Determine whether the frequency to be tested after increasing the first preset step size is greater than the maximum frequency test value. If so, record the test status in the CBD test result file as the test completed, and the frequency of the completed test is the maximum frequency test value, and use the shutdown command to shut down; otherwise, execute the CBD test case based on the voltage point to be tested and the frequency to be tested to test the processor under test.
6. The method according to claim 1, characterized in that If it is determined that the test result corresponding to the voltage point to be tested in the CBD test result file is a complete failure, then the pressure test result corresponding to the voltage point to be tested is recorded as a failure in the VAL test result file, and the pressure test status is that the pressure test is completed; if there is a next voltage point to be tested, then the next voltage point to be tested in the CBD test result file is judged; otherwise, it is determined that the VAL test is completed; If it is determined that there is a stress test record corresponding to the voltage point to be tested in the VAL test result file, and the stress test result of the previous stress test is successful, then the stress test status is recorded in the VAL test result file as stress test completed, and the frequency of completed stress test is the stress test frequency to be tested in the previous stress test; if there is a next voltage point to be tested, then the next voltage point to be tested in the CBD test result file is judged; otherwise, it is determined that the VAL test is completed.
7. The method according to claim 6, characterized in that The configuration file sets a minimum frequency test value for each test voltage point; after determining the voltage point to be stress tested and the frequency to be stress tested according to the CBD test result file and the VAL test result file, before executing the VAL test case to stress test the processor under test based on the voltage point to be stress tested and the frequency to be stress tested, the method further includes: Determine whether the frequency to be stress tested is less than the minimum value of the frequency test. If so, record the stress test result as complete failure in the VAL test result record file, and the stress test status of the voltage point to be stress tested is that the stress test is completed; otherwise, execute the stress test step of executing the VAL test case based on the voltage point to be stress tested and the frequency to be stress tested.
8. The method according to claim 7, characterized in that Before executing the VAL test case to stress test the processor under test based on the voltage point to be stress tested and the frequency to be stress tested, the method further comprises: pre-recording the stress test result corresponding to the frequency point to be stress tested and the frequency to be stress tested as unsuccessful in the VAL test result file; When the VAL test case is executed based on the voltage point to be stress tested and the frequency to be stress tested to perform stress testing on the processor to be tested to obtain a stress testing result, the method further includes: If the stress test result is confirmed to be a downtime, restart it through the power on / off module; If the stress test result is determined to be a failure or timeout, use the shutdown command to shut down the system. If the stress test result is determined to be successful, the stress test result in the VAL test result file is updated from unsuccessful to successful; and the stress test status is recorded as the stress test completed, and the frequency that passed the stress test is the stress test frequency to be tested successfully; if there is a next voltage point to be tested, use the shutdown command to shut down; otherwise, it is determined that the VAL test is completed.
9. A device for testing a processor, applied to a test platform of a processor under test, characterized in that: The device comprises: A storage unit, used for storing CBD test scripts, CBD test cases, VAL test scripts, VAL test cases and configuration files; A starting unit, used to start the test platform through a power on / off module; the power on / off module is connected to the test platform through hardware, and is used to start the test platform when it is detected that the test platform is not started; A testing unit, configured to call and execute the CBD test script through a startup file, and execute the CBD test case based on the configuration file to complete the CBD test of the processor under test; A stress testing unit, configured to call and execute the VAL test script after determining that the CBD test is completed, and execute the VAL test case based on the CBD test result file to complete the VAL test of the processor under test; wherein the CBD test result file is a test result file recorded during the CBD test process; if it is an initial test, the CBD test result file is empty; Wherein, the test unit is specifically used to determine the voltage point to be tested and the frequency to be tested according to the configuration file and the CBD test result file when the CBD test case is executed based on the configuration file to complete the CBD test of the processor under test; execute the CBD test case to test the processor under test based on the voltage point to be tested and the frequency to be tested, obtain the test result, and maintain the CBD test result file according to the test result; wherein the test voltage point and the initial test frequency corresponding to the test voltage point are specified in the configuration file; the determination of the voltage point to be tested and the frequency to be tested according to the configuration file and the CBD test result file includes: making the following judgment on each of the test voltage points in the order of the test voltage points specified in the configuration file: if the test voltage point has no test record in the CBD test result file, then determining the test voltage point as the voltage point to be tested, and the initial test frequency corresponding to the test voltage point is the frequency to be tested; If there is a test record for the test voltage point in the CBD test result file, and the test status in the test record is in the testing process, and the test result of the last test is unsuccessful, then the test voltage point is determined to be the voltage point to be tested, and the frequency to be tested used for the last test is reduced by a second preset step size as the frequency to be tested for the current test; The stress testing unit is specifically used to perform the VAL test case based on the CBD test result file to complete the VAL test of the processor under test, determine the voltage point to be stress tested and the frequency to be stress tested according to the CBD test result file and the VAL test result file; perform the VAL test case on the processor under test to perform stress testing based on the voltage point to be stress tested and the frequency to be stress tested, obtain the stress testing result, and maintain the VAL test result file according to the stress testing result; if it is the first stress test, the VAL test result file is empty; wherein, the voltage point to be stress tested and the frequency to be stress tested are determined according to the CBD test result file and the VAL test result file. The frequency includes: judging each voltage point to be tested as follows according to the order of the voltage points to be tested recorded in the CBD test result file: if it is determined that there is no stress test record corresponding to the voltage point to be tested in the VAL test result file, and the test result corresponding to the voltage point to be tested in the CBD test result file is successful, then the voltage point to be tested is determined to be the voltage point to be stress tested, and the frequency of completing the test is the frequency to be stress tested; if it is determined that there is a stress test record corresponding to the voltage point to be tested in the VAL test result file, and the stress test result is unsuccessful, then the frequency to be stress tested of the last unsuccessful stress test is reduced by a third step as the frequency to be stress tested of the current stress test.
10. An electronic device, characterized in that: include: processor; a memory for storing executable instructions for the processor; The processor is configured to execute the executable instructions to implement the method for testing a processor according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: When at least one instruction in the computer-readable storage medium is executed by a processor of an electronic device, the electronic device is enabled to implement the method for testing a processor as claimed in any one of claims 1 to 8.
