Piece of cake testing remote embedded devices made easy with MuxPi . Paweł Wieczorek February 3, 2018 Samsung R&D Institute Poland
Agenda . 1. Introduction 2. Previous efforts 3. Idea 4. Hardware 5. Software 6. Next steps 7. Conclusion 1/49
Introduction .
Tizen . 2/49
Use cases . https://news.s6msung.com/glob6l/ tizen-�-�-first-milestone-rele6se-to-open-new-opportunities-in-the-iot-er6 3/49
Release engineering . • Continuous platform development • QA step prior pulling new changes • Package internal tests are not enough 4/49
Remote accessibility . . • Easy to store in a secure manner • Less effort than per developer • Better utilized when shared 5/49
Piece of cake (with MuxPi) . 6/49
Piece of cake (with Dryad) . . 7/49
Piece of cake (with Dryad) . . 7/49
Piece of cake (with Dryads) . . 8/49
Piece of cake (with Dryads) . . 8/49
Piece of cake (with Dryads) . . 8/49
Previous efforts .
LAVA . • Linaro Automated Validation Architecture • Automation system for deploying operating systems • Virtual and physical hardware supported • Allows running boot, bootloader and system level tests 9/49
Kernel CI . https://kernelci.org/st6ts/ 10/49
LAVA LMP . https://linux.codehelp.co.uk/the-problem-of-sd-mux.html 11/49
SD MUX . 12/49
SD MUX – open hardware . https://git.tizen.org/cgit/tools/testl6b/sd-mux 13/49
Autohat board (SD MUX-based) . https://github.com/resin-io/6utoh6t-bo6rd 14/49
SD MUX issues . $ dmesg | t6il -�� [ ��.������] usb �-�: new full-speed USB device number �� using xhci_hcd [ ��.������] usb �-�: device descriptor re6d/��, error -�� [ ��.������] usb �-�: device descriptor re6d/��, error -�� [ ��.������] usb �-�: new full-speed USB device number �� using xhci_hcd [ ��.������] usb �-�: Device not responding to setup 6ddress. [ ��.������] usb �-�: Device not responding to setup 6ddress. [ ��.������] usb �-�: device not 6ccepting 6ddress ��, error -�� [ ��.������] usb �-�: new full-speed USB device number �� using xhci_hcd [ ��.������] usb �-�: Device not responding to setup 6ddress. [ ��.������] usb �-�: Device not responding to setup 6ddress. [ ��.������] usb �-�: device not 6ccepting 6ddress ��, error -�� [ ��.������] usb usb�-port�: un6ble to enumer6te USB device 15/49
Idea .
Constraints . • Only replaceable media • No single point of failure parts • No USB involvement (from test server) 16/49
Requirements . • Minimum external connections • Unified remote access to target devices • Easy setup and maintenance 17/49
Features . • User interface (often requested) • Power measurement (increasing demand) • Writing EDID to HDMI 18/49
Hardware .
MuxPi . 19/49
MuxPi components . . 20/49
MuxPi components . . 20/49
MuxPi components . . 20/49
MuxPi components . . 20/49
MuxPi components . . 20/49
Essential MuxPi functions . • Switching a microSD card between DUT and TS • Switching power supply for DUT • Switching jumpers/buttons of DUT • Measuring power consumption of DUT • Writing EDID to DUT over HDMI connection • Providing DUT connection (UART, USB, ETH, microSD card) over Ethernet • Interacting with farm maintainer 21/49
Indicators . 22/49
Easy maintenance . 23/49
Extensibility . 24/49
Major improvements . • Independent (standalone) • Aware of its state • Easy to maintain • Extensible from start 25/49
Parts Soldering skills High Patience A LOT https://git.tizen.org/cgit/tools/muxpi Building your own . NanoPi NEO ≈ $10 26/49
Soldering skills High Patience A LOT https://git.tizen.org/cgit/tools/muxpi Building your own . NanoPi NEO ≈ $10 Parts ≈ $80 26/49
Patience A LOT https://git.tizen.org/cgit/tools/muxpi Building your own . NanoPi NEO ≈ $10 Parts ≈ $80 Soldering skills High 26/49
https://git.tizen.org/cgit/tools/muxpi Building your own . NanoPi NEO ≈ $10 Parts ≈ $80 Soldering skills High Patience A LOT 26/49
Building your own . NanoPi NEO ≈ $10 Parts ≈ $80 Soldering skills High Patience A LOT https://git.tizen.org/cgit/tools/muxpi 26/49
Software .
Multitier architecture . • “Do One Thing and Do It Well” • RESTful HTTP APIs • Homogeneous solution stack 27/49
Perun Weles Boruta MuxPi Responsibilities . • Who knows what requires verification? • Who knows which actions are necessary? • Who knows where can it be done? • Who knows how to do it? 28/49
Weles Boruta MuxPi Responsibilities . • Who knows what requires verification? Perun • Who knows which actions are necessary? • Who knows where can it be done? • Who knows how to do it? 28/49
Boruta MuxPi Responsibilities . • Who knows what requires verification? Perun • Who knows which actions are necessary? Weles • Who knows where can it be done? • Who knows how to do it? 28/49
MuxPi Responsibilities . • Who knows what requires verification? Perun • Who knows which actions are necessary? Weles • Who knows where can it be done? Boruta • Who knows how to do it? 28/49
Responsibilities . • Who knows what requires verification? Perun • Who knows which actions are necessary? Weles • Who knows where can it be done? Boruta • Who knows how to do it? MuxPi 28/49
MuxPi (farm) . • Manages single DUT • Fully aware of its capabilities • Requires only two interfaces • Power supply • Network connection (Ethernet) . . 29/49
MuxPi (software) . $ fot6 --help $ stm --help Us6ge of fot6: Us6ge of stm: -c6rd string -dut p6th to SDc6rd connect SD c6rd to DUT -m6p string -m dur6tion p6th to JSON form6tted m6pping time del6y for tick comm6nd -md� string -tick URL to MD�SUMS file power off 6nd on 6fter 'm' (s) -quiet -ts suppress logging connect SD c6rd to test server . . 30/49
MuxPi (software) . $ fot6 --help $ stm --help Us6ge of fot6: Us6ge of stm: -c6rd string -dut p6th to SDc6rd connect SD c6rd to DUT -m6p string -m dur6tion p6th to JSON form6tted m6pping time del6y for tick comm6nd -md� string -tick URL to MD�SUMS file power off 6nd on 6fter 'm' (s) -quiet -ts suppress logging connect SD c6rd to test server . . 30/49
MuxPi (software) . $ fot6 --help $ stm --help Us6ge of fot6: Us6ge of stm: -c6rd string -dut p6th to SDc6rd connect SD c6rd to DUT -m6p string -m dur6tion p6th to JSON form6tted m6pping time del6y for tick comm6nd -md� string -tick URL to MD�SUMS file power off 6nd on 6fter 'm' (s) -quiet -ts suppress logging connect SD c6rd to test server . . 30/49
MuxPi (software) . $ fot6 --help $ stm --help Us6ge of fot6: Us6ge of stm: -c6rd string -dut p6th to SDc6rd connect SD c6rd to DUT -m6p string -m dur6tion p6th to JSON form6tted m6pping time del6y for tick comm6nd -md� string -tick URL to MD�SUMS file power off 6nd on 6fter 'm' (s) -quiet -ts suppress logging connect SD c6rd to test server . . 30/49
Boruta . • Dryad farm management system • Schedules requests • Priority • Device groups • Delayed access • Provides convenient access to selected Dryad 31/49
Boruta on stack . . 32/49
Dryad life cycle in Boruta . Maintenance . mode Actions . performed Unallocated . Sets up . . . . . . . tunnel Matches . requirements Prepares . environment . . . 33/49
Weles . • Lightweight testing framework • Provides LAVA-like interface • YAML job definition �→ actions executed on DUT • Deploy • Boot • Test • Collect 34/49
Weles on stack . . 35/49
Weles purpose . Maintenance . mode Actions . performed Unallocated . Sets up . . . . . . . tunnel Matches . requirements Prepares . environment . . . 36/49
Weles action sequence . . . . . . Parse . YAML Collect . assets Request . DUT Perform . tests 37/49
Perun . • OS images testing system • Schedules verification (per new set of OS images) • Automates QA step of Release Engineering Duty 38/49
Perun on stack . . 39/49
Perun action sequence . Crawl . URL Report . changes Interpret . . . . . . . results Submit . Weles jobs Collect . artifacts 40/49
Keeping it simple . 41/49
Keeping it simple (and decoupled) . 42/49
Keeping it simple (and decoupled) . 42/49
Keeping it simple (and decoupled) . 42/49
Keeping it simple (and decoupled) . 42/49
Next steps .
Recommend
More recommend