2003-03-13 02:30:29 +01:00
|
|
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/regress.sgml,v 1.31 2003/03/13 01:30:29 petere Exp $ -->
|
2000-10-17 17:26:40 +02:00
|
|
|
|
2000-05-02 22:02:03 +02:00
|
|
|
<chapter id="regress">
|
2000-10-17 17:26:40 +02:00
|
|
|
<title id="regress-title">Regression Tests</title>
|
2000-05-02 22:02:03 +02:00
|
|
|
|
|
|
|
<para>
|
2000-10-17 17:26:40 +02:00
|
|
|
The regression tests are a comprehensive set of tests for the SQL
|
|
|
|
implementation in <productname>PostgreSQL</productname>. They test
|
|
|
|
standard SQL operations as well as the extended capabilities of
|
2003-03-13 02:30:29 +01:00
|
|
|
<productname>PostgreSQL</productname>. From
|
|
|
|
<productname>PostgreSQL</productname> 6.1 onward, the regression
|
|
|
|
tests are current for every official release.
|
2000-05-02 22:02:03 +02:00
|
|
|
</para>
|
|
|
|
|
2001-09-21 20:37:05 +02:00
|
|
|
<sect1 id="regress-run">
|
|
|
|
<title>Running the Tests</title>
|
|
|
|
|
2000-05-02 22:02:03 +02:00
|
|
|
<para>
|
2000-10-17 17:26:40 +02:00
|
|
|
The regression test can be run against an already installed and
|
|
|
|
running server, or using a temporary installation within the build
|
|
|
|
tree. Furthermore, there is a <quote>parallel</quote> and a
|
|
|
|
<quote>sequential</quote> mode for running the tests. The
|
|
|
|
sequential method runs each test script in turn, whereas the
|
|
|
|
parallel method starts up multiple server processes to run groups
|
|
|
|
of tests in parallel. Parallel testing gives confidence that
|
|
|
|
interprocess communication and locking are working correctly. For
|
|
|
|
historical reasons, the sequential test is usually run against an
|
2000-10-22 21:11:05 +02:00
|
|
|
existing installation and the parallel method against a temporary
|
|
|
|
installation, but there are no technical reasons for this.
|
2000-05-02 22:02:03 +02:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2000-10-17 17:26:40 +02:00
|
|
|
To run the regression tests after building but before installation,
|
|
|
|
type
|
|
|
|
<screen>
|
2003-03-13 02:30:29 +01:00
|
|
|
gmake check
|
2000-10-17 17:26:40 +02:00
|
|
|
</screen>
|
|
|
|
in the top-level directory. (Or you can change to
|
|
|
|
<filename>src/test/regress</filename> and run the command there.)
|
|
|
|
This will first build several auxiliary files, such as
|
2003-03-13 02:30:29 +01:00
|
|
|
some sample
|
2000-10-17 17:26:40 +02:00
|
|
|
user-defined trigger functions, and then run the test driver
|
|
|
|
script. At the end you should see something like
|
|
|
|
<screen>
|
|
|
|
<computeroutput>
|
|
|
|
======================
|
2001-08-07 00:53:26 +02:00
|
|
|
All 77 tests passed.
|
2000-10-17 17:26:40 +02:00
|
|
|
======================
|
|
|
|
</computeroutput>
|
|
|
|
</screen>
|
|
|
|
or otherwise a note about what tests failed. See <xref
|
|
|
|
linkend="regress-evaluation"> below for more.
|
2000-05-02 22:02:03 +02:00
|
|
|
</para>
|
|
|
|
|
2000-10-17 17:26:40 +02:00
|
|
|
<note>
|
2000-05-02 22:02:03 +02:00
|
|
|
<para>
|
2000-10-17 17:26:40 +02:00
|
|
|
Because this test method runs a temporary server, it will not work
|
|
|
|
when you are the root user (the server will not start as root).
|
|
|
|
If you already did the build as root, you do not have to start all
|
|
|
|
over. Instead, make the regression test directory writable by
|
|
|
|
some other user, log in as that user, and restart the tests.
|
2003-03-13 02:30:29 +01:00
|
|
|
For example
|
2000-10-17 17:26:40 +02:00
|
|
|
<screen>
|
|
|
|
<prompt>root# </prompt><userinput>chmod -R a+w src/test/regress</userinput>
|
2001-09-11 04:24:52 +02:00
|
|
|
<prompt>root# </prompt><userinput>chmod -R a+w contrib/spi</userinput>
|
2000-10-17 17:26:40 +02:00
|
|
|
<prompt>root# </prompt><userinput>su - joeuser</userinput>
|
2001-11-28 21:49:10 +01:00
|
|
|
<prompt>joeuser$ </prompt><userinput>cd <replaceable>top-level build directory</></userinput>
|
2000-10-17 17:26:40 +02:00
|
|
|
<prompt>joeuser$ </prompt><userinput>gmake check</userinput>
|
|
|
|
</screen>
|
|
|
|
(The only possible <quote>security risk</quote> here is that other
|
|
|
|
users might be able to alter the regression test results behind
|
|
|
|
your back. Use common sense when managing user permissions.)
|
2000-05-02 22:02:03 +02:00
|
|
|
</para>
|
|
|
|
<para>
|
2000-10-17 17:26:40 +02:00
|
|
|
Alternatively, run the tests after installation.
|
2000-05-02 22:02:03 +02:00
|
|
|
</para>
|
2000-10-17 17:26:40 +02:00
|
|
|
</note>
|
2000-05-02 22:02:03 +02:00
|
|
|
|
2001-12-04 02:49:17 +01:00
|
|
|
<tip>
|
|
|
|
<para>
|
|
|
|
The parallel regression test starts quite a few processes under your
|
2002-01-20 23:19:57 +01:00
|
|
|
user ID. Presently, the maximum concurrency is twenty parallel test
|
2003-03-13 02:30:29 +01:00
|
|
|
scripts, which means sixty processes: there's a server process, a <application>psql</>,
|
2002-09-21 20:32:54 +02:00
|
|
|
and usually a shell parent process for the <application>psql</> for each test script.
|
2001-12-04 02:49:17 +01:00
|
|
|
So if your system enforces a per-user limit on the number of processes,
|
|
|
|
make sure this limit is at least seventy-five or so, else you may get
|
|
|
|
random-seeming failures in the parallel test. If you are not in
|
|
|
|
a position to raise the limit, you can edit the file
|
|
|
|
<filename>src/test/regress/parallel_schedule</> to split the
|
|
|
|
larger concurrent test sets into more manageable groups.
|
|
|
|
</para>
|
|
|
|
</tip>
|
|
|
|
|
2000-10-17 17:26:40 +02:00
|
|
|
<tip>
|
2000-05-02 22:02:03 +02:00
|
|
|
<para>
|
2000-10-17 17:26:40 +02:00
|
|
|
On some systems, the default Bourne-compatible shell
|
|
|
|
(<filename>/bin/sh</filename>) gets confused when it has to manage
|
|
|
|
too many child processes in parallel. This may cause the parallel
|
|
|
|
test run to lock up or fail. In such cases, specify a different
|
|
|
|
Bourne-compatible shell on the command line, for example:
|
|
|
|
<screen>
|
2003-03-13 02:30:29 +01:00
|
|
|
gmake SHELL=/bin/ksh check
|
2000-10-17 17:26:40 +02:00
|
|
|
</screen>
|
2001-12-04 02:49:17 +01:00
|
|
|
If no non-broken shell is available, you can alter the parallel test
|
|
|
|
schedule as suggested above.
|
2000-05-02 22:02:03 +02:00
|
|
|
</para>
|
2000-10-17 17:26:40 +02:00
|
|
|
</tip>
|
|
|
|
|
|
|
|
<para>
|
2001-09-21 20:37:05 +02:00
|
|
|
To run the tests after installation<![%standalone-ignore;[ (see <xref linkend="installation">)]]>,
|
|
|
|
initialize a data area and start the
|
|
|
|
server, <![%standalone-ignore;[as explained in <xref linkend="runtime">, ]]> then type
|
2000-10-17 17:26:40 +02:00
|
|
|
<screen>
|
2003-03-13 02:30:29 +01:00
|
|
|
gmake installcheck
|
2000-10-17 17:26:40 +02:00
|
|
|
</screen>
|
2001-03-20 01:09:36 +01:00
|
|
|
The tests will expect to contact the server at the local host and the
|
2001-09-10 01:52:12 +02:00
|
|
|
default port number, unless directed otherwise by <envar>PGHOST</envar> and <envar>PGPORT</envar>
|
2001-03-20 01:09:36 +01:00
|
|
|
environment variables.
|
2000-10-17 17:26:40 +02:00
|
|
|
</para>
|
2001-09-21 20:37:05 +02:00
|
|
|
</sect1>
|
2000-10-17 17:26:40 +02:00
|
|
|
|
|
|
|
<sect1 id="regress-evaluation">
|
|
|
|
<title>Test Evaluation</title>
|
2000-05-02 22:02:03 +02:00
|
|
|
|
|
|
|
<para>
|
2000-10-17 17:26:40 +02:00
|
|
|
Some properly installed and fully functional
|
|
|
|
<productname>PostgreSQL</productname> installations can
|
|
|
|
<quote>fail</quote> some of these regression tests due to
|
2002-01-07 03:29:15 +01:00
|
|
|
platform-specific artifacts such as varying floating-point representation
|
2001-03-20 01:09:36 +01:00
|
|
|
and time zone support. The tests are currently evaluated using a simple
|
2003-03-13 02:30:29 +01:00
|
|
|
<command>diff</command> comparison against the outputs
|
2000-10-17 17:26:40 +02:00
|
|
|
generated on a reference system, so the results are sensitive to
|
|
|
|
small system differences. When a test is reported as
|
|
|
|
<quote>failed</quote>, always examine the differences between
|
|
|
|
expected and actual results; you may well find that the
|
|
|
|
differences are not significant. Nonetheless, we still strive to
|
|
|
|
maintain accurate reference files across all supported platforms,
|
|
|
|
so it can be expected that all tests pass.
|
2000-05-02 22:02:03 +02:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2000-10-17 17:26:40 +02:00
|
|
|
The actual outputs of the regression tests are in files in the
|
|
|
|
<filename>src/test/regress/results</filename> directory. The test
|
2003-03-13 02:30:29 +01:00
|
|
|
script uses <command>diff</command> to compare each output
|
2000-10-17 17:26:40 +02:00
|
|
|
file against the reference outputs stored in the
|
|
|
|
<filename>src/test/regress/expected</filename> directory. Any
|
|
|
|
differences are saved for your inspection in
|
|
|
|
<filename>src/test/regress/regression.diffs</filename>. (Or you
|
2003-03-13 02:30:29 +01:00
|
|
|
can run <command>diff</command> yourself, if you prefer.)
|
2000-05-02 22:02:03 +02:00
|
|
|
</para>
|
2000-10-17 17:26:40 +02:00
|
|
|
|
|
|
|
<sect2>
|
|
|
|
<title>Error message differences</title>
|
|
|
|
|
2000-05-02 22:02:03 +02:00
|
|
|
<para>
|
2000-10-17 17:26:40 +02:00
|
|
|
Some of the regression tests involve intentional invalid input
|
|
|
|
values. Error messages can come from either the
|
|
|
|
<productname>PostgreSQL</productname> code or from the host
|
|
|
|
platform system routines. In the latter case, the messages may
|
|
|
|
vary between platforms, but should reflect similar
|
|
|
|
information. These differences in messages will result in a
|
2000-12-22 19:57:50 +01:00
|
|
|
<quote>failed</quote> regression test that can be validated by
|
2000-10-17 17:26:40 +02:00
|
|
|
inspection.
|
2000-05-02 22:02:03 +02:00
|
|
|
</para>
|
2000-10-17 17:26:40 +02:00
|
|
|
</sect2>
|
1999-05-20 04:46:40 +02:00
|
|
|
|
2001-03-20 01:09:36 +01:00
|
|
|
<sect2>
|
|
|
|
<title>Locale differences</title>
|
|
|
|
|
|
|
|
<para>
|
2002-05-14 15:05:43 +02:00
|
|
|
If you run the tests against an already-installed server that was
|
|
|
|
initialized with a collation order locale different than C then
|
|
|
|
there may be differences due to sort order and follow-up
|
|
|
|
failures. The regression test suite is set up to handle this
|
|
|
|
problem by providing alternative result files that together are
|
|
|
|
known to handle a large number of locales. For example, for the
|
2003-03-13 02:30:29 +01:00
|
|
|
<literal>char</literal> test, the expected file
|
2002-09-21 20:32:54 +02:00
|
|
|
<filename>char.out</filename> handles the <literal>C</> and <literal>POSIX</> locales,
|
2002-05-14 15:05:43 +02:00
|
|
|
and the file <filename>char_1.out</filename> handles many other
|
|
|
|
locales. The regression test driver will automatically pick the
|
|
|
|
best file to match against when checking for success and for
|
|
|
|
computing failure differences. (This means that the regression
|
|
|
|
tests cannot detect whether the results are appropriate for the
|
|
|
|
configured locale. The tests will simply pick the one result
|
|
|
|
file that works best.)
|
2001-03-20 01:09:36 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2002-05-14 15:05:43 +02:00
|
|
|
If for some reason the existing expected files do not cover some
|
|
|
|
locale, you can add a new file. The naming scheme is
|
|
|
|
<literal><replaceable>testname</>_<replaceable>digit</>.out</>.
|
|
|
|
The actual digit is not significant. Remember that the
|
|
|
|
regression test driver will consider all such files to be equally
|
|
|
|
valid test results. If the test results are platform-dependent,
|
|
|
|
the technique described in <xref linkend="regress-platform">
|
|
|
|
should be used instead.
|
2001-03-20 01:09:36 +01:00
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
2000-10-17 17:26:40 +02:00
|
|
|
<sect2>
|
|
|
|
<title>Date and time differences</title>
|
2001-08-07 00:53:26 +02:00
|
|
|
|
|
|
|
<para>
|
2002-04-08 06:37:36 +02:00
|
|
|
Some of the queries in the <filename>horology</filename> test will
|
2001-11-28 21:49:10 +01:00
|
|
|
fail if you run the test on the day of a daylight-saving time
|
2001-08-07 00:53:26 +02:00
|
|
|
changeover, or the day before or after one. These queries assume
|
|
|
|
that the intervals between midnight yesterday, midnight today and
|
2003-03-13 02:30:29 +01:00
|
|
|
midnight tomorrow are exactly twenty-four hours --- which is wrong
|
2001-11-28 21:49:10 +01:00
|
|
|
if daylight-saving time went into or out of effect meanwhile.
|
2001-08-07 00:53:26 +02:00
|
|
|
</para>
|
|
|
|
|
2000-10-17 17:26:40 +02:00
|
|
|
<para>
|
|
|
|
Most of the date and time results are dependent on the time zone
|
|
|
|
environment. The reference files are generated for time zone
|
2003-03-13 02:30:29 +01:00
|
|
|
<literal>PST8PDT</literal> (Berkeley, California), and there will be apparent
|
2000-10-17 17:26:40 +02:00
|
|
|
failures if the tests are not run with that time zone setting.
|
|
|
|
The regression test driver sets environment variable
|
2001-08-07 00:53:26 +02:00
|
|
|
<envar>PGTZ</envar> to <literal>PST8PDT</literal>, which normally
|
2003-03-13 02:30:29 +01:00
|
|
|
ensures proper results. However, your operating system must provide
|
2001-09-10 01:52:12 +02:00
|
|
|
support for the <literal>PST8PDT</literal> time zone, or the time zone-dependent
|
2000-10-17 17:26:40 +02:00
|
|
|
tests will fail. To verify that your machine does have this
|
|
|
|
support, type the following:
|
|
|
|
<screen>
|
2003-03-13 02:30:29 +01:00
|
|
|
env TZ=PST8PDT date
|
2000-10-17 17:26:40 +02:00
|
|
|
</screen>
|
|
|
|
The command above should have returned the current system time in
|
2003-03-13 02:30:29 +01:00
|
|
|
the <literal>PST8PDT</literal> time zone. If the <literal>PST8PDT</literal> time zone is not available,
|
2000-10-17 17:26:40 +02:00
|
|
|
then your system may have returned the time in GMT. If the
|
2003-03-13 02:30:29 +01:00
|
|
|
<literal>PST8PDT</literal> time zone is missing, you can set the time zone
|
2000-10-17 17:26:40 +02:00
|
|
|
rules explicitly:
|
|
|
|
<programlisting>
|
|
|
|
PGTZ='PST8PDT7,M04.01.0,M10.05.03'; export PGTZ
|
|
|
|
</programlisting>
|
|
|
|
</para>
|
1999-05-20 04:46:40 +02:00
|
|
|
|
2000-10-17 17:26:40 +02:00
|
|
|
<para>
|
2000-12-22 19:57:50 +01:00
|
|
|
There appear to be some systems that do not accept the
|
2000-10-17 17:26:40 +02:00
|
|
|
recommended syntax for explicitly setting the local time zone
|
|
|
|
rules; you may need to use a different <envar>PGTZ</envar>
|
|
|
|
setting on such machines.
|
2000-05-02 22:02:03 +02:00
|
|
|
</para>
|
2000-10-17 17:26:40 +02:00
|
|
|
|
2000-05-02 22:02:03 +02:00
|
|
|
<para>
|
2003-03-13 02:30:29 +01:00
|
|
|
Some systems using older time-zone libraries fail to apply
|
2001-11-28 21:49:10 +01:00
|
|
|
daylight-saving corrections to dates before 1970, causing
|
2001-09-10 01:52:12 +02:00
|
|
|
pre-1970 <acronym>PDT</acronym> times to be displayed in <acronym>PST</acronym> instead. This will
|
2000-10-17 17:26:40 +02:00
|
|
|
result in localized differences in the test results.
|
2000-05-02 22:02:03 +02:00
|
|
|
</para>
|
2000-10-17 17:26:40 +02:00
|
|
|
</sect2>
|
1998-12-29 03:24:47 +01:00
|
|
|
|
2000-10-17 17:26:40 +02:00
|
|
|
<sect2>
|
2002-01-07 03:29:15 +01:00
|
|
|
<title>Floating-point differences</title>
|
1998-12-29 03:24:47 +01:00
|
|
|
|
2000-10-17 17:26:40 +02:00
|
|
|
<para>
|
2003-03-13 02:30:29 +01:00
|
|
|
Some of the tests involve computing 64-bit floating-point numbers (<type>double
|
|
|
|
precision</type>) from table columns. Differences in
|
2000-10-17 17:26:40 +02:00
|
|
|
results involving mathematical functions of <type>double
|
2002-11-08 21:26:12 +01:00
|
|
|
precision</type> columns have been observed. The <literal>float8</> and
|
|
|
|
<literal>geometry</> tests are particularly prone to small differences
|
|
|
|
across platforms, or even with different compiler optimization options.
|
2000-10-17 17:26:40 +02:00
|
|
|
Human eyeball comparison is needed to determine the real
|
|
|
|
significance of these differences which are usually 10 places to
|
|
|
|
the right of the decimal point.
|
|
|
|
</para>
|
1999-05-20 04:46:40 +02:00
|
|
|
|
2002-11-08 21:26:12 +01:00
|
|
|
<para>
|
|
|
|
Some systems display minus zero as <literal>-0</>, while others
|
|
|
|
just show <literal>0</>.
|
|
|
|
</para>
|
|
|
|
|
2000-10-17 17:26:40 +02:00
|
|
|
<para>
|
|
|
|
Some systems signal errors from <function>pow()</function> and
|
|
|
|
<function>exp()</function> differently from the mechanism
|
|
|
|
expected by the current <productname>PostgreSQL</productname>
|
|
|
|
code.
|
|
|
|
</para>
|
|
|
|
</sect2>
|
2001-01-02 06:56:02 +01:00
|
|
|
|
|
|
|
<sect2>
|
2001-09-21 20:37:05 +02:00
|
|
|
<title>Row ordering differences</title>
|
2001-01-02 06:56:02 +01:00
|
|
|
|
|
|
|
<para>
|
2001-09-21 20:37:05 +02:00
|
|
|
You might see differences in which the same rows are output in a
|
2001-01-02 06:56:02 +01:00
|
|
|
different order than what appears in the expected file. In most cases
|
|
|
|
this is not, strictly speaking, a bug. Most of the regression test
|
2003-03-13 02:30:29 +01:00
|
|
|
scripts are not so pedantic as to use an <literal>ORDER BY</> for every single
|
|
|
|
<literal>SELECT</>, and so their result row orderings are not well-defined
|
2001-09-21 20:37:05 +02:00
|
|
|
according to the letter of the SQL specification. In practice, since we are
|
2001-01-02 06:56:02 +01:00
|
|
|
looking at the same queries being executed on the same data by the same
|
|
|
|
software, we usually get the same result ordering on all platforms, and
|
2003-03-13 02:30:29 +01:00
|
|
|
so the lack of <literal>ORDER BY</> isn't a problem. Some queries do exhibit
|
2001-03-20 01:09:36 +01:00
|
|
|
cross-platform ordering differences, however. (Ordering differences
|
|
|
|
can also be triggered by non-C locale settings.)
|
2001-01-02 06:56:02 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Therefore, if you see an ordering difference, it's not something to
|
2003-03-13 02:30:29 +01:00
|
|
|
worry about, unless the query does have an <literal>ORDER BY</> that your result
|
2001-03-20 01:09:36 +01:00
|
|
|
is violating. But please report it anyway, so that we can add an
|
2003-03-13 02:30:29 +01:00
|
|
|
<literal>ORDER BY</> to that particular query and thereby eliminate the bogus
|
2001-01-02 06:56:02 +01:00
|
|
|
<quote>failure</quote> in future releases.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2003-03-13 02:30:29 +01:00
|
|
|
You might wonder why we don't order all the regression test queries explicitly to
|
2001-01-02 06:56:02 +01:00
|
|
|
get rid of this issue once and for all. The reason is that that would
|
|
|
|
make the regression tests less useful, not more, since they'd tend
|
|
|
|
to exercise query plan types that produce ordered results to the
|
|
|
|
exclusion of those that don't.
|
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
2000-10-17 17:26:40 +02:00
|
|
|
<sect2>
|
|
|
|
<title>The <quote>random</quote> test</title>
|
1998-12-29 03:24:47 +01:00
|
|
|
|
2000-10-17 17:26:40 +02:00
|
|
|
<para>
|
2003-03-13 02:30:29 +01:00
|
|
|
There is at least one case in the <literal>random</literal> test
|
2000-10-17 17:26:40 +02:00
|
|
|
script that is intended to produce random results. This causes
|
|
|
|
random to fail the regression test once in a while (perhaps once
|
|
|
|
in every five to ten trials). Typing
|
|
|
|
<programlisting>
|
|
|
|
diff results/random.out expected/random.out
|
|
|
|
</programlisting>
|
|
|
|
should produce only one or a few lines of differences. You need
|
|
|
|
not worry unless the random test always fails in repeated
|
|
|
|
attempts. (On the other hand, if the random test is
|
|
|
|
<emphasis>never</emphasis> reported to fail even in many trials
|
2001-09-21 20:37:05 +02:00
|
|
|
of the regression tests, you probably <emphasis>should</emphasis>
|
2000-10-17 17:26:40 +02:00
|
|
|
worry.)
|
|
|
|
</para>
|
|
|
|
</sect2>
|
2000-05-02 22:02:03 +02:00
|
|
|
</sect1>
|
2000-01-09 21:54:36 +01:00
|
|
|
|
2000-10-17 17:26:40 +02:00
|
|
|
<!-- We might want to move the following section into the developer's guide. -->
|
2000-09-29 22:21:34 +02:00
|
|
|
<sect1 id="regress-platform">
|
2000-11-22 00:40:28 +01:00
|
|
|
<title>Platform-specific comparison files</title>
|
2000-01-09 21:54:36 +01:00
|
|
|
|
2000-11-22 00:40:28 +01:00
|
|
|
<para>
|
|
|
|
Since some of the tests inherently produce platform-specific
|
|
|
|
results, we have provided a way to supply platform-specific result
|
|
|
|
comparison files. Frequently, the same variation applies to
|
|
|
|
multiple platforms; rather than supplying a separate comparison
|
|
|
|
file for every platform, there is a mapping file that defines
|
|
|
|
which comparison file to use. So, to eliminate bogus test
|
|
|
|
<quote>failures</quote> for a particular platform, you must choose
|
|
|
|
or make a variant result file, and then add a line to the mapping
|
|
|
|
file, which is <filename>resultmap</filename>.
|
|
|
|
</para>
|
2000-01-09 21:54:36 +01:00
|
|
|
|
2000-11-22 00:40:28 +01:00
|
|
|
<para>
|
|
|
|
Each line in the mapping file is of the form
|
|
|
|
<synopsis>
|
2000-11-22 01:58:47 +01:00
|
|
|
testname/platformpattern=comparisonfilename
|
2000-11-22 00:40:28 +01:00
|
|
|
</synopsis>
|
|
|
|
The test name is just the name of the particular regression test
|
2003-03-13 02:30:29 +01:00
|
|
|
module. The platform pattern is a pattern in the style of the Unix
|
|
|
|
tool <command>expr</> (that is, a regular expression with an implicit
|
2000-11-22 01:58:47 +01:00
|
|
|
<literal>^</literal> anchor
|
2000-11-22 00:40:28 +01:00
|
|
|
at the start). It is matched against the platform name as printed
|
2003-03-13 02:30:29 +01:00
|
|
|
by <command>config.guess</command> followed by
|
2000-11-22 00:40:28 +01:00
|
|
|
<literal>:gcc</literal> or <literal>:cc</literal>, depending on
|
|
|
|
whether you use the GNU compiler or the system's native compiler
|
|
|
|
(on systems where there is a difference). The comparison file
|
|
|
|
name is the name of the substitute result comparison file.
|
|
|
|
</para>
|
2000-01-09 21:54:36 +01:00
|
|
|
|
2000-11-22 00:40:28 +01:00
|
|
|
<para>
|
2001-08-07 00:53:26 +02:00
|
|
|
For example: some systems using older time zone libraries fail to apply
|
2001-11-28 21:49:10 +01:00
|
|
|
daylight-saving corrections to dates before 1970, causing
|
2001-09-10 01:52:12 +02:00
|
|
|
pre-1970 <acronym>PDT</acronym> times to be displayed in <acronym>PST</acronym> instead. This causes a
|
2001-08-07 00:53:26 +02:00
|
|
|
few differences in the <filename>horology</> regression test.
|
2000-11-22 00:40:28 +01:00
|
|
|
Therefore, we provide a variant comparison file,
|
2001-08-07 00:53:26 +02:00
|
|
|
<filename>horology-no-DST-before-1970.out</filename>, which includes
|
|
|
|
the results to be expected on these systems. To silence the bogus
|
2001-09-10 01:52:12 +02:00
|
|
|
<quote>failure</quote> message on <systemitem>HPPA</systemitem> platforms, <filename>resultmap</filename>
|
2000-11-22 00:40:28 +01:00
|
|
|
includes
|
|
|
|
<programlisting>
|
2001-08-07 00:53:26 +02:00
|
|
|
horology/hppa=horology-no-DST-before-1970
|
2000-11-22 00:40:28 +01:00
|
|
|
</programlisting>
|
2001-09-10 01:52:12 +02:00
|
|
|
which will trigger on any machine for which the output of <command>config.guess</command>
|
2003-03-13 02:30:29 +01:00
|
|
|
begins with <literal>hppa</literal>. Other lines
|
2001-09-10 01:52:12 +02:00
|
|
|
in <filename>resultmap</> select the variant comparison file for other
|
2000-11-22 00:40:28 +01:00
|
|
|
platforms where it's appropriate.
|
|
|
|
</para>
|
2000-01-09 21:54:36 +01:00
|
|
|
|
2000-05-02 22:02:03 +02:00
|
|
|
</sect1>
|
1998-12-29 03:24:47 +01:00
|
|
|
|
2000-05-02 22:02:03 +02:00
|
|
|
</chapter>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode:sgml
|
|
|
|
sgml-omittag:nil
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"./reference.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:("/usr/lib/sgml/catalog")
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
-->
|