SimTester: a controllable and observable testing framework for embedded systems

In software for embedded systems, the frequent use of interrupts for timing, sensing, and I/O processing can cause concurrency faults to occur due to interactions between applications, device drivers, and interrupt handlers. This type of fault is considered by many practitioners to be among the most difficult to detect, isolate, and correct, in part because it can be sensitive to execution interleavings and often occurs without leaving any observable incorrect output. As such, commonly used testing techniques that inspect program outputs to detect failures are often ineffective at detecting them. To test for these concurrency faults, test engineers need to be able to control interleavings so that they are deterministic. Furthermore, they also need to be able to observe faults as they occur instead of relying on observable incorrect outputs. In this paper, we introduce SimTester, a framework that allows engineers to effectively test for subtle and non-deterministic concurrency faults by providing them with greater controllability and observability. We implemented our framework on a commercial virtual platform that is widely used to support hardware/software co-designs to promote ease of adoption. We then evaluated its effectiveness by using it to test for data races and deadlocks. The result shows that our framework can be effective and efficient at detecting these faults.

[1]  Norihisa Doi,et al.  An efficient and generic reversible debugger using the virtual machine based approach , 2005, VEE '05.

[2]  Koushik Sen,et al.  CalFuzzer: An Extensible Active Testing Framework for Concurrent Programs , 2009, CAV.

[3]  Greg Kroah-Hartman,et al.  Linux Device Drivers, 3rd Edition , 2005 .

[4]  Dawson R. Engler,et al.  KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs , 2008, OSDI.

[5]  David Lie,et al.  Using VMM-based sensors to monitor honeypots , 2006, VEE '06.

[6]  Sebastian Fischmeister,et al.  Tracing interrupts in embedded software , 2009, LCTES '09.

[7]  Greg Kroah-Hartman,et al.  Linux Device Drivers , 1998 .

[8]  David Hovemeyer,et al.  Finding Concurrency Bugs in Java , 2004 .

[9]  Stephen N. Freund,et al.  FastTrack: efficient and precise dynamic race detection , 2009, PLDI '09.

[10]  Michael D. Bond,et al.  PACER: proportional detection of data races , 2010, PLDI '10.

[11]  Michael Roitzsch,et al.  Capability wrangling made easy: debugging on a microkernel with valgrind , 2010, VEE '10.

[12]  Lionel C. Briand,et al.  Is mutation an appropriate tool for testing experiments? , 2005, ICSE.

[13]  Tuomas Ihme,et al.  Challenges of software-hardware co-design: Prestudy in TWINS project , 2008 .

[14]  Katsuro Inoue,et al.  An effective method to control interrupt handler for data race detection , 2010, AST '10.

[15]  Amir Pnueli,et al.  Checking that finite state concurrent programs satisfy their linear specification , 1985, POPL.

[16]  Lars Albertsson Simulation-Based Debugging of Soft Real-Time Applications , 2001, IEEE Real Time Technology and Applications Symposium.

[17]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multithreaded programs , 1997, TOCS.

[18]  Yann-Hang Lee,et al.  Schedulable Online Testing Framework for Real-Time Embedded Applications in VM , 2007, EUC.

[19]  Michael Franz,et al.  Tracing for web 3.0: trace compilation for the next generation web applications , 2009, VEE '09.

[20]  Koushik Sen,et al.  Randomized active atomicity violation detection in concurrent programs , 2008, SIGSOFT '08/FSE-16.

[21]  Koushik Sen,et al.  Race directed random testing of concurrent programs , 2008, PLDI '08.

[22]  Koushik Sen,et al.  CUTE: a concolic unit testing engine for C , 2005, ESEC/FSE-13.

[23]  Tal Garfinkel,et al.  VMwareDecoupling Dynamic Program Analysis from Execution in Virtual Environments , 2008, USENIX Annual Technical Conference.

[24]  Jörg Brauer,et al.  Reduction of Interrupt Handler Executions for Model Checking Embedded Software , 2009, Haifa Verification Conference.

[25]  Jens Palsberg,et al.  Static checking of interrupt-driven software , 2001, Proceedings of the 23rd International Conference on Software Engineering. ICSE 2001.

[26]  Dawson R. Engler,et al.  Checking system rules using system-specific, programmer-written compiler extensions , 2000, OSDI.

[27]  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.

[28]  John Regehr,et al.  Random testing of interrupt-driven software , 2005, EMSOFT.

[29]  Lori A. Clarke,et al.  Data flow analysis for verifying properties of concurrent programs , 1994, SIGSOFT '94.

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

[31]  Richard H. Carver,et al.  Replay and testing for concurrent programs , 1991, IEEE Software.

[32]  Sriram Sankaranarayanan,et al.  Fast and Accurate Static Data-Race Detection for Concurrent Programs , 2007, CAV.

[33]  Sriram K. Rajamani,et al.  Thorough static analysis of device drivers , 2006, EuroSys.

[34]  Sanjay Bhansali,et al.  Framework for instruction-level tracing and analysis of program executions , 2006, VEE '06.

[35]  Sorin Lerner,et al.  RELAY: static race detection on millions of lines of code , 2007, ESEC-FSE '07.

[36]  Shigeru Chiba,et al.  HyperSpector: virtual distributed monitoring environments for secure intrusion detection , 2005, VEE '05.

[37]  Yuanyuan Zhou,et al.  aComment: mining annotations from comments and code to detect interrupt related concurrency bugs , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

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