Changes between Initial Version and Version 1 of WebKitGTK/Gardening/Howto


Ignore:
Timestamp:
Feb 9, 2015 3:52:31 AM (9 years ago)
Author:
clopez@igalia.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WebKitGTK/Gardening/Howto

    v1 v1  
     1= !WebKit Gardening =
     2
     3[[PageOutline]]
     4
     5== Typical Workflow ==
     6
     71. Check on the [https://build.webkit.org/builders/GTK%20Linux%2064-bit%20Release%20%28Tests%29 release bot] which tests are failing. To do that we open the last build (or the penultimate if the last one still didn't finished running the layout tests) and we go to the log ("stdio") of the layout tests. (Ex: "8. layout-test 15 failures 5 new passes 25 flakes 1 missing results"). At the end of the log we can see something like:
     8{{{
     9  Expected to fail, but passed: (3)
     10    fast/dom/gc-dom-tree-lifetime.html
     11    ...
     12  Unexpected flakiness: text-only failures (11)
     13    editing/selection/caret-at-bidi-boundary.html [ Failure Pass ]
     14    editing/selection/click-left-of-rtl-wrapping-text.html [ Failure Pass ]
     15    ...
     16  Unexpected flakiness: timeouts (14)
     17    fast/forms/mailto/formenctype-attribute-input-2.html [ Timeout Pass ]
     18    jquery/traversing.html [ Timeout Pass ]
     19    ...
     20}}}
     212. We pick one tests and we must research since '''when''' the test started to fail. Some ways of doing it:
     22  * '''The failure is recent (<50 releases)''': Check on the Flakiness Dashboard the recent history of each test on the buildbots.
     23    * The Flakiness Dashboard that is online (webkit-test-results.appspot.com) is very outdated regarding the list of bots. You will do better by running the flakiness dashboard locally. To do that just open with a browser the file ```Tools/TestResultServer/static-dashboards/flakiness_dashboard.html``` (it may take a bit to load even if run locally because it fetches the json files with the data from webkit.org).
     24  * '''The failure is not so recent (<200 releases)''': Manually checking the stdio log for the layout tests on the [https://build.webkit.org/builders/GTK%20Linux%2064-bit%20Release%20%28Tests%29?numbuilds=200 last 200 builds]. If the test passes on the older build available there , but not on the current build, then you can manually bisect the logs until you find when it started to fail. Maybe you can't find the exact release because not all releases were built or because the bot failed to compile between them. But at least you should able to allocate a shorter interval than you can bisect further by building webkit for each release on the interval and testing it.
     25{{{
     26  * media/video-controls-captions.html [ Timeout ]
     27    --> 166964 < bug < 167006 (bot failed to compile webkit in between)
     28}}}
     29  * '''The failure is not recent (>200 releases)''': Then you can check on the [https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20%28Tests%29/ raw results dir] the results for each release. You can proceed to do a manual bisection like in the previous case is explained.
     30    * This is useful also to check if the new baselines for the tests on the bot are the same that on your machine.
     31  * '''!WebKit-!TestHunter''': There is a tool that checks the complete known history of webkitgtk layout test results and outputs intervals for the different results for a given test. Check it out at https://github.com/clopez/webkit-testhunter
     323. Now we know when the test started to fail, me must guess '''why''' it fails. For that we can "git log" the test files and see if someone has changed something on the test. We can also check if this test is reported as failing on another platform by grepping on all the ```TestExpectation``` files
     33  * The test fails because there is something wrong with webkitgtk: then we report a new bug (hint: clicking the button "report bug" on the flakiness dashboard gives you a template) and then we mark the test as failing on the testexpactions file (```LayoutTests/platform/gtk/TestExpectations```) with the bug number we reported.
     34  * The test fails because it needs a rebaseline: if someone changed the test but did not update the expected results (```*-expected.txt```) for our platform the test needs a rebaseline.
     354. Once you have the changes ready to commit (usually one gardening patch contains several changes, not need to do one commit per change) you update the changelog and request to commit the changes.
     36  * Although you can first manually create a new bug for uploading your gardening changes, you can also send these little patches and open the bug and ask ```cq?``` all at once. These commands are enough (warning: don't include a bug number on the changelog.)
     37{{{
     38  Tools/Scripts/prepare-ChangeLog
     39  Tools/Scripts/webkit-patch upload --open-bug --no-review --request-commit
     40}}}
     41    * Now you ask (if you are still not a committer) some committers/reviewers to ```cq+`` the patch for you. Probably the ```#webkitgtk+``` IRC channel at freenode is a good place for this.
     425. At the end, you should add a small notes with the things you did and what things are still pending at KeepingTheTreeGreen
     43  * hint: if is your first time is useful to check the gardening log at KeepingTheTreeGreen and see how others open the bugs or update the test expectations
     44
     45== The bots. ==
     46
     47==== The release bot. ====
     48
     49Our target to keep the tree green is the [https://build.webkit.org/builders/GTK%20Linux%2064-bit%20Release%20%28Tests%29 GTK Linux 64-bit Release (Tests)] bot.
     50
     51==== Other bots. ====
     52
     53You can check on the waterfall all the GTK bots: http://build.webkit.org/waterfall?category=GTK
     54
     55
     56== Building !WebKit ==
     57
     58We will build !WebKit as follows:
     59
     60{{{
     61cd ~/WebKit
     62Tools/Scripts/update-webkitgtk-libs
     63Tools/Scripts/build-webkit --gtk --release
     64}}}
     65
     66== Layout Tests ==
     67
     68=== Running the layout tests ===
     69
     70* Running all the tests
     71{{{
     72Tools/Scripts/run-webkit-tests --no-show-results --no-new-test-results --no-sample-on-timeout --results-directory layout-test-results --debug-rwt-logging --release --webkit-test-runner --gtk --retry-failures
     73}}}
     74
     75* Running a specific test: To only run the tests you are interested just pass the names as arguments to the run-webkit-tests script. Ex:
     76{{{
     77Tools/Scripts/run-webkit-tests --no-show-results --no-new-test-results --no-sample-on-timeout --results-directory layout-test-results --debug-rwt-logging --release --webkit-test-runner --gtk --retry-failures accessibility/aria-help.html accessibility/aria-hidden-false-works-in-subtrees.html accessibility/fieldset-element.html
     78accessibility/meter-element.html accessibility/negative-tabindex-does-not-expose-label.html
     79}}}
     80
     81Check ```Tools/Scripts/run-webkit-tests --help``` for a detailed description of each switch.
     82
     83Also check the WebKitGtkLayoutTests wiki page that contains useful information about the tests.
     84
     85=== Updating the baseline (expected result) for a test. ===
     86
     87We have two options for this:
     88
     89==== Updating the baseline with run-webkit-tests ====
     90
     91If we want to update the expected results for a test we will run ```Tools/Scripts/run-webkit-tests``` '''without''' the switch ```--no-new-test-results```. This will create new baselines on the ```--results-directory``` directory for the test.
     92
     93==== Updating the baseline with garden-o-matic ====
     94
     95Check the wiki Rebaseline for hints about using this tool
     96
     97=== !TestExpectations ===
     98
     99The !TextExpectations files contains the current expectations for the !LayoutTests.
     100
     101You can find detailed information about the format of the Layout Tests here: https://trac.webkit.org/wiki/TestExpectations
     102
     103There is a general !TestExpectations (applies to every port) and a port-specific one.
     104
     105{{{
     106$ find LayoutTests -type f -name TestExpectations
     107LayoutTests/TestExpectations
     108LayoutTests/platform/wk2/TestExpectations
     109LayoutTests/platform/efl/TestExpectations
     110LayoutTests/platform/win-xp/TestExpectations
     111LayoutTests/platform/efl-wk1/TestExpectations
     112LayoutTests/platform/mac/TestExpectations
     113LayoutTests/platform/gtk/TestExpectations
     114LayoutTests/platform/mac-wk1/TestExpectations
     115LayoutTests/platform/win/TestExpectations
     116LayoutTests/platform/wincairo/TestExpectations
     117LayoutTests/platform/mac-wk2/TestExpectations
     118LayoutTests/platform/efl-wk2/TestExpectations
     119}}}
     120
     121We will be generally interested in the !TestExpectations file for our port ```LayoutTests/platform/gtk/TestExpectations```. However when checking the failure of a test is interesting to grep the other port !TestExpectations files in order to see if they are also having problems with this test. Ex:
     122
     123{{{
     124find LayoutTests -type f -name TestExpectations | xargs grep --color=auto accessibility/aria-hidden-false-works-in-subtrees.html
     125}}}
     126
     127Another interesting check is to do a git log on the different -expected results. Maybe some other port did a rebaseline of the expected result after some change in the code or the test itself, that can give us useful hints.
     128
     129{{{
     130find LayoutTests -type f -name aria-hidden-false-works-in-subtrees-expected.txt
     131# git log every result
     132}}}
     133
     134== Committing your changes ==
     135
     1361. After you have successfully modified the !TestExpectations or created new baselines, you should add this changes to be committed and then run:
     137{{{
     138Tools/Scripts/prepare-ChangeLog
     139}}}
     1401. That will modify the !LayoutTests/ChangeLog with a skeleton that you should modify with the log of your changes.
     141  * Usually the gardening changes don't require a review.
     1422. Then you add the !ChangeLog file to git, and commit all the changes on your branch.
     143  * Finally you upload the patch to bugzilla:
     144{{{
     145Tools/Scripts/webkit-patch upload -g $commit-id --open-bug --no-review --request-commit
     146}}}
     1473. Then you ask some of committers (if you still aren't one) to cq+ the patch for you.
     148
     149== Updating the Gardening Log. ==
     150
     151At the end of the day the gardener should keep a very simple log for tomorrow's gardener, so he can follow up with any pending investigations. This will also help us keep track of newly skipped tests.
     152Once you have finished your gardening tasks for today you should update the Gardening log at KeepingTheTreeGreen with some notes about what you did and what is pending to do.
     153
     154== Updating the schedule calendar. ==
     155
     156Don't forget to review and update your available timeslots on the gardening schedule calendar at KeepingTheTreeGreen