#87 Duration incorrect for failed tests

v1.0 (example)
closed-fixed
nobody
5
2013-12-23
2013-02-06
Mike Wright
No

When running tests, I see that the duration is incorrect depending on whether the test result was success or failure. It appears that failed tests are several orders of magnitude larger than they should be. For example, see the abbreviated XML output below. The tests run are identical aside from the input data, and given that the function tested consists of some relatively simple, single-pass string parsing and my own observations regarding actual execution time, I can't imagine that the failed test is actually taking 305+ seconds:
<test result="success">
<path>check</path>
<fn>check_header_detect.c:116</fn>
<id>test_detect_browser</id>
<iteration>13</iteration>
<duration>0.000019</duration>
<description>test_header_detect</description>
<message>Passed</message>
</test>
<test result="failure">
<path>check</path>
<fn>check_header_detect.c:119</fn>
<id>test_detect_browser</id>
<iteration>14</iteration>
<duration>305.877511</duration>
<description>test_header_detect</description>
<message>Failed Browser Detection: [14] 9 but expected 12 for input &quot;Mozilla/5.0 (iPhone; U; ru; CPU iPhone OS 4_2_1 like Mac OS X; ru) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148a Safari/6533.18.5&quot;.</message>
</test>

Discussion

  • Normally the duration for failed tests are set to -1. Are you running this in NO_FORK mode? Also which platform are you on?

     
  • Mike Wright
    Mike Wright
    2013-02-08

    These tests are running in NO_FORK mode.
    The platform is CentOS release 5.8 (Final) x86_64 GNU Linux

     
  • Branden Archer
    Branden Archer
    2013-10-02

    I put in some changes that may affect this bug. The values used to hold the times may not have been initialized properly. Would you be able to verify if the code in svn's trunk also exhibits the issue? If so, that would be very helpful.

    Thanks!

     
  • Branden Archer
    Branden Archer
    2013-12-23

    This issue is resolved as of rev 926, and a test to detect this issue in the future was added in rev 927. If you continue to have difficulty with this in the next Check release, please let us know.

     
  • Branden Archer
    Branden Archer
    2013-12-23

    • status: open --> closed-fixed
    • assigned_to: Arien Malec --> nobody
    • Group: --> v1.0 (example)