Piece of cake testing remote embedded devices made easy with MuxPi - - PowerPoint PPT Presentation

piece of cake
SMART_READER_LITE
LIVE PREVIEW

Piece of cake testing remote embedded devices made easy with MuxPi - - PowerPoint PPT Presentation

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.


slide-1
SLIDE 1

Piece of cake

testing remote embedded devices made easy with MuxPi

.

Paweł Wieczorek February 3, 2018

Samsung R&D Institute Poland

slide-2
SLIDE 2

Agenda .

  • 1. Introduction
  • 2. Previous efforts
  • 3. Idea
  • 4. Hardware
  • 5. Software
  • 6. Next steps
  • 7. Conclusion

1/49

slide-3
SLIDE 3

Introduction .

slide-4
SLIDE 4

Tizen .

2/49

slide-5
SLIDE 5

Use cases .

https://news.s6msung.com/glob6l/ tizen---first-milestone-rele6se-to-open-new-opportunities-in-the-iot-er6

3/49

slide-6
SLIDE 6

Release engineering .

  • Continuous

platform development

  • QA step prior pulling

new changes

  • Package internal tests

are not enough

4/49

slide-7
SLIDE 7

Remote accessibility .

.

  • Easy to store in a secure manner
  • Less effort than per developer
  • Better utilized when shared

5/49

slide-8
SLIDE 8

Piece of cake (with MuxPi) .

6/49

slide-9
SLIDE 9

Piece of cake (with Dryad) .

.

7/49

slide-10
SLIDE 10

Piece of cake (with Dryad) .

.

7/49

slide-11
SLIDE 11

Piece of cake (with Dryads) .

.

8/49

slide-12
SLIDE 12

Piece of cake (with Dryads) .

.

8/49

slide-13
SLIDE 13

Piece of cake (with Dryads) .

.

8/49

slide-14
SLIDE 14

Previous efforts .

slide-15
SLIDE 15

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

slide-16
SLIDE 16

Kernel CI .

https://kernelci.org/st6ts/

10/49

slide-17
SLIDE 17

LAVA LMP .

https://linux.codehelp.co.uk/the-problem-of-sd-mux.html

11/49

slide-18
SLIDE 18

SD MUX .

12/49

slide-19
SLIDE 19

SD MUX – open hardware .

https://git.tizen.org/cgit/tools/testl6b/sd-mux

13/49

slide-20
SLIDE 20

Autohat board (SD MUX-based) .

https://github.com/resin-io/6utoh6t-bo6rd

14/49

slide-21
SLIDE 21

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

slide-22
SLIDE 22

Idea .

slide-23
SLIDE 23

Constraints .

  • Only replaceable media
  • No single point of failure parts
  • No USB involvement

(from test server)

16/49

slide-24
SLIDE 24

Requirements .

  • Minimum external connections
  • Unified remote access

to target devices

  • Easy setup and maintenance

17/49

slide-25
SLIDE 25

Features .

  • User interface

(often requested)

  • Power measurement

(increasing demand)

  • Writing EDID to HDMI

18/49

slide-26
SLIDE 26

Hardware .

slide-27
SLIDE 27

MuxPi .

19/49

slide-28
SLIDE 28

MuxPi components .

.

20/49

slide-29
SLIDE 29

MuxPi components .

.

20/49

slide-30
SLIDE 30

MuxPi components .

.

20/49

slide-31
SLIDE 31

MuxPi components .

.

20/49

slide-32
SLIDE 32

MuxPi components .

.

20/49

slide-33
SLIDE 33

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

slide-34
SLIDE 34

Indicators .

22/49

slide-35
SLIDE 35

Easy maintenance .

23/49

slide-36
SLIDE 36

Extensibility .

24/49

slide-37
SLIDE 37

Major improvements .

  • Independent

(standalone)

  • Aware of its state
  • Easy to maintain
  • Extensible from start

25/49

slide-38
SLIDE 38

Building your own .

NanoPi NEO ≈ $10 Parts Soldering skills High Patience A LOT

https://git.tizen.org/cgit/tools/muxpi

26/49

slide-39
SLIDE 39

Building your own .

NanoPi NEO ≈ $10 Parts ≈ $80 Soldering skills High Patience A LOT

https://git.tizen.org/cgit/tools/muxpi

26/49

slide-40
SLIDE 40

Building your own .

NanoPi NEO ≈ $10 Parts ≈ $80 Soldering skills High Patience A LOT

