CN109976762B - Method and system for improving solid state disk firmware test efficiency - Google Patents

Method and system for improving solid state disk firmware test efficiency Download PDF

Info

Publication number
CN109976762B
CN109976762B CN201910207062.2A CN201910207062A CN109976762B CN 109976762 B CN109976762 B CN 109976762B CN 201910207062 A CN201910207062 A CN 201910207062A CN 109976762 B CN109976762 B CN 109976762B
Authority
CN
China
Prior art keywords
compiling
unit
script
sending
jenkins
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.)
Active
Application number
CN201910207062.2A
Other languages
Chinese (zh)
Other versions
CN109976762A (en
Inventor
王瑞
冯元元
冷志源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Union Memory Information System Co Ltd
Original Assignee
Shenzhen Union Memory Information System Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Union Memory Information System Co Ltd filed Critical Shenzhen Union Memory Information System Co Ltd
Priority to CN201910207062.2A priority Critical patent/CN109976762B/en
Publication of CN109976762A publication Critical patent/CN109976762A/en
Application granted granted Critical
Publication of CN109976762B publication Critical patent/CN109976762B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a method and a system for improving the efficiency of testing solid state disk firmware; the method for improving the test efficiency of the solid state disk firmware comprises the following steps: s1, detecting that the library has new code update; s2, jenkins is triggered and a script is called; s3, modifying the macro definition and compiling the code by the script; s4, judging whether the compiling result is correct; s5, copying the wrong compiling result into a shared folder; s6, judging whether all macro definition branch compiling is completed; s7, judging whether the shared folder has files; s8, sending the mail with failed compiling and the error information thereof to the relevant personnel; and S9, sending a compiling success mail. According to the invention, through the traversal of the configuration of different macro definitions by the Patch, the compilation is automatically carried out by using the Jenkins tool to call the script to modify the compilation macro, and the compilation inspection result is sent out through the mail, so that the full-process automation compilation is realized, the human resources are greatly saved, and the detection efficiency is improved.

Description

Method and system for improving solid state disk firmware test efficiency
Technical Field
The invention relates to the technical field of solid state disk firmware testing, in particular to a method and a system for improving the solid state disk firmware testing efficiency.
Background
The solid state disk is a very complex device, which needs to have many functions in a set of codes, so that many compiled macro definitions need to be added into the codes, different compiled macro definitions need to be verified each time the codes are modified, and different macro definitions need to be modified, recompiled and loaded into the device to prove the correctness of the codes.
The existing universal detection method is to compile codes in a manual mode, check after compiling is finished, change compiled macros in a code modification mode if the result is correct, and then recompile until all macro definition branches are compiled; the solid state disk is a very complex device, for example, some solid state disks have one DRAM, some solid state disks have two DRAMs, for example, some solid state disks adopt PRD channels, some solid state disks adopt BM channels, and these different definitions must be considered and verified, and the macro definitions involved are many, so the method is not only tedious and inefficient, but also wastes manpower, and cannot meet the requirements.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method and a system for improving the efficiency of testing solid state disk firmware.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for improving the efficiency of testing solid state disk firmware comprises the following steps:
s1, detecting that the library has new code update;
s2, jenkins is triggered and a script is called;
s3, modifying the macro definition and compiling the code by the script;
s4, judging whether the compiling result is correct; if yes, go to S6; if not, go to S5;
s5, copying the wrong compiling result into a shared folder;
s6, judging whether all macro definition branch compiling is finished; if yes, go to S7; if not, returning to S3;
s7, judging whether the shared folder has files; if yes, go to S8; if not, go to S9;
s8, sending the mail with failed compiling and the error information thereof to the relevant personnel;
and S9, sending a compiling success mail.
The further technical scheme is as follows: and in the step S1, detecting whether the codes on the library are updated or not through jenkins.
The further technical scheme is as follows: the S3 may further include: checking whether the script mode called by jenkins is correct and checking whether the compiling environment of the current host is correct.
The further technical scheme is as follows: the S3 may further include: and extracting the patch file and acquiring the file name and the number.
The further technical scheme is as follows: in S3, the script calls the patch file to modify the compilation macro via the patch instruction.
The further technical scheme is as follows: the S6 may further include: and deleting the bin file under the output directory.
The further technical scheme is as follows: the S6 further includes: checking whether a bin file exists in the output directory, and if not, copying the compiling result to a shared folder.
A system for improving the efficiency of testing solid state disk firmware comprises a detection unit, a triggering and calling unit, a modifying and compiling unit, a first judgment unit, a copying unit, a second judgment unit, a third judgment unit, a first sending unit and a second sending unit;
the detection unit is used for detecting that a new code is updated on the library;
the trigger calling unit is used for triggering jenkins and calling scripts;
the modification compiling unit is used for modifying the macro definition and compiling the code by the script;
the first judging unit is used for judging whether the compiling result is correct or not;
the copying unit is used for copying an incorrect compiling result into a shared folder;
the second judging unit is configured to judge whether all macro definition branch compilation is completed;
the third judging unit is used for judging whether a file exists in the shared folder or not;
the first sending unit is used for sending the mail with failed compilation and the error information thereof to related personnel;
and the second sending unit is used for sending the mail with successful compiling.
The further technical scheme is as follows: and in the detection unit, whether the codes on the library are updated or not is detected through jenkins.
The further technical scheme is as follows: in the modification compiling unit, the script calls a patch file to modify the compiling macro through a patch instruction.
Compared with the prior art, the invention has the beneficial effects that: through the configuration that different macros of batch ergodic defined, use Jenkins instrument to call script modification compilation macro and compile automatically to will examine the compilation result and send out through the mail, realize full automatic compilation, saved manpower resources greatly, improved detection efficiency, can satisfy the demand better.
The invention is further described below with reference to the accompanying drawings and specific embodiments.
Drawings
FIG. 1 is a flow diagram illustrating a prior art inspection compilation method;
FIG. 2 is a flowchart illustrating a method for improving the efficiency of testing the firmware of the solid state disk according to the present invention;
FIG. 3 is a block diagram of a system for improving efficiency of testing firmware of a solid state disk according to the present invention.
10 detection unit 20 trigger calling unit
30 modified compiling unit 40 first judging unit
50 copy unit 60 second decision unit
70 third judging unit 80 first transmitting unit
90 second transmitting unit
Detailed Description
In order to more fully understand the technical content of the present invention, the technical solution of the present invention will be further described and illustrated with reference to the following specific embodiments, but not limited thereto.
The specific embodiment shown in fig. 1 to 3, wherein the prior art is shown in fig. 1; and compiling the codes in a manual mode, checking after compiling is finished, changing the compiled macros in a code modification mode if the result is correct, and then recompiling until all the macro definition branches are compiled.
However, the solid state disk is a very complicated device, for example, some solid state disks have one DRAM, some solid state disks have two DRAMs, for example, some solid state disks employ a PRD channel, some solid state disks employ a BM channel, and these different definitions must be considered and verified, and the macro definitions involved are many, so this approach is not only cumbersome, but also very wasteful of manpower.
As shown in fig. 2, the present invention discloses a method for improving the efficiency of testing firmware of a solid state disk, which comprises the following steps:
s1, detecting that the library has new code update;
s2, jenkins is triggered and a script is called;
s3, modifying the macro definition and compiling the code by the script;
s4, judging whether the compiling result is correct; if yes, go to S6; if not, entering S5;
s5, copying the wrong compiling result into a shared folder;
s6, judging whether all macro definition branch compiling is finished; if yes, go to S7; if not, returning to S3;
s7, judging whether the shared folder has files; if yes, go to S8; if not, go to S9;
s8, sending the mail with failed compiling and the error information thereof to the relevant personnel;
and S9, sending a compiling success mail.
Jenkins is an integrated tool developed based on Java and is mainly used for continuous and repeated work.
In S1, detecting whether the code in the library is updated by jenkins.
Wherein the step S3 further comprises: checking whether the script mode called by jenkins is correct and checking whether the compiling environment of the current host is correct.
Wherein the step S3 further comprises: extracting patch files, and acquiring file names and quantity, wherein the patch files are files which are made in advance and enable scripts to modify compiled macros, the file names are acquired for convenient calling, and the quantity is acquired for knowing how many times the files are called in total.
Further, in S3, the script calls the patch file to modify the compilation macro through the patch instruction.
Wherein the step S6 further comprises: the bin file under the result output directory is deleted (which would be generated if compilation was successful).
Wherein, after the step S6, the method further comprises: checking whether a bin file exists in the output directory, and if not, copying the compiling result to a shared folder.
Further, in S7, after compiling all the patch files, checking whether there is any file in the shared folder, if there is no description that the compiling is successful, and if there is description that the compiling is failed, sending the mail with failed compiling and the error information thereof to the relevant personnel through jenkins.
Wherein, through the mode that above-mentioned jenkins and script combined together, realize full automation's compilation, saved manpower resources greatly, improved detection efficiency.
As shown in fig. 3, the present invention discloses a system for improving the efficiency of testing a solid state disk firmware, which includes a detecting unit 10, a triggering and calling unit 20, a modification compiling unit 30, a first determining unit 40, a copying unit 50, a second determining unit 60, a third determining unit 70, a first sending unit 80, and a second sending unit 90;
the detection unit 10 is configured to detect that a new code update exists in the library;
the trigger calling unit 20 is used for triggering jenkins and calling scripts;
the modification compiling unit 30 is used for modifying macro definition and compiling codes by scripts;
the first judging unit 40 is configured to judge whether a compiling result is correct;
the copying unit 50 is configured to copy the wrong compiling result to a shared folder;
the second determining unit 60 is configured to determine whether all macro definition branch compilation is completed;
the third judging unit 70 is configured to judge whether a file exists in the shared folder;
the first sending unit 80 is configured to send a mail with failed compilation and error information thereof to relevant personnel;
the second sending unit 90 is configured to send a mail with a successful compiling.
In the detection unit 10, whether the codes in the library are updated is detected through jenkins.
In the modification compiling unit 30, the script calls a patch file to modify the compiling macro through a patch instruction.
According to the invention, the script is automatically called by jenkins, so that the code is circularly modified and compiled after being modified, the efficiency of compiling the code by the solid state disk is improved, the manpower is saved, and the requirements can be better met.
The technical contents of the present invention are further illustrated by the examples, so as to facilitate the reader to understand more easily, but the embodiments of the present invention are not limited thereto, and any technical extension or re-creation made by the present invention is protected by the present invention. The protection scope of the invention is subject to the claims.

Claims (4)

1. A method for improving the efficiency of testing solid state disk firmware is characterized by comprising the following steps:
s1, detecting that the library has new code update;
s2, jenkins is triggered and a script is called;
s3, modifying the macro definition and compiling the code by the script;
s4, judging whether the compiling result is correct; if yes, go to S6; if not, entering S5;
s5, copying the wrong compiling result into a shared folder;
s6, judging whether all macro definition branch compiling is finished; if yes, go to S7; if not, returning to S3;
s7, judging whether the shared folder has files; if yes, go to S8; if not, go to S9;
s8, sending the mail with failed compiling and the error information thereof to the relevant personnel;
s9, sending a mail with successful compiling;
in the step S1, whether codes on the library are updated or not is detected through jenkins;
the S3 may further include: checking whether the script mode called by jenkins is correct and checking whether the compiling environment of the current host is correct;
the S3 may further include: extracting patch files, and acquiring file names and file numbers;
in S3, the script calls the patch file to modify the compilation macro via the patch instruction.
2. The method of claim 1, wherein the step S6 is preceded by the step of: and deleting the bin file under the output directory.
3. The method of claim 1, wherein after the step S6, the method further comprises: checking whether a bin file exists in the output directory, and if not, copying the compiling result to a shared folder.
4. A system for improving the test efficiency of solid state disk firmware is characterized by comprising a detection unit, a triggering and calling unit, a modification compiling unit, a first judgment unit, a copying unit, a second judgment unit, a third judgment unit, a first sending unit and a second sending unit;
the detection unit is used for detecting that a new code is updated on the library;
the trigger calling unit is used for triggering jenkins and calling scripts;
the modification compiling unit is used for modifying the macro definition and compiling the code by the script;
the first judging unit is used for judging whether the compiling result is correct or not;
the copying unit is used for copying an incorrect compiling result into a shared folder;
the second judging unit is configured to judge whether all macro definition branch compilation is completed;
the third judging unit is used for judging whether a file exists in the shared folder or not;
the first sending unit is used for sending the mail with failed compilation and the error information thereof to related personnel;
the second sending unit is used for sending a mail with successful compiling;
in the detection unit, whether codes on the library are updated or not is detected through jenkins; further comprising: checking whether the script mode called by jenkins is correct and checking whether the compiling environment of the current host is correct; further comprising: extracting patch files, and acquiring file names and file numbers; in the modification compiling unit, the script calls a patch file to modify the compiling macro through a patch instruction.
CN201910207062.2A 2019-03-19 2019-03-19 Method and system for improving solid state disk firmware test efficiency Active CN109976762B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910207062.2A CN109976762B (en) 2019-03-19 2019-03-19 Method and system for improving solid state disk firmware test efficiency

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910207062.2A CN109976762B (en) 2019-03-19 2019-03-19 Method and system for improving solid state disk firmware test efficiency

Publications (2)

Publication Number Publication Date
CN109976762A CN109976762A (en) 2019-07-05
CN109976762B true CN109976762B (en) 2022-06-07

Family

ID=67079469

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910207062.2A Active CN109976762B (en) 2019-03-19 2019-03-19 Method and system for improving solid state disk firmware test efficiency

Country Status (1)

Country Link
CN (1) CN109976762B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2667142A1 (en) * 2006-10-20 2008-04-24 Her Majesty The Queen, In Right Of Canada As Represented By The Minister Of Health Through The Public Health Agency Of Canada Method and apparatus for creating a configurable browser-based forms application
CN102508670A (en) * 2011-11-18 2012-06-20 康佳集团股份有限公司 Method and system for customizing television software
CN106020918A (en) * 2016-04-29 2016-10-12 广州小百合信息技术有限公司 Television software compiling method and system
CN107450933A (en) * 2017-08-18 2017-12-08 郑州云海信息技术有限公司 A kind of software continuous integrated approach and system
CN108376073A (en) * 2016-11-15 2018-08-07 平安科技(深圳)有限公司 A kind of test software packet generation method and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2667142A1 (en) * 2006-10-20 2008-04-24 Her Majesty The Queen, In Right Of Canada As Represented By The Minister Of Health Through The Public Health Agency Of Canada Method and apparatus for creating a configurable browser-based forms application
CN102508670A (en) * 2011-11-18 2012-06-20 康佳集团股份有限公司 Method and system for customizing television software
CN106020918A (en) * 2016-04-29 2016-10-12 广州小百合信息技术有限公司 Television software compiling method and system
CN108376073A (en) * 2016-11-15 2018-08-07 平安科技(深圳)有限公司 A kind of test software packet generation method and terminal
CN107450933A (en) * 2017-08-18 2017-12-08 郑州云海信息技术有限公司 A kind of software continuous integrated approach and system

Also Published As

Publication number Publication date
CN109976762A (en) 2019-07-05

Similar Documents

Publication Publication Date Title
CN109388566B (en) Code coverage rate analysis method, device, equipment and storage medium
CN103577324B (en) Static detection method for privacy information disclosure in mobile applications
CN105630463B (en) For detecting the method and device of JAR packet conflict
CN110413506A (en) Test case recommended method, device, equipment and storage medium
CN112306855B (en) Interface automation test method, device, terminal and storage medium
CN109726107A (en) Test method, device, equipment and storage medium
CN110348218B (en) Vulnerability testing method and device based on vehicle-mounted terminal system
CN107329889B (en) Method for automatically testing C compiler
CN105653946A (en) Android malicious behavior detection system based on combined event behavior triggering and detection method of Android malicious behavior detection system
CN107643893A (en) A kind of program detecting method and device
CN108875375B (en) Dynamic characteristic information extraction method for android system privacy leakage detection
CN103823665B (en) SDK (software development kit) activeness analyzing method, network server and system
CN106874196B (en) Automatic test exception handling method and automatic test system
CN109558328A (en) A kind of test method of code coverage, system, device and readable storage medium storing program for executing
CN115292197A (en) Software testing method and device, electronic equipment and storage medium
CN108897588B (en) Routing method and routing device for communication between modules
CN109976762B (en) Method and system for improving solid state disk firmware test efficiency
CN107273745B (en) Dynamic analysis method for malicious code in dynamic link library form
CN107341110B (en) Tool for modifying and affecting range of software test positioning patch and implementation method
CN110716859A (en) Method for automatically pushing test cases for modified codes and related device
CN113688031B (en) Test positioning method based on byte code enhancement technology
CN113127367B (en) Defect detection method for Android dynamic permission application
CN114816984A (en) JAVA program regression test method and test device
CN108845932B (en) Unit testing method and device of network library, storage medium and terminal
CN111338956A (en) Automatic pressure measurement method, device, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant