Automation beyond Testing and Embedded System Validation

Similar documents
Automation beyond Testing and Embedded System Validation

KERNEL C.I. USING LINARO S AUTOMATED VALIDATION ARCHITECTURE. Wednesday, September 11, 13

Keeping up with LTS Linux Kernel Functional Testing on Devices

ATS report. Linux Plumbers 2018, Vancouver Kevin Hilman

Tutorial: Howto setup a Remote Test Lab (not only) within the AGL CI Infrastructure

Tutorial: Howto setup a. Remote Test Lab. for the AGL Infrastructure

LAVA FOR BISECTING KERNEL BUGS LAVA MEETS GIT BISECT RUN

Introducing The Lab in a Box Concept ELC-E Prague, October 2017 Patrick Titiano - Kevin Hilman, Baylibre.

AMM Feb/2018. Frederic Marec Embedded Engineer

The HiKey AOSP collaborative experience

Linaro Automated Validation on ARM. Paul Larson

ONAP Developer Typical Setup 2017 July ONAP Virtual Developers Event

Introduction to a Virtualization Testsuite --Based on Autotest Testing Framework. Yu Mingfei

ovirt Node June 9, 2012 Mike Burns ovirt Node 1

openqa Helping SUSE Linux Enterprise with Automated Testing Richard Brown openqa Technical Lead

Hands-on with the Sitara Linux SDK

ECE 471 Embedded Systems Lecture 16

Android System Development Training 4-day session

How to Write Tests for the AGL HW Test Infra. Jan-Simon Möller AGL Release Manager

Fosdem Feb/2018. Frederic Marec Embedded Engineer

If it compiles, ship it.

Track Three Building a Rich UI Based Dual Display Video Player with the Freescale i.mx53 using LinuxLink

INSTALLATION RUNBOOK FOR Iron.io + IronWorker

EzBench, a tool to help you benchmark and bisect the Graphics Stack s performance

RZ/G Verified Linux Package V2.1.0-RT

Think Small to Scale Big

Introducing The Lab in a Box Concept ELC-E Prague, October 2017 Patrick Titiano - Kevin Hilman, Baylibre.

Track Two Building an Internet Radio with the TI Sitara AM3517 using LinuxLink

Google Cloud Platform for Systems Operations Professionals (CPO200) Course Agenda

openqa Avoiding Disasters of Biblical Proportions Marita Werner QA Project Manager

Linux System Management with Puppet, Gitlab, and R10k. Scott Nolin, SSEC Technical Computing 22 June 2017

The functional test beast: tame it, bring it home and make it your pet. Cleber Rosa Sr. Software Engineer Oct. 26 Th, 2018

X(cross) Development System make AGL application development easier. December 2017 Sébastien Douheret

The blob bootloader. The blob bootloader. Thomas Petazzoni Free Electrons

Building a reference IoT product with Zephyr. Ricardo Salveti Michael Scott Tyler Baker

Chapter 2. Operating-System Structures

NI Linux Real-Time. Fanie Coetzer. Field Sales Engineer SA North. ni.com

Testing your AGL, yocto ptest, lava and more

ECE 471 Embedded Systems Lecture 16

Linux Systems Security. Backup and Change Management NETS Fall 2016

SFO17-315: OpenDataPlane Testing in Travis. Dmitry Eremin-Solenikov, Cavium Maxim Uvarov, Linaro

Empower your testing with Cisco Test Automation Solution Featuring pyats & Genie

AGL-Fuego display change flow

Relax-and-Recover (ReaR) Automated Testing

Track Three Building a Rich UI Based Dual Display Video Player with the Freescale i.mx53 using LinuxLink

#jenkinsconf. Managing jenkins with multiple components project. Jenkins User Conference Israel. Presenter Name Ohad Basan

Yocto Layers and Device Profiles July 11, 2017

ECE 471 Embedded Systems Lecture 12

OP-TEE Using TrustZone to Protect Our Own Secrets