https://git.tizen.org/cgit/tools/muxpi

26/49

slide-41
SLIDE 41

Building your own .

NanoPi NEO ≈ $10 Parts ≈ $80 Soldering skills High Patience A LOT

https://git.tizen.org/cgit/tools/muxpi

26/49

slide-42
SLIDE 42

Building your own .

NanoPi NEO ≈ $10 Parts ≈ $80 Soldering skills High Patience A LOT

https://git.tizen.org/cgit/tools/muxpi

26/49

slide-43
SLIDE 43

Software .

slide-44
SLIDE 44

Multitier architecture .

  • “Do One Thing and Do It Well”
  • RESTful HTTP APIs
  • Homogeneous solution stack

27/49

slide-45
SLIDE 45

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

slide-46
SLIDE 46

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

slide-47
SLIDE 47

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

slide-48
SLIDE 48

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

slide-49
SLIDE 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

slide-50
SLIDE 50

MuxPi (farm) .

  • Manages single DUT
  • Fully aware of its capabilities
  • Requires only two interfaces
  • Power supply
  • Network connection (Ethernet)

. .

29/49

slide-51
SLIDE 51

MuxPi (software) .

$ fot6 --help Us6ge of fot6:

  • c6rd string

p6th to SDc6rd

  • m6p string

p6th to JSON form6tted m6pping

  • md string

URL to MDSUMS file

  • quiet

suppress logging $ stm --help Us6ge of stm:

  • dut

connect SD c6rd to DUT

  • m dur6tion

time del6y for tick comm6nd

  • tick

power off 6nd on 6fter 'm' (s)

  • ts

connect SD c6rd to test server

. .

30/49

slide-52
SLIDE 52

MuxPi (software) .

$ fot6 --help Us6ge of fot6:

  • c6rd string

p6th to SDc6rd

  • m6p string

p6th to JSON form6tted m6pping

  • md string

URL to MDSUMS file

  • quiet

suppress logging $ stm --help Us6ge of stm:

  • dut

connect SD c6rd to DUT

  • m dur6tion

time del6y for tick comm6nd

  • tick

power off 6nd on 6fter 'm' (s)

  • ts

connect SD c6rd to test server

. .

30/49

slide-53
SLIDE 53

MuxPi (software) .

$ fot6 --help Us6ge of fot6:

  • c6rd string

p6th to SDc6rd

  • m6p string

p6th to JSON form6tted m6pping

  • md string

URL to MDSUMS file

  • quiet

suppress logging $ stm --help Us6ge of stm:

  • dut

connect SD c6rd to DUT

  • m dur6tion

time del6y for tick comm6nd

  • tick

power off 6nd on 6fter 'm' (s)

  • ts

connect SD c6rd to test server

. .

30/49

slide-54
SLIDE 54

MuxPi (software) .

$ fot6 --help Us6ge of fot6:

  • c6rd string

p6th to SDc6rd

  • m6p string

p6th to JSON form6tted m6pping

  • md string

URL to MDSUMS file

  • quiet

suppress logging $ stm --help Us6ge of stm:

  • dut

connect SD c6rd to DUT

  • m dur6tion

time del6y for tick comm6nd

  • tick

power off 6nd on 6fter 'm' (s)

  • ts

connect SD c6rd to test server

. .

30/49

slide-55
SLIDE 55

Boruta .

  • Dryad farm management system
  • Schedules requests
  • Priority
  • Device groups
  • Delayed access
  • Provides convenient access

to selected Dryad

31/49

slide-56
SLIDE 56

Boruta on stack .

.

32/49

slide-57
SLIDE 57

Dryad life cycle in Boruta .

.

.

.

Actions performed .

.

Unallocated .

.

Matches requirements .

.

Prepares environment .

.

Sets up tunnel

. . . Maintenance mode .

33/49

slide-58
SLIDE 58

Weles .

  • Lightweight testing framework
  • Provides LAVA-like interface
  • YAML job definition →

actions executed on DUT

  • Deploy
  • Boot
  • Test
  • Collect

34/49

slide-59
SLIDE 59

Weles on stack .

.

35/49

slide-60
SLIDE 60

Weles purpose .

.

.

.

Actions performed .

.

Unallocated .

.

Matches requirements .

.

Prepares environment .

.

Sets up tunnel

. . . Maintenance mode .

36/49

slide-61
SLIDE 61

Weles action sequence .

.

.

.

Parse YAML

.

.

Collect assets

