Bug 116858 - Bad value in tests counter at new-run-webkit-tests in --debug-rwt-logging mode
Summary: Bad value in tests counter at new-run-webkit-tests in --debug-rwt-logging mode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P5 Trivial
Assignee: Dariusz Frankiewicz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-28 03:06 PDT by Dariusz Frankiewicz
Modified: 2013-06-05 01:08 PDT (History)
4 users (show)

See Also:


Attachments
log (6.06 KB, text/plain)
2013-05-28 03:06 PDT, Dariusz Frankiewicz
no flags Details
Patch (1.47 KB, patch)
2013-05-29 03:14 PDT, Dariusz Frankiewicz
dpranke: review-
Details | Formatted Diff | Diff
Proposed patch with improvements (7.27 KB, patch)
2013-06-04 03:27 PDT, Dariusz Frankiewicz
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dariusz Frankiewicz 2013-05-28 03:06:17 PDT
Created attachment 203033 [details]
log

When running new-run-webkit-tests with --debug-rwt-logging parameter, logger shows wrong number of actual running test.

For example when we've got 9 tests it starts from 0 and ends at 8.
So in last line we could think that script ran one less test, until we've look at the begining.

    [0/9] editing/text-iterator/backward-textiterator-first-letter-crash.html
    "ps -eo comm,command" took 0.02s
    worker/0 editing/text-iterator/backward-textiterator-first-letter-crash.html passed
    [1/9] editing/text-iterator/find-after-mutation.html
    worker/0 editing/text-iterator/find-after-mutation.html passed
    [2/9] editing/text-iterator/findString.html
    worker/0 editing/text-iterator/findString.html passed
    [3/9] editing/text-iterator/first-letter-rtl-crash.html
    worker/0 editing/text-iterator/first-letter-rtl-crash.html passed
    [4/9] editing/text-iterator/first-letter-word-boundary.html
    worker/0 editing/text-iterator/first-letter-word-boundary.html passed
    [5/9] editing/text-iterator/range-to-from-location-and-length.html
    worker/0 editing/text-iterator/range-to-from-location-and-length.html passed
    [6/9] editing/text-iterator/rtl-first-letter-text-iterator-crash.html
    worker/0 editing/text-iterator/rtl-first-letter-text-iterator-crash.html passed
    [7/9] editing/text-iterator/rtl-selection-crash.html
    worker/0 editing/text-iterator/rtl-selection-crash.html passed
    [8/9] editing/text-iterator/thai-cursor-movement.html

In my opinion it should indicate value one higher so at the end we've got [9/9]

To reproduce this you can run: 
./new-run-webkit-tests --efl -2 -v --debug --debug-rwt-logging LayoutTests/editing/text-iterator
Comment 1 Dirk Pranke 2013-05-28 09:40:34 PDT
The status line is actually printing the number of tests that have completed, not the number of tests that have been started, which is why it starts at 0. The status line is also designed to be overwritten in place, so when you actually complete the last (9th) test, we immediately erase it and move on, so you never actually see [9/9].

This was by design, but arguably is not the best design, and I'm open to changing it.
Comment 2 Dariusz Frankiewicz 2013-05-29 03:14:52 PDT
Created attachment 203146 [details]
Patch
Comment 3 Dirk Pranke 2013-05-29 12:19:47 PDT
Comment on attachment 203146 [details]
Patch

if you incremented 'num_completed' before the test has completed, that's wrong, isn't it? :) At the very least, you should change the name to 'num_started', and make sure you update the other places it is used.
Comment 4 Dariusz Frankiewicz 2013-06-04 03:27:14 PDT
Created attachment 203673 [details]
Proposed patch with improvements
Comment 5 WebKit Commit Bot 2013-06-05 01:08:34 PDT
Comment on attachment 203673 [details]
Proposed patch with improvements

Clearing flags on attachment: 203673

Committed r151201: <http://trac.webkit.org/changeset/151201>
Comment 6 WebKit Commit Bot 2013-06-05 01:08:36 PDT
All reviewed patches have been landed.  Closing bug.