File: [Development] / ltp-website / howto / x59.html (download) (as text)
Revision 1.1, Wed Oct 11 15:52:55 2000 UTC (17 years ago) by nstraz
Branch: MAIN
I'm going to start a discussion on the list about the howto and I want to put some exports of the howto out there for people to look at.
|
<HTML
><HEAD
><TITLE
> Testing Tools
</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.49"><LINK
REL="HOME"
TITLE=" Linux Test Project HOWTO
"
HREF="t1.html"><LINK
REL="PREVIOUS"
TITLE=" Writing Tests
"
HREF="x50.html"><LINK
REL="NEXT"
TITLE=" To Do
"
HREF="x76.html"></HEAD
><BODY
CLASS="SECT1"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux Test Project HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x50.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x76.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN59"
>Testing Tools</A
></H1
><P
> The Linux Test Project has not yet decided on a "final" test harness. We have provided a simple solution with pan to make due until a complete solution has been found/created that compliments the Linux kernel development process. Several people have said we should use such and such a test harness. Until we find we need a large complex test harness, we will apply the KISS concept.
</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN62"
>Pan</A
></H2
><P
> pan is a simple test driver. It will take a list of test tags and command lines and run them. pan has the ability to run the test sequentially or randomly and in parallel while capturing test output and cleaning up orphaned processes. pan can also be nested to create very complex test environments.
</P
><P
> A pan file contains a list of tests to run. The format of a pan file is as follows:
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>testtag testprogram -o one -p two other command line options
# This is a comment. It is a good idea to describe the test
# tags in your pan file. Tests programs can have different
# behaviors depending on the command line options so it is
# helpful to describe what each test tag is meant to verify or
# provoke.
# Some more test cases
mm01 mmap001 -m 10000
# 40 Mb mmap() test.
# Creates a 10000 page mmap, touches all of the map, sync's
# it, and munmap()s it.
mm03 mmap001 -i 0 -I 1 -m 100
# repetitive mmapping test.
# Creates a one page map repetitively for one minute.
dup02 dup02
# Negative test for dup(2) with bad fd
kill09 kill09
# Basic test for kill(2)
fs-suite01 pan -e -a fs-suite01.zoo -n fs-suite01 -f runtest/fs
# run the entire set of file system tests
</PRE
></TD
></TR
></TABLE
><P
> For more information on pan see the man page doc/man1/pan.1.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN68"
>Scanner</A
></H2
><P
> scanner is a results analysis tool that understands the <I
CLASS="EMPHASIS"
>rts</I
> style output which pan generates by default. It will produce a table summarizing which tests passed and which failed.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN72"
>The Quick-hitter Package</A
></H2
><P
> Many of the tests released use the Quick-hitter test package to perform tasks like create and move to a temporary directory, handle some common command line parameters, loop, run in parallel, handle signals, and clean up.
</P
><P
> There is an example test case, doc/examples/quickhit.c, which shows how the quick-hitter package can be used. The file is meant to be a supplement to the documentation, not a working test case. Use any of the tests in tests/ as a template.
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x50.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="t1.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x76.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Writing Tests</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
> </TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>To Do</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>