Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 1 | ============================= |
| 2 | How To Validate a New Release |
| 3 | ============================= |
| 4 | |
| 5 | .. contents:: |
| 6 | :local: |
| 7 | :depth: 1 |
| 8 | |
| 9 | Introduction |
| 10 | ============ |
| 11 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 12 | This document contains information about testing the release candidates that |
| 13 | will ultimately be the next LLVM release. For more information on how to |
| 14 | manage the actual release, please refer to :doc:`HowToReleaseLLVM`. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 15 | |
| 16 | Overview of the Release Process |
| 17 | ------------------------------- |
| 18 | |
| 19 | Once the release process starts, the Release Manager will ask for volunteers, |
| 20 | and it'll be the role of each volunteer to: |
| 21 | |
| 22 | * Test and benchmark the previous release |
| 23 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 24 | * Test and benchmark each release candidate, comparing to the previous release |
| 25 | and candidates |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 26 | |
| 27 | * Identify, reduce and report every regression found during tests and benchmarks |
| 28 | |
| 29 | * Make sure the critical bugs get fixed and merged to the next release candidate |
| 30 | |
| 31 | Not all bugs or regressions are show-stoppers and it's a bit of a grey area what |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 32 | should be fixed before the next candidate and what can wait until the next |
| 33 | release. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 34 | |
| 35 | It'll depend on: |
| 36 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 37 | * The severity of the bug, how many people it affects and if it's a regression |
| 38 | or a known bug. Known bugs are "unsupported features" and some bugs can be |
| 39 | disabled if they have been implemented recently. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 40 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 41 | * The stage in the release. Less critical bugs should be considered to be |
| 42 | fixed between RC1 and RC2, but not so much at the end of it. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 43 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 44 | * If it's a correctness or a performance regression. Performance regression |
| 45 | tends to be taken more lightly than correctness. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 46 | |
| 47 | .. _scripts: |
| 48 | |
| 49 | Scripts |
| 50 | ======= |
| 51 | |
| 52 | The scripts are in the ``utils/release`` directory. |
| 53 | |
| 54 | test-release.sh |
| 55 | --------------- |
| 56 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 57 | This script will check-out, configure and compile LLVM+Clang (+ most add-ons, |
| 58 | like ``compiler-rt``, ``libcxx``, ``libomp`` and ``clang-extra-tools``) in |
| 59 | three stages, and will test the final stage. |
| 60 | It'll have installed the final binaries on the Phase3/Releasei(+Asserts) |
| 61 | directory, and that's the one you should use for the test-suite and other |
| 62 | external tests. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 63 | |
Renato Golin | f42b14e | 2013-06-12 11:35:33 +0000 | [diff] [blame] | 64 | To run the script on a specific release candidate run:: |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 65 | |
Renato Golin | f42b14e | 2013-06-12 11:35:33 +0000 | [diff] [blame] | 66 | ./test-release.sh \ |
| 67 | -release 3.3 \ |
| 68 | -rc 1 \ |
| 69 | -no-64bit \ |
| 70 | -test-asserts \ |
| 71 | -no-compare-files |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 72 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 73 | Each system will require different options. For instance, x86_64 will |
| 74 | obviously not need ``-no-64bit`` while 32-bit systems will, or the script will |
| 75 | fail. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 76 | |
| 77 | The important flags to get right are: |
| 78 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 79 | * On the pre-release, you should change ``-rc 1`` to ``-final``. On RC2, |
| 80 | change it to ``-rc 2`` and so on. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 81 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 82 | * On non-release testing, you can use ``-final`` in conjunction with |
| 83 | ``-no-checkout``, but you'll have to create the ``final`` directory by hand |
| 84 | and link the correct source dir to ``final/llvm.src``. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 85 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 86 | * For release candidates, you need ``-test-asserts``, or it won't create a |
| 87 | "Release+Asserts" directory, which is needed for release testing and |
| 88 | benchmarking. This will take twice as long. |
Renato Golin | f42b14e | 2013-06-12 11:35:33 +0000 | [diff] [blame] | 89 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 90 | * On the final candidate you just need Release builds, and that's the binary |
| 91 | directory you'll have to pack. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 92 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 93 | This script builds three phases of Clang+LLVM twice each (Release and |
| 94 | Release+Asserts), so use screen or nohup to avoid headaches, since it'll take |
| 95 | a long time. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 96 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 97 | Use the ``--help`` option to see all the options and chose it according to |
| 98 | your needs. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 99 | |
| 100 | |
| 101 | findRegressions-nightly.py |
| 102 | -------------------------- |
| 103 | |
| 104 | TODO |
| 105 | |
| 106 | .. _test-suite: |
| 107 | |
| 108 | Test Suite |
| 109 | ========== |
| 110 | |
| 111 | .. contents:: |
| 112 | :local: |
| 113 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 114 | Follow the `LNT Quick Start Guide |
| 115 | <http://llvm.org/docs/lnt/quickstart.html>`__ link on how to set-up the |
| 116 | test-suite |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 117 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 118 | The binary location you'll have to use for testing is inside the |
| 119 | ``rcN/Phase3/Release+Asserts/llvmCore-REL-RC.install``. |
Renato Golin | f42b14e | 2013-06-12 11:35:33 +0000 | [diff] [blame] | 120 | Link that directory to an easier location and run the test-suite. |
| 121 | |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 122 | An example on the run command line, assuming you created a link from the correct |
| 123 | install directory to ``~/devel/llvm/install``:: |
| 124 | |
| 125 | ./sandbox/bin/python sandbox/bin/lnt runtest \ |
| 126 | nt \ |
| 127 | -j4 \ |
| 128 | --sandbox sandbox \ |
| 129 | --test-suite ~/devel/llvm/test/test-suite \ |
| 130 | --cc ~/devel/llvm/install/bin/clang \ |
| 131 | --cxx ~/devel/llvm/install/bin/clang++ |
| 132 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 133 | It should have no new regressions, compared to the previous release or release |
| 134 | candidate. You don't need to fix all the bugs in the test-suite, since they're |
| 135 | not necessarily meant to pass on all architectures all the time. This is |
| 136 | due to the nature of the result checking, which relies on direct comparison, |
| 137 | and most of the time, the failures are related to bad output checking, rather |
| 138 | than bad code generation. |
Renato Golin | f42b14e | 2013-06-12 11:35:33 +0000 | [diff] [blame] | 139 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 140 | If the errors are in LLVM itself, please report every single regression found |
| 141 | as blocker, and all the other bugs as important, but not necessarily blocking |
| 142 | the release to proceed. They can be set as "known failures" and to be |
Renato Golin | f42b14e | 2013-06-12 11:35:33 +0000 | [diff] [blame] | 143 | fix on a future date. |
| 144 | |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 145 | .. _pre-release-process: |
| 146 | |
| 147 | Pre-Release Process |
| 148 | =================== |
| 149 | |
| 150 | .. contents:: |
| 151 | :local: |
| 152 | |
| 153 | When the release process is announced on the mailing list, you should prepare |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 154 | for the testing, by applying the same testing you'll do on the release |
| 155 | candidates, on the previous release. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 156 | |
| 157 | You should: |
| 158 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 159 | * Download the previous release sources from |
| 160 | http://llvm.org/releases/download.html. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 161 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 162 | * Run the test-release.sh script on ``final`` mode (change ``-rc 1`` to |
| 163 | ``-final``). |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 164 | |
| 165 | * Once all three stages are done, it'll test the final stage. |
| 166 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 167 | * Using the ``Phase3/Release+Asserts/llvmCore-MAJ.MIN-final.install`` base, |
| 168 | run the test-suite. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 169 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 170 | If the final phase's ``make check-all`` failed, it's a good idea to also test |
| 171 | the intermediate stages by going on the obj directory and running |
| 172 | ``make check-all`` to find if there's at least one stage that passes (helps |
| 173 | when reducing the error for bug report purposes). |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 174 | |
| 175 | .. _release-process: |
| 176 | |
| 177 | Release Process |
| 178 | =============== |
| 179 | |
| 180 | .. contents:: |
| 181 | :local: |
| 182 | |
| 183 | When the Release Manager sends you the release candidate, download all sources, |
| 184 | unzip on the same directory (there will be sym-links from the appropriate places |
| 185 | to them), and run the release test as above. |
| 186 | |
| 187 | You should: |
| 188 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 189 | * Download the current candidate sources from where the release manager points |
| 190 | you (ex. http://llvm.org/pre-releases/3.3/rc1/). |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 191 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 192 | * Repeat the steps above with ``-rc 1``, ``-rc 2`` etc modes and run the |
| 193 | test-suite the same way. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 194 | |
| 195 | * Compare the results, report all errors on Bugzilla and publish the binary blob |
| 196 | where the release manager can grab it. |
| 197 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 198 | Once the release manages announces that the latest candidate is the good one, |
| 199 | you have to pack the ``Release`` (no Asserts) install directory on ``Phase3`` |
| 200 | and that will be the official binary. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 201 | |
Renato Golin | f42b14e | 2013-06-12 11:35:33 +0000 | [diff] [blame] | 202 | * Rename (or link) ``clang+llvm-REL-ARCH-ENV`` to the .install directory |
| 203 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 204 | * Tar that into the same name with ``.tar.gz`` extensioan from outside the |
| 205 | directory |
Renato Golin | f42b14e | 2013-06-12 11:35:33 +0000 | [diff] [blame] | 206 | |
| 207 | * Make it available for the release manager to download |
| 208 | |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 209 | .. _bug-reporting: |
| 210 | |
| 211 | Bug Reporting Process |
| 212 | ===================== |
| 213 | |
| 214 | .. contents:: |
| 215 | :local: |
| 216 | |
| 217 | If you found regressions or failures when comparing a release candidate with the |
| 218 | previous release, follow the rules below: |
| 219 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 220 | * Critical bugs on compilation should be fixed as soon as possible, possibly |
| 221 | before releasing the binary blobs. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 222 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 223 | * Check-all tests should be fixed before the next release candidate, but can |
| 224 | wait until the test-suite run is finished. |
Renato Golin | e5ee3cf | 2013-05-28 09:48:52 +0000 | [diff] [blame] | 225 | |
| 226 | * Bugs in the test suite or unimportant check-all tests can be fixed in between |
| 227 | release candidates. |
| 228 | |
Joel Jones | a317810 | 2018-01-18 14:57:55 +0000 | [diff] [blame] | 229 | * New features or recent big changes, when close to the release, should have |
| 230 | done in a way that it's easy to disable. If they misbehave, prefer disabling |
| 231 | them than releasing an unstable (but untested) binary package. |