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