<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.yoctoproject.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Juro+Bystricky</id>
	<title>Yocto Project - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.yoctoproject.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Juro+Bystricky"/>
	<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/Special:Contributions/Juro_Bystricky"/>
	<updated>2026-11-24T19:00:11Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Reproducible_Builds&amp;diff=36808</id>
		<title>Reproducible Builds</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Reproducible_Builds&amp;diff=36808"/>
		<updated>2018-03-10T17:30:12Z</updated>

		<summary type="html">&lt;p&gt;Juro Bystricky: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== What are Reproducible Builds? ==&lt;br /&gt;
&lt;br /&gt;
The first tricky problem in this area is that the term &amp;quot;reproducible builds&amp;quot; means different things to different people. The simplest scenario is that you need to be able to re-run a build at some point in the future and have it succeed. The project already has mechanisms to provide the basics for this such as source mirroring support so that if upstream sources disappear, the build and still run. We also have technology such as sstate which means when you rebuild, prebuilt artefacts can be used where possible instead of rebuilding from scratch.&lt;br /&gt;
&lt;br /&gt;
The others, reproducibility is also about the levels of determinism in the builds. Releases prior to pyro didn&#039;t have &amp;quot;recipe specific sysroots&amp;quot; which meant that potentially, builds could be contaminated depending on build ordering. From pyro onwards the sysroots are isolated to be per recipe to avoid this issue. Perfect determinism in this area would mean task specific sysroots since multiple tasks from the same recipe can currently run in parallel however that is not something we&#039;ve felt the project needs right now.&lt;br /&gt;
&lt;br /&gt;
There are other factors which affect determism and reproducibility, for example:&lt;br /&gt;
&lt;br /&gt;
* compressing files with different levels of parallelism could result in different output&lt;br /&gt;
* dates, times and build paths can be embedded in the built objects&lt;br /&gt;
* dates and times of build objects changes depending on when the build was run and which tasks happened in parallel&lt;br /&gt;
&lt;br /&gt;
Our current intent is to model the best practises available and have tools and techniques to fix deltas where we can. &lt;br /&gt;
&lt;br /&gt;
It is worth noting there are things it would be sensible to do outside the build system to help with reproducibility over the long term too, its not a problem the build system can solve alone. Depending on your circumstances and requirements, it may help to:&lt;br /&gt;
&lt;br /&gt;
* build on the same distro version with the same installed packages&lt;br /&gt;
* build in the same path&lt;br /&gt;
* use the same build hardware&lt;br /&gt;
&lt;br /&gt;
The system is designed to factor out these deltas but for example, the build system today which works on Ubuntu X is not likely to work on Ubuntu X+5 years as the compilers will be totally different and probably unable to build today&#039;s codebase. If you need to run Ubuntu X in 5 years time, you may need older hardware to do that. There are solutions with containers, the build system can even self host inside its own image but there are limits to every approach and the exact circumstances of each individual situation need to be considered.&lt;br /&gt;
&lt;br /&gt;
== Current Status and Planned Development ==&lt;br /&gt;
&lt;br /&gt;
The Yocto Project aims to have builds which are entirely reproducible. That is; if you run a build today, then run that same configuration X time in the future, the binaries you get out of the build should be binary identical.&lt;br /&gt;
&lt;br /&gt;
This implies that the host system you run the build on and the path you run the build in should not affect the target system output.&lt;br /&gt;
&lt;br /&gt;
Our build system doesn&#039;t produce binary reproducible builds today, but we are actively working towards that goal and fixing issues as we identify them. We also plan to improve our testing to help find reproducibility issues.&lt;br /&gt;
&lt;br /&gt;
The design of the system lends itself very well to producing reproducible builds, as we provide a reproducible build environment with minimal dependencies on the host/build OS.&lt;br /&gt;
&lt;br /&gt;
We have several technologies in place which aide in reproducibility:&lt;br /&gt;
&lt;br /&gt;
Our shared state (sstate) mechanism base our builds on hashes of input metadata, reusing the outputs if the inputs are the same. &lt;br /&gt;
&lt;br /&gt;
As our sstate files need to be reusable regardless of build path and can be target or native binaries, we have mechanisms for working around various issues such as hard-coded paths (though we&#039;d prefer to remove the need for them entirely).&lt;br /&gt;
&lt;br /&gt;
A related problem to sstate is that of knowing when the input has changed, has the output changed? This is useful in the context of package feeds, amongst other things, to know whether we should update them or not. &lt;br /&gt;
We have binary build comparison tools at an early stage of development to allow us to reduce unnecessary churn in package feeds, however further developments are planned in this area using the tools from the reproducible-builds project.&lt;br /&gt;
&lt;br /&gt;
Our SDKs need to be relocatable and run anywhere they are installed to. We  include our own C library to do this in a &amp;quot;run anywhere&amp;quot; scenario and are able to generate fully relocatable toolchains.&lt;br /&gt;
&lt;br /&gt;
Our new for Yocto Project 2.3 (Pyro) recipe specific sysroots ensure that the output of a recipe doesn&#039;t change depending on whether other recipes have already been built and in which order, even when the software tries to autodetect available features.&lt;br /&gt;
&lt;br /&gt;
At this point the project does not intend to target timestamp levels of reproducibility so whilst the binary content should be the same, file timestamps may not be and this means package manager tarballs would not be binary identical due to timestamp differences. There are likely some ways we can fix this too and we are working on it but its a lower priority than some other determinism issues.&lt;br /&gt;
&lt;br /&gt;
== Why do we want reproducible builds? ==&lt;br /&gt;
&lt;br /&gt;
The many benefits of reproducible builds as listed in the [https://reproducible-builds.org/ reproducible-builds] project, not least of all the ability to verify a built output matches the source, are key motivations for our work on reproducible builds. Additonal benefits specific to the Yocto Project include:&lt;br /&gt;
* ability to reduce the churn in package feeds&lt;br /&gt;
* ability to improve reliability of allarch recipes and enable wider use of them&lt;br /&gt;
&lt;br /&gt;
== Related Work ==&lt;br /&gt;
&lt;br /&gt;
Some key bugs that are important in our reproducibility efforts are:&lt;br /&gt;
* &amp;lt;s&amp;gt;[https://bugzilla.yoctoproject.org/show_bug.cgi?id=1560 #1560] Enable recipe specific sysroots&amp;lt;/s&amp;gt; — DONE for 2.3&lt;br /&gt;
* [https://bugzilla.yoctoproject.org/show_bug.cgi?id=5866 #5866] Reproducible builds: identical binaries&lt;br /&gt;
* [https://bugzilla.yoctoproject.org/show_bug.cgi?id=10813 #10813] Replace build-compare with tools from the reproducible-builds project&lt;br /&gt;
* [https://bugzilla.yoctoproject.org/show_bug.cgi?id=11176 #11176] Add optional command to rootfs-postprocess to remove non-determinism from rootfs&lt;br /&gt;
* Integrate changes to improve determinism in OE-Core:&lt;br /&gt;
** [https://bugzilla.yoctoproject.org/show_bug.cgi?id=11177 #11177] Generate archives with deterministic metadata&lt;br /&gt;
** [https://bugzilla.yoctoproject.org/show_bug.cgi?id=11178 #11178] Make use of &amp;lt;tt&amp;gt;[https://reproducible-builds.org/specs/source-date-epoch/ SOURCE_DATE_EPOCH]&amp;lt;/tt&amp;gt;, most likely with patches from [https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal Debian] to ensure tools are using it.&lt;br /&gt;
** [https://bugzilla.yoctoproject.org/show_bug.cgi?id=11179 #11179] Deterministic timezone and locale settings&lt;br /&gt;
* Develop tests to catch issues with reproducibility&lt;br /&gt;
* Reproducibility analysis tool which will run &#039;&#039;diffoscope&#039;&#039; on all binary artifacts and produce a report that lists files with issues and points to the package and recipe the file came from.&lt;br /&gt;
&lt;br /&gt;
As the goal is to achieve 100% reproducibility in building packages and the number of packages built that are binary different is relatively small, we started filing individual bug entries for each of them.&lt;br /&gt;
&lt;br /&gt;
== Verification ==&lt;br /&gt;
&lt;br /&gt;
To ensure that our builds are reproducible we need to implement an infrastructure of verification over the build systems outputs Images, SDKs, Binary packages, etc.&lt;br /&gt;
&lt;br /&gt;
The idea is to run diffoscope over target shared states (populate_sysroot) because is the first output on what the other artifacts (Images, SDK&#039;s, Binary packages) are generated. The build output will be generated running bitbake world with two different Host systems, this can be done using two Virtual machines as Autobuilder workers and then launch the comparison process (diffoscope) against the two build outputs.&lt;br /&gt;
&lt;br /&gt;
A script exists to call diffoscope against shared states, the AB needs to use something similar to get the comparison results. [https://github.com/alimon/yocto-reproduciblebuilds-data/blob/master/sstate_diffoscope.py]. There is a example of the output  here [https://github.com/alimon/yocto-reproduciblebuilds-data/tree/master/poky_master_qemux86_d454dc2fc].&lt;br /&gt;
&lt;br /&gt;
An Autobuilder development branch for reproducible builds. [http://git.yoctoproject.org/cgit/cgit.cgi/yocto-autobuilder/log/?h=contrib/alimon/reproducible_builds]&lt;br /&gt;
&lt;br /&gt;
To preserve the results a web system needs to be implemented (the AB will push the results), this also will serve to publish something like www.yoctoproject.org/reproduciblebuilds to see the actual status and what recipes needs works in order to be 100% reproducible. An initial implementation only with database models. [https://github.com/alimon/reproducible-builds]&lt;br /&gt;
&lt;br /&gt;
== Current Development ==&lt;br /&gt;
&lt;br /&gt;
Yocto builds are well suited to provide reproducible builds, as there is minimal reliance on host tools. Most tools, including various toolchains, are built from scratch.&lt;br /&gt;
Hence builds on different machines, but using the same build recipes, will generally use the same toolchain for cross-compiling. Before we dive into pesky details, we need to define what we mean by &amp;quot;binary reproducible&amp;quot;. Yocto final binaries are placed in the folder &amp;quot;deploy&amp;quot;, so the most natural definition is that two &amp;quot;deploy&amp;quot; folders should be binary identical. This is the actual goal we aim for. In the process, we need to deal with various well known sources of binary differences:&lt;br /&gt;
&lt;br /&gt;
1. &#039;&#039;&#039;Embedded paths&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Usually a result of the C macro __FILE__, popular in asserts, error messages etc.&lt;br /&gt;
These are actually very easy to deal with using Yocto GCC compiler. The compiler has a special command line argument that remaps a hard coded __FILE__ path to an arbitrary string.&lt;br /&gt;
This feature allowed the whole Linux kernel and all kernel modules modules to build reproducibly without making any changes to the Linux source tree.&lt;br /&gt;
&lt;br /&gt;
2. &#039;&#039;&#039;Timestamps&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timestamps are dealt with the usual way via the environment variable SOURCE_DATE_EPOCH. The simplest way is to set &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SOURCE_DATE_EPOCH=&amp;quot;some value&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The actual timestamp value is not really important. However, a recipe specific values for SOURCE_DATE_EPOCH may be more desirable.&lt;br /&gt;
Yocto takes advantage of multi-core systems to utilize parallel builds. We need to set a recipe specific SOURCE_DATE_EPOCH in each recipe environment for various tasks. One way would be to modify all recipes one-by-one to specify SOURCE_DATE_EPOCH explicitly, but that is not realistic as there are hundreds (probably thousands) of recipes in various meta-layers. &lt;br /&gt;
So this is done automatically instead in the &#039;&#039;reproducible_binaries.bbclass&#039;&#039;.&lt;br /&gt;
After sources are unpacked but before they are patched, we try to determine the value for SOURCE_DATE_EPOCH.&lt;br /&gt;
&lt;br /&gt;
There are 4 ways to determine SOURCE_DATE_EPOCH:&lt;br /&gt;
&lt;br /&gt;
1. Use value from __source-date-epoch.txt file if this file exists. This file was most likely created in the previous build by one of the following methods 2,3,4.&lt;br /&gt;
(But, in principle, it could actually provided by a recipe via SRC_URI)&lt;br /&gt;
&lt;br /&gt;
If the file does not exist:&lt;br /&gt;
&lt;br /&gt;
2. Use .git last commit date timestamp (git does not allow checking out files and preserving their timestamps)&lt;br /&gt;
&lt;br /&gt;
3. Use &amp;quot;known&amp;quot; files such as NEWS, CHANGLELOG, ...&lt;br /&gt;
&lt;br /&gt;
4. Use the youngest file of the source tree.&lt;br /&gt;
&lt;br /&gt;
Once the value of SOURCE_DATE_EPOCH is determined, it is stored in the recipe ${WORKDIR} in a text file &amp;quot;__source-date-epoch.txt&#039;.&lt;br /&gt;
If this file is found by other recipe task, the value is placed in the  SOURCE_DATE_EPOCH var in the task environment.&lt;br /&gt;
This is done in an anonymous python function, so SOURCE_DATE_EPOCH is guaranteed to exist for all tasks.&lt;br /&gt;
&lt;br /&gt;
In some cases, the timestamp may be embedded in the code that does not respect SOURCE_DATE_EPOCH. Those cases are dealt with on an individual bases.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Compression&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Various packing/compression utilities &#039;&#039;gzip&#039;&#039;, &#039;&#039;tar&#039;&#039;,..., etc. place timestamps or file mtimes in the archives. When we run into these issues, we modify&lt;br /&gt;
the arguments to prevent this. There may be build hosts with older &#039;&#039;tar&#039;&#039; and &#039;&#039;cpio&#039;&#039; not supporting these options. In this case we can&lt;br /&gt;
provide a natively built replacement.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. Build host references leaks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Sometimes packages may contain references to the host build system. This happens most frequently with various ptest and debug packages. This is very easy to &lt;br /&gt;
detect with &#039;&#039;diffoscope&#039;&#039;. The remedy is to modify the corresponding recipes and filter out the leakage. Typical offenders are HOSTTOLS_DIR, DEBUG_PREFIX_MAP,&lt;br /&gt;
RECIPE_SYSROOT_NATIVE, STAGING_DIR_TARGET. This is mostly a straight-forward fix.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5. Sorting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Parallel build can build packages/images in non-deterministic order. This may become an issue is some cases.&lt;br /&gt;
For reproducibility, we need to consistently assign the UID/GID values. There is a proper way to do this in Yocto:&lt;br /&gt;
http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#ref-classes-useradd&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6. Rootfs&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
There are numerous other issues: file mtimes in rootfs, pre-link time...&lt;br /&gt;
All of these will get a timestamp as specified by the variable REPRODUCIBLE_TIMESTAMP_ROOTFS. &lt;br /&gt;
This is a catch-all timestamp, used in the final step of building an image. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;7. Package type&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Yocto supports the following package types: RPM, Debian, IPK. Until recently, only Debian packages supported reproducible build.&lt;br /&gt;
However, due to very recent development, we can also build RPM and IPK packages reproducible as well.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;8. Dates and times embedded in the built objects&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This usually requires patching the offending source code. However, the patch may already exist, Debian does a good job.&lt;br /&gt;
If not, creating a new patch may be necessary while also contacting the maintainer.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== Hands On: Building Reproducible Binaries ==&lt;br /&gt;
&lt;br /&gt;
While this is still a work in progress, with patches being sent to the OpenEmbedded Core mailing list, we can already build binary identical images.&lt;br /&gt;
We need to introduce two new variables:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;BUILD_REPRODUCIBLE_BINARIES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Setting BUILD_REPRODUCIBLE_BINARIES=&amp;quot;1&amp;quot; will remove/disable certain features that were intentionally performed by default.&lt;br /&gt;
Sometimes choosing reproducibility can override certain features originally meant to increase security, so this is the way to specify you prefer reproducibility.&lt;br /&gt;
For example, prelink will not use random addresses for libraries if BUILD_REPRODUCIBLE_BINARIES=&amp;quot;1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;REPRODUCIBLE_TIMESTAMP_ROOTFS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When building packages, various timestamps can be controlled by SOURCE_DATE_EPOCH. This, however, does not work&lt;br /&gt;
for building images. Images contain various scattered timestamps, and as a consequence, two builds of otherwise identical images will differ.&lt;br /&gt;
The purpose of this variable is to use the value as a &amp;quot;catch-all&amp;quot; rootfs image timestamp and build all images with identical timestamps.&lt;br /&gt;
The value for this variable is always up to the developers/image builders.&lt;br /&gt;
&lt;br /&gt;
In addition, we need four environmental variables need to be exported with consistent values. For example, placing the following in your local.conf will allow you to get started:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
BUILD_REPRODUCIBLE_BINARIES = &amp;quot;1&amp;quot;&lt;br /&gt;
export PYTHONHASHSEED = &amp;quot;0&amp;quot;&lt;br /&gt;
export PERL_HASH_SEED = &amp;quot;0&amp;quot;&lt;br /&gt;
export TZ = &#039;UTC&#039;&lt;br /&gt;
export SOURCE_DATE_EPOCH ??= &amp;quot;1520598896&amp;quot;&lt;br /&gt;
REPRODUCIBLE_TIMESTAMP_ROOTFS ??= &amp;quot;1520598896&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the value for REPRODUCIBLE_TIMESTAMP_ROOTFS and SOURCE_DATE_EPOCH are rather arbitrary and not really very important. Feel free to use your own favorite dates.&lt;br /&gt;
https://www.epochconverter.com/ . &lt;br /&gt;
&lt;br /&gt;
Comparing two clean builds (same host, same date, different build folder, different time) of core-image-minimal will result in something similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            DEB    RPM    IPK&lt;br /&gt;
-----------------------------&lt;br /&gt;
Same:      3949   3949   3949&lt;br /&gt;
Different:    2      2      2&lt;br /&gt;
Total:     3951   3951   3951&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More complex images, for example core-image-sato-sdk-ptest-multilib-corei7 will produce results:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            IPK    RPM    DEB&lt;br /&gt;
-----------------------------&lt;br /&gt;
Same:      8771   8772   8772&lt;br /&gt;
Different:   76     75     79&lt;br /&gt;
Total:     8847   8847   8851&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers above will vary, as they reflect the current master, which is a moving target. The numbers above do not include a few packages that differ due&lt;br /&gt;
to being built on two different days. The important point here is, there is only a finite number of remaining packages that are binary different and the goal to reduce them to&lt;br /&gt;
zero is quite realistic. As always, you can scrutinize the differences using &#039;&#039;diffoscope&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Juro Bystricky</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Processes_and_Activities&amp;diff=36727</id>
		<title>Processes and Activities</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Processes_and_Activities&amp;diff=36727"/>
		<updated>2018-03-08T17:33:10Z</updated>

		<summary type="html">&lt;p&gt;Juro Bystricky: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the Processes and Activities Page!&lt;br /&gt;
&lt;br /&gt;
* [[Contribution Guidelines]]&lt;br /&gt;
* [[Recipe &amp;amp; Patch Style Guide]]&lt;br /&gt;
* [[Building your own recipes from first principles]]&lt;br /&gt;
* [[Development Best Practices]]&lt;br /&gt;
* [[Distro Tracking]]&lt;br /&gt;
* [[Best Known Methods (BKMs) for Package Updating]]&lt;br /&gt;
* [[Working Behind a Network Proxy]]&lt;br /&gt;
* [[QA]]&lt;br /&gt;
* [[Kernel]]&lt;br /&gt;
* [[Core]]&lt;br /&gt;
* [[Bugzilla Configuration and Bug Tracking]]&lt;br /&gt;
* [[Bug Triage]]&lt;br /&gt;
* [[Yocto Point-Release Development Workflow]]&lt;br /&gt;
* [[Yocto Release Engineering]]&lt;br /&gt;
* [[Performance]]&lt;br /&gt;
* [[Security]]&lt;br /&gt;
* [[PAM Integration]]&lt;br /&gt;
* [[Program Management Plan]]&lt;br /&gt;
* [[Enable sstate cache]]&lt;br /&gt;
* Guidelines for contributing to meta-intel layer&lt;br /&gt;
* [[Building and running embedded Linux .NET applications from first principles]]&lt;/div&gt;</summary>
		<author><name>Juro Bystricky</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/UseRamdiskToSpeedUpBuilds&amp;diff=33948</id>
		<title>TipsAndTricks/UseRamdiskToSpeedUpBuilds</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/UseRamdiskToSpeedUpBuilds&amp;diff=33948"/>
		<updated>2017-12-08T22:46:12Z</updated>

		<summary type="html">&lt;p&gt;Juro Bystricky: Created page with &amp;quot;At some point your build system may become IO bound, when your hard disk(s) cannot keep up with CPUs running various tasks. This is frequently the case when your systems has n...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At some point your build system may become IO bound, when your hard disk(s) cannot keep up with CPUs running various tasks. This is frequently the case when your systems has numerous CPUs, but only a single hard drive. Providing you have plenty of RAM, it is possible to improve&lt;br /&gt;
the build performance by using a ramdisk. It is probably a good idea not to keep DEPLOY_DIR in ramdisk. Placing something like the following: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TMPDIR=&amp;quot;/tmp/ramdisk/build-ramdisk&amp;quot;&lt;br /&gt;
DEPLOY_DIR=&amp;quot;/work/poky/build-ramdisk/tmp/deploy&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in your local.conf would keep the built images on your harddrive, everything else in a volatile ramdisk.&lt;br /&gt;
&lt;br /&gt;
Some build times as observed on my system (in minutes), YMMV.&lt;br /&gt;
Builds are clean builds, no SSTATE, with data already downloaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
----------------------- HDD -------- RAMDISK ---&lt;br /&gt;
core-image-minimal      24            20&lt;br /&gt;
core-image-sato         47            39&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If running multiple builds at the same time, the benefits become even more obvious.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Setting up a ramdisk is trivial, the following example creates 64G ramdisk:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mkdir /tmp/ramdisk&lt;br /&gt;
$ sudo chmod 777 /tmp/ramdisk&lt;br /&gt;
$ sudo mount -t tmpfs -o size=64G ramdisk /tmp/ramdisk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want the ramdisk mounted automatically at boot time, add this into /etc/fstab:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ramdisk /tmp/ramdisk tmpfs defaults,size=64G,x-gvfs-show 0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Another advantage of ramdisk is that it is much faster to delete the files.)&lt;/div&gt;</summary>
		<author><name>Juro Bystricky</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks&amp;diff=33946</id>
		<title>TipsAndTricks</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks&amp;diff=33946"/>
		<updated>2017-12-08T22:02:04Z</updated>

		<summary type="html">&lt;p&gt;Juro Bystricky: /* Articles in development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
This wiki page captures ideas for &amp;quot;Tips and tricks&amp;quot; articles that are aimed Yocto Project users that have a basic understanding of the core tools and want to extend their knowledge. Articles will written and published using the following process&lt;br /&gt;
* Articles must refer to the current (or earlier) release. They must not cover features in development in the master branch.&lt;br /&gt;
* Anyone can add entries to the &#039;&#039;&#039;Ideas for Articles&#039;&#039;&#039; section based on challenges they have encountered when using the Yocto Project&lt;br /&gt;
* More experienced developers can start to flesh out articles in the &#039;&#039;Ideas&#039;&#039; section move then to &#039;&#039;&#039;Articles in Development&#039;&#039;&#039; or contribute directly to this section.&lt;br /&gt;
* Approximately once a month an article ready for publishing will be chosen for publication by [mailto:jeffrey.osier-mixon@intel.com Jefro] and moved to the &#039;&#039;&#039;Finished Articles &#039;&#039;&#039; section. &lt;br /&gt;
&lt;br /&gt;
Please contact [mailto:henry.bruce@intel.com?Subject=Yocto%20Project%20Tips%20and%20Tricks Henry Bruce] with any questions.&lt;br /&gt;
&lt;br /&gt;
== Ideas for Articles ==&lt;br /&gt;
* [[TipsAndTricks/GeneratingASDK]] (Ross, Paul help please...)&lt;br /&gt;
* [[TipsAndTricks/AddingALicense]] (Ross)&lt;br /&gt;
* [[TipsAndTricks/UsingBuildstatsDiff]] (Ross)&lt;br /&gt;
* [[TipsAndTricks/DevPyShell]] (Richard Purdie)&lt;br /&gt;
* [[TipsAndTricks/CreatingABSP]]. And what not to put in it.&lt;br /&gt;
* [[TipsAndTricks/Patchwork]]&lt;br /&gt;
* [[TipsAndTricks/Patchtest]] (Leo)&lt;br /&gt;
* [[TipsAndTricks/CreateNewLayer]] (Brendan)&lt;br /&gt;
* [[TipsAndTricks/JenkinsPipelinesForContinuousIntegration]] (Tim Orling)&lt;br /&gt;
&lt;br /&gt;
== Articles in development ==&lt;br /&gt;
* [[TipsAndTricks/Building core-image-minimal on AWS]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/Running YP Image On AWS]] (Amber Elliot)&lt;br /&gt;
* [[TipsAndTricks/DockerOnImage]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/OnTargetWorkFlowLeveragingRPMPackagefeeds]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/BuildingAndRunningClearContainersonTarget]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/KernelDevelopmentWithEsdk]] (Todor Minchev, Henry Bruce)&lt;br /&gt;
* [[TipsAndTricks/DebugNativeRecipeWithGdb]] (Joshua Lock)&lt;br /&gt;
* [[TipsAndTricks/Netconsole]] (Ross Burton)&lt;br /&gt;
* [[TipsAndTricks/ParsingProfiling]] (Richard Purdie)&lt;br /&gt;
* [[TipsAndTricks/DemystifyingTheLinuxYoctoKernel]] (Tom Zanussi)&lt;br /&gt;
* [[TipsAndTricks/Patching the source for a recipe]] (Paul Eggleton)&lt;br /&gt;
* [[TipsAndTricks/Incorporating closed source components]] (Paul Eggleton)&lt;br /&gt;
* [[TipsAndTricks/DebuggingAvoidingRebuilds]] (Richard Purdie)&lt;br /&gt;
* [[TipsAndTricks/GitBisectABitbake]]  (Ross)&lt;br /&gt;
* [[TipsAndTricks/RunningEclipseAgainstBuiltImage]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/PrelinkSomePointersAndWorkarounds]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/RunningQemuOnMacOSX]] (Stephano)&lt;br /&gt;
* [[TipsAndTricks/Understanding what changed (diffsigs etc)]] (Joshua)&lt;br /&gt;
* [[TipsAndTricks/CropsCLIContainers]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/QuickAndDirtyKernelConfig]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/TestingToasterWithContainers]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/InvestigatingBuildTime]] (Leo Sandoval)&lt;br /&gt;
* [[TipsAndTricks/ResolvingLocaleIssues]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/DebuggingBitbakeInPudb]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/DebuggingBitbakeInWingIDE]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/CliBuildsInToasterBuilddir]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/BuildingZephyrImages]] (Henry)&lt;br /&gt;
* [[TipsAndTricks/Cmake,Eclipse, and SDKS]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/LinuxKernelAndSDKs]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/Running YP binaries on Ubuntu and Vice Versa]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/LockSharedState]] (Stephano)&lt;br /&gt;
* [[TipsAndTricks/Building and booting for Joule or MinnowBoard]] (Cal)&lt;br /&gt;
* [[TipsAndTricks/EnablingAPackageFeed]] (Henry)&lt;br /&gt;
* [[TipsAndTricks/Creating Recipes for ROS modules]] (Henry)&lt;br /&gt;
* [[TipsAndTricks/TeamWorkflows]] (Joshua)&lt;br /&gt;
* [[TipsAndTricks/UseRamdisikToSpeedUpBuilds]] (Juro)&lt;br /&gt;
&lt;br /&gt;
== Finished Articles ==&lt;br /&gt;
* [[TipsAndTricks/Packaging Prebuilt Libraries | Packaging Prebuilt Libraries]] (Ross and Henry)&lt;br /&gt;
* [[TipsAndTricks/NPM | Packaging Node.js Projects]]  (Brendan and Henry)&lt;/div&gt;</summary>
		<author><name>Juro Bystricky</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=32630</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=32630"/>
		<updated>2017-10-24T19:18:49Z</updated>

		<summary type="html">&lt;p&gt;Juro Bystricky: /* Building the test suite */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages, and producing a consistent output format.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
To add package testing to your build, add the DISTRO_FEATURES and EXTRA_IMAGE_FEATURES variables to your local.conf file, which is found in the Build Directory:&lt;br /&gt;
&lt;br /&gt;
     DISTRO_FEATURES_append = &amp;quot; ptest&amp;quot;&lt;br /&gt;
     * Adding &amp;quot;ptest&amp;quot; to your DISTRO_FEATURES variable causes -ptest packages to be built.&lt;br /&gt;
&lt;br /&gt;
     EXTRA_IMAGE_FEATURES += &amp;quot;ptest-pkgs&amp;quot;&lt;br /&gt;
     * Adding &amp;quot;ptest-pkgs&amp;quot; to IMAGE_FEATURES variable causes -ptest packages to be installed in your image.&lt;br /&gt;
&lt;br /&gt;
All ptest files are installed in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; which loops through all installed ptest test suites and runs them in sequence. You may therefore want to add &amp;quot;ptest-runner&amp;quot; to your image.&lt;br /&gt;
&lt;br /&gt;
==Ptest-runner Usage==&lt;br /&gt;
&lt;br /&gt;
The usage for the ptest-runner is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Usage: ptest-runner [-d directory] [-l list] [-t timeout] [-h] [ptest1 ptest2 ...] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Executing Ptest-runner==&lt;br /&gt;
&lt;br /&gt;
To execute a full ptest run you can do the following command line anywhere in the target:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; $ ptest-runner &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember to redirect to a file if you want to have a log&lt;br /&gt;
&lt;br /&gt;
=Implementing ptest in a package recipe=&lt;br /&gt;
&lt;br /&gt;
==What constitutes a ptest?==&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
The test can be anything, from a simple shell script running a binary and checking its output to an elaborate system of test binaries and data files.&lt;br /&gt;
&lt;br /&gt;
One major point of ptest is to consolidate the output format of all tests into a single common format. The format selected is the automake &amp;quot;simple test&amp;quot; format:&lt;br /&gt;
&lt;br /&gt;
   result: testname&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;result&amp;quot; is one of PASS, FAIL or SKIP and &amp;quot;testname&amp;quot; can be any identifying string. (The same format [http://www.gnu.org/software/automake/manual/automake.html#Simple-Tests used by Automake].)&lt;br /&gt;
&lt;br /&gt;
==General recipe preparations==&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest suffix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Building the test suite==&lt;br /&gt;
&lt;br /&gt;
Few packages support cross-compiling their test suites, so this is something we typically have to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: &amp;quot;make check&amp;quot;. This doesn&#039;t work when cross-compiling, since we need to build on host and run on target. So we need to split that into two targets: One for building the test and one for running it. Our build of automake comes with a [http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/automake/automake/buildtest.patch patch] which does this automatically, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_ptest function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_ptest() {&lt;br /&gt;
      oe_runmake buildtest-TESTS&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
If the package requires special configuration actions prior to compiling the test code, create a do_configure_ptest function to do that.&lt;br /&gt;
&lt;br /&gt;
Note that buildtest-TESTS requires [https://www.gnu.org/software/automake/manual/html_node/Serial-Test-Harness.html  serial-tests], but usually parallel tests are enabled by default.&lt;br /&gt;
In this case, you may have to modify the configure.ac script by adding serial-tests to AM_INIT_AUTOMAKE:&lt;br /&gt;
&lt;br /&gt;
  AM_INIT_AUTOMAKE([serial-tests])&lt;br /&gt;
&lt;br /&gt;
Recursive targets may not work out of the box either, in that case also try adding the following into configure.ac:&lt;br /&gt;
&lt;br /&gt;
  AM_EXTRA_RECURSIVE_TARGETS([buildtest-TESTS])&lt;br /&gt;
&lt;br /&gt;
==Installing the test suite==&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass will automatically copy the required &amp;quot;run-ptest&amp;quot; file and run &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. For packages where this is enough, you don&#039;t need to do anything else.&lt;br /&gt;
&lt;br /&gt;
If you need to do something more than the automatic &amp;quot;make install-ptest&amp;quot;, create a do_install_ptest function and put the required actions there. This function will be called after &amp;quot;make install-ptest&amp;quot; has completed.&lt;br /&gt;
&lt;br /&gt;
==Recipes with ptest Enabled==&lt;br /&gt;
&lt;br /&gt;
The following is a list of recipes already have ptest enabled:&lt;br /&gt;
*acl&lt;br /&gt;
*attr&lt;br /&gt;
*apr&lt;br /&gt;
*apr-util&lt;br /&gt;
*bash&lt;br /&gt;
*beecrypt&lt;br /&gt;
*bluz5&lt;br /&gt;
*busybox&lt;br /&gt;
*bzip&lt;br /&gt;
*diffstat&lt;br /&gt;
*diffutils&lt;br /&gt;
*dbus&lt;br /&gt;
*ethtool&lt;br /&gt;
*e2fsprogs&lt;br /&gt;
*flex&lt;br /&gt;
*gawk&lt;br /&gt;
*gdbm&lt;br /&gt;
*glib&lt;br /&gt;
*go&lt;br /&gt;
*kbd&lt;br /&gt;
*kmod&lt;br /&gt;
*libevent&lt;br /&gt;
*libxml2&lt;br /&gt;
*libpcre&lt;br /&gt;
*lttng-tools&lt;br /&gt;
*lzo&lt;br /&gt;
*mdadm&lt;br /&gt;
*nettle&lt;br /&gt;
*openssh&lt;br /&gt;
*openssl&lt;br /&gt;
*parted&lt;br /&gt;
*perl&lt;br /&gt;
*python&lt;br /&gt;
*qemu&lt;br /&gt;
*quilt&lt;br /&gt;
*rt-tests&lt;br /&gt;
*sed&lt;br /&gt;
*slang&lt;br /&gt;
*strace&lt;br /&gt;
*systemd&lt;br /&gt;
*sed&lt;br /&gt;
*tcl&lt;br /&gt;
*udev&lt;br /&gt;
*util-linux&lt;br /&gt;
*valgrind&lt;br /&gt;
*zlib&lt;br /&gt;
&lt;br /&gt;
==Recipes in Progress==&lt;br /&gt;
&lt;br /&gt;
The following list is being worked on by various people, to avoid duplication, please add any recipes you might be working on here, once they are merged we can move them to the list above.&lt;br /&gt;
&lt;br /&gt;
*dhcp&lt;br /&gt;
*dropbear&lt;br /&gt;
*gcc-runtime&lt;br /&gt;
*gdb&lt;br /&gt;
*gettext&lt;br /&gt;
*gmp&lt;br /&gt;
*guile&lt;br /&gt;
*libuser&lt;br /&gt;
*tar&lt;br /&gt;
*xz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please consider when updating a recipe whether you can also incorporate a ptest package to it as well.&lt;br /&gt;
&lt;br /&gt;
= QA = &lt;br /&gt;
&lt;br /&gt;
For every Milestone of the release, QA team should execute pTest on real HW and compare the results with his previous corresponding execution (example 2.3 M2 should be compared with 2.3 M1 results) to track better all the releases ans execution an [[ Ptest/archive | archive ]] page was created to track all the executions and check what are the previous results available to compare.&lt;br /&gt;
&lt;br /&gt;
* To check the process used to execute Ptest during QA cycles go to [[BSP_Test_Plan#pTest|pTest process]]&lt;/div&gt;</summary>
		<author><name>Juro Bystricky</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=32600</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=32600"/>
		<updated>2017-10-23T23:21:22Z</updated>

		<summary type="html">&lt;p&gt;Juro Bystricky: /* Recipes with ptest Enabled */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages, and producing a consistent output format.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
To add package testing to your build, add the DISTRO_FEATURES and EXTRA_IMAGE_FEATURES variables to your local.conf file, which is found in the Build Directory:&lt;br /&gt;
&lt;br /&gt;
     DISTRO_FEATURES_append = &amp;quot; ptest&amp;quot;&lt;br /&gt;
     * Adding &amp;quot;ptest&amp;quot; to your DISTRO_FEATURES variable causes -ptest packages to be built.&lt;br /&gt;
&lt;br /&gt;
     EXTRA_IMAGE_FEATURES += &amp;quot;ptest-pkgs&amp;quot;&lt;br /&gt;
     * Adding &amp;quot;ptest-pkgs&amp;quot; to IMAGE_FEATURES variable causes -ptest packages to be installed in your image.&lt;br /&gt;
&lt;br /&gt;
All ptest files are installed in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; which loops through all installed ptest test suites and runs them in sequence. You may therefore want to add &amp;quot;ptest-runner&amp;quot; to your image.&lt;br /&gt;
&lt;br /&gt;
==Ptest-runner Usage==&lt;br /&gt;
&lt;br /&gt;
The usage for the ptest-runner is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Usage: ptest-runner [-d directory] [-l list] [-t timeout] [-h] [ptest1 ptest2 ...] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Executing Ptest-runner==&lt;br /&gt;
&lt;br /&gt;
To execute a full ptest run you can do the following command line anywhere in the target:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; $ ptest-runner &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember to redirect to a file if you want to have a log&lt;br /&gt;
&lt;br /&gt;
=Implementing ptest in a package recipe=&lt;br /&gt;
&lt;br /&gt;
==What constitutes a ptest?==&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
The test can be anything, from a simple shell script running a binary and checking its output to an elaborate system of test binaries and data files.&lt;br /&gt;
&lt;br /&gt;
One major point of ptest is to consolidate the output format of all tests into a single common format. The format selected is the automake &amp;quot;simple test&amp;quot; format:&lt;br /&gt;
&lt;br /&gt;
   result: testname&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;result&amp;quot; is one of PASS, FAIL or SKIP and &amp;quot;testname&amp;quot; can be any identifying string. (The same format [http://www.gnu.org/software/automake/manual/automake.html#Simple-Tests used by Automake].)&lt;br /&gt;
&lt;br /&gt;
==General recipe preparations==&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest suffix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Building the test suite==&lt;br /&gt;
&lt;br /&gt;
Few packages support cross-compiling their test suites, so this is something we typically have to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: &amp;quot;make check&amp;quot;. This doesn&#039;t work when cross-compiling, since we need to build on host and run on target. So we need to split that into two targets: One for building the test and one for running it. Our build of automake comes with a [http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/automake/automake/buildtest.patch patch] which does this automatically, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_ptest function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_ptest() {&lt;br /&gt;
      oe_runmake buildtest-TESTS&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
If the package requires special configuration actions prior to compiling the test code, create a do_configure_ptest function to do that.&lt;br /&gt;
&lt;br /&gt;
Note that buildtest-TESTS requires [https://www.gnu.org/software/automake/manual/html_node/Serial-Test-Harness.html  serial-tests], but usually parallel tests are enabled by default.&lt;br /&gt;
In this case, you may have to modify the configure.ac script by adding serial-tests to AM_INIT_AUTOMAKE:&lt;br /&gt;
&lt;br /&gt;
  AM_INIT_AUTOMAKE([serial-tests])&lt;br /&gt;
&lt;br /&gt;
==Installing the test suite==&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass will automatically copy the required &amp;quot;run-ptest&amp;quot; file and run &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. For packages where this is enough, you don&#039;t need to do anything else.&lt;br /&gt;
&lt;br /&gt;
If you need to do something more than the automatic &amp;quot;make install-ptest&amp;quot;, create a do_install_ptest function and put the required actions there. This function will be called after &amp;quot;make install-ptest&amp;quot; has completed.&lt;br /&gt;
&lt;br /&gt;
==Recipes with ptest Enabled==&lt;br /&gt;
&lt;br /&gt;
The following is a list of recipes already have ptest enabled:&lt;br /&gt;
*acl&lt;br /&gt;
*attr&lt;br /&gt;
*apr&lt;br /&gt;
*apr-util&lt;br /&gt;
*bash&lt;br /&gt;
*beecrypt&lt;br /&gt;
*bluz5&lt;br /&gt;
*busybox&lt;br /&gt;
*bzip&lt;br /&gt;
*diffstat&lt;br /&gt;
*diffutils&lt;br /&gt;
*dbus&lt;br /&gt;
*ethtool&lt;br /&gt;
*e2fsprogs&lt;br /&gt;
*flex&lt;br /&gt;
*gawk&lt;br /&gt;
*gdbm&lt;br /&gt;
*glib&lt;br /&gt;
*go&lt;br /&gt;
*kbd&lt;br /&gt;
*kmod&lt;br /&gt;
*libevent&lt;br /&gt;
*libxml2&lt;br /&gt;
*libpcre&lt;br /&gt;
*lttng-tools&lt;br /&gt;
*lzo&lt;br /&gt;
*mdadm&lt;br /&gt;
*nettle&lt;br /&gt;
*openssh&lt;br /&gt;
*openssl&lt;br /&gt;
*parted&lt;br /&gt;
*perl&lt;br /&gt;
*python&lt;br /&gt;
*qemu&lt;br /&gt;
*quilt&lt;br /&gt;
*rt-tests&lt;br /&gt;
*sed&lt;br /&gt;
*slang&lt;br /&gt;
*strace&lt;br /&gt;
*systemd&lt;br /&gt;
*sed&lt;br /&gt;
*tcl&lt;br /&gt;
*udev&lt;br /&gt;
*util-linux&lt;br /&gt;
*valgrind&lt;br /&gt;
*zlib&lt;br /&gt;
&lt;br /&gt;
==Recipes in Progress==&lt;br /&gt;
&lt;br /&gt;
The following list is being worked on by various people, to avoid duplication, please add any recipes you might be working on here, once they are merged we can move them to the list above.&lt;br /&gt;
&lt;br /&gt;
*dhcp&lt;br /&gt;
*dropbear&lt;br /&gt;
*gcc-runtime&lt;br /&gt;
*gdb&lt;br /&gt;
*gettext&lt;br /&gt;
*gmp&lt;br /&gt;
*guile&lt;br /&gt;
*libuser&lt;br /&gt;
*tar&lt;br /&gt;
*xz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please consider when updating a recipe whether you can also incorporate a ptest package to it as well.&lt;br /&gt;
&lt;br /&gt;
= QA = &lt;br /&gt;
&lt;br /&gt;
For every Milestone of the release, QA team should execute pTest on real HW and compare the results with his previous corresponding execution (example 2.3 M2 should be compared with 2.3 M1 results) to track better all the releases ans execution an [[ Ptest/archive | archive ]] page was created to track all the executions and check what are the previous results available to compare.&lt;br /&gt;
&lt;br /&gt;
* To check the process used to execute Ptest during QA cycles go to [[BSP_Test_Plan#pTest|pTest process]]&lt;/div&gt;</summary>
		<author><name>Juro Bystricky</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=32599</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=32599"/>
		<updated>2017-10-23T23:17:18Z</updated>

		<summary type="html">&lt;p&gt;Juro Bystricky: /* Recipes with ptest Enabled */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages, and producing a consistent output format.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
To add package testing to your build, add the DISTRO_FEATURES and EXTRA_IMAGE_FEATURES variables to your local.conf file, which is found in the Build Directory:&lt;br /&gt;
&lt;br /&gt;
     DISTRO_FEATURES_append = &amp;quot; ptest&amp;quot;&lt;br /&gt;
     * Adding &amp;quot;ptest&amp;quot; to your DISTRO_FEATURES variable causes -ptest packages to be built.&lt;br /&gt;
&lt;br /&gt;
     EXTRA_IMAGE_FEATURES += &amp;quot;ptest-pkgs&amp;quot;&lt;br /&gt;
     * Adding &amp;quot;ptest-pkgs&amp;quot; to IMAGE_FEATURES variable causes -ptest packages to be installed in your image.&lt;br /&gt;
&lt;br /&gt;
All ptest files are installed in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; which loops through all installed ptest test suites and runs them in sequence. You may therefore want to add &amp;quot;ptest-runner&amp;quot; to your image.&lt;br /&gt;
&lt;br /&gt;
==Ptest-runner Usage==&lt;br /&gt;
&lt;br /&gt;
The usage for the ptest-runner is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Usage: ptest-runner [-d directory] [-l list] [-t timeout] [-h] [ptest1 ptest2 ...] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Executing Ptest-runner==&lt;br /&gt;
&lt;br /&gt;
To execute a full ptest run you can do the following command line anywhere in the target:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; $ ptest-runner &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember to redirect to a file if you want to have a log&lt;br /&gt;
&lt;br /&gt;
=Implementing ptest in a package recipe=&lt;br /&gt;
&lt;br /&gt;
==What constitutes a ptest?==&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
The test can be anything, from a simple shell script running a binary and checking its output to an elaborate system of test binaries and data files.&lt;br /&gt;
&lt;br /&gt;
One major point of ptest is to consolidate the output format of all tests into a single common format. The format selected is the automake &amp;quot;simple test&amp;quot; format:&lt;br /&gt;
&lt;br /&gt;
   result: testname&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;result&amp;quot; is one of PASS, FAIL or SKIP and &amp;quot;testname&amp;quot; can be any identifying string. (The same format [http://www.gnu.org/software/automake/manual/automake.html#Simple-Tests used by Automake].)&lt;br /&gt;
&lt;br /&gt;
==General recipe preparations==&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest suffix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Building the test suite==&lt;br /&gt;
&lt;br /&gt;
Few packages support cross-compiling their test suites, so this is something we typically have to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: &amp;quot;make check&amp;quot;. This doesn&#039;t work when cross-compiling, since we need to build on host and run on target. So we need to split that into two targets: One for building the test and one for running it. Our build of automake comes with a [http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/automake/automake/buildtest.patch patch] which does this automatically, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_ptest function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_ptest() {&lt;br /&gt;
      oe_runmake buildtest-TESTS&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
If the package requires special configuration actions prior to compiling the test code, create a do_configure_ptest function to do that.&lt;br /&gt;
&lt;br /&gt;
Note that buildtest-TESTS requires [https://www.gnu.org/software/automake/manual/html_node/Serial-Test-Harness.html  serial-tests], but usually parallel tests are enabled by default.&lt;br /&gt;
In this case, you may have to modify the configure.ac script by adding serial-tests to AM_INIT_AUTOMAKE:&lt;br /&gt;
&lt;br /&gt;
  AM_INIT_AUTOMAKE([serial-tests])&lt;br /&gt;
&lt;br /&gt;
==Installing the test suite==&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass will automatically copy the required &amp;quot;run-ptest&amp;quot; file and run &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. For packages where this is enough, you don&#039;t need to do anything else.&lt;br /&gt;
&lt;br /&gt;
If you need to do something more than the automatic &amp;quot;make install-ptest&amp;quot;, create a do_install_ptest function and put the required actions there. This function will be called after &amp;quot;make install-ptest&amp;quot; has completed.&lt;br /&gt;
&lt;br /&gt;
==Recipes with ptest Enabled==&lt;br /&gt;
&lt;br /&gt;
The following is a list of recipes already have ptest enabled:&lt;br /&gt;
*acl&lt;br /&gt;
*attr&lt;br /&gt;
*apr&lt;br /&gt;
*apr-util&lt;br /&gt;
*bash&lt;br /&gt;
*beecrypt&lt;br /&gt;
*busybox&lt;br /&gt;
*bzip&lt;br /&gt;
*diffstat&lt;br /&gt;
*diffutils&lt;br /&gt;
*dbus&lt;br /&gt;
*ethtool&lt;br /&gt;
*e2fsprogs&lt;br /&gt;
*flex&lt;br /&gt;
*gawk&lt;br /&gt;
*gdbm&lt;br /&gt;
*glib&lt;br /&gt;
*kbd&lt;br /&gt;
*kmod&lt;br /&gt;
*libevent&lt;br /&gt;
*libxml2&lt;br /&gt;
*libpcre&lt;br /&gt;
*lttng-tools&lt;br /&gt;
*lzo&lt;br /&gt;
*mdadm&lt;br /&gt;
*openssh&lt;br /&gt;
*openssl&lt;br /&gt;
*parted&lt;br /&gt;
*perl&lt;br /&gt;
*python&lt;br /&gt;
*quilt&lt;br /&gt;
*rt-tests&lt;br /&gt;
*sed&lt;br /&gt;
*strace&lt;br /&gt;
*systemd&lt;br /&gt;
*sed&lt;br /&gt;
*tcl&lt;br /&gt;
*udev&lt;br /&gt;
*zlib&lt;br /&gt;
&lt;br /&gt;
==Recipes in Progress==&lt;br /&gt;
&lt;br /&gt;
The following list is being worked on by various people, to avoid duplication, please add any recipes you might be working on here, once they are merged we can move them to the list above.&lt;br /&gt;
&lt;br /&gt;
*dhcp&lt;br /&gt;
*dropbear&lt;br /&gt;
*gcc-runtime&lt;br /&gt;
*gdb&lt;br /&gt;
*gettext&lt;br /&gt;
*gmp&lt;br /&gt;
*guile&lt;br /&gt;
*libuser&lt;br /&gt;
*tar&lt;br /&gt;
*xz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please consider when updating a recipe whether you can also incorporate a ptest package to it as well.&lt;br /&gt;
&lt;br /&gt;
= QA = &lt;br /&gt;
&lt;br /&gt;
For every Milestone of the release, QA team should execute pTest on real HW and compare the results with his previous corresponding execution (example 2.3 M2 should be compared with 2.3 M1 results) to track better all the releases ans execution an [[ Ptest/archive | archive ]] page was created to track all the executions and check what are the previous results available to compare.&lt;br /&gt;
&lt;br /&gt;
* To check the process used to execute Ptest during QA cycles go to [[BSP_Test_Plan#pTest|pTest process]]&lt;/div&gt;</summary>
		<author><name>Juro Bystricky</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=32597</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=32597"/>
		<updated>2017-10-23T23:10:49Z</updated>

		<summary type="html">&lt;p&gt;Juro Bystricky: /* Recipes in Progress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages, and producing a consistent output format.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
To add package testing to your build, add the DISTRO_FEATURES and EXTRA_IMAGE_FEATURES variables to your local.conf file, which is found in the Build Directory:&lt;br /&gt;
&lt;br /&gt;
     DISTRO_FEATURES_append = &amp;quot; ptest&amp;quot;&lt;br /&gt;
     * Adding &amp;quot;ptest&amp;quot; to your DISTRO_FEATURES variable causes -ptest packages to be built.&lt;br /&gt;
&lt;br /&gt;
     EXTRA_IMAGE_FEATURES += &amp;quot;ptest-pkgs&amp;quot;&lt;br /&gt;
     * Adding &amp;quot;ptest-pkgs&amp;quot; to IMAGE_FEATURES variable causes -ptest packages to be installed in your image.&lt;br /&gt;
&lt;br /&gt;
All ptest files are installed in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; which loops through all installed ptest test suites and runs them in sequence. You may therefore want to add &amp;quot;ptest-runner&amp;quot; to your image.&lt;br /&gt;
&lt;br /&gt;
==Ptest-runner Usage==&lt;br /&gt;
&lt;br /&gt;
The usage for the ptest-runner is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Usage: ptest-runner [-d directory] [-l list] [-t timeout] [-h] [ptest1 ptest2 ...] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Executing Ptest-runner==&lt;br /&gt;
&lt;br /&gt;
To execute a full ptest run you can do the following command line anywhere in the target:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; $ ptest-runner &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember to redirect to a file if you want to have a log&lt;br /&gt;
&lt;br /&gt;
=Implementing ptest in a package recipe=&lt;br /&gt;
&lt;br /&gt;
==What constitutes a ptest?==&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
The test can be anything, from a simple shell script running a binary and checking its output to an elaborate system of test binaries and data files.&lt;br /&gt;
&lt;br /&gt;
One major point of ptest is to consolidate the output format of all tests into a single common format. The format selected is the automake &amp;quot;simple test&amp;quot; format:&lt;br /&gt;
&lt;br /&gt;
   result: testname&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;result&amp;quot; is one of PASS, FAIL or SKIP and &amp;quot;testname&amp;quot; can be any identifying string. (The same format [http://www.gnu.org/software/automake/manual/automake.html#Simple-Tests used by Automake].)&lt;br /&gt;
&lt;br /&gt;
==General recipe preparations==&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest suffix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Building the test suite==&lt;br /&gt;
&lt;br /&gt;
Few packages support cross-compiling their test suites, so this is something we typically have to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: &amp;quot;make check&amp;quot;. This doesn&#039;t work when cross-compiling, since we need to build on host and run on target. So we need to split that into two targets: One for building the test and one for running it. Our build of automake comes with a [http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/automake/automake/buildtest.patch patch] which does this automatically, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_ptest function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_ptest() {&lt;br /&gt;
      oe_runmake buildtest-TESTS&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
If the package requires special configuration actions prior to compiling the test code, create a do_configure_ptest function to do that.&lt;br /&gt;
&lt;br /&gt;
Note that buildtest-TESTS requires [https://www.gnu.org/software/automake/manual/html_node/Serial-Test-Harness.html  serial-tests], but usually parallel tests are enabled by default.&lt;br /&gt;
In this case, you may have to modify the configure.ac script by adding serial-tests to AM_INIT_AUTOMAKE:&lt;br /&gt;
&lt;br /&gt;
  AM_INIT_AUTOMAKE([serial-tests])&lt;br /&gt;
&lt;br /&gt;
==Installing the test suite==&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass will automatically copy the required &amp;quot;run-ptest&amp;quot; file and run &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. For packages where this is enough, you don&#039;t need to do anything else.&lt;br /&gt;
&lt;br /&gt;
If you need to do something more than the automatic &amp;quot;make install-ptest&amp;quot;, create a do_install_ptest function and put the required actions there. This function will be called after &amp;quot;make install-ptest&amp;quot; has completed.&lt;br /&gt;
&lt;br /&gt;
==Recipes with ptest Enabled==&lt;br /&gt;
&lt;br /&gt;
The following is a list of recipes already have ptest enabled:&lt;br /&gt;
*acl&lt;br /&gt;
*attr&lt;br /&gt;
*apr&lt;br /&gt;
*apr-util&lt;br /&gt;
*bash&lt;br /&gt;
*beecrypt&lt;br /&gt;
*diffstat&lt;br /&gt;
*busybox&lt;br /&gt;
*bzip&lt;br /&gt;
*dbus&lt;br /&gt;
*ethtool&lt;br /&gt;
*flex&lt;br /&gt;
*gawk&lt;br /&gt;
*glib&lt;br /&gt;
*kbd&lt;br /&gt;
*kmod&lt;br /&gt;
*libxml2&lt;br /&gt;
*libpcre&lt;br /&gt;
*lttng-tools&lt;br /&gt;
*parted&lt;br /&gt;
*perl&lt;br /&gt;
*python&lt;br /&gt;
*quilt&lt;br /&gt;
*strace&lt;br /&gt;
*systemd&lt;br /&gt;
*sed&lt;br /&gt;
*tcl&lt;br /&gt;
*openssh&lt;br /&gt;
*openssl&lt;br /&gt;
*udev&lt;br /&gt;
*gdbm&lt;br /&gt;
*mdadm&lt;br /&gt;
*rt-tests&lt;br /&gt;
*sed&lt;br /&gt;
*lzo&lt;br /&gt;
*zlib&lt;br /&gt;
*diffutils&lt;br /&gt;
*e2fsprogs&lt;br /&gt;
*libevent&lt;br /&gt;
&lt;br /&gt;
==Recipes in Progress==&lt;br /&gt;
&lt;br /&gt;
The following list is being worked on by various people, to avoid duplication, please add any recipes you might be working on here, once they are merged we can move them to the list above.&lt;br /&gt;
&lt;br /&gt;
*dhcp&lt;br /&gt;
*dropbear&lt;br /&gt;
*gcc-runtime&lt;br /&gt;
*gdb&lt;br /&gt;
*gettext&lt;br /&gt;
*gmp&lt;br /&gt;
*guile&lt;br /&gt;
*libuser&lt;br /&gt;
*tar&lt;br /&gt;
*xz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please consider when updating a recipe whether you can also incorporate a ptest package to it as well.&lt;br /&gt;
&lt;br /&gt;
= QA = &lt;br /&gt;
&lt;br /&gt;
For every Milestone of the release, QA team should execute pTest on real HW and compare the results with his previous corresponding execution (example 2.3 M2 should be compared with 2.3 M1 results) to track better all the releases ans execution an [[ Ptest/archive | archive ]] page was created to track all the executions and check what are the previous results available to compare.&lt;br /&gt;
&lt;br /&gt;
* To check the process used to execute Ptest during QA cycles go to [[BSP_Test_Plan#pTest|pTest process]]&lt;/div&gt;</summary>
		<author><name>Juro Bystricky</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=32596</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=32596"/>
		<updated>2017-10-23T23:10:05Z</updated>

		<summary type="html">&lt;p&gt;Juro Bystricky: /* Building the test suite */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages, and producing a consistent output format.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
To add package testing to your build, add the DISTRO_FEATURES and EXTRA_IMAGE_FEATURES variables to your local.conf file, which is found in the Build Directory:&lt;br /&gt;
&lt;br /&gt;
     DISTRO_FEATURES_append = &amp;quot; ptest&amp;quot;&lt;br /&gt;
     * Adding &amp;quot;ptest&amp;quot; to your DISTRO_FEATURES variable causes -ptest packages to be built.&lt;br /&gt;
&lt;br /&gt;
     EXTRA_IMAGE_FEATURES += &amp;quot;ptest-pkgs&amp;quot;&lt;br /&gt;
     * Adding &amp;quot;ptest-pkgs&amp;quot; to IMAGE_FEATURES variable causes -ptest packages to be installed in your image.&lt;br /&gt;
&lt;br /&gt;
All ptest files are installed in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; which loops through all installed ptest test suites and runs them in sequence. You may therefore want to add &amp;quot;ptest-runner&amp;quot; to your image.&lt;br /&gt;
&lt;br /&gt;
==Ptest-runner Usage==&lt;br /&gt;
&lt;br /&gt;
The usage for the ptest-runner is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Usage: ptest-runner [-d directory] [-l list] [-t timeout] [-h] [ptest1 ptest2 ...] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Executing Ptest-runner==&lt;br /&gt;
&lt;br /&gt;
To execute a full ptest run you can do the following command line anywhere in the target:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; $ ptest-runner &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember to redirect to a file if you want to have a log&lt;br /&gt;
&lt;br /&gt;
=Implementing ptest in a package recipe=&lt;br /&gt;
&lt;br /&gt;
==What constitutes a ptest?==&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
The test can be anything, from a simple shell script running a binary and checking its output to an elaborate system of test binaries and data files.&lt;br /&gt;
&lt;br /&gt;
One major point of ptest is to consolidate the output format of all tests into a single common format. The format selected is the automake &amp;quot;simple test&amp;quot; format:&lt;br /&gt;
&lt;br /&gt;
   result: testname&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;result&amp;quot; is one of PASS, FAIL or SKIP and &amp;quot;testname&amp;quot; can be any identifying string. (The same format [http://www.gnu.org/software/automake/manual/automake.html#Simple-Tests used by Automake].)&lt;br /&gt;
&lt;br /&gt;
==General recipe preparations==&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest suffix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Building the test suite==&lt;br /&gt;
&lt;br /&gt;
Few packages support cross-compiling their test suites, so this is something we typically have to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: &amp;quot;make check&amp;quot;. This doesn&#039;t work when cross-compiling, since we need to build on host and run on target. So we need to split that into two targets: One for building the test and one for running it. Our build of automake comes with a [http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/automake/automake/buildtest.patch patch] which does this automatically, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_ptest function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_ptest() {&lt;br /&gt;
      oe_runmake buildtest-TESTS&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
If the package requires special configuration actions prior to compiling the test code, create a do_configure_ptest function to do that.&lt;br /&gt;
&lt;br /&gt;
Note that buildtest-TESTS requires [https://www.gnu.org/software/automake/manual/html_node/Serial-Test-Harness.html  serial-tests], but usually parallel tests are enabled by default.&lt;br /&gt;
In this case, you may have to modify the configure.ac script by adding serial-tests to AM_INIT_AUTOMAKE:&lt;br /&gt;
&lt;br /&gt;
  AM_INIT_AUTOMAKE([serial-tests])&lt;br /&gt;
&lt;br /&gt;
==Installing the test suite==&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass will automatically copy the required &amp;quot;run-ptest&amp;quot; file and run &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. For packages where this is enough, you don&#039;t need to do anything else.&lt;br /&gt;
&lt;br /&gt;
If you need to do something more than the automatic &amp;quot;make install-ptest&amp;quot;, create a do_install_ptest function and put the required actions there. This function will be called after &amp;quot;make install-ptest&amp;quot; has completed.&lt;br /&gt;
&lt;br /&gt;
==Recipes with ptest Enabled==&lt;br /&gt;
&lt;br /&gt;
The following is a list of recipes already have ptest enabled:&lt;br /&gt;
*acl&lt;br /&gt;
*attr&lt;br /&gt;
*apr&lt;br /&gt;
*apr-util&lt;br /&gt;
*bash&lt;br /&gt;
*beecrypt&lt;br /&gt;
*diffstat&lt;br /&gt;
*busybox&lt;br /&gt;
*bzip&lt;br /&gt;
*dbus&lt;br /&gt;
*ethtool&lt;br /&gt;
*flex&lt;br /&gt;
*gawk&lt;br /&gt;
*glib&lt;br /&gt;
*kbd&lt;br /&gt;
*kmod&lt;br /&gt;
*libxml2&lt;br /&gt;
*libpcre&lt;br /&gt;
*lttng-tools&lt;br /&gt;
*parted&lt;br /&gt;
*perl&lt;br /&gt;
*python&lt;br /&gt;
*quilt&lt;br /&gt;
*strace&lt;br /&gt;
*systemd&lt;br /&gt;
*sed&lt;br /&gt;
*tcl&lt;br /&gt;
*openssh&lt;br /&gt;
*openssl&lt;br /&gt;
*udev&lt;br /&gt;
*gdbm&lt;br /&gt;
*mdadm&lt;br /&gt;
*rt-tests&lt;br /&gt;
*sed&lt;br /&gt;
*lzo&lt;br /&gt;
*zlib&lt;br /&gt;
*diffutils&lt;br /&gt;
*e2fsprogs&lt;br /&gt;
*libevent&lt;br /&gt;
&lt;br /&gt;
==Recipes in Progress==&lt;br /&gt;
&lt;br /&gt;
The following list is being worked on by various people, to avoid duplication, please add any recipes you might be working on here, once they are merged we can move them to the list above.&lt;br /&gt;
&lt;br /&gt;
*dhcp&lt;br /&gt;
*dropbear&lt;br /&gt;
*gcc-runtime&lt;br /&gt;
*gdb&lt;br /&gt;
*gettext&lt;br /&gt;
*guile&lt;br /&gt;
*libuser&lt;br /&gt;
*tar&lt;br /&gt;
*xz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please consider when updating a recipe whether you can also incorporate a ptest package to it as well.&lt;br /&gt;
&lt;br /&gt;
= QA = &lt;br /&gt;
&lt;br /&gt;
For every Milestone of the release, QA team should execute pTest on real HW and compare the results with his previous corresponding execution (example 2.3 M2 should be compared with 2.3 M1 results) to track better all the releases ans execution an [[ Ptest/archive | archive ]] page was created to track all the executions and check what are the previous results available to compare.&lt;br /&gt;
&lt;br /&gt;
* To check the process used to execute Ptest during QA cycles go to [[BSP_Test_Plan#pTest|pTest process]]&lt;/div&gt;</summary>
		<author><name>Juro Bystricky</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Reproducible_Builds&amp;diff=30857</id>
		<title>Reproducible Builds</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Reproducible_Builds&amp;diff=30857"/>
		<updated>2017-08-23T22:44:24Z</updated>

		<summary type="html">&lt;p&gt;Juro Bystricky: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== What are Reproducible Builds? ==&lt;br /&gt;
&lt;br /&gt;
The first tricky problem in this area is that the term &amp;quot;reproducible builds&amp;quot; means different things to different people. The simplest scenario is that you need to be able to re-run a build at some point in the future and have it succeed. The project already has mechanisms to provide the basics for this such as source mirroring support so that if upstream sources disappear, the build and still run. We also have technology such as sstate which means when you rebuild, prebuilt artefacts can be used where possible instead of rebuilding from scratch.&lt;br /&gt;
&lt;br /&gt;
The others, reproducibility is also about the levels of determinism in the builds. Releases prior to pyro didn&#039;t have &amp;quot;recipe specific sysroots&amp;quot; which meant that potentially, builds could be contaminated depending on build ordering. From pyro onwards the sysroots are isolated to be per recipe to avoid this issue. Perfect determinism in this area would mean task specific sysroots since multiple tasks from the same recipe can currently run in parallel however that is not something we&#039;ve felt the project needs right now.&lt;br /&gt;
&lt;br /&gt;
There are other factors which affect determism and reproducibility, for example:&lt;br /&gt;
&lt;br /&gt;
* compressing files with different levels of parallelism could result in different output&lt;br /&gt;
* dates, times and build paths can be embedded in the built objects&lt;br /&gt;
* dates and times of build objects changes depending on when the build was run and which tasks happened in parallel&lt;br /&gt;
&lt;br /&gt;
Our current intent is to model the best practises available and have tools and techniques to fix deltas where we can. &lt;br /&gt;
&lt;br /&gt;
It is worth noting there are things it would be sensible to do outside the build system to help with reproducibility over the long term too, its not a problem the build system can solve alone. Depending on your circumstances and requirements, it may help to:&lt;br /&gt;
&lt;br /&gt;
* build on the same distro version with the same installed packages&lt;br /&gt;
* build in the same path&lt;br /&gt;
* use the same build hardware&lt;br /&gt;
&lt;br /&gt;
The system is designed to factor out these deltas but for example, the build system today which works on Ubuntu X is not likely to work on Ubuntu X+5 years as the compilers will be totally different and probably unable to build today&#039;s codebase. If you need to run Ubuntu X in 5 years time, you may need older hardware to do that. There are solutions with containers, the build system can even self host inside its own image but there are limits to every approach and the exact circumstances of each individual situation need to be considered.&lt;br /&gt;
&lt;br /&gt;
== Current Status and Planned Development ==&lt;br /&gt;
&lt;br /&gt;
The Yocto Project aims to have builds which are entirely reproducible. That is; if you run a build today, then run that same configuration X time in the future, the binaries you get out of the build should be binary identical.&lt;br /&gt;
&lt;br /&gt;
This implies that the host system you run the build on and the path you run the build in should not affect the target system output.&lt;br /&gt;
&lt;br /&gt;
Our build system doesn&#039;t produce binary reproducible builds today, but we are actively working towards that goal and fixing issues as we identify them. We also plan to improve our testing to help find reproducibility issues.&lt;br /&gt;
&lt;br /&gt;
The design of the system lends itself very well to producing reproducible builds, as we provide a reproducible build environment with minimal dependencies on the host/build OS.&lt;br /&gt;
&lt;br /&gt;
We have several technologies in place which aide in reproducibility:&lt;br /&gt;
&lt;br /&gt;
Our shared state (sstate) mechanism base our builds on hashes of input metadata, reusing the outputs if the inputs are the same. &lt;br /&gt;
&lt;br /&gt;
As our sstate files need to be reusable regardless of build path and can be target or native binaries, we have mechanisms for working around various issues such as hard-coded paths (though we&#039;d prefer to remove the need for them entirely).&lt;br /&gt;
&lt;br /&gt;
A related problem to sstate is that of knowing when the input has changed, has the output changed? This is useful in the context of package feeds, amongst other things, to know whether we should update them or not. &lt;br /&gt;
We have binary build comparison tools at an early stage of development to allow us to reduce unnecessary churn in package feeds, however further developments are planned in this area using the tools from the reproducible-builds project.&lt;br /&gt;
&lt;br /&gt;
Our SDKs need to be relocatable and run anywhere they are installed to. We  include our own C library to do this in a &amp;quot;run anywhere&amp;quot; scenario and are able to generate fully relocatable toolchains.&lt;br /&gt;
&lt;br /&gt;
Our new for Yocto Project 2.3 (Pyro) recipe specific sysroots ensure that the output of a recipe doesn&#039;t change depending on whether other recipes have already been built and in which order, even when the software tries to autodetect available features.&lt;br /&gt;
&lt;br /&gt;
At this point the project does not intend to target timestamp levels of reproducibility so whilst the binary content should be the same, file timestamps may not be and this means package manager tarballs would not be binary identical due to timestamp differences. There are likely some ways we can fix this too and we are working on it but its a lower priority than some other determinism issues.&lt;br /&gt;
&lt;br /&gt;
== Why do we want reproducible builds? ==&lt;br /&gt;
&lt;br /&gt;
The many benefits of reproducible builds as listed in the [https://reproducible-builds.org/ reproducible-builds] project, not least of all the ability to verify a built output matches the source, are key motivations for our work on reproducible builds. Additonal benefits specific to the Yocto Project include:&lt;br /&gt;
* ability to reduce the churn in package feeds&lt;br /&gt;
* ability to improve reliability of allarch recipes and enable wider use of them&lt;br /&gt;
&lt;br /&gt;
== Related Work ==&lt;br /&gt;
&lt;br /&gt;
Some key bugs that are important in our reproducibility efforts are:&lt;br /&gt;
* &amp;lt;s&amp;gt;[https://bugzilla.yoctoproject.org/show_bug.cgi?id=1560 #1560] Enable recipe specific sysroots&amp;lt;/s&amp;gt; — DONE for 2.3&lt;br /&gt;
* [https://bugzilla.yoctoproject.org/show_bug.cgi?id=5866 #5866] Reproducible builds: identical binaries&lt;br /&gt;
* [https://bugzilla.yoctoproject.org/show_bug.cgi?id=10813 #10813] Replace build-compare with tools from the reproducible-builds project&lt;br /&gt;
* [https://bugzilla.yoctoproject.org/show_bug.cgi?id=11176 #11176] Add optional command to rootfs-postprocess to remove non-determinism from rootfs&lt;br /&gt;
* Integrate changes to improve determinism in OE-Core:&lt;br /&gt;
** [https://bugzilla.yoctoproject.org/show_bug.cgi?id=11177 #11177] Generate archives with deterministic metadata&lt;br /&gt;
** [https://bugzilla.yoctoproject.org/show_bug.cgi?id=11178 #11178] Make use of &amp;lt;tt&amp;gt;[https://reproducible-builds.org/specs/source-date-epoch/ SOURCE_DATE_EPOCH]&amp;lt;/tt&amp;gt;, most likely with patches from [https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal Debian] to ensure tools are using it.&lt;br /&gt;
** [https://bugzilla.yoctoproject.org/show_bug.cgi?id=11179 #11179] Deterministic timezone and locale settings&lt;br /&gt;
* Develop tests to catch issues with reproducibility&lt;br /&gt;
* Reproducibility analysis tool which will run diffoscope on all binary artefacts and produce a report that lists files with issues and points to the package and recipe the file came from.&lt;br /&gt;
&lt;br /&gt;
== Verification ==&lt;br /&gt;
&lt;br /&gt;
To ensure that our builds are reproducible we need to implement an infrastructure of verification over the build systems outputs Images, SDKs, Binary packages, etc.&lt;br /&gt;
&lt;br /&gt;
The idea is to run diffoscope over target shared states (populate_sysroot) because is the first output on what the other artifacts (Images, SDK&#039;s, Binary packages) are generated. The build output will be generated running bitbake world with two different Host systems, this can be done using two Virtual machines as Autobuilder workers and then launch the comparison process (diffoscope) against the two build outputs.&lt;br /&gt;
&lt;br /&gt;
A script exists to call diffoscope against shared states, the AB needs to use something similar to get the comparison results. [https://github.com/alimon/yocto-reproduciblebuilds-data/blob/master/sstate_diffoscope.py]. There is a example of the output  here [https://github.com/alimon/yocto-reproduciblebuilds-data/tree/master/poky_master_qemux86_d454dc2fc].&lt;br /&gt;
&lt;br /&gt;
An Autobuilder development branch for reproducible builds. [http://git.yoctoproject.org/cgit/cgit.cgi/yocto-autobuilder/log/?h=contrib/alimon/reproducible_builds]&lt;br /&gt;
&lt;br /&gt;
To preserve the results a web system needs to be implemented (the AB will push the results), this also will serve to publish something like www.yoctoproject.org/reproduciblebuilds to see the actual status and what recipes needs works in order to be 100% reproducible. An initial implementation only with database models. [https://github.com/alimon/reproducible-builds]&lt;br /&gt;
&lt;br /&gt;
== Current Development ==&lt;br /&gt;
&lt;br /&gt;
Yocto builds are well suited to provide reproducible builds, as there is minimal reliance on host tools. Most tools, including various toolchains, are built from scratch.&lt;br /&gt;
Hence builds on different machines, but using the same build recipes, will generally use the same toolchain for cross-compiling. Before we dive into pesky details, we need to define what we mean by &amp;quot;binary reproducible&amp;quot;. Yocto final binaries are placed in the folder &amp;quot;deploy&amp;quot;, so the most natural definition is that two &amp;quot;deploy&amp;quot; folders should be binary identical. This is the actual goal we aim for. In the process, we need to deal with various well known sources of binary differences:&lt;br /&gt;
&lt;br /&gt;
1. &#039;&#039;&#039;Embedded paths&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Usually a result of the C macro __FILE__, popular in asserts, error messages etc.&lt;br /&gt;
These are actually very easy to deal with using Yocto GCC compiler. The compiler has a special command line argument that remaps a hard coded __FILE__ path to an arbitrary string.&lt;br /&gt;
This feature allowed the whole Linux kernel and all kernel modules modules to build reproducibly without making any changes to the Linux source tree.&lt;br /&gt;
&lt;br /&gt;
2. &#039;&#039;&#039;Timestamps&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Timestamps are dealt with the usual way via the environment variable SOURCE_DATE_EPOCH.&lt;br /&gt;
Yocto takes advantage of multi-core systems to utilize parallel builds. We need to set a recipe specific SOURCE_DATE_EPOCH in each recipe environment for various tasks. One way would be to modify all recipes one-by-one to specify SOURCE_DATE_EPOCH explicitly, but that is not realistic as there are hundreds (probably thousands) of recipes in various meta-layers. &lt;br /&gt;
So this is done automatically instead in the &#039;&#039;reproducible_binaries.bbclass&#039;&#039;.&lt;br /&gt;
After sources are unpacked but before they are patched, we try to determine the value for SOURCE_DATE_EPOCH.&lt;br /&gt;
&lt;br /&gt;
There are 4 ways to determine SOURCE_DATE_EPOCH:&lt;br /&gt;
&lt;br /&gt;
1. Use value from __source-date-epoch.txt file if this file exists. This file was most likely created in the previous build by one of the following methods 2,3,4.&lt;br /&gt;
(But, in principle, it could actually provided by a recipe via SRC_URI)&lt;br /&gt;
&lt;br /&gt;
If the file does not exist:&lt;br /&gt;
&lt;br /&gt;
2. Use .git last commit date timestamp (git does not allow checking out files and preserving their timestamps)&lt;br /&gt;
&lt;br /&gt;
3. Use &amp;quot;known&amp;quot; files such as NEWS, CHANGLELOG, ...&lt;br /&gt;
&lt;br /&gt;
4. Use the youngest file of the source tree.&lt;br /&gt;
&lt;br /&gt;
Once the value of SOURCE_DATE_EPOCH is determined, it is stored in the recipe ${WORKDIR} in a text file &amp;quot;__source-date-epoch.txt&#039;.&lt;br /&gt;
If this file is found by other recipe task, the value is placed in the  SOURCE_DATE_EPOCH var in the task environment.&lt;br /&gt;
This is done in an anonymous python function, so SOURCE_DATE_EPOCH is guaranteed to exist for all tasks.&lt;br /&gt;
&lt;br /&gt;
In some cases, the timestamp may be embedded in the code that does not respect SOURCE_DATE_EPOCH. Those cases are dealt with on an individual bases.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Compression&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Various packing/compression utilities &#039;&#039;gzip&#039;&#039;, &#039;&#039;tar&#039;&#039;,..., etc. place timestamps or file mtimes in the archives. When we run into these issues, we modify&lt;br /&gt;
the arguments to prevent this. There may be build hosts with older &#039;&#039;tar&#039;&#039; and &#039;&#039;cpio&#039;&#039; not supporting these options. In this case we can&lt;br /&gt;
provide a natively built replacement.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. Build host references leaks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Sometimes packages may contain references to the host build system. This happens most frequently with various ptest and debug packages. This is very easy to &lt;br /&gt;
detect with &#039;&#039;diffoscope&#039;&#039;. The remedy is to modify the corresponding recipes and filter out the leakage. Typical offenders are HOSTTOLS_DIR, DEBUG_PREFIX_MAP,&lt;br /&gt;
RECIPE_SYSROOT_NATIVE, STAGING_DIR_TARGET. This is mostly a straight-forward fix.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5. Sorting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Parallel build can build packages/images in non-deterministic order. This may become an issue is some cases.&lt;br /&gt;
For reproducibility, we need to consistently assign the UID/GID values. There is a proper way to do this in Yocto:&lt;br /&gt;
http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#ref-classes-useradd&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6. Rootfs&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
There are numerous other issues: file mtimes in rootfs, pre-link time...&lt;br /&gt;
All of these will get a timestamp as specified by the variable REPRODUCIBLE_TIMESTAMP_ROOTFS. &lt;br /&gt;
This is a catch-all timestamp, used in the final step of building an image. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;7. Package type&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Yocto supports the following package types: RPM, Debian, IPK. At this point the focus is on Debian.&lt;br /&gt;
Making RPM and IPK packages reproducible as well is at the moment on a back-burner due to time &lt;br /&gt;
constraints. We don&#039;t expect too much resistance, though. The issues are mostly file mtimes and dependencies on file system&lt;br /&gt;
directory inode size.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;8. Dates and times embedded in the built objects&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This usually requires patching the offending source code. However, the patch may already exist, Debian does a good job.&lt;br /&gt;
If not, creating a new patch may be necessary while also contacting the maintainer.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is still a work in progress, with patches being sent to the OpenEmbedded Core mailing list, the latest one being:&lt;br /&gt;
https://patchwork.openembedded.org/series/6504/&lt;br /&gt;
&lt;br /&gt;
Recent results (using the above patch set while building core-image minimal, two clean builds, same&lt;br /&gt;
machine/OS, same date, two different folders, at two different times):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Same:&lt;br /&gt;
core-image-minimal-initramfs-qemux86&lt;br /&gt;
bzImage-qemux86.bin&lt;br /&gt;
vmlinux.gz-qemux86.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Comparing Debian packages in tmp/deploy/deb:&lt;br /&gt;
&lt;br /&gt;
Same:  4005&lt;br /&gt;
Different:  38&lt;br /&gt;
Total: 4043&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Juro Bystricky</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Yocto_Build_Failure_Swat_Team&amp;diff=15377</id>
		<title>Yocto Build Failure Swat Team</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Yocto_Build_Failure_Swat_Team&amp;diff=15377"/>
		<updated>2015-08-05T15:51:59Z</updated>

		<summary type="html">&lt;p&gt;Juro Bystricky: /* Things to never do */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
The assembly of the Yocto Project SWAT team is mainly to tackle urgent technical problems that break build on the master branch or major release branches in a timely manner, thus to maintain the stability of the master and release branch. The SWAT team includes volunteers or appointed members of the Yocto Project team. Community members can also volunteer to be part of the SWAT team.&lt;br /&gt;
&lt;br /&gt;
==Scope of Responsibility==&lt;br /&gt;
&lt;br /&gt;
Whenever a build (nightly build, weekly build, release build) fails, the SWAT team is responsible for ensuring the necessary debugging occurs and organizing resources to solve the issue and ensure successful builds. If resolving the issues requires schedule or resource adjustment, the SWAT team should work with program and development management to accommodate the change in the overall planning. If resolving the issues requires access to the autobuilder, please contact either [[User:Eflangan| Beth Flanagan]] or [[User:Mhalstead| Michael Halstead]] for access rights.&lt;br /&gt;
&lt;br /&gt;
In general, priority should always go first towards major release candidates and secondly to master failures. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point releases (yocto-1.X.x) should have minimal problems in the first place. As well, stable branch maintainers should be paying attention to their own point release candidate builds.&lt;br /&gt;
&lt;br /&gt;
Build failures are reported on the [https://lists.yoctoproject.org/listinfo/yocto-builds yocto-build mailing list].&lt;br /&gt;
&lt;br /&gt;
Please review the [[Media:Swat.odp]] presentation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: If a build fails, check the error log. If the failure happened on the master-next branch, i.e. the log contains:&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;branch : master-next&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;then the failure is generally of no concern for the SWAT member on duty (&amp;quot;The Chairperson&amp;quot;) and no special action is required.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&lt;br /&gt;
* Elizabeth Flanagan (US) (Autobuilder Maintainer)&lt;br /&gt;
* Saul Wold (US) (Autobuilder Administrator)&lt;br /&gt;
* Paul Eggleton (UK)&lt;br /&gt;
* Ross Burton (UK)&lt;br /&gt;
* Cristian Iorga (RO)&lt;br /&gt;
* Randy Witt (US)&lt;br /&gt;
* Benjamin Esquivel (MX)&lt;br /&gt;
* Juro Bystricky (US)&lt;br /&gt;
* Anibal Limon (MX)&lt;br /&gt;
* Tracy Graydon (US)&lt;br /&gt;
* Alejandro Hermandez (MX)&lt;br /&gt;
&lt;br /&gt;
==Chair==&lt;br /&gt;
A chairperson role will be rotated among team members each week on Friday. The Chairperson should monitor the build status for the entire week. Whenever a build is broken, the Chairperson should do necessary debugging and organize resources to solve the problems in a timely manner to meet the overall project and release schedule. The Chairperson serves as the focal point of the SWAT team to external people such as program managers or development managers.&lt;br /&gt;
&lt;br /&gt;
==Rotation Process==&lt;br /&gt;
The Chairperson rotation takes place during the weekly when the Friday morning status report is sent. Usually, this will take a simple round robin order. In case the next person cannot take the role due to tight schedule, vacation or some other reasons, the role will be passed to the next person.&lt;br /&gt;
&lt;br /&gt;
==Debugging BKMs==&lt;br /&gt;
&lt;br /&gt;
When looking at a failure, the first question is what the baseline was and what changed. If there were recent known good builds it helps to narrow down the number of changes that were likely responsible for the failure. It&#039;s also useful to note if the build was from scratch or from existing sstate files. You can tell by seeing what &amp;quot;setscene&amp;quot; tasks run in the log.&lt;br /&gt;
&lt;br /&gt;
The primary responsibility is to ensure that any failures are categorized correctly and that the right people get to know about them.&lt;br /&gt;
&lt;br /&gt;
It&#039;s important *someone* is then tasked with fixing it. Image failures are particular tricky since its likely some component of the image that failed and the question is then whether that component changed recently, whether it was some kind of core functionality at fault and so on.&lt;br /&gt;
&lt;br /&gt;
Ideally we want to get the failure reported to the person who knows something about the area and can come up with a fix without it distracting them too much.&lt;br /&gt;
As a secondary responsibility, it&#039;s often helpful to triage the failure. This might mean documenting a way to reproduce the failure outside a full build and/or documenting how the failure is happening and maybe even propose a fix.&lt;br /&gt;
&lt;br /&gt;
To fulfill the primary responsibility, it&#039;s suggested that bugs are opened on the bugzilla for each type of failure. This way, appropriate people can be brought into the discussion and a specific owner of the failure can be assigned. Replying to the build failure with the bug ID and also bringing the bug to the attention of anyone you suspect was responsible for the problem are also good practices.&lt;br /&gt;
&lt;br /&gt;
When filing the bug, please cut and paste the relevant error in the bug comment, and include the log file as an attachment. This ensures the assignee and triage team can quickly asses this issue.&lt;br /&gt;
&#039;&#039;&#039;In the bug report, do not post links to any Autobuilder log. The logs are non-persistent and hence the bug report will eventually end up with a dead link.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Every build failure should be responded to. If it is a known issue, a response with a single line containing &amp;quot;Known Issue&amp;quot; is sufficient. This assures others that the failure has been looked at and is being worked on.&lt;br /&gt;
&lt;br /&gt;
==Autobuilder BKMs==&lt;br /&gt;
&lt;br /&gt;
Sometimes failures are difficult to understand and can require direct ssh access to the autobuilder so the issue can be debugged passively on the system to examine contents of files and so forth. If doing this ensure you don&#039;t change any of the file system for example adding files that couldn&#039;t then be deleted by the autobuilder when it rebuilds.&lt;br /&gt;
&lt;br /&gt;
Rarely, &amp;quot;live&amp;quot; debugging might be needed where you&#039;d su to the pokybuild user and run a build manually to see the failure in real time. If doing this, ensure you only create files as the pokybuild user and you are careful not to generate sstate packages which shouldn&#039;t be present or any other bad state that might get reused. In general its recommended not to do &amp;quot;live&amp;quot; debugging. This can be escalated to RP/Saul/Beth if needed.&lt;br /&gt;
&lt;br /&gt;
Live debugging is generally something we try to avoid doing. It should only occur if an issue can only be reproduced on the autobuilder.&lt;br /&gt;
&lt;br /&gt;
===Autobuilder Overview===&lt;br /&gt;
&lt;br /&gt;
====Infrastructure Overview====&lt;br /&gt;
ab01: The yocto master autobuilder. This runs one low utility slave which does, universe fetch, package index, bitbake self test, builds the adt-installer and generally acts as the release mechanism for the Yocto Project. It also acts as a trigger parent for our full nightly build. This nightly build is essentially what builds our release, minus release notes.&lt;br /&gt;
&lt;br /&gt;
ab02, ab04, ab05, ab06, ab10: Generic nightly slaves. These run three slaves a piece. ab10 also runs our eclipse plugin build&lt;br /&gt;
&lt;br /&gt;
====Build Targets====&lt;br /&gt;
Nightly is a &amp;quot;dummy&amp;quot; buildset that does relatively few things and is only ever run on ab01. It mainly does universe fetch, building&lt;br /&gt;
adt-installer and building the eclipse plugin. It&#039;s main function is to trigger nightly-${ARCH} and wait until they&#039;re done. ab02, ab04,&lt;br /&gt;
ab05, ab06 are what is used to run this pool of nightly arch builds. &lt;br /&gt;
&lt;br /&gt;
NOTE: Just because nightly-* ran on ab04 the last time does not mean it will again. It&#039;s semi random. In order to find out what host you need to log into, please look for the buildstep that says:&lt;br /&gt;
&lt;br /&gt;
Building on&lt;br /&gt;
autobuilder04&lt;br /&gt;
Linux autobuilder04 2.6.37.6-0.9-default #1 SMP 2011-10-19 22:33:27&lt;br /&gt;
+0200 x86_64 x86_64 x86_64 GNU/Linux&lt;br /&gt;
&lt;br /&gt;
====Build &amp;quot;gotchas&amp;quot;====&lt;br /&gt;
Currently, we share sstate-cache and downloads between these slaves via NAS. For the moment we are also splitting up sstate and lsb-sstate. They are currently stored in /srv/www/vhosts/autobuilder.yoctoproject.org/pub/[sstate|lsb-sstate]. This will change after M2 to be combined into one directory; /srv/www/vhosts/autobuilder.yoctoproject.org/pub/sstate&lt;br /&gt;
&lt;br /&gt;
TMPDIR between distros (poky and poky-lsb) is not shared. $TMPDIR ends up being moved to ~pokybuild/yocto-autobuilder/yocto-slave/nightly-${ARCH}/build/build/nonlsb-tmp and poky-lsb is left in the above path&#039;s tmp. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Live Debugging Process====&lt;br /&gt;
If you need to do live debugging on the autobuilder, you want to:&lt;br /&gt;
&lt;br /&gt;
* Check that nothing is running on the builder:&lt;br /&gt;
https://autobuilder.yoctoproject.org/main/buildslaves&lt;br /&gt;
&lt;br /&gt;
* If nothing is running, remove the buildslave from the pool. Please let either Beth or sgw know if you&#039;re planning on doing this. Email/IRC is fine.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that we are currently utilizing two autobuilders. One is just for bugzilla reference (logs and whatnot), the other is production. There have been instances of people not know where the running autobuilder lives.&lt;br /&gt;
&lt;br /&gt;
The new autobuilder lives in ~/pokybuild/yocto-autobuilder-new. This will eventually change when I EOL the old autobuilder. However, when in doubt about where to find the base dir of the slave, always check the Create BBLayers Configuration step of the build you want. From this you can derive the base dir.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
http://autobuilder.yoctoproject.org:8011/builders/nightly/builds/101&lt;br /&gt;
&lt;br /&gt;
Looking at: http://autobuilder.yoctoproject.org:8011/builders/nightly/builds/101/steps/CreateAutoConf/logs/stdio shows that we&#039;ve not moved TMPDIR&lt;br /&gt;
&lt;br /&gt;
Looking at: http://autobuilder.yoctoproject.org:8011/builders/nightly/builds/101/steps/Create%20BBLayers%20Configuration/logs/stdio&lt;br /&gt;
&lt;br /&gt;
&amp;quot;BBLAYERS += &amp;quot; \ &lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/meta \ &lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/meta-yocto \ &lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/meta-yocto-bsp \ &lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/meta-qt3 \ &lt;br /&gt;
&amp;quot; &lt;br /&gt;
&lt;br /&gt;
indicates that the layers all exist in the slave&#039;s build dir for that build set. Which means that TMPDIR is most likely in:&lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/build/tmp&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo -i -u pokybuild&lt;br /&gt;
cd yocto-autobuilder-new&lt;br /&gt;
. ./yocto-autobuilder-setup&lt;br /&gt;
./yocto-stop-autobuilder slave&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will ensure that the directory you are working in doesn&#039;t disappear out from under you. Please make sure that after you are done, you restart:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo -i -u pokybuild&lt;br /&gt;
cd yocto-autobuilder-new&lt;br /&gt;
. ./yocto-autobuilder-setup&lt;br /&gt;
./yocto-start-autobuilder slave&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Things to never do=====&lt;br /&gt;
*  NEVER clean sstate (cleanall, cleansstate). As sstate is shared across builders, you do not want it wiped like this. If you need to toss sstate, let Beth/sgw/RP know. We try not to remove sstate as it speeds up build times dramatically. As it&#039;s fairly large and takes a while to wipe, we try to avoid this.&lt;br /&gt;
*  NEVER stop ab01&#039;s master/slave. If you need to debug something on ab01, let sgw, RP and Beth know. As we&#039;re the only three who can kick builds off, it&#039;s really important they all know so they don&#039;t kick off a build and tromp on live debugging. If you need to work on ab01 one of them must know about it *and* have given the ok.&lt;br /&gt;
*  NEVER create a file as yourself under ~pokybuild/yocto-autobuilder/* This can cause future builds to fail and is frustrating to debug.&lt;br /&gt;
*  NEVER post links to any Autobuilder log in bug reports. The logs are non-persistent and hence the bug report will eventually end up with a dead link.&lt;/div&gt;</summary>
		<author><name>Juro Bystricky</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Yocto_Build_Failure_Swat_Team&amp;diff=15376</id>
		<title>Yocto Build Failure Swat Team</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Yocto_Build_Failure_Swat_Team&amp;diff=15376"/>
		<updated>2015-08-05T15:50:36Z</updated>

		<summary type="html">&lt;p&gt;Juro Bystricky: /* Debugging BKMs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
The assembly of the Yocto Project SWAT team is mainly to tackle urgent technical problems that break build on the master branch or major release branches in a timely manner, thus to maintain the stability of the master and release branch. The SWAT team includes volunteers or appointed members of the Yocto Project team. Community members can also volunteer to be part of the SWAT team.&lt;br /&gt;
&lt;br /&gt;
==Scope of Responsibility==&lt;br /&gt;
&lt;br /&gt;
Whenever a build (nightly build, weekly build, release build) fails, the SWAT team is responsible for ensuring the necessary debugging occurs and organizing resources to solve the issue and ensure successful builds. If resolving the issues requires schedule or resource adjustment, the SWAT team should work with program and development management to accommodate the change in the overall planning. If resolving the issues requires access to the autobuilder, please contact either [[User:Eflangan| Beth Flanagan]] or [[User:Mhalstead| Michael Halstead]] for access rights.&lt;br /&gt;
&lt;br /&gt;
In general, priority should always go first towards major release candidates and secondly to master failures. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point releases (yocto-1.X.x) should have minimal problems in the first place. As well, stable branch maintainers should be paying attention to their own point release candidate builds.&lt;br /&gt;
&lt;br /&gt;
Build failures are reported on the [https://lists.yoctoproject.org/listinfo/yocto-builds yocto-build mailing list].&lt;br /&gt;
&lt;br /&gt;
Please review the [[Media:Swat.odp]] presentation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: If a build fails, check the error log. If the failure happened on the master-next branch, i.e. the log contains:&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;branch : master-next&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;then the failure is generally of no concern for the SWAT member on duty (&amp;quot;The Chairperson&amp;quot;) and no special action is required.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&lt;br /&gt;
* Elizabeth Flanagan (US) (Autobuilder Maintainer)&lt;br /&gt;
* Saul Wold (US) (Autobuilder Administrator)&lt;br /&gt;
* Paul Eggleton (UK)&lt;br /&gt;
* Ross Burton (UK)&lt;br /&gt;
* Cristian Iorga (RO)&lt;br /&gt;
* Randy Witt (US)&lt;br /&gt;
* Benjamin Esquivel (MX)&lt;br /&gt;
* Juro Bystricky (US)&lt;br /&gt;
* Anibal Limon (MX)&lt;br /&gt;
* Tracy Graydon (US)&lt;br /&gt;
* Alejandro Hermandez (MX)&lt;br /&gt;
&lt;br /&gt;
==Chair==&lt;br /&gt;
A chairperson role will be rotated among team members each week on Friday. The Chairperson should monitor the build status for the entire week. Whenever a build is broken, the Chairperson should do necessary debugging and organize resources to solve the problems in a timely manner to meet the overall project and release schedule. The Chairperson serves as the focal point of the SWAT team to external people such as program managers or development managers.&lt;br /&gt;
&lt;br /&gt;
==Rotation Process==&lt;br /&gt;
The Chairperson rotation takes place during the weekly when the Friday morning status report is sent. Usually, this will take a simple round robin order. In case the next person cannot take the role due to tight schedule, vacation or some other reasons, the role will be passed to the next person.&lt;br /&gt;
&lt;br /&gt;
==Debugging BKMs==&lt;br /&gt;
&lt;br /&gt;
When looking at a failure, the first question is what the baseline was and what changed. If there were recent known good builds it helps to narrow down the number of changes that were likely responsible for the failure. It&#039;s also useful to note if the build was from scratch or from existing sstate files. You can tell by seeing what &amp;quot;setscene&amp;quot; tasks run in the log.&lt;br /&gt;
&lt;br /&gt;
The primary responsibility is to ensure that any failures are categorized correctly and that the right people get to know about them.&lt;br /&gt;
&lt;br /&gt;
It&#039;s important *someone* is then tasked with fixing it. Image failures are particular tricky since its likely some component of the image that failed and the question is then whether that component changed recently, whether it was some kind of core functionality at fault and so on.&lt;br /&gt;
&lt;br /&gt;
Ideally we want to get the failure reported to the person who knows something about the area and can come up with a fix without it distracting them too much.&lt;br /&gt;
As a secondary responsibility, it&#039;s often helpful to triage the failure. This might mean documenting a way to reproduce the failure outside a full build and/or documenting how the failure is happening and maybe even propose a fix.&lt;br /&gt;
&lt;br /&gt;
To fulfill the primary responsibility, it&#039;s suggested that bugs are opened on the bugzilla for each type of failure. This way, appropriate people can be brought into the discussion and a specific owner of the failure can be assigned. Replying to the build failure with the bug ID and also bringing the bug to the attention of anyone you suspect was responsible for the problem are also good practices.&lt;br /&gt;
&lt;br /&gt;
When filing the bug, please cut and paste the relevant error in the bug comment, and include the log file as an attachment. This ensures the assignee and triage team can quickly asses this issue.&lt;br /&gt;
&#039;&#039;&#039;In the bug report, do not post links to any Autobuilder log. The logs are non-persistent and hence the bug report will eventually end up with a dead link.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Every build failure should be responded to. If it is a known issue, a response with a single line containing &amp;quot;Known Issue&amp;quot; is sufficient. This assures others that the failure has been looked at and is being worked on.&lt;br /&gt;
&lt;br /&gt;
==Autobuilder BKMs==&lt;br /&gt;
&lt;br /&gt;
Sometimes failures are difficult to understand and can require direct ssh access to the autobuilder so the issue can be debugged passively on the system to examine contents of files and so forth. If doing this ensure you don&#039;t change any of the file system for example adding files that couldn&#039;t then be deleted by the autobuilder when it rebuilds.&lt;br /&gt;
&lt;br /&gt;
Rarely, &amp;quot;live&amp;quot; debugging might be needed where you&#039;d su to the pokybuild user and run a build manually to see the failure in real time. If doing this, ensure you only create files as the pokybuild user and you are careful not to generate sstate packages which shouldn&#039;t be present or any other bad state that might get reused. In general its recommended not to do &amp;quot;live&amp;quot; debugging. This can be escalated to RP/Saul/Beth if needed.&lt;br /&gt;
&lt;br /&gt;
Live debugging is generally something we try to avoid doing. It should only occur if an issue can only be reproduced on the autobuilder.&lt;br /&gt;
&lt;br /&gt;
===Autobuilder Overview===&lt;br /&gt;
&lt;br /&gt;
====Infrastructure Overview====&lt;br /&gt;
ab01: The yocto master autobuilder. This runs one low utility slave which does, universe fetch, package index, bitbake self test, builds the adt-installer and generally acts as the release mechanism for the Yocto Project. It also acts as a trigger parent for our full nightly build. This nightly build is essentially what builds our release, minus release notes.&lt;br /&gt;
&lt;br /&gt;
ab02, ab04, ab05, ab06, ab10: Generic nightly slaves. These run three slaves a piece. ab10 also runs our eclipse plugin build&lt;br /&gt;
&lt;br /&gt;
====Build Targets====&lt;br /&gt;
Nightly is a &amp;quot;dummy&amp;quot; buildset that does relatively few things and is only ever run on ab01. It mainly does universe fetch, building&lt;br /&gt;
adt-installer and building the eclipse plugin. It&#039;s main function is to trigger nightly-${ARCH} and wait until they&#039;re done. ab02, ab04,&lt;br /&gt;
ab05, ab06 are what is used to run this pool of nightly arch builds. &lt;br /&gt;
&lt;br /&gt;
NOTE: Just because nightly-* ran on ab04 the last time does not mean it will again. It&#039;s semi random. In order to find out what host you need to log into, please look for the buildstep that says:&lt;br /&gt;
&lt;br /&gt;
Building on&lt;br /&gt;
autobuilder04&lt;br /&gt;
Linux autobuilder04 2.6.37.6-0.9-default #1 SMP 2011-10-19 22:33:27&lt;br /&gt;
+0200 x86_64 x86_64 x86_64 GNU/Linux&lt;br /&gt;
&lt;br /&gt;
====Build &amp;quot;gotchas&amp;quot;====&lt;br /&gt;
Currently, we share sstate-cache and downloads between these slaves via NAS. For the moment we are also splitting up sstate and lsb-sstate. They are currently stored in /srv/www/vhosts/autobuilder.yoctoproject.org/pub/[sstate|lsb-sstate]. This will change after M2 to be combined into one directory; /srv/www/vhosts/autobuilder.yoctoproject.org/pub/sstate&lt;br /&gt;
&lt;br /&gt;
TMPDIR between distros (poky and poky-lsb) is not shared. $TMPDIR ends up being moved to ~pokybuild/yocto-autobuilder/yocto-slave/nightly-${ARCH}/build/build/nonlsb-tmp and poky-lsb is left in the above path&#039;s tmp. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Live Debugging Process====&lt;br /&gt;
If you need to do live debugging on the autobuilder, you want to:&lt;br /&gt;
&lt;br /&gt;
* Check that nothing is running on the builder:&lt;br /&gt;
https://autobuilder.yoctoproject.org/main/buildslaves&lt;br /&gt;
&lt;br /&gt;
* If nothing is running, remove the buildslave from the pool. Please let either Beth or sgw know if you&#039;re planning on doing this. Email/IRC is fine.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that we are currently utilizing two autobuilders. One is just for bugzilla reference (logs and whatnot), the other is production. There have been instances of people not know where the running autobuilder lives.&lt;br /&gt;
&lt;br /&gt;
The new autobuilder lives in ~/pokybuild/yocto-autobuilder-new. This will eventually change when I EOL the old autobuilder. However, when in doubt about where to find the base dir of the slave, always check the Create BBLayers Configuration step of the build you want. From this you can derive the base dir.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
http://autobuilder.yoctoproject.org:8011/builders/nightly/builds/101&lt;br /&gt;
&lt;br /&gt;
Looking at: http://autobuilder.yoctoproject.org:8011/builders/nightly/builds/101/steps/CreateAutoConf/logs/stdio shows that we&#039;ve not moved TMPDIR&lt;br /&gt;
&lt;br /&gt;
Looking at: http://autobuilder.yoctoproject.org:8011/builders/nightly/builds/101/steps/Create%20BBLayers%20Configuration/logs/stdio&lt;br /&gt;
&lt;br /&gt;
&amp;quot;BBLAYERS += &amp;quot; \ &lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/meta \ &lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/meta-yocto \ &lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/meta-yocto-bsp \ &lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/meta-qt3 \ &lt;br /&gt;
&amp;quot; &lt;br /&gt;
&lt;br /&gt;
indicates that the layers all exist in the slave&#039;s build dir for that build set. Which means that TMPDIR is most likely in:&lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/build/tmp&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo -i -u pokybuild&lt;br /&gt;
cd yocto-autobuilder-new&lt;br /&gt;
. ./yocto-autobuilder-setup&lt;br /&gt;
./yocto-stop-autobuilder slave&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will ensure that the directory you are working in doesn&#039;t disappear out from under you. Please make sure that after you are done, you restart:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo -i -u pokybuild&lt;br /&gt;
cd yocto-autobuilder-new&lt;br /&gt;
. ./yocto-autobuilder-setup&lt;br /&gt;
./yocto-start-autobuilder slave&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Things to never do=====&lt;br /&gt;
*  NEVER clean sstate (cleanall, cleansstate). As sstate is shared across builders, you do not want it wiped like this. If you need to toss sstate, let Beth/sgw/RP know. We try not to remove sstate as it speeds up build times dramatically. As it&#039;s fairly large and takes a while to wipe, we try to avoid this.&lt;br /&gt;
*  NEVER stop ab01&#039;s master/slave. If you need to debug something on ab01, let sgw, RP and Beth know. As we&#039;re the only three who can kick builds off, it&#039;s really important they all know so they don&#039;t kick off a build and tromp on live debugging. If you need to work on ab01 one of them must know about it *and* have given the ok.&lt;br /&gt;
*  NEVER create a file as yourself under ~pokybuild/yocto-autobuilder/* This can cause future builds to fail and is frustrating to debug.&lt;/div&gt;</summary>
		<author><name>Juro Bystricky</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Yocto_Build_Failure_Swat_Team&amp;diff=14636</id>
		<title>Yocto Build Failure Swat Team</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Yocto_Build_Failure_Swat_Team&amp;diff=14636"/>
		<updated>2015-06-02T22:20:50Z</updated>

		<summary type="html">&lt;p&gt;Juro Bystricky: /* Scope of Responsibility */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
The assembly of the Yocto Project SWAT team is mainly to tackle urgent technical problems that break build on the master branch or major release branches in a timely manner, thus to maintain the stability of the master and release branch. The SWAT team includes volunteers or appointed members of the Yocto Project team. Community members can also volunteer to be part of the SWAT team.&lt;br /&gt;
&lt;br /&gt;
==Scope of Responsibility==&lt;br /&gt;
&lt;br /&gt;
Whenever a build (nightly build, weekly build, release build) fails, the SWAT team is responsible for ensuring the necessary debugging occurs and organizing resources to solve the issue and ensure successful builds. If resolving the issues requires schedule or resource adjustment, the SWAT team should work with program and development management to accommodate the change in the overall planning. If resolving the issues requires access to the autobuilder, please contact either [[User:Eflangan| Beth Flanagan]] or [[User:Mhalstead| Michael Halstead]] for access rights.&lt;br /&gt;
&lt;br /&gt;
In general, priority should always go first towards major release candidates and secondly to master failures. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point releases (yocto-1.X.x) should have minimal problems in the first place. As well, stable branch maintainers should be paying attention to their own point release candidate builds.&lt;br /&gt;
&lt;br /&gt;
Build failures are reported on the [https://lists.yoctoproject.org/listinfo/yocto-builds yocto-build mailing list].&lt;br /&gt;
&lt;br /&gt;
Please review the [[Media:Swat.odp]] presentation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: If a build fails, check the error log. If the failure happened on the master-next branch, i.e. the log contains:&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;branch : master-next&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;then the failure is generally of no concern for the SWAT member on duty (&amp;quot;The Chairperson&amp;quot;) and no special action is required.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&lt;br /&gt;
* Elizabeth Flanagan (US) (Autobuilder Maintainer)&lt;br /&gt;
* Saul Wold (US) (Autobuilder Administrator)&lt;br /&gt;
* Paul Eggleton (UK)&lt;br /&gt;
* Ross Burton (UK)&lt;br /&gt;
* Cristian Iorga (RO)&lt;br /&gt;
* Randy Witt (US)&lt;br /&gt;
* Benjamin Esquivel (MX)&lt;br /&gt;
* Juro Bystricky (US)&lt;br /&gt;
* Anibal Limon (MX)&lt;br /&gt;
* Tracy Graydon (US)&lt;br /&gt;
* Alejandro Hermandez (MX)&lt;br /&gt;
&lt;br /&gt;
==Chair==&lt;br /&gt;
A chairperson role will be rotated among team members each other week. The Chairperson should monitor the build status for the entire two weeks. Whenever a build is broken, the Chairperson should do necessary debugging and organize resources to solve the problems in a timely manner to meet the overall project and release schedule. The Chairperson serves as the focal point of the SWAT team to external people such as program managers or development managers.&lt;br /&gt;
&lt;br /&gt;
==Rotation Process==&lt;br /&gt;
The Chairperson rotation takes place during the bi-weekly technical project meeting (Every other Tuesday at 8:00 AM PT). Usually, this will take a simple round robin order. In case the next person cannot take the role due to tight schedule, vacation or some other reasons, the role will be passed to the next person.&lt;br /&gt;
&lt;br /&gt;
==Debugging BKMs==&lt;br /&gt;
&lt;br /&gt;
When looking at a failure, the first question is what the baseline was and what changed. If there were recent known good builds it helps to narrow down the number of changes that were likely responsible for the failure. It&#039;s also useful to note if the build was from scratch or from existing sstate files. You can tell by seeing what &amp;quot;setscene&amp;quot; tasks run in the log.&lt;br /&gt;
&lt;br /&gt;
The primary responsibility is to ensure that any failures are categorized correctly and that the right people get to know about them.&lt;br /&gt;
&lt;br /&gt;
It&#039;s important *someone* is then tasked with fixing it. Image failures are particular tricky since its likely some component of the image that failed and the question is then whether that component changed recently, whether it was some kind of core functionality at fault and so on.&lt;br /&gt;
&lt;br /&gt;
Ideally we want to get the failure reported to the person who knows something about the area and can come up with a fix without it distracting them too much.&lt;br /&gt;
As a secondary responsibility, it&#039;s often helpful to triage the failure. This might mean documenting a way to reproduce the failure outside a full build and/or documenting how the failure is happening and maybe even propose a fix.&lt;br /&gt;
&lt;br /&gt;
To fulfill the primary responsibility, it&#039;s suggested that bugs are opened on the bugzilla for each type of failure. This way, appropriate people can be brought into the discussion and a specific owner of the failure can be assigned. Replying to the build failure with the bug ID and also bringing the bug to the attention of anyone you suspect was responsible for the problem are also good practices.&lt;br /&gt;
&lt;br /&gt;
When filing the bug, please cut and paste the relevant error in the bug comment, and include the log file as an attachement. This ensures the assignee and triage team can quickly asses this issue.&lt;br /&gt;
&lt;br /&gt;
Every build failure should be responded to. If it is a known issue, a response with a single line containing &amp;quot;Known Issue&amp;quot; is sufficient. This assures others that the failure has been looked at and is being worked on.&lt;br /&gt;
&lt;br /&gt;
==Autobuilder BKMs==&lt;br /&gt;
&lt;br /&gt;
Sometimes failures are difficult to understand and can require direct ssh access to the autobuilder so the issue can be debugged passively on the system to examine contents of files and so forth. If doing this ensure you don&#039;t change any of the file system for example adding files that couldn&#039;t then be deleted by the autobuilder when it rebuilds.&lt;br /&gt;
&lt;br /&gt;
Rarely, &amp;quot;live&amp;quot; debugging might be needed where you&#039;d su to the pokybuild user and run a build manually to see the failure in real time. If doing this, ensure you only create files as the pokybuild user and you are careful not to generate sstate packages which shouldn&#039;t be present or any other bad state that might get reused. In general its recommended not to do &amp;quot;live&amp;quot; debugging. This can be escalated to RP/Saul/Beth if needed.&lt;br /&gt;
&lt;br /&gt;
Live debugging is generally something we try to avoid doing. It should only occur if an issue can only be reproduced on the autobuilder.&lt;br /&gt;
&lt;br /&gt;
===Autobuilder Overview===&lt;br /&gt;
&lt;br /&gt;
====Infrastructure Overview====&lt;br /&gt;
ab01: The yocto master autobuilder. This runs one low utility slave which does, universe fetch, package index, bitbake self test, builds the adt-installer and generally acts as the release mechanism for the Yocto Project. It also acts as a trigger parent for our full nightly build. This nightly build is essentially what builds our release, minus release notes.&lt;br /&gt;
&lt;br /&gt;
ab02, ab04, ab05, ab06, ab10: Generic nightly slaves. These run three slaves a piece. ab10 also runs our eclipse plugin build&lt;br /&gt;
&lt;br /&gt;
====Build Targets====&lt;br /&gt;
Nightly is a &amp;quot;dummy&amp;quot; buildset that does relatively few things and is only ever run on ab01. It mainly does universe fetch, building&lt;br /&gt;
adt-installer and building the eclipse plugin. It&#039;s main function is to trigger nightly-${ARCH} and wait until they&#039;re done. ab02, ab04,&lt;br /&gt;
ab05, ab06 are what is used to run this pool of nightly arch builds. &lt;br /&gt;
&lt;br /&gt;
NOTE: Just because nightly-* ran on ab04 the last time does not mean it will again. It&#039;s semi random. In order to find out what host you need to log into, please look for the buildstep that says:&lt;br /&gt;
&lt;br /&gt;
Building on&lt;br /&gt;
autobuilder04&lt;br /&gt;
Linux autobuilder04 2.6.37.6-0.9-default #1 SMP 2011-10-19 22:33:27&lt;br /&gt;
+0200 x86_64 x86_64 x86_64 GNU/Linux&lt;br /&gt;
&lt;br /&gt;
====Build &amp;quot;gotchas&amp;quot;====&lt;br /&gt;
Currently, we share sstate-cache and downloads between these slaves via NAS. For the moment we are also splitting up sstate and lsb-sstate. They are currently stored in /srv/www/vhosts/autobuilder.yoctoproject.org/pub/[sstate|lsb-sstate]. This will change after M2 to be combined into one directory; /srv/www/vhosts/autobuilder.yoctoproject.org/pub/sstate&lt;br /&gt;
&lt;br /&gt;
TMPDIR between distros (poky and poky-lsb) is not shared. $TMPDIR ends up being moved to ~pokybuild/yocto-autobuilder/yocto-slave/nightly-${ARCH}/build/build/nonlsb-tmp and poky-lsb is left in the above path&#039;s tmp. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Live Debugging Process====&lt;br /&gt;
If you need to do live debugging on the autobuilder, you want to:&lt;br /&gt;
&lt;br /&gt;
* Check that nothing is running on the builder:&lt;br /&gt;
https://autobuilder.yoctoproject.org/main/buildslaves&lt;br /&gt;
&lt;br /&gt;
* If nothing is running, remove the buildslave from the pool. Please let either Beth or sgw know if you&#039;re planning on doing this. Email/IRC is fine.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that we are currently utilizing two autobuilders. One is just for bugzilla reference (logs and whatnot), the other is production. There have been instances of people not know where the running autobuilder lives.&lt;br /&gt;
&lt;br /&gt;
The new autobuilder lives in ~/pokybuild/yocto-autobuilder-new. This will eventually change when I EOL the old autobuilder. However, when in doubt about where to find the base dir of the slave, always check the Create BBLayers Configuration step of the build you want. From this you can derive the base dir.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
http://autobuilder.yoctoproject.org:8011/builders/nightly/builds/101&lt;br /&gt;
&lt;br /&gt;
Looking at: http://autobuilder.yoctoproject.org:8011/builders/nightly/builds/101/steps/CreateAutoConf/logs/stdio shows that we&#039;ve not moved TMPDIR&lt;br /&gt;
&lt;br /&gt;
Looking at: http://autobuilder.yoctoproject.org:8011/builders/nightly/builds/101/steps/Create%20BBLayers%20Configuration/logs/stdio&lt;br /&gt;
&lt;br /&gt;
&amp;quot;BBLAYERS += &amp;quot; \ &lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/meta \ &lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/meta-yocto \ &lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/meta-yocto-bsp \ &lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/meta-qt3 \ &lt;br /&gt;
&amp;quot; &lt;br /&gt;
&lt;br /&gt;
indicates that the layers all exist in the slave&#039;s build dir for that build set. Which means that TMPDIR is most likely in:&lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/build/tmp&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo -i -u pokybuild&lt;br /&gt;
cd yocto-autobuilder-new&lt;br /&gt;
. ./yocto-autobuilder-setup&lt;br /&gt;
./yocto-stop-autobuilder slave&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will ensure that the directory you are working in doesn&#039;t disappear out from under you. Please make sure that after you are done, you restart:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo -i -u pokybuild&lt;br /&gt;
cd yocto-autobuilder-new&lt;br /&gt;
. ./yocto-autobuilder-setup&lt;br /&gt;
./yocto-start-autobuilder slave&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Things to never do=====&lt;br /&gt;
*  NEVER clean sstate (cleanall, cleansstate). As sstate is shared across builders, you do not want it wiped like this. If you need to toss sstate, let Beth/sgw/RP know. We try not to remove sstate as it speeds up build times dramatically. As it&#039;s fairly large and takes a while to wipe, we try to avoid this.&lt;br /&gt;
*  NEVER stop ab01&#039;s master/slave. If you need to debug something on ab01, let sgw, RP and Beth know. As we&#039;re the only three who can kick builds off, it&#039;s really important they all know so they don&#039;t kick off a build and tromp on live debugging. If you need to work on ab01 one of them must know about it *and* have given the ok.&lt;br /&gt;
*  NEVER create a file as yourself under ~pokybuild/yocto-autobuilder/* This can cause future builds to fail and is frustrating to debug.&lt;/div&gt;</summary>
		<author><name>Juro Bystricky</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Yocto_Build_Failure_Swat_Team&amp;diff=14635</id>
		<title>Yocto Build Failure Swat Team</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Yocto_Build_Failure_Swat_Team&amp;diff=14635"/>
		<updated>2015-06-02T22:02:28Z</updated>

		<summary type="html">&lt;p&gt;Juro Bystricky: /* Live Debugging Process */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
The assembly of the Yocto Project SWAT team is mainly to tackle urgent technical problems that break build on the master branch or major release branches in a timely manner, thus to maintain the stability of the master and release branch. The SWAT team includes volunteers or appointed members of the Yocto Project team. Community members can also volunteer to be part of the SWAT team.&lt;br /&gt;
&lt;br /&gt;
==Scope of Responsibility==&lt;br /&gt;
&lt;br /&gt;
Whenever a build (nightly build, weekly build, release build) fails, the SWAT team is responsible for ensuring the necessary debugging occurs and organizing resources to solve the issue and ensure successful builds. If resolving the issues requires schedule or resource adjustment, the SWAT team should work with program and development management to accommodate the change in the overall planning. If resolving the issues requires access to the autobuilder, please contact either [[User:Eflangan| Beth Flanagan]] or [[User:Mhalstead| Michael Halstead]] for access rights.&lt;br /&gt;
&lt;br /&gt;
In general, priority should always go first towards major release candidates and secondly to master failures. &lt;br /&gt;
&lt;br /&gt;
Point releases (yocto-1.X.x) should have minimal problems in the first place. As well, stable branch maintainers should be paying attention to their own point release candidate builds.&lt;br /&gt;
&lt;br /&gt;
Build failures are reported on the [https://lists.yoctoproject.org/listinfo/yocto-builds yocto-build mailing list].&lt;br /&gt;
&lt;br /&gt;
Please review the [[Media:Swat.odp]] presentation.&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&lt;br /&gt;
* Elizabeth Flanagan (US) (Autobuilder Maintainer)&lt;br /&gt;
* Saul Wold (US) (Autobuilder Administrator)&lt;br /&gt;
* Paul Eggleton (UK)&lt;br /&gt;
* Ross Burton (UK)&lt;br /&gt;
* Cristian Iorga (RO)&lt;br /&gt;
* Randy Witt (US)&lt;br /&gt;
* Benjamin Esquivel (MX)&lt;br /&gt;
* Juro Bystricky (US)&lt;br /&gt;
* Anibal Limon (MX)&lt;br /&gt;
* Tracy Graydon (US)&lt;br /&gt;
* Alejandro Hermandez (MX)&lt;br /&gt;
&lt;br /&gt;
==Chair==&lt;br /&gt;
A chairperson role will be rotated among team members each other week. The Chairperson should monitor the build status for the entire two weeks. Whenever a build is broken, the Chairperson should do necessary debugging and organize resources to solve the problems in a timely manner to meet the overall project and release schedule. The Chairperson serves as the focal point of the SWAT team to external people such as program managers or development managers.&lt;br /&gt;
&lt;br /&gt;
==Rotation Process==&lt;br /&gt;
The Chairperson rotation takes place during the bi-weekly technical project meeting (Every other Tuesday at 8:00 AM PT). Usually, this will take a simple round robin order. In case the next person cannot take the role due to tight schedule, vacation or some other reasons, the role will be passed to the next person.&lt;br /&gt;
&lt;br /&gt;
==Debugging BKMs==&lt;br /&gt;
&lt;br /&gt;
When looking at a failure, the first question is what the baseline was and what changed. If there were recent known good builds it helps to narrow down the number of changes that were likely responsible for the failure. It&#039;s also useful to note if the build was from scratch or from existing sstate files. You can tell by seeing what &amp;quot;setscene&amp;quot; tasks run in the log.&lt;br /&gt;
&lt;br /&gt;
The primary responsibility is to ensure that any failures are categorized correctly and that the right people get to know about them.&lt;br /&gt;
&lt;br /&gt;
It&#039;s important *someone* is then tasked with fixing it. Image failures are particular tricky since its likely some component of the image that failed and the question is then whether that component changed recently, whether it was some kind of core functionality at fault and so on.&lt;br /&gt;
&lt;br /&gt;
Ideally we want to get the failure reported to the person who knows something about the area and can come up with a fix without it distracting them too much.&lt;br /&gt;
As a secondary responsibility, it&#039;s often helpful to triage the failure. This might mean documenting a way to reproduce the failure outside a full build and/or documenting how the failure is happening and maybe even propose a fix.&lt;br /&gt;
&lt;br /&gt;
To fulfill the primary responsibility, it&#039;s suggested that bugs are opened on the bugzilla for each type of failure. This way, appropriate people can be brought into the discussion and a specific owner of the failure can be assigned. Replying to the build failure with the bug ID and also bringing the bug to the attention of anyone you suspect was responsible for the problem are also good practices.&lt;br /&gt;
&lt;br /&gt;
When filing the bug, please cut and paste the relevant error in the bug comment, and include the log file as an attachement. This ensures the assignee and triage team can quickly asses this issue.&lt;br /&gt;
&lt;br /&gt;
Every build failure should be responded to. If it is a known issue, a response with a single line containing &amp;quot;Known Issue&amp;quot; is sufficient. This assures others that the failure has been looked at and is being worked on.&lt;br /&gt;
&lt;br /&gt;
==Autobuilder BKMs==&lt;br /&gt;
&lt;br /&gt;
Sometimes failures are difficult to understand and can require direct ssh access to the autobuilder so the issue can be debugged passively on the system to examine contents of files and so forth. If doing this ensure you don&#039;t change any of the file system for example adding files that couldn&#039;t then be deleted by the autobuilder when it rebuilds.&lt;br /&gt;
&lt;br /&gt;
Rarely, &amp;quot;live&amp;quot; debugging might be needed where you&#039;d su to the pokybuild user and run a build manually to see the failure in real time. If doing this, ensure you only create files as the pokybuild user and you are careful not to generate sstate packages which shouldn&#039;t be present or any other bad state that might get reused. In general its recommended not to do &amp;quot;live&amp;quot; debugging. This can be escalated to RP/Saul/Beth if needed.&lt;br /&gt;
&lt;br /&gt;
Live debugging is generally something we try to avoid doing. It should only occur if an issue can only be reproduced on the autobuilder.&lt;br /&gt;
&lt;br /&gt;
===Autobuilder Overview===&lt;br /&gt;
&lt;br /&gt;
====Infrastructure Overview====&lt;br /&gt;
ab01: The yocto master autobuilder. This runs one low utility slave which does, universe fetch, package index, bitbake self test, builds the adt-installer and generally acts as the release mechanism for the Yocto Project. It also acts as a trigger parent for our full nightly build. This nightly build is essentially what builds our release, minus release notes.&lt;br /&gt;
&lt;br /&gt;
ab02, ab04, ab05, ab06, ab10: Generic nightly slaves. These run three slaves a piece. ab10 also runs our eclipse plugin build&lt;br /&gt;
&lt;br /&gt;
====Build Targets====&lt;br /&gt;
Nightly is a &amp;quot;dummy&amp;quot; buildset that does relatively few things and is only ever run on ab01. It mainly does universe fetch, building&lt;br /&gt;
adt-installer and building the eclipse plugin. It&#039;s main function is to trigger nightly-${ARCH} and wait until they&#039;re done. ab02, ab04,&lt;br /&gt;
ab05, ab06 are what is used to run this pool of nightly arch builds. &lt;br /&gt;
&lt;br /&gt;
NOTE: Just because nightly-* ran on ab04 the last time does not mean it will again. It&#039;s semi random. In order to find out what host you need to log into, please look for the buildstep that says:&lt;br /&gt;
&lt;br /&gt;
Building on&lt;br /&gt;
autobuilder04&lt;br /&gt;
Linux autobuilder04 2.6.37.6-0.9-default #1 SMP 2011-10-19 22:33:27&lt;br /&gt;
+0200 x86_64 x86_64 x86_64 GNU/Linux&lt;br /&gt;
&lt;br /&gt;
====Build &amp;quot;gotchas&amp;quot;====&lt;br /&gt;
Currently, we share sstate-cache and downloads between these slaves via NAS. For the moment we are also splitting up sstate and lsb-sstate. They are currently stored in /srv/www/vhosts/autobuilder.yoctoproject.org/pub/[sstate|lsb-sstate]. This will change after M2 to be combined into one directory; /srv/www/vhosts/autobuilder.yoctoproject.org/pub/sstate&lt;br /&gt;
&lt;br /&gt;
TMPDIR between distros (poky and poky-lsb) is not shared. $TMPDIR ends up being moved to ~pokybuild/yocto-autobuilder/yocto-slave/nightly-${ARCH}/build/build/nonlsb-tmp and poky-lsb is left in the above path&#039;s tmp. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Live Debugging Process====&lt;br /&gt;
If you need to do live debugging on the autobuilder, you want to:&lt;br /&gt;
&lt;br /&gt;
* Check that nothing is running on the builder:&lt;br /&gt;
https://autobuilder.yoctoproject.org/main/buildslaves&lt;br /&gt;
&lt;br /&gt;
* If nothing is running, remove the buildslave from the pool. Please let either Beth or sgw know if you&#039;re planning on doing this. Email/IRC is fine.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that we are currently utilizing two autobuilders. One is just for bugzilla reference (logs and whatnot), the other is production. There have been instances of people not know where the running autobuilder lives.&lt;br /&gt;
&lt;br /&gt;
The new autobuilder lives in ~/pokybuild/yocto-autobuilder-new. This will eventually change when I EOL the old autobuilder. However, when in doubt about where to find the base dir of the slave, always check the Create BBLayers Configuration step of the build you want. From this you can derive the base dir.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
http://autobuilder.yoctoproject.org:8011/builders/nightly/builds/101&lt;br /&gt;
&lt;br /&gt;
Looking at: http://autobuilder.yoctoproject.org:8011/builders/nightly/builds/101/steps/CreateAutoConf/logs/stdio shows that we&#039;ve not moved TMPDIR&lt;br /&gt;
&lt;br /&gt;
Looking at: http://autobuilder.yoctoproject.org:8011/builders/nightly/builds/101/steps/Create%20BBLayers%20Configuration/logs/stdio&lt;br /&gt;
&lt;br /&gt;
&amp;quot;BBLAYERS += &amp;quot; \ &lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/meta \ &lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/meta-yocto \ &lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/meta-yocto-bsp \ &lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/meta-qt3 \ &lt;br /&gt;
&amp;quot; &lt;br /&gt;
&lt;br /&gt;
indicates that the layers all exist in the slave&#039;s build dir for that build set. Which means that TMPDIR is most likely in:&lt;br /&gt;
/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly/build/build/tmp&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo -i -u pokybuild&lt;br /&gt;
cd yocto-autobuilder-new&lt;br /&gt;
. ./yocto-autobuilder-setup&lt;br /&gt;
./yocto-stop-autobuilder slave&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will ensure that the directory you are working in doesn&#039;t disappear out from under you. Please make sure that after you are done, you restart:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo -i -u pokybuild&lt;br /&gt;
cd yocto-autobuilder-new&lt;br /&gt;
. ./yocto-autobuilder-setup&lt;br /&gt;
./yocto-start-autobuilder slave&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Things to never do=====&lt;br /&gt;
*  NEVER clean sstate (cleanall, cleansstate). As sstate is shared across builders, you do not want it wiped like this. If you need to toss sstate, let Beth/sgw/RP know. We try not to remove sstate as it speeds up build times dramatically. As it&#039;s fairly large and takes a while to wipe, we try to avoid this.&lt;br /&gt;
*  NEVER stop ab01&#039;s master/slave. If you need to debug something on ab01, let sgw, RP and Beth know. As we&#039;re the only three who can kick builds off, it&#039;s really important they all know so they don&#039;t kick off a build and tromp on live debugging. If you need to work on ab01 one of them must know about it *and* have given the ok.&lt;br /&gt;
*  NEVER create a file as yourself under ~pokybuild/yocto-autobuilder/* This can cause future builds to fail and is frustrating to debug.&lt;/div&gt;</summary>
		<author><name>Juro Bystricky</name></author>
	</entry>
</feed>