Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-testing > by-pkgid > bab02a23fa9f3df8d66a9a3231b50245 > files > 463

postgresql8.3-docs-8.3.6-2mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Test Evaluation</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REV="MADE"
HREF="mailto:pgsql-docs@postgresql.org"><LINK
REL="HOME"
TITLE="PostgreSQL 8.3.6 Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="Regression Tests"
HREF="regress.html"><LINK
REL="PREVIOUS"
TITLE="Running the Tests"
HREF="regress-run.html"><LINK
REL="NEXT"
TITLE="Variant Comparison Files"
HREF="regress-variant.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="stylesheet.css"><META
HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=ISO-8859-1"><META
NAME="creation"
CONTENT="2009-02-03T04:34:16"></HEAD
><BODY
CLASS="SECT1"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="5"
ALIGN="center"
VALIGN="bottom"
>PostgreSQL 8.3.6 Documentation</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="regress-run.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="regress.html"
>Fast Backward</A
></TD
><TD
WIDTH="60%"
ALIGN="center"
VALIGN="bottom"
>Chapter 29. Regression Tests</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="top"
><A
HREF="regress.html"
>Fast Forward</A
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="top"
><A
HREF="regress-variant.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="REGRESS-EVALUATION"
>29.2. Test Evaluation</A
></H1
><P
>    Some properly installed and fully functional
    <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> installations can
    <SPAN
CLASS="QUOTE"
>"fail"</SPAN
> some of these regression tests due to
    platform-specific artifacts such as varying floating-point representation
    and message wording. The tests are currently evaluated using a simple
    <TT
CLASS="COMMAND"
>diff</TT
> comparison against the outputs
    generated on a reference system, so the results are sensitive to
    small system differences.  When a test is reported as
    <SPAN
CLASS="QUOTE"
>"failed"</SPAN
>, always examine the differences between
    expected and actual results; you might 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.
   </P
><P
>    The actual outputs of the regression tests are in files in the
    <TT
CLASS="FILENAME"
>src/test/regress/results</TT
> directory. The test
    script uses <TT
CLASS="COMMAND"
>diff</TT
> to compare each output
    file against the reference outputs stored in the
    <TT
CLASS="FILENAME"
>src/test/regress/expected</TT
> directory.  Any
    differences are saved for your inspection in
    <TT
CLASS="FILENAME"
>src/test/regress/regression.diffs</TT
>.  (Or you
    can run <TT
CLASS="COMMAND"
>diff</TT
> yourself, if you prefer.)
   </P
><P
>    If for some reason a particular platform generates a <SPAN
CLASS="QUOTE"
>"failure"</SPAN
>
    for a given test, but inspection of the output convinces you that
    the result is valid, you can add a new comparison file to silence
    the failure report in future test runs.  See
    <A
HREF="regress-variant.html"
>Section 29.3</A
> for details.
   </P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN30106"
>29.2.1. Error message differences</A
></H2
><P
>     Some of the regression tests involve intentional invalid input
     values.  Error messages can come from either the
     <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> code or from the host
     platform system routines. In the latter case, the messages can
     vary between platforms, but should reflect similar
     information. These differences in messages will result in a
     <SPAN
CLASS="QUOTE"
>"failed"</SPAN
> regression test that can be validated by
     inspection.
    </P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN30111"
>29.2.2. Locale differences</A
></H2
><P
>     If you run the tests against an already-installed server that was
     initialized with a collation-order locale other than C, then
     there might 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.
    </P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN30114"
>29.2.3. Date and time differences</A
></H2
><P
>     Most of the date and time results are dependent on the time zone
     environment.  The reference files are generated for time zone
     <TT
CLASS="LITERAL"
>PST8PDT</TT
> (Berkeley, California), and there will be
     apparent failures if the tests are not run with that time zone setting.
     The regression test driver sets environment variable
     <TT
CLASS="ENVAR"
>PGTZ</TT
> to <TT
CLASS="LITERAL"
>PST8PDT</TT
>, which normally
     ensures proper results.
    </P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN30120"