.

.

Request DUT

.

.

Perform tests

37/49

slide-62
SLIDE 62

Perun .

  • OS images testing system
  • Schedules verification

(per new set of OS images)

  • Automates QA step of

Release Engineering Duty

38/49

slide-63
SLIDE 63

Perun on stack .

.

39/49

slide-64
SLIDE 64

Perun action sequence .

.

.

.

Crawl URL

.

.

Report changes

. .

Submit Weles jobs

.

.

Collect artifacts

.

.

Interpret results

40/49

slide-65
SLIDE 65

Keeping it simple .

41/49

slide-66
SLIDE 66

Keeping it simple (and decoupled) .

42/49

slide-67
SLIDE 67

Keeping it simple (and decoupled) .

42/49

slide-68
SLIDE 68

Keeping it simple (and decoupled) .

42/49

slide-69
SLIDE 69

Keeping it simple (and decoupled) .

42/49

slide-70
SLIDE 70

Next steps .

slide-71
SLIDE 71

Future plans .

Hardware

  • Audio I/O
  • USB Type C

investigation

  • NanoPi serial console
  • n USB

Software

  • Web interfaces

for current layers

  • Service state

management

  • Release engineer's layer

43/49

slide-72
SLIDE 72

Further details .

  • MuxPi

https://wiki.tizen.org/MuxPi

  • SD MUX (deprecated – lesson learnt)

https://wiki.tizen.org/SD_MUX

44/49

slide-73
SLIDE 73

Help? .

  • Mailing list

general@lists.tizen.org

  • #tizen on Freenode

https://webchat.freenode.net/?channels=tizen

45/49

slide-74
SLIDE 74

Conclusion .

slide-75
SLIDE 75

Summary .

  • Quick setup
  • Easy maintenance
  • Responsibilities division
  • Execution parallelization
  • Environment unification

46/49

slide-76
SLIDE 76

Questions?

46/49

slide-77
SLIDE 77

Thank you!

Paweł Wieczorek

p.wieczorek2@samsung.com Samsung R&D Institute Poland

slide-78
SLIDE 78

Acknowledgements

  • Metropolis – simple, modern Beamer theme
slide-79
SLIDE 79

Pictures used

  • https://en.wikipedi6.org/wiki/File:Heckert_GNU_white.svg
  • https://commons.wikimedi6.org/wiki/File:Tux.svg
  • https://commons.wikimedi6.org/wiki/File:W6yl6nd_Logo.svg
  • https://commons.wikimedi6.org/wiki/File:Enlightenment_logo_bl6ck.png
  • https://developer.tizen.org/sites/def6ult/files/im6ges/6bout_tizen_.png
  • https://pix6b6y.com/en/security-industri6l-logistic-/
  • https://commons.wikimedi6.org/wiki/File:ColoredBl6nkM6p-World-E.svg
  • https://commons.wikimedi6.org/wiki/File:Nuvol6_Kore6n_fl6g.svg
  • https://commons.wikimedi6.org/wiki/File:Nuvol6_Polish_fl6g.svg
  • https://commons.wikimedi6.org/wiki/File:Nuvol6_USA_fl6g.svg
  • https://v6lid6tion.lin6ro.org/st6tic/docs/v/_im6ges/l6v6.svg
  • https://wiki.lin6ro.org/Pl6tform/LAB/LMP_in_pr6ctice
  • https://forums.resin.io/uplo6ds/resin/origin6l/X/

6becdbbf6edeceb6df6.jpg

  • https://commons.wikimedi6.org/wiki/File:

It6li6n_tr6ffic_signs_-_ferm6rsi_e_d6re_precedenz6_-_stop.svg

  • https://f6rm.st6ticflickr.com//_db6e_k_d.jpg
  • https://pix6b6y.com/en/st6rs-new-6dvertisement-sign-/
  • https://pix6b6y.com/en/upd6te-upgr6de-renew-improve-/
  • https://www.goodfreephotos.com/6lbums/vector-im6ges/

different-colored-l6yers-vector-file.png

  • https://pix6b6y.com/en/ethernet-internet-l6n-network-/
  • https://pix6b6y.com/en/power-c6ble-plug-socket-/
  • https://pix6b6y.com/en/memory-c6rd-sd-secure-digit6l-/
  • https://pix6b6y.com/en/kiss-lips-mouth-red-love-ros6-/
  • https://commons.wikimedi6.org/wiki/File:PEO-smiley_smile.svg