GDB BuildBot

This wiki page describes how the GDB BuildBot works. Read it if you are interested in adding a new buildslave to the system, if you want to know who is responsible for each existing buildslave, or if you are just curious about how the BuildBot is configured.

1. TL;DR

The web interface for the GDB BuildBot is http://gdb-build.sergiodj.net/. Specifically, you may be interested in going directly to the Waterfall page, which displays in a nice manner the builds.

The URL for connecting your buildslave to the GDB BuildBot is gdb-build.sergiodj.net:16123. You must contact us first in order to obtain permission to do that (and a password); send a message to <gdb@sourceware.org> and put <sergiodj@redhat.com> in the Cc.

The interface for viewing the results of the builds is http://gdb-build.sergiodj.net/cgit .

Regression reports are sent to the gdb-testers mailing list.

2. New terms

In this page, we will use a few specific terms to describe things, so it is good to understand what they mean.

3. How to use the cgit interface to view the logs

The interface for looking at the log files generated by the testsuite (i.e., gdb.sum and gdb.log files) is http://gdb-build.sergiodj.net/cgit. When you enter this page, you will many git repositories whose names are exactly the same names of the existing builders. Inside each repository, you will notice that there is only the master branch, and lots of tags. Each tag is named using the following convention:

TIMESTAMP-COMMIT

Where TIMESTAMP is composed by YEARMONTHDAY-HOURMINUTESECOND, and COMMIT is the SHA1 hash representing the GDB git repository's commit that has been tested. Therefore, if you pushed a commit to the GDB repository (say, 0abcd), and you want to take a look at the log files generated by testing your patch against the builder Fedora-x86_64-native-gdbserver-m64, you just have to go the repository named Fedora-x86_64-native-gdbserver-m64/.git and search (there is a search box in the top-right corner) for 0abcd.

4. How to add your buildslave

If you are interested in adding a new buildslave (and possibly a new builder) to the GDB BuildBot, thank you! There are some steps you need to perform in order to make sure everything is OK.

4.1. Buildslave specs

Your machine needs to:

It is also recommended that your machine is constantly updated (e.g., on Fedora you might consider running a cronjob to yum update every day), because GDB's test results are impacted by updates on GCC, glibc, binutils, etc.

4.2. Buildslave owner responsibilities

You will be the responsible for the buildslave, which means that we may contact you if there is anything you should do (i.e., update the buildbot-slave package, restart your buildslave, etc.). Be sure to fill the contact fields on your buildslave configuration file (see below).

4.3. Contact us first

Please, contact us in order to discuss further details, and to let us know about you. The best way to contact the GDB community is to write to <gdb@sourceware.org>. Please, make sure you also include Sergio Durigan Junior in the Cc (e-mail: <sergiodj@redhat.com>), because he is the current maintainer of the GDB BuildBot.

4.4. Adding your buildslave to the configuration

You will need to patch the following files and add your buildslave configuration there:

On config.json, you will have to add your buildslave information on the slaves section. You should provide:

This is an example of how a new entry should look like:

"slaves" : [ { "name" : "fedora-x86-64-1", "arch" : "x86_64", "jobs" : "4" },
             ...
             { "name" : "debian-x86-64-1", "arch" : "x86_64", "jobs" : "2" }
           ],

Then, you will have to edit the builders section. In this section we describe what kind of build we are interested in, and what are the buildslaves that will perform it. If you are adding a buildslave with a new architecture, then you will most probably want to create a new builder for it. However, you can also be interested in adding more buildslaves to an existing builder. In both cases, you will have to edit the following properties:

