<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Some tests compare hash values as if they were floating point"
   href="https://bugs.llvm.org/show_bug.cgi?id=50818">50818</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Some tests compare hash values as if they were floating point
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Test Suite
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Nightly Tester
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>andrew.kaylor@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Some tests in the test suite (I'm not sure how many) are hashing the test
output but then using fpcmp to compare the hashed result to the expected hash.

For example, I ran the test suite with "-ffp-contract=on" as an extra compile
option (before a recent change which disabled fp contraction in a number of
tests) and observed the following with the Microbenchmarks/ImageProcessing/Blur
test:

Expected hash value: 7f4246596bcfbb5e6e44cd21ddfeaf07
Actual hash value: 6098466d4eeaf5ccd1871870206176c9
Test error message:
fpcmp-target: Compared: 7.000000e+00 and 6.098466e+10
abs. diff = 6.098466e+10 rel.diff = 1.000000e+00
Out of tolerance: rel/abs: 0.000000e+00/0.000000e+00

The error message results from the test calling fpcmp-target, which looks for
the first thing that seems to be a number and converts it to a floating point
value. So, in this case it was comparing “7” to “6098466”. If the first
character of either hash value is non-numeric, it reports a “not a numeric
difference” error.

The comparison works (for the wrong reasons) if the test produces the exact
output that is expected, but there is no way to allow any floating point
tolerance and the error message is incorrect.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>