>29.2.4. Floating-point differences</A
></H2
><P
>     Some of the tests involve computing 64-bit floating-point numbers (<TT
CLASS="TYPE"
>double
     precision</TT
>) from table columns. Differences in
     results involving mathematical functions of <TT
CLASS="TYPE"
>double
     precision</TT
> columns have been observed.  The <TT
CLASS="LITERAL"
>float8</TT
> and
     <TT
CLASS="LITERAL"
>geometry</TT
> tests are particularly prone to small differences
     across platforms, or even with different compiler optimization options.
     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.
    </P
><P
>     Some systems display minus zero as <TT
CLASS="LITERAL"
>-0</TT
>, while others
     just show <TT
CLASS="LITERAL"
>0</TT
>.
    </P
><P
>     Some systems signal errors from <CODE
CLASS="FUNCTION"
>pow()</CODE
> and
     <CODE
CLASS="FUNCTION"
>exp()</CODE
> differently from the mechanism
     expected by the current <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
>
     code.
    </P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN30134"
>29.2.5. Row ordering differences</A
></H2
><P
>You might see differences in which the same rows are output in a
different order than what appears in the expected file.  In most cases
this is not, strictly speaking, a bug.  Most of the regression test
scripts are not so pedantic as to use an <TT
CLASS="LITERAL"
>ORDER BY</TT
> for every single
<TT
CLASS="LITERAL"
>SELECT</TT
>, and so their result row orderings are not well-defined
according to the letter of the SQL specification.  In practice, since we are
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
so the lack of <TT
CLASS="LITERAL"
>ORDER BY</TT
> isn't a problem.  Some queries do exhibit
cross-platform ordering differences, however.  When testing against an
already-installed server, ordering differences can also be caused by
non-C locale settings or non-default parameter settings, such as custom values
of <TT
CLASS="VARNAME"
>work_mem</TT
> or the planner cost parameters.
    </P
><P
>Therefore, if you see an ordering difference, it's not something to
worry about, unless the query does have an <TT
CLASS="LITERAL"
>ORDER BY</TT
> that your
result is violating.  But please report it anyway, so that we can add an
<TT
CLASS="LITERAL"
>ORDER BY</TT
> to that particular query and thereby eliminate the bogus
<SPAN
CLASS="QUOTE"
>"failure"</SPAN
> in future releases.
    </P
><P
>You might wonder why we don't order all the regression test queries explicitly
to 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.
    </P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN30146"
>29.2.6. Insufficient stack depth</A
></H2
><P
>     If the <TT
CLASS="LITERAL"
>errors</TT
> test results in a server crash
     at the <TT
CLASS="LITERAL"
>select infinite_recurse()</TT
> command, it means that
     the platform's limit on process stack size is smaller than the
     <A
HREF="runtime-config-resource.html#GUC-MAX-STACK-DEPTH"
>max_stack_depth</A
>
     
     parameter indicates.  This
     can be fixed by running the server under a higher stack
     size limit (4MB is recommended with the default value of 
     <TT
CLASS="VARNAME"
>max_stack_depth</TT
>).  If you are unable to do that, an
     alternative is to reduce the value of <TT
CLASS="VARNAME"
>max_stack_depth</TT
>.
    </P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN30154"
>29.2.7. The <SPAN
CLASS="QUOTE"
>"random"</SPAN
> test</A
></H2
><P
>     The <TT
CLASS="LITERAL"
>random</TT
> test script is intended to produce 
     random results.   In rare cases, this causes the random regression
     test to fail.  Typing:
</P><PRE
CLASS="PROGRAMLISTING"
>diff results/random.out expected/random.out</PRE
><P>
     should produce only one or a few lines of differences.  You need
     not worry unless the random test fails repeatedly.
    </P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="regress-run.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="regress-variant.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Running the Tests</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="regress.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Variant Comparison Files</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>