"builders" : [ { "name" : "Fedora-x86_64-m64", "type" : "Plain_c64t64",
                 "builddir" : "fedora-x86-64",
                 "slavenames" : [ "fedora-x86-64-1" ] },
               ...
               { "name" : "Debian-x86_64-m64", "type" : "Plain_c64t64",
                 "builddir" : "debian-x86-64",
                 "slavenames" : [ "debian-x86-64-1" ] },

At last, if you created a new builder, you will also want to include its name in the builderNames property of the schedulers section.

After you have done this, please send a patch to the <gdb-patches@sourceware.org> mailing list. You will be provided a password used by the buildslave to connect to the buildmaster.

4.5. Buildslave configuration

The first thing you will need to do is to install the buildbot-slave, version 0.8.12, package on your system. To do that, run (as root):

pip install buildbot-slave==0.8.12

If this doesn't work, you will have to find the specific version on BuildBot's website. If you are running Windows, take a look at BuildBot's instructions.

4.5.1. Fedora-specific instructions

You will need to install the dependencies to compile and test GDB. For Fedora systems:

(set -ex;fedpkg clone -a gdb;cd gdb;fedpkg sources;rpmbuild --define "_specdir $PWD" --define "_sourcedir $PWD" --define "_srcrpmdir $PWD" -bs --with testsuite *.spec;yum-builddep gdb-*.src.rpm)

Do not forget to disable the abrt-ccpp service on Fedora. It will make ABRT be invoked every time a coredump is generate, which consumes time and is totally unnecessary. To disable it, do (as root):

$ systemctl stop abrt-ccpp.service
$ systemctl disable abrt-ccpp.service

Also make sure that core dumps can be generated in the current directory, so that core dump tests are not skipped. E.g., on Fedora:

echo "kernel.core_pattern=core" > /etc/sysctl.d/50-coredump.conf

4.5.2. Debian-specific instructions

For Debian-based distributions, you can do:

$ apt-get build-dep gdb
$ apt-get install texinfo flex bison
$ apt-get install emacs

4.5.3. General instructions

/!\ Because of the make TAGS step, you will also have to install emacs.

/!\ If your machine will not test 32-bit packages, you do not need to install the 32-bit (i.e., .i686) versions of the packages above.

/!\ It has been reported that the tests won't run properly if the SHELL variable is not set to a valid shell (e.g. /sbin/nologin instead of /bin/bash). Make sure that the user running the buildslave has a valid shell or override the SHELL environment variable somehow.

It is also recommended that you create a separate user to run the buildslave. This user should not need/have root nor SSH access; it only needs to be able to build and test GDB.

For example, let's assume this new user is called buildbot. Log into its account in the system, and create a new buildslave. To do that, you are going to need three things:

Then, you can issue the command:

$ buildslave create-slave DIR URL:PORT NAME PASSWORD

Where DIR is the directory that will be used by the buildslave to store local files (it can be the same as NAME), URL:PORT is the address of the buildmaster, and NAME is the name of the buildslave. The PASSWORD needs to be obtained from the BuildBot admin.

4.5.4. Adding information about yourself and the machine

You must add your contact information on your buildslave. To do that, edit the file named DIR/info/admin} (assuming that {{{DIR is the name of your buildslave, as per the example above) and add your name and e-mail address there:

$ cat DIR/info/admin
My Name <my@email.com>

You should also edit the file DIR/info/host and include a one-line information about the machine. For example, if it is running a Fedora GNU/Linux 23 on x86_64, you would put:

Fedora 23 x86_64

This info will show up in your buildslave's page, and it's important to keep it up-to-date whenever you upgrade or change your machine.

4.5.5. Starting the buildslave

After that, you can start the buildslave:

$ buildslave start NAME

Make sure it is started OK. It is also recommended that you create some special cronjob to restart this on every reboot. An example would be:

$ crontab -l
# restart buildslaves on every reboot

@reboot buildslave restart NAME

5. Try Jobs

TBD.

5.1. Available Builders

Here you can see the available builders to try your patches on.

try_builders = [ "Fedora-x86_64-m64",
                 "Fedora-x86_64-m32",
                 "Fedora-x86_64-native-gdbserver-m64",
                 "Fedora-x86_64-native-gdbserver-m32",
                 "Fedora-x86_64-native-extended-gdbserver-m64",
                 "Fedora-x86_64-native-extended-gdbserver-m32",
                 "Fedora-x86_64-cc-with-index",
                 "Fedora-i686" ]

None: BuildBot (last edited 2016-08-05 16:36:35 by PedroAlves)

All content (C) 2008 Free Software Foundation. For terms of use, redistribution, and modification, please see the WikiLicense page.