109467b48Spatrick============================= 209467b48SpatrickHow To Validate a New Release 309467b48Spatrick============================= 409467b48Spatrick 509467b48Spatrick.. contents:: 609467b48Spatrick :local: 709467b48Spatrick :depth: 1 809467b48Spatrick 909467b48SpatrickIntroduction 1009467b48Spatrick============ 1109467b48Spatrick 1209467b48SpatrickThis document contains information about testing the release candidates that 1309467b48Spatrickwill ultimately be the next LLVM release. For more information on how to 1409467b48Spatrickmanage the actual release, please refer to :doc:`HowToReleaseLLVM`. 1509467b48Spatrick 1609467b48SpatrickOverview of the Release Process 1709467b48Spatrick------------------------------- 1809467b48Spatrick 1909467b48SpatrickOnce the release process starts, the Release Manager will ask for volunteers, 2009467b48Spatrickand it'll be the role of each volunteer to: 2109467b48Spatrick 2209467b48Spatrick* Test and benchmark the previous release 2309467b48Spatrick 2409467b48Spatrick* Test and benchmark each release candidate, comparing to the previous release 2509467b48Spatrick and candidates 2609467b48Spatrick 2709467b48Spatrick* Identify, reduce and report every regression found during tests and benchmarks 2809467b48Spatrick 2909467b48Spatrick* Make sure the critical bugs get fixed and merged to the next release candidate 3009467b48Spatrick 3109467b48SpatrickNot all bugs or regressions are show-stoppers and it's a bit of a grey area what 3209467b48Spatrickshould be fixed before the next candidate and what can wait until the next 3309467b48Spatrickrelease. 3409467b48Spatrick 3509467b48SpatrickIt'll depend on: 3609467b48Spatrick 3709467b48Spatrick* The severity of the bug, how many people it affects and if it's a regression 3809467b48Spatrick or a known bug. Known bugs are "unsupported features" and some bugs can be 3909467b48Spatrick disabled if they have been implemented recently. 4009467b48Spatrick 4109467b48Spatrick* The stage in the release. Less critical bugs should be considered to be 4209467b48Spatrick fixed between RC1 and RC2, but not so much at the end of it. 4309467b48Spatrick 4409467b48Spatrick* If it's a correctness or a performance regression. Performance regression 4509467b48Spatrick tends to be taken more lightly than correctness. 4609467b48Spatrick 4709467b48Spatrick.. _scripts: 4809467b48Spatrick 4909467b48SpatrickScripts 5009467b48Spatrick======= 5109467b48Spatrick 5209467b48SpatrickThe scripts are in the ``utils/release`` directory. 5309467b48Spatrick 5409467b48Spatricktest-release.sh 5509467b48Spatrick--------------- 5609467b48Spatrick 5709467b48SpatrickThis script will check-out, configure and compile LLVM+Clang (+ most add-ons, 5809467b48Spatricklike ``compiler-rt``, ``libcxx``, ``libomp`` and ``clang-extra-tools``) in 5909467b48Spatrickthree stages, and will test the final stage. 6009467b48SpatrickIt'll have installed the final binaries on the Phase3/Releasei(+Asserts) 6109467b48Spatrickdirectory, and that's the one you should use for the test-suite and other 6209467b48Spatrickexternal tests. 6309467b48Spatrick 6409467b48SpatrickTo run the script on a specific release candidate run:: 6509467b48Spatrick 6609467b48Spatrick ./test-release.sh \ 6709467b48Spatrick -release 3.3 \ 6809467b48Spatrick -rc 1 \ 6909467b48Spatrick -no-64bit \ 7009467b48Spatrick -test-asserts \ 7109467b48Spatrick -no-compare-files 7209467b48Spatrick 7309467b48SpatrickEach system will require different options. For instance, x86_64 will 7409467b48Spatrickobviously not need ``-no-64bit`` while 32-bit systems will, or the script will 7509467b48Spatrickfail. 7609467b48Spatrick 7709467b48SpatrickThe important flags to get right are: 7809467b48Spatrick 7909467b48Spatrick* On the pre-release, you should change ``-rc 1`` to ``-final``. On RC2, 8009467b48Spatrick change it to ``-rc 2`` and so on. 8109467b48Spatrick 8209467b48Spatrick* On non-release testing, you can use ``-final`` in conjunction with 8309467b48Spatrick ``-no-checkout``, but you'll have to create the ``final`` directory by hand 8409467b48Spatrick and link the correct source dir to ``final/llvm.src``. 8509467b48Spatrick 8609467b48Spatrick* For release candidates, you need ``-test-asserts``, or it won't create a 8709467b48Spatrick "Release+Asserts" directory, which is needed for release testing and 8809467b48Spatrick benchmarking. This will take twice as long. 8909467b48Spatrick 9009467b48Spatrick* On the final candidate you just need Release builds, and that's the binary 9109467b48Spatrick directory you'll have to pack. 9209467b48Spatrick 9309467b48Spatrick* On macOS, you must export ``MACOSX_DEPLOYMENT_TARGET=10.9`` before running 9409467b48Spatrick the script. 9509467b48Spatrick 9609467b48SpatrickThis script builds three phases of Clang+LLVM twice each (Release and 9709467b48SpatrickRelease+Asserts), so use screen or nohup to avoid headaches, since it'll take 9809467b48Spatricka long time. 9909467b48Spatrick 10009467b48SpatrickUse the ``--help`` option to see all the options and chose it according to 10109467b48Spatrickyour needs. 10209467b48Spatrick 10309467b48Spatrick 10409467b48SpatrickfindRegressions-nightly.py 10509467b48Spatrick-------------------------- 10609467b48Spatrick 10709467b48SpatrickTODO 10809467b48Spatrick 10909467b48Spatrick.. _test-suite: 11009467b48Spatrick 11109467b48SpatrickTest Suite 11209467b48Spatrick========== 11309467b48Spatrick 11409467b48Spatrick.. contents:: 11509467b48Spatrick :local: 11609467b48Spatrick 11709467b48SpatrickFollow the `LNT Quick Start Guide 118*097a140dSpatrick<https://llvm.org/docs/lnt/quickstart.html>`__ link on how to set-up the 11909467b48Spatricktest-suite 12009467b48Spatrick 12109467b48SpatrickThe binary location you'll have to use for testing is inside the 12209467b48Spatrick``rcN/Phase3/Release+Asserts/llvmCore-REL-RC.install``. 12309467b48SpatrickLink that directory to an easier location and run the test-suite. 12409467b48Spatrick 12509467b48SpatrickAn example on the run command line, assuming you created a link from the correct 12609467b48Spatrickinstall directory to ``~/devel/llvm/install``:: 12709467b48Spatrick 12809467b48Spatrick ./sandbox/bin/python sandbox/bin/lnt runtest \ 12909467b48Spatrick nt \ 13009467b48Spatrick -j4 \ 13109467b48Spatrick --sandbox sandbox \ 13209467b48Spatrick --test-suite ~/devel/llvm/test/test-suite \ 13309467b48Spatrick --cc ~/devel/llvm/install/bin/clang \ 13409467b48Spatrick --cxx ~/devel/llvm/install/bin/clang++ 13509467b48Spatrick 13609467b48SpatrickIt should have no new regressions, compared to the previous release or release 13709467b48Spatrickcandidate. You don't need to fix all the bugs in the test-suite, since they're 13809467b48Spatricknot necessarily meant to pass on all architectures all the time. This is 13909467b48Spatrickdue to the nature of the result checking, which relies on direct comparison, 14009467b48Spatrickand most of the time, the failures are related to bad output checking, rather 14109467b48Spatrickthan bad code generation. 14209467b48Spatrick 14309467b48SpatrickIf the errors are in LLVM itself, please report every single regression found 14409467b48Spatrickas blocker, and all the other bugs as important, but not necessarily blocking 14509467b48Spatrickthe release to proceed. They can be set as "known failures" and to be 14609467b48Spatrickfix on a future date. 14709467b48Spatrick 14809467b48Spatrick.. _pre-release-process: 14909467b48Spatrick 15009467b48SpatrickPre-Release Process 15109467b48Spatrick=================== 15209467b48Spatrick 15309467b48Spatrick.. contents:: 15409467b48Spatrick :local: 15509467b48Spatrick 15609467b48SpatrickWhen the release process is announced on the mailing list, you should prepare 15709467b48Spatrickfor the testing, by applying the same testing you'll do on the release 15809467b48Spatrickcandidates, on the previous release. 15909467b48Spatrick 16009467b48SpatrickYou should: 16109467b48Spatrick 16209467b48Spatrick* Download the previous release sources from 163*097a140dSpatrick https://llvm.org/releases/download.html. 16409467b48Spatrick 16509467b48Spatrick* Run the test-release.sh script on ``final`` mode (change ``-rc 1`` to 16609467b48Spatrick ``-final``). 16709467b48Spatrick 16809467b48Spatrick* Once all three stages are done, it'll test the final stage. 16909467b48Spatrick 17009467b48Spatrick* Using the ``Phase3/Release+Asserts/llvmCore-MAJ.MIN-final.install`` base, 17109467b48Spatrick run the test-suite. 17209467b48Spatrick 17309467b48SpatrickIf the final phase's ``make check-all`` failed, it's a good idea to also test 17409467b48Spatrickthe intermediate stages by going on the obj directory and running 17509467b48Spatrick``make check-all`` to find if there's at least one stage that passes (helps 17609467b48Spatrickwhen reducing the error for bug report purposes). 17709467b48Spatrick 17809467b48Spatrick.. _release-process: 17909467b48Spatrick 18009467b48SpatrickRelease Process 18109467b48Spatrick=============== 18209467b48Spatrick 18309467b48Spatrick.. contents:: 18409467b48Spatrick :local: 18509467b48Spatrick 18609467b48SpatrickWhen the Release Manager sends you the release candidate, download all sources, 18709467b48Spatrickunzip on the same directory (there will be sym-links from the appropriate places 18809467b48Spatrickto them), and run the release test as above. 18909467b48Spatrick 19009467b48SpatrickYou should: 19109467b48Spatrick 19209467b48Spatrick* Download the current candidate sources from where the release manager points 193*097a140dSpatrick you (ex. https://llvm.org/pre-releases/3.3/rc1/). 19409467b48Spatrick 19509467b48Spatrick* Repeat the steps above with ``-rc 1``, ``-rc 2`` etc modes and run the 19609467b48Spatrick test-suite the same way. 19709467b48Spatrick 19809467b48Spatrick* Compare the results, report all errors on Bugzilla and publish the binary blob 19909467b48Spatrick where the release manager can grab it. 20009467b48Spatrick 20109467b48SpatrickOnce the release manages announces that the latest candidate is the good one, 20209467b48Spatrickyou have to pack the ``Release`` (no Asserts) install directory on ``Phase3`` 20309467b48Spatrickand that will be the official binary. 20409467b48Spatrick 20509467b48Spatrick* Rename (or link) ``clang+llvm-REL-ARCH-ENV`` to the .install directory 20609467b48Spatrick 207*097a140dSpatrick* Tar that into the same name with ``.tar.gz`` extension from outside the 20809467b48Spatrick directory 20909467b48Spatrick 21009467b48Spatrick* Make it available for the release manager to download 21109467b48Spatrick 21209467b48Spatrick.. _bug-reporting: 21309467b48Spatrick 21409467b48SpatrickBug Reporting Process 21509467b48Spatrick===================== 21609467b48Spatrick 21709467b48Spatrick.. contents:: 21809467b48Spatrick :local: 21909467b48Spatrick 22009467b48SpatrickIf you found regressions or failures when comparing a release candidate with the 22109467b48Spatrickprevious release, follow the rules below: 22209467b48Spatrick 22309467b48Spatrick* Critical bugs on compilation should be fixed as soon as possible, possibly 22409467b48Spatrick before releasing the binary blobs. 22509467b48Spatrick 22609467b48Spatrick* Check-all tests should be fixed before the next release candidate, but can 22709467b48Spatrick wait until the test-suite run is finished. 22809467b48Spatrick 22909467b48Spatrick* Bugs in the test suite or unimportant check-all tests can be fixed in between 23009467b48Spatrick release candidates. 23109467b48Spatrick 23209467b48Spatrick* New features or recent big changes, when close to the release, should have 23309467b48Spatrick done in a way that it's easy to disable. If they misbehave, prefer disabling 23409467b48Spatrick them than releasing an unstable (but untested) binary package. 235