📄 testing-filters.html
字号:
<!-- Copyright (C) 2003 Red Hat, Inc. --><!-- This material may be distributed only subject to the terms --><!-- and conditions set forth in the Open Publication License, v1.0 --><!-- or later (the latest version is presently available at --><!-- http://www.opencontent.org/openpub/). --><!-- Distribution of the work or derivative of the work in any --><!-- standard (paper) book form is prohibited unless prior --><!-- permission is obtained from the copyright holder. --><HTML><HEAD><TITLE>Testing Filters</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos User Guide"HREF="ecos-user-guide.html"><LINKREL="UP"TITLE="Running an eCos Test Case"HREF="running-an-ecos-test-case.html"><LINKREL="PREVIOUS"TITLE="Using the command line"HREF="using-commandline-testcase.html"><LINKREL="NEXT"TITLE="Building and Running Sample Applications"HREF="building-and-running-sample-appliations.html"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos User Guide</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="using-commandline-testcase.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 12. Running an <SPANCLASS="PRODUCTNAME">eCos</SPAN> Test Case</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="building-and-running-sample-appliations.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="TESTING-FILTERS">Testing Filters</H1><P>While most test cases today run solely in the target environment,some packages may require external testing infrastructure and/orfeedback from the external environment to do complete testing.</P><P>The serial package is an example of this. The network packagealso contains some tests that require programs to be run on ahost. See the network <ICLASS="CITETITLE">Tests and Demonstrations</I>section in the network documentation in the <ICLASS="CITETITLE"><SPANCLASS="PRODUCTNAME">eCos</SPAN> ReferenceGuide</I>. Here we will concentrate on the serial tests sincethese are applicable to more targets.</P><P>Since the serial line is also used for communication withGDB, a filter is inserted in the communication pathway betweenGDB and the serial device which is connected to the hardware target.The filter forwards all communication between the two, but alsolistens for special commands embedded in the data stream from thetarget.</P><P>When such a command is seen, the filter stops forwarding datato GDB from the target and enters a special mode. In this modethe test case running on the target is able to control the filter,commanding it to run various tests. While these tests run, GDB isisolated from the target.</P><P>As the test completes (or if the filter detects a target crash)the communication path between GDB and the hardware target is re-established,allowing GDB to resume control.</P><P>In theory, it is possible to extend the filter to providea generic framework for other target-external testing components,thus decoupling the testing infrastructure from the (possibly limited)communication means provided by the target (serial, JTAG, Ethernet,etc). </P><P>Another advantage is that the host tools do not need toknow about the various testing environments required by the <SPANCLASS="PRODUCTNAME">eCos</SPAN>packages, since all contact with the target continues to happenvia GDB.</P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="using-commandline-testcase.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-user-guide.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="building-and-running-sample-appliations.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Using the command line</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="running-an-ecos-test-case.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Building and Running Sample Applications</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -