blob: 0cd455fdb79a6e6fab8fd4f2f134bc1c296296bb [file] [log] [blame]
Renato Golin63475512013-05-28 09:48:52 +00001=============================
2How To Validate a New Release
3=============================
4
5.. contents::
6 :local:
7 :depth: 1
8
9Introduction
10============
11
Joel Jones57c226982018-01-18 14:57:55 +000012This document contains information about testing the release candidates that
13will ultimately be the next LLVM release. For more information on how to
14manage the actual release, please refer to :doc:`HowToReleaseLLVM`.
Renato Golin63475512013-05-28 09:48:52 +000015
16Overview of the Release Process
17-------------------------------
18
19Once the release process starts, the Release Manager will ask for volunteers,
20and it'll be the role of each volunteer to:
21
22* Test and benchmark the previous release
23
Joel Jones57c226982018-01-18 14:57:55 +000024* Test and benchmark each release candidate, comparing to the previous release
25 and candidates
Renato Golin63475512013-05-28 09:48:52 +000026
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
31Not all bugs or regressions are show-stoppers and it's a bit of a grey area what
Joel Jones57c226982018-01-18 14:57:55 +000032should be fixed before the next candidate and what can wait until the next
33release.
Renato Golin63475512013-05-28 09:48:52 +000034
35It'll depend on:
36
Joel Jones57c226982018-01-18 14:57:55 +000037* 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 Golin63475512013-05-28 09:48:52 +000040
Joel Jones57c226982018-01-18 14:57:55 +000041* 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 Golin63475512013-05-28 09:48:52 +000043
Joel Jones57c226982018-01-18 14:57:55 +000044* If it's a correctness or a performance regression. Performance regression
45 tends to be taken more lightly than correctness.
Renato Golin63475512013-05-28 09:48:52 +000046
47.. _scripts:
48
49Scripts
50=======
51
52The scripts are in the ``utils/release`` directory.
53
54test-release.sh
55---------------
56
Joel Jones57c226982018-01-18 14:57:55 +000057This script will check-out, configure and compile LLVM+Clang (+ most add-ons,
58like ``compiler-rt``, ``libcxx``, ``libomp`` and ``clang-extra-tools``) in
59three stages, and will test the final stage.
60It'll have installed the final binaries on the Phase3/Releasei(+Asserts)
61directory, and that's the one you should use for the test-suite and other
62external tests.
Renato Golin63475512013-05-28 09:48:52 +000063
Renato Golin11cb23a2013-06-12 11:35:33 +000064To run the script on a specific release candidate run::
Renato Golin63475512013-05-28 09:48:52 +000065
Renato Golin11cb23a2013-06-12 11:35:33 +000066 ./test-release.sh \
67 -release 3.3 \
68 -rc 1 \
69 -no-64bit \
70 -test-asserts \
71 -no-compare-files
Renato Golin63475512013-05-28 09:48:52 +000072
Joel Jones57c226982018-01-18 14:57:55 +000073Each system will require different options. For instance, x86_64 will
74obviously not need ``-no-64bit`` while 32-bit systems will, or the script will
75fail.
Renato Golin63475512013-05-28 09:48:52 +000076
77The important flags to get right are:
78
Joel Jones57c226982018-01-18 14:57:55 +000079* On the pre-release, you should change ``-rc 1`` to ``-final``. On RC2,
80 change it to ``-rc 2`` and so on.
Renato Golin63475512013-05-28 09:48:52 +000081
Joel Jones57c226982018-01-18 14:57:55 +000082* 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 Golin63475512013-05-28 09:48:52 +000085
Joel Jones57c226982018-01-18 14:57:55 +000086* 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 Golin11cb23a2013-06-12 11:35:33 +000089
Joel Jones57c226982018-01-18 14:57:55 +000090* On the final candidate you just need Release builds, and that's the binary
91 directory you'll have to pack.
Renato Golin63475512013-05-28 09:48:52 +000092
Vedant Kumara1e7efa2019-10-01 17:10:45 +000093* On macOS, you must export ``MACOSX_DEPLOYMENT_TARGET=10.9`` before running
94 the script.
95
Joel Jones57c226982018-01-18 14:57:55 +000096This script builds three phases of Clang+LLVM twice each (Release and
97Release+Asserts), so use screen or nohup to avoid headaches, since it'll take
98a long time.
Renato Golin63475512013-05-28 09:48:52 +000099
Joel Jones57c226982018-01-18 14:57:55 +0000100Use the ``--help`` option to see all the options and chose it according to
101your needs.
Renato Golin63475512013-05-28 09:48:52 +0000102
103
104findRegressions-nightly.py
105--------------------------
106
107TODO
108
109.. _test-suite:
110
111Test Suite
112==========
113
114.. contents::
115 :local:
116
Joel Jones57c226982018-01-18 14:57:55 +0000117Follow the `LNT Quick Start Guide
118<http://llvm.org/docs/lnt/quickstart.html>`__ link on how to set-up the
119test-suite
Renato Golin63475512013-05-28 09:48:52 +0000120
Joel Jones57c226982018-01-18 14:57:55 +0000121The binary location you'll have to use for testing is inside the
122``rcN/Phase3/Release+Asserts/llvmCore-REL-RC.install``.
Renato Golin11cb23a2013-06-12 11:35:33 +0000123Link that directory to an easier location and run the test-suite.
124
Renato Golin63475512013-05-28 09:48:52 +0000125An example on the run command line, assuming you created a link from the correct
126install directory to ``~/devel/llvm/install``::
127
128 ./sandbox/bin/python sandbox/bin/lnt runtest \
129 nt \
130 -j4 \
131 --sandbox sandbox \
132 --test-suite ~/devel/llvm/test/test-suite \
133 --cc ~/devel/llvm/install/bin/clang \
134 --cxx ~/devel/llvm/install/bin/clang++
135
Joel Jones57c226982018-01-18 14:57:55 +0000136It should have no new regressions, compared to the previous release or release
137candidate. You don't need to fix all the bugs in the test-suite, since they're
138not necessarily meant to pass on all architectures all the time. This is
139due to the nature of the result checking, which relies on direct comparison,
140and most of the time, the failures are related to bad output checking, rather
141than bad code generation.
Renato Golin11cb23a2013-06-12 11:35:33 +0000142
Joel Jones57c226982018-01-18 14:57:55 +0000143If the errors are in LLVM itself, please report every single regression found
144as blocker, and all the other bugs as important, but not necessarily blocking
145the release to proceed. They can be set as "known failures" and to be
Renato Golin11cb23a2013-06-12 11:35:33 +0000146fix on a future date.
147
Renato Golin63475512013-05-28 09:48:52 +0000148.. _pre-release-process:
149
150Pre-Release Process
151===================
152
153.. contents::
154 :local:
155
156When the release process is announced on the mailing list, you should prepare
Joel Jones57c226982018-01-18 14:57:55 +0000157for the testing, by applying the same testing you'll do on the release
158candidates, on the previous release.
Renato Golin63475512013-05-28 09:48:52 +0000159
160You should:
161
Joel Jones57c226982018-01-18 14:57:55 +0000162* Download the previous release sources from
163 http://llvm.org/releases/download.html.
Renato Golin63475512013-05-28 09:48:52 +0000164
Joel Jones57c226982018-01-18 14:57:55 +0000165* Run the test-release.sh script on ``final`` mode (change ``-rc 1`` to
166 ``-final``).
Renato Golin63475512013-05-28 09:48:52 +0000167
168* Once all three stages are done, it'll test the final stage.
169
Joel Jones57c226982018-01-18 14:57:55 +0000170* Using the ``Phase3/Release+Asserts/llvmCore-MAJ.MIN-final.install`` base,
171 run the test-suite.
Renato Golin63475512013-05-28 09:48:52 +0000172
Joel Jones57c226982018-01-18 14:57:55 +0000173If the final phase's ``make check-all`` failed, it's a good idea to also test
174the intermediate stages by going on the obj directory and running
175``make check-all`` to find if there's at least one stage that passes (helps
176when reducing the error for bug report purposes).
Renato Golin63475512013-05-28 09:48:52 +0000177
178.. _release-process:
179
180Release Process
181===============
182
183.. contents::
184 :local:
185
186When the Release Manager sends you the release candidate, download all sources,
187unzip on the same directory (there will be sym-links from the appropriate places
188to them), and run the release test as above.
189
190You should:
191
Joel Jones57c226982018-01-18 14:57:55 +0000192* Download the current candidate sources from where the release manager points
193 you (ex. http://llvm.org/pre-releases/3.3/rc1/).
Renato Golin63475512013-05-28 09:48:52 +0000194
Joel Jones57c226982018-01-18 14:57:55 +0000195* Repeat the steps above with ``-rc 1``, ``-rc 2`` etc modes and run the
196 test-suite the same way.
Renato Golin63475512013-05-28 09:48:52 +0000197
198* Compare the results, report all errors on Bugzilla and publish the binary blob
199 where the release manager can grab it.
200
Joel Jones57c226982018-01-18 14:57:55 +0000201Once the release manages announces that the latest candidate is the good one,
202you have to pack the ``Release`` (no Asserts) install directory on ``Phase3``
203and that will be the official binary.
Renato Golin63475512013-05-28 09:48:52 +0000204
Renato Golin11cb23a2013-06-12 11:35:33 +0000205* Rename (or link) ``clang+llvm-REL-ARCH-ENV`` to the .install directory
206
Joel Jones57c226982018-01-18 14:57:55 +0000207* Tar that into the same name with ``.tar.gz`` extensioan from outside the
208 directory
Renato Golin11cb23a2013-06-12 11:35:33 +0000209
210* Make it available for the release manager to download
211
Renato Golin63475512013-05-28 09:48:52 +0000212.. _bug-reporting:
213
214Bug Reporting Process
215=====================
216
217.. contents::
218 :local:
219
220If you found regressions or failures when comparing a release candidate with the
221previous release, follow the rules below:
222
Joel Jones57c226982018-01-18 14:57:55 +0000223* Critical bugs on compilation should be fixed as soon as possible, possibly
224 before releasing the binary blobs.
Renato Golin63475512013-05-28 09:48:52 +0000225
Joel Jones57c226982018-01-18 14:57:55 +0000226* Check-all tests should be fixed before the next release candidate, but can
227 wait until the test-suite run is finished.
Renato Golin63475512013-05-28 09:48:52 +0000228
229* Bugs in the test suite or unimportant check-all tests can be fixed in between
230 release candidates.
231
Joel Jones57c226982018-01-18 14:57:55 +0000232* New features or recent big changes, when close to the release, should have
233 done in a way that it's easy to disable. If they misbehave, prefer disabling
234 them than releasing an unstable (but untested) binary package.