Location pairs: a test coverage metric for shared-memory concurrent programs

We present a coverage metric targeted at shared-memory concurrent programs: the Location Pairs (LP) coverage metric. The goals of this metric are (i) to measure how thoroughly a program has been tested from a concurrency standpoint, i.e., whether enough qualitatively different thread interleavings have been explored, and (ii) to guide testing towards unexplored concurrency scenarios. This metric was inspired by an access pattern known to lead to high-level concurrency errors in industrial software and in the literature. We built a monitoring tool to measure LP coverage of test programs. We used the LP metric for interactive debugging, and compared LP coverage with other concurrency coverage metrics on Java benchmarks. We demonstrated that LP coverage corresponds better to concurrency errors, is a better measure of how well a program is exercised concurrency-wise by a test set, reaches saturation later than other coverage metrics, and is viable and useful as an interactive testing and debugging tool.

[1]  Klaus Havelund,et al.  Benchmark and framework for encouraging research on multi-threaded testing tools , 2003, Proceedings International Parallel and Distributed Processing Symposium.

[2]  Yossi Lichtenstein,et al.  Testing concurrent programs: a formal evaluation of coverage criteria , 1996, Proceedings of the Seventh Israeli Conference on Computer Systems and Software Engineering.

[3]  Shan Lu,et al.  A study of interleaving coverage criteria , 2007, ESEC-FSE '07.

[4]  Klaus Havelund,et al.  Model checking programs , 2000, Proceedings ASE 2000. Fifteenth IEEE International Conference on Automated Software Engineering.

[5]  Matthew B. Dwyer,et al.  Saturation-based testing of concurrent programs , 2009, ESEC/FSE '09.

[6]  Eitan Farchi,et al.  Applications of synchronization coverage , 2005, PPoPP.

[7]  Serdar Tasiran,et al.  VYRD: verifYing concurrent programs by runtime refinement-violation detection , 2005, PLDI '05.

[8]  James R. Cordy,et al.  Mutation Operators for Concurrent Java ( J 2 SE 5 . 0 ) 1 , 2006 .

[9]  David Gregg,et al.  Platform independent dynamic Java virtual machine analysis: the Java Grande Forum benchmark suite , 2003, Concurr. Comput. Pract. Exp..

[10]  Azadeh Farzan,et al.  Monitoring Atomicity in Concurrent Programs , 2008, CAV.

[11]  Stephen N. Freund,et al.  Velodrome: a sound and complete dynamic atomicity checker for multithreaded programs , 2008, PLDI '08.

[12]  Shmuel Ur,et al.  ConTest listeners: a concurrency-oriented infrastructure for Java test and heal tools , 2007, SOQUA '07.

[13]  Serdar Tasiran,et al.  Goldilocks: a race-aware Java runtime , 2010, Commun. ACM.

[14]  Stephen N. Freund,et al.  Atomizer: A dynamic atomicity checker for multithreaded programs , 2008, Sci. Comput. Program..

[15]  Keshav Pingali,et al.  Lonestar: A suite of parallel irregular programs , 2009, 2009 IEEE International Symposium on Performance Analysis of Systems and Software.

[16]  Serdar Tasiran,et al.  A classification of concurrency bugs in java benchmarks by developer intent , 2006, PADTAD '06.

[17]  James F. Power,et al.  Platform independent dynamic Java virtual machine analysis: the Java Grande Forum benchmark suite , 2001, JGI '01.

[18]  Alexander Aiken,et al.  Effective static race detection for Java , 2006, PLDI '06.

[19]  Thomas Ball,et al.  Finding and Reproducing Heisenbugs in Concurrent Programs , 2008, OSDI.

[20]  Eitan Farchi,et al.  Concurrent bug patterns and how to test them , 2003, Proceedings International Parallel and Distributed Processing Symposium.

[21]  Lori L. Pollock,et al.  All-du-path coverage for parallel programs , 1998, ISSTA '98.

[22]  Cormac Flanagan,et al.  Types for atomicity , 2003, TLDI '03.

[23]  Phyllis G. Frankl,et al.  An Experimental Comparison of the Effectiveness of Branch Testing and Data Flow Testing , 1993, IEEE Trans. Software Eng..

[24]  Jun Chen,et al.  Testing concurrent programs using value schedules , 2007, ASE.

[25]  Yosi Ben-Asher,et al.  Producing scheduling that causes concurrent programs to fail , 2006, PADTAD '06.

[26]  Gregg Rothermel,et al.  Using Property-Based Oracles when Testing Embedded System Applications , 2011, 2011 Fourth IEEE International Conference on Software Testing, Verification and Validation.

[27]  Jan Tretmans,et al.  Testing Concurrent Systems: A Formal Approach , 1999, CONCUR.

[28]  Scott D. Stoller,et al.  Accurate and efficient runtime detection of atomicity errors in concurrent programs , 2006, PPoPP '06.

[29]  Alan Kaminsky Parallel Java: A Unified API for Shared Memory and Cluster Parallel Programming in 100% Java , 2007, 2007 IEEE International Parallel and Distributed Processing Symposium.

[30]  Ohad Kammar,et al.  Algebraic foundations for effect-dependent optimisations , 2012, POPL '12.

[31]  Richard N. Taylor,et al.  Structural Testing of Concurrent Programs , 1992, IEEE Trans. Software Eng..

[32]  Jeremy Manson,et al.  The Java memory model , 2005, POPL '05.

[33]  Shing-Chi Cheung,et al.  Inter-context control-flow and data-flow test adequacy criteria for nesC applications , 2008, SIGSOFT '08/FSE-16.

[34]  L.A. Smith,et al.  A Parallel Java Grande Benchmark Suite , 2001, ACM/IEEE SC 2001 Conference (SC'01).

[35]  Gregg Rothermel,et al.  Testing Inter-layer and Inter-task Interactions in RTES Applications , 2010, 2010 Asia Pacific Software Engineering Conference.

[36]  Hong Zhu,et al.  Software unit test coverage and adequacy , 1997, ACM Comput. Surv..