Important DevOps Technologies (3+2+3days) for Deployment

ovirt Node November 1, 2011 Mike Burns Alan Pevec Perry Myers ovirt Node 1

Intel GFX CI and IGT. What services do we provide, our roadmaps, and lessons learnt! Martin Peres & Arek Hiler Feb 3 rd 2018

Flashing binaries to DRA7xx factory boards using DFU

Linuxboot continuous integration

LTSI kernel / Yocto Validation Proposal

LENS Server Maintenance Guide JZ 2017/07/28

Beyond make and make check

Improving the Yocto Project Developer Experience. How New Tools Will Enable a Better Workflow October 2016 Henry Bruce

Managing build infrastructure of a Debian derivative

Turbo boost your digital app test automation with Jenkins

The ultimate guide to software updates on embedded Linux devices

MiPDF.COM. 3. Which procedure is used to access a Cisco 2960 switch when performing an initial configuration in a secure environment?

Configuring Host Router and Cisco Analog Video Gateway Module Interfaces

Isar. Build Debian-Based Products with BitBake. Baurzhan Ismagulov. Embedded Linux Conference Europe Oct 11-13, 2016 Berlin, Germany

Life, the Universe, and CSS Tests XML Prague 2018

Mainline on form-factor devices / Improving AOSP

Running MarkLogic in Containers (Both Docker and Kubernetes)

The following file is used for updating the boot loader: xboot.bin: XSTREAM development platform boot loader image

Using Virtual Platforms To Improve Software Verification and Validation Efficiency

CHAPTER 2: SYSTEM STRUCTURES. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

Chapter 2: Operating-System Structures

Configuring and Building Palacios/Linux

X(cross) Development System make AGL application development easier. July 2017 Sébastien Douheret

Cyclone V SoC PCI-Express Root Port Example Design. Application Note

The bootstrap node must be network accessible from the cluster nodes. The bootstrap node must have the HTTP(S) ports open from the cluster nodes.

Four Components of a Computer System

96Boards Enablement for opensuse

Linux Kernel on RISC-V: Where do we stand?

Rekall. Rekall Agent - OSDFCon Forensics. We will remember it for you wholesale! Michael Cohen

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edition

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

Continuous Delivery the hard way with Kubernetes. Luke Marsden, Developer

Lab 1: Accessing the Linux Operating System Spring 2009

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edit9on

openqa making QA interesting since 2013 Ondrej Holecek /aaannz/

DevOps Technologies. for Deployment

REX-RED Community Android 4.3

Software Development Using Full System Simulation with Freescale QorIQ Communications Processors

Operating System Services. User Services. System Operation Services. User Operating System Interface - CLI. A View of Operating System Services

Chapter 6: Network Layer

Department of Computer Science and Engineering, Sri Jayachamarajendra College of Engineering, Mysore, Karnataka

CloudCenter for Developers

SPBT3.0DPx BT module. Firmware Update Procedure. Revision 1.0

Getting Started With Containers

NEW TOOLS. ngage vaping. MATT GRISWOLD

What is new? Page 1. Peter Korsgaard, Maintainer ELCE 2013

Accelerate at DevOps Speed With Openshift v3. Alessandro Vozza & Samuel Terburg Red Hat

Simplified CICD with Jenkins and Git on the ZeroStack Platform

Build & Launch Tools (BLT) Automating best practices for enterprise sites

LaunchStation Controller

Transcription:

Automation beyond Testing and Embedded System Validation Embedded Linux Conference Europe Jan Lübbe <j.luebbe@pengutronix.de> Slide 1 - http://www.pengutronix.de 2017-10-23

Some Background Embedded Linux integration and development for custom hardware Using Linux mainline, mesa, wayland, gstreamer, Qt, chromium, Everything changes all the time Updates break user-visible features Kernel and application level testing solved with Jenkins & LAVA Slide 2 - http://www.pengutronix.de 2017-10-23

