SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
1
Automated Flashing and Testing
for Continuous Integration
Igor Stoppa
Embedded Linux Conference
North America 2015
2
Automated Flasher Tester
AFT
Tool for deploying and verifying a SW image on an
appropriate target HW device.
● Easily integrate with existing setup.
● Minimize requirements of the setup (including cost).
● Easily scale both the number and the type of units.
● Minimal deployment & testing time.
● Keep close to real life conditions.
● Enable Developers to test before submitting,
using identical means of verification.
3
Continuous Integration
Merge contributions often, even multiple times per day,
but only if they meet the following requirements:
1. Patches must apply cleanly.
2. Patched SW must build cleanly - at least not worse than pre-
patching.
3. Generated SW image must deploy successfully to the Device
Under Test (DUT).
4. Deployed SW image must boot.
5. Deployed image must pass a set of predefined test cases.
Only what is tested can be expected to work.
4
Why yet another tool?
● Several proprietary solutions available but:
○ focused only on one architecture
○ non open source - hinders sharing publicly testing methods / results
● Other public solutions, ex: LAVA (Linaro)
○ not alternative, rather complementary
○ LAVA provides lots of infrastructure (queuing, result visualization,
etc.)
AFT focuses on optimizing deployment and test execution.
● Let developers use locally exactly the same test configuration used by CI.
○ install and configure the tool painlessly
5
Woes of Continuous Integration
Speed: building and testing can take a long time, but it’s needed frequently
● parallelize sw build - throw in more servers
● parallelize testing - but deployng the SW image can still take a long time!
Multiple-targets: supporting multiple platform/arch is resources-intensive
● build infrastructure can adjust (run different cross compilers/qemu)
● each new type of HW needs ad-hoc work: expensive and slow.
● during the project the HW to support will likely change.
Optimizing Deployment & Testing can have high returns.
6
Interaction with DUT
Standardize the interaction: do not use specific interfaces/APIs.
Rather, emulate the user:
● plug/unplug power
● enter data from a (USB) keyboard
● issue commands to transfer data over a network connection.
Deployment of SW image to test
Deploy the same image produced by the build system, directly to the DUT.
Allow passwordless login by injecting the ssh public key of the testing harness,
for the root user.
Key Features
7
High level view
Build Cloud or
Developer’s
workstation
DUT 1.1
Testing
Harness 1
Testing
Harness 2
Testing
Harness n
DUT 1.2
DUT 1.m
...
DUTs
associated
to Testing
Harness 2
...
DUTs
associated
to Testing
Harness n
8
Simplified Model
Build Cloud or
Developer’s
workstation
Testing
Harness
(PC)
DUT
(ex: MinnowMax)
Mains
Power-cycling
USB
keyboard
emulator
User-input emulation
DNS
DHCP
NFS Local NetworkSW Image
Test
Results
OpenSUSE
USB key
9
HW configuration
1
2
3
4
6 7
8
5
1. MinnowBoard Max
2. Minnow Power Supply
3. USB-controlled power
cutter.
4. OpenSUSE Thumb drive
5. SD Card (target media)
6. Arduino UNO R3
7. USB to Serial port
Control interface for UNO
8. Programming toggle for UNO
USB port.
9. Ethernet port
9
10
SW Stack & Data
AFT-Core
module
Power Control Plugin
DUT Plugins:
● remote access (ex: ssh)
● remote OS deployment
● device identification
Test Cases Plugins:
● execution of basic
commands
● system services
● ...
Test Plan
Devices Types
Actual Topology
11
Main Steps
(ex: MinnowBoard Max)
1. Verify compatibility: is the image supported and is there a suitable device?
2. Allocate device compatible with the SW image.
3. Power-cycle and boot the DUT into service mode from the OpenSUSE USB key.
4. Deploy the test SW image to the target storage - it is taken from an nfs share.
5. Install the public ssh key used by the Testing Harness for the DUT root user.
6. Power-cycle and boot the DUT into testing mode, from the image just
deployed.
7. Check for availability and run the selected test plan.
8. Report back the test results, in xUnit format.
12
But it was not always easy ...
System Partitioning: many SW components are specific to the HW they drive
(ex: power switch) and the interface used must support various models from
different vendors.
BIOS configuration: some (most?) BIOSes rearrange the sequence of the boot
devices, others can completely lose their settings when the DUT is power-
cycled - the only foolproof solution is to reconfigure the BIOS at each iteration.
More BIOS blues: at some point one device changed autonomously MAC address
- reason still unknown.
System Architecture: initial idea - Testing Harness as VM - qemu cannot
reliably pass to the VM 2+ USB devices with same VendorID:DeviceID - Doh.
Network Interfaces: OpenSUSE network manager (wicked) cannot bring up
interfaces with static IP and no carrier.
USB thumb drives: some brands dropped like flies, after undergoing only a few
power-cycles.
13
USB Keyboard Emulation
● Based on Arduino UNO R3, the only one
currently capable of interfacing with
BIOSes
● Uses LUFA FW to emulate the USB
protocol.
● Uses only libraries with GPLv2
compatible license.
● Messaging protocol to detect data losses
● It costs ~ $7, while the cheapest
commercial alternative is above $100
● Supports:
○ record/playback of keys
○ LibreOffice Calc sheet
○ sequence generated on-the-fly
Testing
Harness
DUT
USB
Master
USB
Master
Arduino
UNO R3
2nd
ATMega
SW
Serial
USB to
Serial
14
Does it meet the requirements?
All the requirements were met:
● The only requirement toward the target OS is to provide means for
login access.
● Adding support for new OS (Yocto) and new HW (NUC,
MinnowBoardMax) took less than a week.
● Depending on the performance of the DUT, a deployment & basic
testing session can last between 3 and 10 minutes.
● The BOM per-device is fairly frugal and relies solely on inexpensive off-
the shelf CE devices, easily obtainable in large amounts, worldwide.
● Everything, from the SW to the HW setup, is public and can be
reproduced anywhere.
15
Ideas for future development
● Support more architectures/boards.
Ex: Edison, Quark, BeagleBone Black, WandBoard Quad, ODroid.
● Support more flavors of power cutter.
Ex: ethernet controlled.
● Replace USB-Serial interface with ethernet.
● Use Edison as testing harness, rather than a PC.
● Support test cases run with fMBT (https://01.org/fmbt)
16
References
Automated Flasher Tester:
https://github.com/igor-stoppa - all the aft-* projects
USB Keyboard Emulator (Peripheral EMulator):
https://github.com/igor-stoppa/pem
Q & A

Weitere ähnliche Inhalte

Was ist angesagt?

Practical Windows Kernel Exploitation
Practical Windows Kernel ExploitationPractical Windows Kernel Exploitation
Practical Windows Kernel ExploitationzeroSteiner
 
Internet of things - with routers
Internet of things - with routersInternet of things - with routers
Internet of things - with routersTavish Naruka
 
Quickboot on i.MX6
Quickboot on i.MX6Quickboot on i.MX6
Quickboot on i.MX6Gary Bisson
 
Fun With Dr Brown
Fun With Dr BrownFun With Dr Brown
Fun With Dr BrownzeroSteiner
 
Device drivers Introduction
Device drivers IntroductionDevice drivers Introduction
Device drivers Introductionvijay selva
 
Linux Kernel and Driver Development Training
Linux Kernel and Driver Development TrainingLinux Kernel and Driver Development Training
Linux Kernel and Driver Development TrainingStephan Cadene
 
Pitfalls of virtual machine introspection on modern hardware
Pitfalls of virtual machine introspection on modern hardwarePitfalls of virtual machine introspection on modern hardware
Pitfalls of virtual machine introspection on modern hardwareTamas K Lengyel
 
BeRTOS: Free Embedded RTOS
BeRTOS: Free Embedded RTOSBeRTOS: Free Embedded RTOS
BeRTOS: Free Embedded RTOSDeveler S.r.l.
 
CrySys guest-lecture: Virtual machine introspection on modern hardware
CrySys guest-lecture: Virtual machine introspection on modern hardwareCrySys guest-lecture: Virtual machine introspection on modern hardware
CrySys guest-lecture: Virtual machine introspection on modern hardwareTamas K Lengyel
 
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0Embarcados
 
Virtual Machine Introspection with Xen
Virtual Machine Introspection with XenVirtual Machine Introspection with Xen
Virtual Machine Introspection with XenTamas K Lengyel
 
Kernel Recipes 2013 - Kernel for your device
Kernel Recipes 2013 - Kernel for your deviceKernel Recipes 2013 - Kernel for your device
Kernel Recipes 2013 - Kernel for your deviceAnne Nicolas
 
01 introduction & setup - Android
01   introduction & setup - Android01   introduction & setup - Android
01 introduction & setup - AndroidWingston
 
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan BaljevicUnix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan BaljevicCircling Cycle
 
Course 102: Lecture 19: Using Signals
Course 102: Lecture 19: Using Signals Course 102: Lecture 19: Using Signals
Course 102: Lecture 19: Using Signals Ahmed El-Arabawy
 

Was ist angesagt? (20)

Linux Internals - Part II
Linux Internals - Part IILinux Internals - Part II
Linux Internals - Part II
 
Intro to RobotC
Intro to RobotCIntro to RobotC
Intro to RobotC
 
Practical Windows Kernel Exploitation
Practical Windows Kernel ExploitationPractical Windows Kernel Exploitation
Practical Windows Kernel Exploitation
 
Internet of things - with routers
Internet of things - with routersInternet of things - with routers
Internet of things - with routers
 
Quickboot on i.MX6
Quickboot on i.MX6Quickboot on i.MX6
Quickboot on i.MX6
 
Fun With Dr Brown
Fun With Dr BrownFun With Dr Brown
Fun With Dr Brown
 
U-Boot - An universal bootloader
U-Boot - An universal bootloader U-Boot - An universal bootloader
U-Boot - An universal bootloader
 
Device drivers Introduction
Device drivers IntroductionDevice drivers Introduction
Device drivers Introduction
 
Embedded Android : System Development - Part III
Embedded Android : System Development - Part IIIEmbedded Android : System Development - Part III
Embedded Android : System Development - Part III
 
Linux Kernel and Driver Development Training
Linux Kernel and Driver Development TrainingLinux Kernel and Driver Development Training
Linux Kernel and Driver Development Training
 
Pitfalls of virtual machine introspection on modern hardware
Pitfalls of virtual machine introspection on modern hardwarePitfalls of virtual machine introspection on modern hardware
Pitfalls of virtual machine introspection on modern hardware
 
BeRTOS: Free Embedded RTOS
BeRTOS: Free Embedded RTOSBeRTOS: Free Embedded RTOS
BeRTOS: Free Embedded RTOS
 
CrySys guest-lecture: Virtual machine introspection on modern hardware
CrySys guest-lecture: Virtual machine introspection on modern hardwareCrySys guest-lecture: Virtual machine introspection on modern hardware
CrySys guest-lecture: Virtual machine introspection on modern hardware
 
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
 
Virtual Machine Introspection with Xen
Virtual Machine Introspection with XenVirtual Machine Introspection with Xen
Virtual Machine Introspection with Xen
 
Kernel modules
Kernel modulesKernel modules
Kernel modules
 
Kernel Recipes 2013 - Kernel for your device
Kernel Recipes 2013 - Kernel for your deviceKernel Recipes 2013 - Kernel for your device
Kernel Recipes 2013 - Kernel for your device
 
01 introduction & setup - Android
01   introduction & setup - Android01   introduction & setup - Android
01 introduction & setup - Android
 
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan BaljevicUnix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
 
Course 102: Lecture 19: Using Signals
Course 102: Lecture 19: Using Signals Course 102: Lecture 19: Using Signals
Course 102: Lecture 19: Using Signals
 

Ähnlich wie ELC_NA-2015-AFT_for_CI-Igor.Stoppa

Ubuntu phone engineering
Ubuntu phone engineeringUbuntu phone engineering
Ubuntu phone engineeringRex Tsai
 
-OpenIoT Summit - IoT devices- secure boot and sw maintenance_0
-OpenIoT Summit - IoT devices- secure boot and sw maintenance_0-OpenIoT Summit - IoT devices- secure boot and sw maintenance_0
-OpenIoT Summit - IoT devices- secure boot and sw maintenance_0Igor Stoppa
 
Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 2012Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 201244CON
 
Adopting agile in an embedded platform Suryakiran Kasturi & Akhil Kumar
Adopting agile in an embedded platform  Suryakiran Kasturi & Akhil KumarAdopting agile in an embedded platform  Suryakiran Kasturi & Akhil Kumar
Adopting agile in an embedded platform Suryakiran Kasturi & Akhil KumarXP Conference India
 
Linux Distribution Automated Testing
 Linux Distribution Automated Testing Linux Distribution Automated Testing
Linux Distribution Automated TestingAleksander Baranowski
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012Philip Polstra
 
Open Source Firmware - oSC19
Open Source Firmware - oSC19Open Source Firmware - oSC19
Open Source Firmware - oSC19Daniel Maslowski
 
Open_IoT_Summit-Europe-2016-Building_an_IoT-class_Device_0
Open_IoT_Summit-Europe-2016-Building_an_IoT-class_Device_0Open_IoT_Summit-Europe-2016-Building_an_IoT-class_Device_0
Open_IoT_Summit-Europe-2016-Building_an_IoT-class_Device_0Igor Stoppa
 
Develop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM BoardsDevelop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM BoardsNational Cheng Kung University
 
HKG18-TR12 - LAVA for LITE Platforms and Tests
HKG18-TR12 - LAVA for LITE Platforms and TestsHKG18-TR12 - LAVA for LITE Platforms and Tests
HKG18-TR12 - LAVA for LITE Platforms and TestsLinaro
 
Rapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USBRapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USBSamsung Open Source Group
 
Infra / Cont delivery - 3rd party automation
Infra / Cont delivery - 3rd party automationInfra / Cont delivery - 3rd party automation
Infra / Cont delivery - 3rd party automationShay Cohen
 
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机Rex Tsai
 
The Hybrid Theory of Classroom Capture
The Hybrid Theory  of Classroom CaptureThe Hybrid Theory  of Classroom Capture
The Hybrid Theory of Classroom CaptureEveretteGAllen
 
Embedded Linux Systems Basics
Embedded Linux Systems BasicsEmbedded Linux Systems Basics
Embedded Linux Systems BasicsMax Henery
 
Workstations-02.pptx
Workstations-02.pptxWorkstations-02.pptx
Workstations-02.pptxDorcask3
 
Selenium Camp 2016 - Kiev, Ukraine
Selenium Camp 2016 -  Kiev, UkraineSelenium Camp 2016 -  Kiev, Ukraine
Selenium Camp 2016 - Kiev, UkraineJustin Ison
 

Ähnlich wie ELC_NA-2015-AFT_for_CI-Igor.Stoppa (20)

Ubuntu phone engineering
Ubuntu phone engineeringUbuntu phone engineering
Ubuntu phone engineering
 
-OpenIoT Summit - IoT devices- secure boot and sw maintenance_0
-OpenIoT Summit - IoT devices- secure boot and sw maintenance_0-OpenIoT Summit - IoT devices- secure boot and sw maintenance_0
-OpenIoT Summit - IoT devices- secure boot and sw maintenance_0
 
Polstra 44con2012
Polstra 44con2012Polstra 44con2012
Polstra 44con2012
 
Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 2012Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 2012
 
Adopting agile in an embedded platform Suryakiran Kasturi & Akhil Kumar
Adopting agile in an embedded platform  Suryakiran Kasturi & Akhil KumarAdopting agile in an embedded platform  Suryakiran Kasturi & Akhil Kumar
Adopting agile in an embedded platform Suryakiran Kasturi & Akhil Kumar
 
Linux Distribution Automated Testing
 Linux Distribution Automated Testing Linux Distribution Automated Testing
Linux Distribution Automated Testing
 
Chef vs puppet
Chef vs puppetChef vs puppet
Chef vs puppet
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012
 
Open Source Firmware - oSC19
Open Source Firmware - oSC19Open Source Firmware - oSC19
Open Source Firmware - oSC19
 
Hardware hacking
Hardware hackingHardware hacking
Hardware hacking
 
Open_IoT_Summit-Europe-2016-Building_an_IoT-class_Device_0
Open_IoT_Summit-Europe-2016-Building_an_IoT-class_Device_0Open_IoT_Summit-Europe-2016-Building_an_IoT-class_Device_0
Open_IoT_Summit-Europe-2016-Building_an_IoT-class_Device_0
 
Develop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM BoardsDevelop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM Boards
 
HKG18-TR12 - LAVA for LITE Platforms and Tests
HKG18-TR12 - LAVA for LITE Platforms and TestsHKG18-TR12 - LAVA for LITE Platforms and Tests
HKG18-TR12 - LAVA for LITE Platforms and Tests
 
Rapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USBRapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USB
 
Infra / Cont delivery - 3rd party automation
Infra / Cont delivery - 3rd party automationInfra / Cont delivery - 3rd party automation
Infra / Cont delivery - 3rd party automation
 
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机
 
The Hybrid Theory of Classroom Capture
The Hybrid Theory  of Classroom CaptureThe Hybrid Theory  of Classroom Capture
The Hybrid Theory of Classroom Capture
 
Embedded Linux Systems Basics
Embedded Linux Systems BasicsEmbedded Linux Systems Basics
Embedded Linux Systems Basics
 
Workstations-02.pptx
Workstations-02.pptxWorkstations-02.pptx
Workstations-02.pptx
 
Selenium Camp 2016 - Kiev, Ukraine
Selenium Camp 2016 -  Kiev, UkraineSelenium Camp 2016 -  Kiev, Ukraine
Selenium Camp 2016 - Kiev, Ukraine
 

ELC_NA-2015-AFT_for_CI-Igor.Stoppa

  • 1. 1 Automated Flashing and Testing for Continuous Integration Igor Stoppa Embedded Linux Conference North America 2015
  • 2. 2 Automated Flasher Tester AFT Tool for deploying and verifying a SW image on an appropriate target HW device. ● Easily integrate with existing setup. ● Minimize requirements of the setup (including cost). ● Easily scale both the number and the type of units. ● Minimal deployment & testing time. ● Keep close to real life conditions. ● Enable Developers to test before submitting, using identical means of verification.
  • 3. 3 Continuous Integration Merge contributions often, even multiple times per day, but only if they meet the following requirements: 1. Patches must apply cleanly. 2. Patched SW must build cleanly - at least not worse than pre- patching. 3. Generated SW image must deploy successfully to the Device Under Test (DUT). 4. Deployed SW image must boot. 5. Deployed image must pass a set of predefined test cases. Only what is tested can be expected to work.
  • 4. 4 Why yet another tool? ● Several proprietary solutions available but: ○ focused only on one architecture ○ non open source - hinders sharing publicly testing methods / results ● Other public solutions, ex: LAVA (Linaro) ○ not alternative, rather complementary ○ LAVA provides lots of infrastructure (queuing, result visualization, etc.) AFT focuses on optimizing deployment and test execution. ● Let developers use locally exactly the same test configuration used by CI. ○ install and configure the tool painlessly
  • 5. 5 Woes of Continuous Integration Speed: building and testing can take a long time, but it’s needed frequently ● parallelize sw build - throw in more servers ● parallelize testing - but deployng the SW image can still take a long time! Multiple-targets: supporting multiple platform/arch is resources-intensive ● build infrastructure can adjust (run different cross compilers/qemu) ● each new type of HW needs ad-hoc work: expensive and slow. ● during the project the HW to support will likely change. Optimizing Deployment & Testing can have high returns.
  • 6. 6 Interaction with DUT Standardize the interaction: do not use specific interfaces/APIs. Rather, emulate the user: ● plug/unplug power ● enter data from a (USB) keyboard ● issue commands to transfer data over a network connection. Deployment of SW image to test Deploy the same image produced by the build system, directly to the DUT. Allow passwordless login by injecting the ssh public key of the testing harness, for the root user. Key Features
  • 7. 7 High level view Build Cloud or Developer’s workstation DUT 1.1 Testing Harness 1 Testing Harness 2 Testing Harness n DUT 1.2 DUT 1.m ... DUTs associated to Testing Harness 2 ... DUTs associated to Testing Harness n
  • 8. 8 Simplified Model Build Cloud or Developer’s workstation Testing Harness (PC) DUT (ex: MinnowMax) Mains Power-cycling USB keyboard emulator User-input emulation DNS DHCP NFS Local NetworkSW Image Test Results OpenSUSE USB key
  • 9. 9 HW configuration 1 2 3 4 6 7 8 5 1. MinnowBoard Max 2. Minnow Power Supply 3. USB-controlled power cutter. 4. OpenSUSE Thumb drive 5. SD Card (target media) 6. Arduino UNO R3 7. USB to Serial port Control interface for UNO 8. Programming toggle for UNO USB port. 9. Ethernet port 9
  • 10. 10 SW Stack & Data AFT-Core module Power Control Plugin DUT Plugins: ● remote access (ex: ssh) ● remote OS deployment ● device identification Test Cases Plugins: ● execution of basic commands ● system services ● ... Test Plan Devices Types Actual Topology
  • 11. 11 Main Steps (ex: MinnowBoard Max) 1. Verify compatibility: is the image supported and is there a suitable device? 2. Allocate device compatible with the SW image. 3. Power-cycle and boot the DUT into service mode from the OpenSUSE USB key. 4. Deploy the test SW image to the target storage - it is taken from an nfs share. 5. Install the public ssh key used by the Testing Harness for the DUT root user. 6. Power-cycle and boot the DUT into testing mode, from the image just deployed. 7. Check for availability and run the selected test plan. 8. Report back the test results, in xUnit format.
  • 12. 12 But it was not always easy ... System Partitioning: many SW components are specific to the HW they drive (ex: power switch) and the interface used must support various models from different vendors. BIOS configuration: some (most?) BIOSes rearrange the sequence of the boot devices, others can completely lose their settings when the DUT is power- cycled - the only foolproof solution is to reconfigure the BIOS at each iteration. More BIOS blues: at some point one device changed autonomously MAC address - reason still unknown. System Architecture: initial idea - Testing Harness as VM - qemu cannot reliably pass to the VM 2+ USB devices with same VendorID:DeviceID - Doh. Network Interfaces: OpenSUSE network manager (wicked) cannot bring up interfaces with static IP and no carrier. USB thumb drives: some brands dropped like flies, after undergoing only a few power-cycles.
  • 13. 13 USB Keyboard Emulation ● Based on Arduino UNO R3, the only one currently capable of interfacing with BIOSes ● Uses LUFA FW to emulate the USB protocol. ● Uses only libraries with GPLv2 compatible license. ● Messaging protocol to detect data losses ● It costs ~ $7, while the cheapest commercial alternative is above $100 ● Supports: ○ record/playback of keys ○ LibreOffice Calc sheet ○ sequence generated on-the-fly Testing Harness DUT USB Master USB Master Arduino UNO R3 2nd ATMega SW Serial USB to Serial
  • 14. 14 Does it meet the requirements? All the requirements were met: ● The only requirement toward the target OS is to provide means for login access. ● Adding support for new OS (Yocto) and new HW (NUC, MinnowBoardMax) took less than a week. ● Depending on the performance of the DUT, a deployment & basic testing session can last between 3 and 10 minutes. ● The BOM per-device is fairly frugal and relies solely on inexpensive off- the shelf CE devices, easily obtainable in large amounts, worldwide. ● Everything, from the SW to the HW setup, is public and can be reproduced anywhere.
  • 15. 15 Ideas for future development ● Support more architectures/boards. Ex: Edison, Quark, BeagleBone Black, WandBoard Quad, ODroid. ● Support more flavors of power cutter. Ex: ethernet controlled. ● Replace USB-Serial interface with ethernet. ● Use Edison as testing harness, rather than a PC. ● Support test cases run with fMBT (https://01.org/fmbt)
  • 16. 16 References Automated Flasher Tester: https://github.com/igor-stoppa - all the aft-* projects USB Keyboard Emulator (Peripheral EMulator): https://github.com/igor-stoppa/pem
  • 17. Q & A