You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

163 lines
5.6 KiB

\usepackage[T1]{ fontenc }
\usepackage[utf8]{ inputenc }
\usepackage{ lmodern }
\usepackage{ color }
\usepackage{ graphicx }
\graphicspath{ {./pix/} }
\usepackage{ drawstack }
\title{Customs tests in Free Electrons's lab}
\author{Florent (Skia) Jacquet}
\institute{Free Electrons}
\begin{frame}[fragile]\frametitle{Why custom tests}
\item Just booting is not enough.
\item Need to test some specific components such as USB, SATA,
\item Also need to test with custom kernel images, or custom rootfs, or
\item Need to be able to send jobs, on demand, easilly, on the specified
boards, while being notified at the end.
\section{Overall architecture}
\begin{frame}[fragile]\frametitle{Many tools}
\item LAVA
\item Buildroot
\item The custom test tool
\item The test suite
\item Runs jobs on devices.
\item Runs KernelCI jobs: only boot.
\item Provides an API to do many thing. Among them: sending jobs and
querying results.
\item Used to make only rootfs.
\item Is configured to provided the needed tools such as iperf,
bonnie++, etc...
\item Builds fresh rootfs every night for all the needed architectures:
ARMv4, ARMv5, ARMv7, ARMv8.
\item Stores them in a LAVA-accessible folder.
\begin{frame}[fragile]{The custom test tool}
\item Has jobs templates and knows how to send them.
\item Can upload custom artifacts useable for tests.
\item Can ask LAVA to notify given emails addresses when the job ends.
\item Needs an access to the LAVA API, an SSH access to the LAVA server
to upload artifacts, and a KernelCI API token to go fetch the latest
builds if no custom artifacts are provided.
\item Keeps a \verb$$ file to store the boards configuration.
\begin{frame}[fragile]{The test suite}
\item Is a bunch of shell scripts that will be run on the devices.
\item Also needs YAML files to interface with LAVA.
\item Leaves in one of our git repo on Github \footnote{\url{}}.
\item Daily jobs:
\item A cron job runs at 23:23 to:
\item Build fresh rootfs.
\item Launch custom tests on every boards with there
default configuration.
\item Another cron is run at 11:00 to get the results of the
last 24 hours and send mails given the failed tests and
which email address is subscribed to what board.
\item On demand jobs:
\item Someone installs and configures the custom test tool on
his/her laptop.
\item He/She can send jobs, specifying whether to use custom
boot artifacts from his/her laptop, or to use KernelCI's
one, and in that case, which branch on which tree to use.
\item He/She gets notified once the job's done.
\section{How do tests works?}
\begin{frame}[fragile]{LAVA v2 jobs}
\item Jobs are YAML files that, combined with the device-types and
devices dictionaries in the LAVA configuration, describe what to do
with which device.
\item It contains:
\item Which device(s) to use
\item The artifacts informations (URL, type, ...)
\item How to boot them (Uboot, fastboot, ramdisk, nfs, shell
strings to expect, ...)
\item The tests to run once booted.
\item Some metadata and various job informations (priority,
notifications, timeouts, ...)
\begin{frame}[fragile]{How do LAVA runs test?}
\item Before bringing up the board, LAVA:
\item Fetches the artifacts.
\item Applies the needed modifications (append DTB, mkimage,
modules, ...)
\item Also downloads the test suite and puts it in the rootfs.
This moment also makes some magic to provide some helpers
useable in the test scripts.
\item Finally connects itself and powers up the board.
\item After the board is booted:
\item Runs each test described in the job definition.
\item For each call to the `lava-test-case` function, creates
the results objects.