Dr. Dobb's Journal - June 2008 - (Page 26) d06doug_p4db 4/18/08 8:07 AM Page 26 Core Technology BUILDING A TEST HARNESS FOR RTOS continued from page 23 In effect, we “outsourced” our boring and monotonous testing to a set of machines, closing the loop between writing, testing, and delivering systems (what we call “general-purpose operating systems” or GPOS) run when no real-time task needs to run. This way, our software is an operating system itself but runs cooperatively with other operating systems—currently Linux, NetBSD, and FreeBSD. We needed to test RTCore when interacting not only with each of these operating systems but when running on Intel x86, four distinct classes of PowerPC, StrongARM, XScale, ARM7, ARM9, Alpha, and MIPS. These processors range from four-processor VME-bus-based systems used for industrial and military applications down to MMUless ARM7 processors that run for days on battery when tracking the movements of mountain lions in the Florida Everglades. We have to push each piece of hardware to the limits of what it can be expected to provide, but not beyond. Spurious failures due to stressing the system too much would lead either to far too much intervention by PEG® GUI Development Tools A family of portable graphics software for designing a high performance GUI for any embedded device. us to address the problem, or to complacency by neglecting an error when the test system reported it. False errors are simply unacceptable because they would seriously damage the trust we have in the test system. This required that we compile a detailed list of our expectations for each piece of hardware, then test against that. That’s no small task, but is extremely important. When starting on a project like this, care should be taken to ensure that this is done the first time, and continued, with all the diligence necessary. The test infrastructure hardware itself was made up of standard parts available from the Internet. At the heart of our system are X10 power control modules. These devices connect to a host computer via RS232, turning “receiver” X10 modules on/off. Normally, these are used to turn appliances on/off but we used them to control computers. To log events in our system, we use serial (RS232) consoles for everything. That means we have about 100+ serial lines that we have to manage and log data on. We started off with inexpensive USB 8-way RS232 devices, but eventually switched to Cyclades 32-way serial devices. Tracking tests, bug fixes, and changes to the system with something this large and complex isn’t easy. If your revision-control software isn’t up to the task, then it’s even harder. We use BitKeeper to manage our source code, test results, and other data. It’s an easy-to-use tool that lets us script things beautifully. D ow nl oa d a First Implementation and Some Mistakes The first implementation of the test harness was crude because of time and resource constraints. The original machine that ran these tests was built from spare parts and had no case. (The name “Sparky” comes from our attempts to power-on the board without an actual on-off switch.) Still, the value of the system was proven within a few days. We found compile errors we didn’t know existed because we never compiled with those options enabled. We quickly added the ability to do runtime tests and expanded to what I’ve described here. application development G R APHI C S S O F T WAR E FO R E MBE D D E D SYS TE MS 26 Dr. Dobb’s Journal l www.ddj.com l June 2008 http://www.swellsoftware.com http://www.swellsoftware.com http://www.ddj.com
Table of Contents Feed for the Digital Edition of Dr. Dobb's Journal - June 2008 Dr. Dobb's Journal - June 2008 Contents Friday Night Fish Fry Alia Vox Developer Diaries There Must Be Contest Conversations Building a Test Harness for RTOS QT and Windows CE Software to Hardware Parallelization Performance Portable C++ Effective Concurrency The Agile Edge Swaine's Flames Dr. Dobb's Journal - June 2008 Dr. Dobb's Journal - June 2008 - Dr. Dobb's Journal - June 2008 (Page Cover1) Dr. Dobb's Journal - June 2008 - Dr. Dobb's Journal - June 2008 (Page Cover2) Dr. Dobb's Journal - June 2008 - Dr. Dobb's Journal - June 2008 (Page 1) Dr. Dobb's Journal - June 2008 - Dr. Dobb's Journal - June 2008 (Page 2) Dr. Dobb's Journal - June 2008 - Dr. Dobb's Journal - June 2008 (Page 3) Dr. Dobb's Journal - June 2008 - Contents (Page 4) Dr. Dobb's Journal - June 2008 - Contents (Page 5) Dr. Dobb's Journal - June 2008 - Friday Night Fish Fry (Page 6) Dr. Dobb's Journal - June 2008 - Friday Night Fish Fry (Page 7) Dr. Dobb's Journal - June 2008 - Friday Night Fish Fry (Page 8) Dr. Dobb's Journal - June 2008 - Friday Night Fish Fry (Page 9) Dr. Dobb's Journal - June 2008 - Alia Vox (Page 10) Dr. Dobb's Journal - June 2008 - Alia Vox (Page 11) Dr. Dobb's Journal - June 2008 - Alia Vox (Page 12) Dr. Dobb's Journal - June 2008 - Alia Vox (Page 13) Dr. Dobb's Journal - June 2008 - Developer Diaries (Page 14) Dr. Dobb's Journal - June 2008 - Developer Diaries (Page 15) Dr. Dobb's Journal - June 2008 - There Must Be Contest (Page 16) Dr. Dobb's Journal - June 2008 - There Must Be Contest (Page 17) Dr. Dobb's Journal - June 2008 - There Must Be Contest (Page 18) Dr. Dobb's Journal - June 2008 - There Must Be Contest (Page 19) Dr. Dobb's Journal - June 2008 - Conversations (Page 20) Dr. Dobb's Journal - June 2008 - Conversations (Page 21) Dr. Dobb's Journal - June 2008 - Building a Test Harness for RTOS (Page 22) Dr. Dobb's Journal - June 2008 - Building a Test Harness for RTOS (Page 23) Dr. Dobb's Journal - June 2008 - Building a Test Harness for RTOS (Page 24) Dr. Dobb's Journal - June 2008 - Building a Test Harness for RTOS (Page IBM-1) Dr. Dobb's Journal - June 2008 - Building a Test Harness for RTOS (Page IMB-2) Dr. Dobb's Journal - June 2008 - Building a Test Harness for RTOS (Page 25) Dr. Dobb's Journal - June 2008 - Building a Test Harness for RTOS (Page 26) Dr. Dobb's Journal - June 2008 - Building a Test Harness for RTOS (Page 27) Dr. Dobb's Journal - June 2008 - Building a Test Harness for RTOS (Page 28) Dr. Dobb's Journal - June 2008 - Building a Test Harness for RTOS (Page 29) Dr. Dobb's Journal - June 2008 - QT and Windows CE (Page 30) Dr. Dobb's Journal - June 2008 - QT and Windows CE (Page 31) Dr. Dobb's Journal - June 2008 - QT and Windows CE (Page 32) Dr. Dobb's Journal - June 2008 - QT and Windows CE (Page 33) Dr. Dobb's Journal - June 2008 - QT and Windows CE (Page 34) Dr. Dobb's Journal - June 2008 - QT and Windows CE (Page 35) Dr. Dobb's Journal - June 2008 - Software to Hardware Parallelization (Page 36) Dr. Dobb's Journal - June 2008 - Software to Hardware Parallelization (Page 37) Dr. Dobb's Journal - June 2008 - Software to Hardware Parallelization (Page 38) Dr. Dobb's Journal - June 2008 - Software to Hardware Parallelization (Page 39) Dr. Dobb's Journal - June 2008 - Performance Portable C++ (Page 40) Dr. Dobb's Journal - June 2008 - Performance Portable C++ (Page 41) Dr. Dobb's Journal - June 2008 - Performance Portable C++ (Page 42) Dr. Dobb's Journal - June 2008 - Performance Portable C++ (Page 43) Dr. Dobb's Journal - June 2008 - Performance Portable C++ (Page 44) Dr. Dobb's Journal - June 2008 - Performance Portable C++ (Page 45) Dr. Dobb's Journal - June 2008 - Performance Portable C++ (Page 46) Dr. Dobb's Journal - June 2008 - Performance Portable C++ (Page 47) Dr. Dobb's Journal - June 2008 - Effective Concurrency (Page 48) Dr. Dobb's Journal - June 2008 - Effective Concurrency (Page 49) Dr. Dobb's Journal - June 2008 - Effective Concurrency (Page 50) Dr. Dobb's Journal - June 2008 - Effective Concurrency (Page 51) Dr. Dobb's Journal - June 2008 - The Agile Edge (Page 52) Dr. Dobb's Journal - June 2008 - The Agile Edge (Page 53) Dr. Dobb's Journal - June 2008 - The Agile Edge (Page 54) Dr. Dobb's Journal - June 2008 - The Agile Edge (Page 55) Dr. Dobb's Journal - June 2008 - Swaine's Flames (Page 56) Dr. Dobb's Journal - June 2008 - Swaine's Flames (Page Cover3) Dr. Dobb's Journal - June 2008 - Swaine's Flames (Page Cover4)
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.