A Short Survey Who has developed embedded Linux systems? rolled out a major base-system update? updates the base-system at least once a year? Who has automated tests for: The application? and the kernel (-drivers)? and the update installer? and the rollback mechanism? What do you use (in-house, Jenkins, LAVA, )? Slide 3 - http://www.pengutronix.de 2017-10-23

Current State Test automation: LAVA, Fuego, autotest, avocado, TI VATF, U-Boot test tool, CI-RT R4D, Baylibe Lab in a Box, Development automation: scripting via SSH expect Production automation: flash images via robot SoC-vendor-sepecific tools (running on windows) ad-hoc scripting Slide 4 - http://www.pengutronix.de 2017-10-23

Our Wishlist Short turnaround times for interactive use during development Support reuse for other use cases Use the same board for devel and CI Complex state transitions (BL Linux update & reboot BL new Linux) Library interface (for use-cases besides testing) Control of additional interfaces (SD, buttons, boot mode, logic analyzer, USB, ) supported by TI s VATF for some special cases Multiple targets in one test case supported by LAVA Slide 5 - http://www.pengutronix.de 2017-10-23

NIH Syndrome? All tools are shaped by requirements Our use-cases!= your use-cases Slide 6 - http://www.pengutronix.de 2017-10-23

LAVA - Linaro Automated Validation Architecture Used by Linaro, Kernel CI and many others lavapdu daemon good web-interface with useful logs automatic health checks boards must be dedicated to LAVA long turn-around times see Introducing the Lab in a Box Concept tomorrow (http://sched.co/byym) Slide 7 - http://www.pengutronix.de 2017-10-23

Fuego Used by LF CE WG, LTSI (Long Term Support Initiative), AGL, CIP Consists of Jenkins + Scripts + Tests (in Docker) builds test and deploys test binaries hard to setup on an existing Jenkins instance Slide 8 - http://www.pengutronix.de 2017-10-23

U-Boot pytest suite Lives in u-boot/test/py Helper functions to build and control U-Boot expressive test cases using pytest only for U-Boot (with build support) no library interface or target abstraction Slide 9 - http://www.pengutronix.de 2017-10-23

CI-RT R4D Power & serial control Implemented as libvirt backend embedded boards controlled similar to VMs easy to use from Jenkins libvirt interface does not fit more complex use cases difficult to synchronize multi node tests needs custom code fo rinterfaces besides power and serial see CI: Jenkins, libvirt and Real Hardware (http://sched.co/byya) Slide 10 - http://www.pengutronix.de 2017-10-23

Heiko Schocher s tbot Python tool to control boards and execute test cases access to remote boards via SSH fexible event collection for reporting patch and build support plain python code for testcases (instead of pytest) Slide 11 - http://www.pengutronix.de 2017-10-23

Project Specific Tools Autotest fork by Google for Chromium OS Avocado (another Autotest fork) for libvirt testing TI s VATF directly contain the testsuites very focused on special requirements only for testing Slide 12 - http://www.pengutronix.de 2017-10-23

Shortcomings Large overhead for running and writing a single test painful to use during iterative development Limited control over the target from the individual test no reboots during test case no easy control over additional IO (buttons, config switches, USB, ) Hard to reuse for other use-cases and one-off tools git bisect Slide 13 - http://www.pengutronix.de 2017-10-23

Goals Make automation useful during normal iterative development Upload bootloader via USB Control distributed equipment Easy test loops Support the same tests and tools from a CI environment Make it easy to extend and embed Connect/automate existing tools (LTP, ) Slide 14 - http://www.pengutronix.de 2017-10-23

Try Something Else Less no integrated build system (unlike Fuego) no integrated test runner (unlike LAVA, autotest, many others) use Jenkins instead or use from shell no fixed boot process (all? others) use pytest and/or custom scripts no scheduler (unlike LAVA, Fuego) use OE/PTXdist/buildroot instead full control from client code library interface not only for testing Slide 15 - http://www.pengutronix.de 2017-10-23

HW/SW Control as a Library Embedded system testing should feel like pure SW testing Don t handle control-flow Client code should be high-level Similar to what I would tell a colleague to do Slide 16 - http://www.pengutronix.de 2017-10-23

Labgrid - Architecture Protocol Resource Slide 17 - http://www.pengutronix.de 2017-10-23 CommandProtocol Bootloader Shell Console Serial

Architecture Targets Target API Strategy Bootloader Shell Console Serial Slide 18 - http://www.pengutronix.de 2017-10-23 Power Fastboot Bootstrap PDU Fastboot USB-Loader

Architecture - Flexibility Target API Strategy Bootloader Shell Serial Power Fastboot Bootstrap PIO Serial PDU Fastboot USB-Loader 1W-PIO Slide 19 - http://www.pengutronix.de 2017-10-23

Labgrid - Configuration YAML Describes Targets with Resources s HW/SW-Specific parameters The Environment Slide 20 - http://www.pengutronix.de 2017-10-23

Labgrid - pytest Test execution, selection and reporting is provided by pytest Fixtures provide access at different levels (command, strategy, target, env) pytest (and Python libs) make it easy to prepare test data and analyze results Easy to integrate in Jenkins Slide 21 - http://www.pengutronix.de 2017-10-23

Slide 22 - http://www.pengutronix.de 2017-10-23

Slide 23 - http://www.pengutronix.de 2017-10-23

Labgrid - CLI Configure boards from distributed resoures ( board farms / labs ) Control power, serial, buttons, fastboot, bootloader upload Lock/unlock boards Use labgrid strategies Usable from shells scripts, CI or other automation (such as LAVA) labgrid-client labgrid-client labgrid-client labgrid-client labgrid-client labgrid-cleint -p -p -p -p -p -p riot1 riot1 riot1 riot1 riot1 riot1 Slide 24 - http://www.pengutronix.de 2017-10-23 lock io high bootmode pw on bootstrap /bootload.img fastboot boot /kernel.img console

Labgrid Remote Control Coordinator Exports Exporter Access Exports Client Exporter Access Direct resource access Exports Client Slide 25 - http://www.pengutronix.de 2017-10-23 Exporter

Labgrid - Scripting Example: Sometimes a ethernet interface discards frames instead of sending them in ~1% of boots. Loop until error occours Manual investigation after script exits Slide 26 - http://www.pengutronix.de 2017-10-23

Labgrid - Autoinstaller Each host manages serveral flashing stations Uses USB tree topology for configuration USB Hub USB Hub USB Hub USB UART USB UART USB UART UART USB Target Board UART USB Target Board UART USB Target Board Slide 27 - http://www.pengutronix.de 2017-10-23 https://github.com/labgrid-project/labgrid/ blob/master/labgrid/autoinstall/main.py

Demo Slide 28 - http://www.pengutronix.de 2017-10-23

Currently Working Remotly control boards in lab from CLI (console, power, BL upload, fastboot) Run pytest against local and remote boards Run tests from Jenkins and collect results via Junit-XML Ad-Hoc automation: git bisect, reproducing sporadic errors Automatic factory installation via USB directly from built BSPw Used as a backend for internal QA tools Slide 29 - http://www.pengutronix.de 2017-10-23

Next Steps Remote target reservation (for use with Jenkins CI) Automatic integration tests for RAUC with QEmu in Jenkins Improved logging and reports priorities (use ResetProtocol instead of PowerProtocol when available) preemption (handle unexpected state changes) Slide 30 - http://www.pengutronix.de 2017-10-23

Getting Started Wait for 0.2.0 release or git clone master Setup in Python venv Connect board Copy and modify one of the examples If it breaks: talk to us! ;-) https://labgrid.readthedocs.io/en/latest/getting_started.html Slide 31 - http://www.pengutronix.de 2017-10-23

Discussion jlu@pengutronix.de, @shoragan, +JanLübbe-jlu Slide 32 - http://www.pengutronix.de 2017-10-23