Font Size: a A A

The Design And Implementation Of A Concurrent Program Testing And Replaying Tool

Posted on:2015-06-02Degree:MasterType:Thesis
Country:ChinaCandidate:Z WangFull Text:PDF
GTID:2298330467985465Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the development of multi-core and distributed computation technique, the concurrent software design has been paid wide attention and applied as an optimal solution. However, the concurrency of software design brings about two main problems in the field of concurrent testing:The first problem is that there exists not only the particularity but also the randomness in the concurrent software’s scheduling. A mass of thread intersection leads to the trace of concurrent software testing extraordinarily complex, and it is often a difficult task to find this kind of trace. Second, as a mass of thread switches exists in the concurrent software execution, the trace can get too detailed and complex to understand, few ones can get useful information from it.For addressing the above two problems in the concurrent testing, this paper provides a design and implementation of multithreaded programs testing tool. It rewrites the C++Pthread library functions by inserting hook functions to reveal and capture the memory point information, scheduling point information, thread information, concurrent operation’s information and so on; tester can run specific thread to replay scheduling trace when stepping through statements of program leaning on the utilization of semaphores, further can analysis the reason of bugs; this tool is also able to map the trace of scheduling point to the corresponding line of the source code file, it helps tester understand the complex trace.In the top design of this tool, this paper builds a visual test tool platform under QT development environment. Loading source file, displaying the source file content, compiling c++source files to executable files using the modified Pthread library functions, random runs test, one step runs test, recording the scheduling sequences, contrasting test traces... all these functions are integrated into the system of this test tool, which basically constitutes a test platform of integrating compiling, testing and replaying process.This test tool has been testified successfully in the loading, compiling, step test and random test of concurrent programs, which will map multifarious scheduling sequence information visibly to the accurate location of source file; Testers can select in running a specific thread at certain scheduling point to recreate a particular thread execution sequence.Furthermore, this graduation project has tested5benchmarks up to10000lines codes for testing the tools, and respectively gets the reason of each concurrent exception.
Keywords/Search Tags:Concurrent software testing, Test tool, Visuality
PDF Full Text Request
Related items