1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
12 >Testing Filters</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos User Guide"
20 HREF="ecos-user-guide.html"><LINK
22 TITLE="Running an eCos Test Case"
23 HREF="running-an-ecos-test-case.html"><LINK
25 TITLE="Using the command line"
26 HREF="using-commandline-testcase.html"><LINK
28 TITLE="Building and Running Sample Applications"
29 HREF="building-and-running-sample-appliations.html"></HEAD
40 SUMMARY="Header navigation table"
57 HREF="using-commandline-testcase.html"
65 >Chapter 12. Running an <SPAN
74 HREF="building-and-running-sample-appliations.html"
88 NAME="TESTING-FILTERS">Testing Filters</H1
90 >While most test cases today run solely in the target environment,
91 some packages may require external testing infrastructure and/or
92 feedback from the external environment to do complete testing.</P
94 >The serial package is an example of this. The network package
95 also contains some tests that require programs to be run on a
96 host. See the network <I
98 >Tests and Demonstrations</I
100 section in the network documentation in the <I
107 >. Here we will concentrate on the serial tests since
108 these are applicable to more targets.</P
110 >Since the serial line is also used for communication with
111 GDB, a filter is inserted in the communication pathway between
112 GDB and the serial device which is connected to the hardware target.
113 The filter forwards all communication between the two, but also
114 listens for special commands embedded in the data stream from the
117 >When such a command is seen, the filter stops forwarding data
118 to GDB from the target and enters a special mode. In this mode
119 the test case running on the target is able to control the filter,
120 commanding it to run various tests. While these tests run, GDB is
121 isolated from the target.</P
123 >As the test completes (or if the filter detects a target crash)
124 the communication path between GDB and the hardware target is re-established,
125 allowing GDB to resume control.</P
127 >In theory, it is possible to extend the filter to provide
128 a generic framework for other target-external testing components,
129 thus decoupling the testing infrastructure from the (possibly limited)
130 communication means provided by the target (serial, JTAG, Ethernet,
133 >Another advantage is that the host tools do not need to
134 know about the various testing environments required by the <SPAN
138 packages, since all contact with the target continues to happen
146 SUMMARY="Footer navigation table"
157 HREF="using-commandline-testcase.html"
166 HREF="ecos-user-guide.html"
175 HREF="building-and-running-sample-appliations.html"
185 >Using the command line</TD
191 HREF="running-an-ecos-test-case.html"
199 >Building and Running Sample Applications</TD