CN113626339A - Automatic software compatibility testing method and system - Google Patents
Automatic software compatibility testing method and system Download PDFInfo
- Publication number
- CN113626339A CN113626339A CN202110991959.6A CN202110991959A CN113626339A CN 113626339 A CN113626339 A CN 113626339A CN 202110991959 A CN202110991959 A CN 202110991959A CN 113626339 A CN113626339 A CN 113626339A
- Authority
- CN
- China
- Prior art keywords
- software
- test
- instruction
- architecture
- compatibility
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 147
- 238000000034 method Methods 0.000 claims abstract description 11
- 238000013102 re-test Methods 0.000 claims description 18
- 238000010998 test method Methods 0.000 claims 1
- 238000004364 calculation method Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000000295 complement effect Effects 0.000 description 3
- 230000005012 migration Effects 0.000 description 3
- 238000013508 migration Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 101100285899 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) SSE2 gene Proteins 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000004134 energy conservation Methods 0.000 description 1
- 238000005265 energy consumption Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007667 floating Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000002787 reinforcement Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
Abstract
The invention relates to a software compatibility automatic test system and a method, which are applied to the software compatibility automatic test when X86 architecture software is migrated to an ARM architecture, and comprise the following steps: an input unit for acquiring software use information of the X86 architecture software; the test unit is used for testing whether various preset software compatibility problems exist when the X86 architecture software is migrated to the ARM architecture according to the software use information and outputting a test result; and the output unit is used for generating a test report according to the test result and outputting and displaying the test report. The invention provides effective automatic test aiming at the compatibility problem of the existing x86 architecture software migrating to the ARM architecture.
Description
Technical Field
The invention relates to the technical field of testing, in particular to an automatic testing method and system for software compatibility.
Background
The ARM architecture has the advantages of high performance power consumption ratio (Perf/W), energy conservation and green, is not only suitable for intelligent equipment and edge calculation, but also capable of greatly saving energy consumption of a data center, so that green calculation of a full-stack full scene is constructed, flexible customization of the inner core can be achieved by the ARM architecture, performance optimization and safety reinforcement can be performed aiming at a specific scene, the many-core architecture can support up to 64 cores, and the ARM architecture has more advantages in parallel calculation and big data calculation and supports a national secret algorithm exclusively, and autonomous controllable firmware safety and data safety protection are achieved.
In the process of migrating X86 framework software to an ARM framework, programs developed by high-level languages such as pure java and python, for example, web containers such as tomcat and the like, can be migrated easily, but with C, C + +, and the like as subjects, the migration difficulty of an inline assembly language is high, the process of software application compatibility testing after migration is very complex, and the conventional compatibility testing is performed manually based on an application software layer, which needs to consume a large amount of manpower and time, and the final result of the compatibility testing cannot necessarily be completely covered, so that the compatibility testing is passed, and some abnormal conditions occur to the application software in the subsequent use process under special conditions.
Disclosure of Invention
The invention aims to provide a method and a system for automatically testing software compatibility, which aim at the compatibility problem that the existing x86 architecture software is migrated to an ARM architecture and provide effective automatic testing.
To achieve the above object, an embodiment of the present invention provides an automatic software compatibility testing system, which is applied to an automatic software compatibility test when software in an X86 architecture is migrated to an ARM architecture, and includes:
an input unit for acquiring software use information of the X86 architecture software;
the test unit is used for testing whether various preset software compatibility problems exist when the X86 architecture software is migrated to the ARM architecture according to the software use information and outputting a test result;
and the output unit is used for generating a test report according to the test result and outputting and displaying the test report.
Optionally, the test unit includes:
the instruction library is used for storing a plurality of test instructions for testing whether a plurality of preset software compatibility problems exist when the X86 architecture software is migrated to the ARM architecture, and the plurality of test instructions are provided with sequence codes;
and the ARM processor is used for running the X86 architecture software, calling the test instructions from the instruction library according to the sequence codes of the test instructions, controlling the X86 architecture software to execute the called test instructions, marking the sequence numbers corresponding to the instruction execution results, and storing the instruction execution results as one of the test results.
Optionally, the input unit is further configured to receive a retest instruction input by a user, where the retest instruction is one or more sequence numbers;
the ARM processor is further used for re-running the X86 framework software according to the retest instruction, sequentially calling the test instructions from the instruction library according to one or more sequence numbers of the retest instruction, controlling the X86 framework software to execute the called test instructions, and marking the instruction execution results with the corresponding sequence numbers and then replacing the test results corresponding to the original sequence numbers.
Optionally, the software compatibility problem comprises at least one of an unsign char problem, a value overflow problem, an inline embedded assembly instruction in C language code problem, and an XCHGL problem.
Another embodiment of the present invention provides an automatic software compatibility testing method, applied to an automatic software compatibility test when software of an X86 architecture is migrated to an ARM architecture, including:
step S10, the input unit acquires the software use information of the X86 framework software;
step S20, the test unit tests whether there are multiple preset software compatibility problems when the X86 framework software is migrated to the ARM framework according to the software use information, and outputs a test result;
and step S30, the output unit generates a test report according to the test result and outputs and displays the test report.
Optionally, the step S20 includes:
the instruction base stores a plurality of test instructions for testing whether a plurality of preset software compatibility problems exist when the X86 architecture software is migrated to the ARM architecture, and the test instructions are provided with sequence codes;
the ARM processor runs the X86 framework software, calls the test instructions from the instruction library according to the sequence codes of the test instructions, controls the X86 framework software to execute the called test instructions, marks the sequence numbers corresponding to the instruction execution results and stores the sequence numbers as one of the test results.
Optionally, the input unit receives a retest instruction input by a user, wherein the retest instruction is one or more sequence numbers;
and the ARM processor reruns the X86 architecture software according to the retesting instruction, sequentially calls the testing instruction from the instruction library according to one or more sequence numbers of the retesting instruction, controls the X86 architecture software to execute the called testing instruction, and marks the instruction execution result with the corresponding sequence number and then replaces the testing result corresponding to the original sequence number.
Optionally, the software compatibility problem comprises at least one of an unsign char problem, a value overflow problem, an inline embedded assembly instruction in C language code problem, and an XCHGL problem.
The embodiment of the invention at least has the following beneficial effects:
the embodiment of the invention integrates the test function of multiple problems which are most easily caused by software compatibility in the process of migrating the X86 architecture software to the ARM framework into one test unit, and can automatically test multiple problems through the test unit, thereby avoiding the problem that a large amount of manpower and time are consumed for manual test, and improving the working efficiency of software compatibility test.
Additional features and advantages of embodiments of the invention will be set forth in the description which follows.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a block diagram of a software compatibility automatic testing system according to an embodiment of the present invention.
Fig. 2 is a flowchart of a method for automatically testing software compatibility according to another embodiment of the present invention.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In addition, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present invention. It will be understood by those skilled in the art that the present invention may be practiced without some of these specific details. In some instances, well known means have not been described in detail so as not to obscure the present invention.
Referring to fig. 1, an embodiment of the present invention provides an automatic software compatibility testing system, which is applied to an automatic software compatibility test when software in an X86 architecture is migrated to an ARM architecture, and includes:
an input unit for acquiring software use information of the X86 architecture software;
the test unit is used for testing whether various preset software compatibility problems exist when the X86 architecture software is migrated to the ARM architecture according to the software use information and outputting a test result;
and the output unit is used for generating a test report according to the test result and outputting and displaying the test report.
Optionally, the test unit includes:
the instruction library is used for storing a plurality of test instructions for testing whether a plurality of preset software compatibility problems exist when the X86 architecture software is migrated to the ARM architecture, and the plurality of test instructions are provided with sequence codes;
specifically, the order code is, for example, 1, 2, 3, 4, … …, n;
the ARM processor is used for running the X86 framework software, calling the test instructions from the instruction library according to the sequence codes of the test instructions, controlling the X86 framework software to execute the called test instructions, marking the sequence numbers corresponding to the instruction execution results and storing the instruction execution results as one of the test results;
specifically, in the prior art, when a tester performs a manual test, a test instruction is manually input to test whether software can normally execute the test instruction, but some tests may be missed in the manual test, or the test instruction is input incorrectly, which is likely to cause a test failure due to subjective factors of the tester.
Optionally, the input unit is further configured to receive a retest instruction input by a user, where the retest instruction is one or more sequence numbers;
the ARM processor is further used for re-running the X86 framework software according to the retest instruction, sequentially calling the test instructions from the instruction library according to one or more sequence numbers of the retest instruction, controlling the X86 framework software to execute the called test instructions, and marking the instruction execution results with the corresponding sequence numbers and then replacing the test results corresponding to the original sequence numbers.
Specifically, in this embodiment, retesting some instructions according to retesting instructions input by a tester/user is further set, and the original test results are replaced after retesting.
Optionally, the software compatibility problem comprises at least one of an unsign char problem, a value overflow problem, an inline embedded assembly instruction in C language code problem, and an XCHGL problem.
The problem of the unsign char is specifically as follows:
the concept of complementary codes. For example, the binary original code of 1 is 10000001, its complement is the inverse of the sign plus 1, and the final complement is 11111111. Under the X86 architecture, char defaults to signed, so print normally-1 when printed; however, under ARM, char is unsigned by default, and this binary 11111111111 is just unsigned 255. Therefore, it is noted that when ARM compiles, the-fsigned-char compile option is added to avoid the problem as follows: aarch 64-redcat-linux-gcc-fsigned-char-o transfer.
The problem of value overflow is specifically as follows:
the floating point to integer conversion instruction in the CPU of X86 defines an indefinite integer value (0X 800000000000) to handle overflow problem, but it cannot judge overflow or underflow from the indefinite integer value. The processing strategy of ARM is to keep the maximum or minimum value that integer can represent, no matter overflow or underflow, for example, as shown in table 1 below:
TABLE 1
The problem of embedding assembly instructions in the C language code is specifically as follows:
since the X86 architecture belongs to CISC (complex instruction set) and ARM belongs to RISC (reduced instruction set), they are completely different in assembly instructions, and some of the commonly used X86 instructions have no corresponding instructions under the ARM architecture. Particularly, certain X86 programs with extremely high efficiency requirements often use related instructions of multiple data streams such as SSE, SSE2 and the like.
Among them, the XCHGL problem is specifically:
xchgl is an assembly instruction on X86, which is used for exchanging values of memory variables, and it is known that an exchange operation requires a middle transition and three instructions, i.e., a- > TMP, B- > a, TMP- > B, are executed to complete, which is a commonly used X86 assembly instruction, a single instruction, and belongs to an atomic operation. If the atomic exchange variable value is needed in the mason, the atomic operation interface __ atomic _ exchange _ n of glibc is needed to do so, and the just-mentioned efficiency problem still exists.
The four problems are that the migration of the X86 framework software to the ARM framework is the most likely to cause a problem in software compatibility, if the compatibility is tested by clicking a function point on a software page manually, a complex software test may take half a day or more to complete a compatibility test report, but the result may not completely contain all possible situations.
Referring to fig. 2, another embodiment of the present invention provides an automatic software compatibility testing method, applied to an automatic software compatibility test when software in an X86 architecture is migrated to an ARM architecture, including:
step S10, the input unit acquires the software use information of the X86 framework software;
step S20, the test unit tests whether there are multiple preset software compatibility problems when the X86 framework software is migrated to the ARM framework according to the software use information, and outputs a test result;
and step S30, the output unit generates a test report according to the test result and outputs and displays the test report.
Optionally, the step S20 includes:
the instruction base stores a plurality of test instructions for testing whether a plurality of preset software compatibility problems exist when the X86 architecture software is migrated to the ARM architecture, and the test instructions are provided with sequence codes;
the ARM processor runs the X86 framework software, calls the test instructions from the instruction library according to the sequence codes of the test instructions, controls the X86 framework software to execute the called test instructions, marks the sequence numbers corresponding to the instruction execution results and stores the sequence numbers as one of the test results.
Optionally, the input unit receives a retest instruction input by a user, wherein the retest instruction is one or more sequence numbers;
and the ARM processor reruns the X86 architecture software according to the retesting instruction, sequentially calls the testing instruction from the instruction library according to one or more sequence numbers of the retesting instruction, controls the X86 architecture software to execute the called testing instruction, and marks the instruction execution result with the corresponding sequence number and then replaces the testing result corresponding to the original sequence number.
Optionally, the software compatibility problem comprises at least one of an unsign char problem, a value overflow problem, an inline embedded assembly instruction in C language code problem, and an XCHGL problem.
The method of this embodiment corresponds to the system of the embodiment, and therefore, the content of the method of this embodiment that is not described in detail can be obtained by referring to the content of the system of the embodiment, which is not described herein again.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Claims (8)
1. An automatic test system for software compatibility is applied to automatic test of software compatibility when X86 architecture software is migrated to ARM architecture, and is characterized by comprising:
an input unit for acquiring software use information of the X86 architecture software;
the test unit is used for testing whether various preset software compatibility problems exist when the X86 architecture software is migrated to the ARM architecture according to the software use information and outputting a test result;
and the output unit is used for generating a test report according to the test result and outputting and displaying the test report.
2. The software compatibility automatic test system according to claim 1, wherein said test unit comprises:
the instruction library is used for storing a plurality of test instructions for testing whether a plurality of preset software compatibility problems exist when the X86 architecture software is migrated to the ARM architecture, and the plurality of test instructions are provided with sequence codes;
and the ARM processor is used for running the X86 architecture software, calling the test instructions from the instruction library according to the sequence codes of the test instructions, controlling the X86 architecture software to execute the called test instructions, marking the sequence numbers corresponding to the instruction execution results, and storing the instruction execution results as one of the test results.
3. The system according to claim 2, wherein the input unit is further configured to receive a retest instruction input by a user, the retest instruction being one or more sequence numbers;
the ARM processor is further used for re-running the X86 framework software according to the retest instruction, sequentially calling the test instructions from the instruction library according to one or more sequence numbers of the retest instruction, controlling the X86 framework software to execute the called test instructions, and marking the instruction execution results with the corresponding sequence numbers and then replacing the test results corresponding to the original sequence numbers.
4. The system according to claim 3, wherein the software compatibility problem comprises at least one of an unsign char problem, a value overflow problem, an inline embedded assembly instruction in C language code problem, and an XCHGL problem.
5. An automatic test method for software compatibility is applied to automatic test of software compatibility when X86 architecture software is migrated to ARM architecture, and is characterized by comprising the following steps:
step S10, the input unit acquires the software use information of the X86 framework software;
step S20, the test unit tests whether there are multiple preset software compatibility problems when the X86 framework software is migrated to the ARM framework according to the software use information, and outputs a test result;
and step S30, the output unit generates a test report according to the test result and outputs and displays the test report.
6. The method for automatically testing software compatibility according to claim 5, wherein said step S20 includes:
the instruction base stores a plurality of test instructions for testing whether a plurality of preset software compatibility problems exist when the X86 architecture software is migrated to the ARM architecture, and the test instructions are provided with sequence codes;
the ARM processor runs the X86 framework software, calls the test instructions from the instruction library according to the sequence codes of the test instructions, controls the X86 framework software to execute the called test instructions, marks the sequence numbers corresponding to the instruction execution results and stores the sequence numbers as one of the test results.
7. The automatic software compatibility testing method according to claim 6, wherein said input unit receives a retest instruction input by a user, said retest instruction being one or more sequence numbers;
and the ARM processor reruns the X86 architecture software according to the retesting instruction, sequentially calls the testing instruction from the instruction library according to one or more sequence numbers of the retesting instruction, controls the X86 architecture software to execute the called testing instruction, and marks the instruction execution result with the corresponding sequence number and then replaces the testing result corresponding to the original sequence number.
8. The method according to claim 7, wherein the software compatibility problem comprises at least one of an unsign char problem, a value overflow problem, an inline embedded assembly instruction in C language code problem, and an XCHGL problem.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110991959.6A CN113626339A (en) | 2021-08-27 | 2021-08-27 | Automatic software compatibility testing method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110991959.6A CN113626339A (en) | 2021-08-27 | 2021-08-27 | Automatic software compatibility testing method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113626339A true CN113626339A (en) | 2021-11-09 |
Family
ID=78387957
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110991959.6A Pending CN113626339A (en) | 2021-08-27 | 2021-08-27 | Automatic software compatibility testing method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113626339A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116261091A (en) * | 2023-05-16 | 2023-06-13 | 深圳市百泰实业股份有限公司 | Bluetooth testing system and method capable of customizing testing flow |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040054988A1 (en) * | 2002-09-18 | 2004-03-18 | Dario Atallah | Certification test suite |
CN104461858A (en) * | 2013-09-23 | 2015-03-25 | 财团法人资讯工业策进会 | Software Compatibility Pre-testing Method and System |
CN105677571A (en) * | 2016-01-29 | 2016-06-15 | 努比亚技术有限公司 | Device and method for testing software compatibility of mobile terminal |
CN109446069A (en) * | 2018-09-26 | 2019-03-08 | 平安普惠企业管理有限公司 | Compatibility test method, device, computer equipment and medium |
-
2021
- 2021-08-27 CN CN202110991959.6A patent/CN113626339A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040054988A1 (en) * | 2002-09-18 | 2004-03-18 | Dario Atallah | Certification test suite |
CN104461858A (en) * | 2013-09-23 | 2015-03-25 | 财团法人资讯工业策进会 | Software Compatibility Pre-testing Method and System |
CN105677571A (en) * | 2016-01-29 | 2016-06-15 | 努比亚技术有限公司 | Device and method for testing software compatibility of mobile terminal |
CN109446069A (en) * | 2018-09-26 | 2019-03-08 | 平安普惠企业管理有限公司 | Compatibility test method, device, computer equipment and medium |
Non-Patent Citations (1)
Title |
---|
马超: "X86向ARM服务器应用移植的注意点", pages 1 - 2, Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/355149896> * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116261091A (en) * | 2023-05-16 | 2023-06-13 | 深圳市百泰实业股份有限公司 | Bluetooth testing system and method capable of customizing testing flow |
CN116261091B (en) * | 2023-05-16 | 2023-08-04 | 深圳市百泰实业股份有限公司 | Bluetooth testing system and method capable of customizing testing flow |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9952873B2 (en) | Method, apparatus and instructions for parallel data conversions | |
EP3299959B1 (en) | Hardware acceleration method, compiler and device | |
CN103488464B (en) | microprocessor and microprocessor operation method | |
US8910170B2 (en) | Managing execution of interdependent tasks of a task dependency chain based on a run-once task attribute | |
CN105793825B (en) | The processor that can restore from excessive approximate calculation error | |
CN109710260B (en) | Multi-platform-based applet code conversion method | |
CN113626339A (en) | Automatic software compatibility testing method and system | |
CN107479878B (en) | Lua modularization development method and development framework based on openness | |
CN110457260A (en) | Document handling method, device, equipment and computer readable storage medium | |
US11709716B2 (en) | Hardware offload support for an operating system offload interface using operation code verification | |
CN111427583A (en) | Component compiling method and device, electronic equipment and computer readable storage medium | |
CN114115990A (en) | Program migration method, system and storage medium for dynamic and static combined binary translation | |
CN109117203A (en) | A kind of Android APP starting velocity optimization method and system | |
CN106020920A (en) | Preprocessing method and system for JCVM interpreter | |
CN100573461C (en) | In embedded system, analyze the method that storehouse uses | |
US20120117553A1 (en) | Programmatic dispatch to functions with matching linkage | |
US20060277552A1 (en) | Facilitating handling of exceptions in a program implementing a M-on-N threading model | |
CN116107639A (en) | Register renaming and instruction decoding method and device, processor and electronic equipment | |
CN113050948B (en) | Dynamic library optimization method, device, equipment and storage medium | |
US6886091B1 (en) | Replacing VLIW operation with equivalent operation requiring fewer issue slots | |
CN113296837A (en) | Resource calculation method and device, electronic equipment and readable storage medium | |
CN111814906B (en) | Express delivery face list recognition model transplanting method, device, equipment and storage medium | |
CN115951936B (en) | Chip adaptation method, device, equipment and medium of vectorization compiler | |
CN112416362B (en) | PDK compiling function implementation method | |
TWI282495B (en) | Testing method of codes in electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |