Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL...

49
Primer: Testing Your Embedded System - What is a ptest, Lava, Fuego, KernelCI and...? Primer: Testing Your Embedded System - What is a ptest, Lava, Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager [email protected] Jan-Simon Möller AGL Release Manager [email protected]

Transcript of Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL...

Page 1: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

Primer: Testing Your Embedded System - What is a ptest, Lava, Fuego, KernelCI and...?

Primer: Testing Your Embedded System - What is a ptest, Lava, Fuego, KernelCI and...?

Jan-Simon MöllerAGL Release Manager

[email protected]

Jan-Simon MöllerAGL Release Manager

[email protected]

Page 2: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

Overview / ScopeOverview / Scope

Page 3: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

Frameworks to test your embedded ...Frameworks to test your embedded ...

• Yocto Project / ptest• Fuego• LAVA• KernelCI• labgrid• r4d• of course there

are more

• Yocto Project / ptest• Fuego• LAVA• KernelCI• labgrid• r4d• of course there

are moreImage: public domain

Page 4: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

Yocto Project's ptestYocto Project's ptest

Page 5: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

ptest – Fact sheetptest – Fact sheet

• Name: ptest

• Project: The Yocto Project (www.yoctoproject.org)

• URL: https://wiki.yoctoproject.org/wiki/Ptest

• TLDR: Packaging and Execution of 'make test' style testsuites on the DUT

• Name: ptest

• Project: The Yocto Project (www.yoctoproject.org)

• URL: https://wiki.yoctoproject.org/wiki/Ptest

• TLDR: Packaging and Execution of 'make test' style testsuites on the DUT

Page 6: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

ptestptest

• ptests are– sub-packages (foo-ptest)– a output format ("$RESULT: <testname>")

– PASS/FAIL/SKIP

– convention to call them ( run-ptest script )– ptest-runner on the target to start them

• ptests are– sub-packages (foo-ptest)– a output format ("$RESULT: <testname>")

– PASS/FAIL/SKIP

– convention to call them ( run-ptest script )– ptest-runner on the target to start them

Page 7: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

ptestptestfrom zlib_1.2.11.bb:SRC_URI += "file://run-ptest"inherit ptestdo_compile_ptest() {

oe_runmake test}do_install_ptest() {

install ${B}/Makefile ${D}${PTEST_PATH}install ${B}/example ${D}${PTEST_PATH}install ${B}/minigzip ${D}${PTEST_PATH}install ${B}/examplesh ${D}${PTEST_PATH}install ${B}/minigzipsh ${D}${PTEST_PATH}

# Remove buildhost references...sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \

-e 's|${DEBUG_PREFIX_MAP}||g' \ ${D}${PTEST_PATH}/Makefile

}RDEPENDS_${PN}-ptest += "make"

wrapper script for target

compilation procedure for testsuite

install test binaries

adapt scripts/path to target execution

if necessary

declare (undetectable) runtime dependencies for tests (e.g. make)

Page 8: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

ptestptest

• To add package testing to your build, set the DISTRO_FEATURES and EXTRA_IMAGE_FEATURES

DISTRO_FEATURES_append = " ptest"

EXTRA_IMAGE_FEATURES += "ptest-pkgs"•

• To add package testing to your build, set the DISTRO_FEATURES and EXTRA_IMAGE_FEATURES

DISTRO_FEATURES_append = " ptest"

EXTRA_IMAGE_FEATURES += "ptest-pkgs"•

Page 9: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

ptestptest

+ supports cross-compilation of the test-suite ahead of time

+ well integrated into the bitbake procedures+ can be combined with the "testimage"

class- large log output, full run takes quite long - Result visualization needs postprocessing

+ supports cross-compilation of the test-suite ahead of time

+ well integrated into the bitbake procedures+ can be combined with the "testimage"

class- large log output, full run takes quite long - Result visualization needs postprocessing

Page 10: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

ptestptest

• References:– https://wiki.yoctoproject.org/wiki/Ptest– http://bit.ly/2S5JNtA

• References:– https://wiki.yoctoproject.org/wiki/Ptest– http://bit.ly/2S5JNtA

Page 11: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

FuegoFuego

Page 12: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

• Name: Fuego• Project:Fuego Test System• URL: http://fuegotest.org/

• TLDR: automated testing of embedded targets from a host system with 100 pre-packaged tests

• Name: Fuego• Project:Fuego Test System• URL: http://fuegotest.org/

• TLDR: automated testing of embedded targets from a host system with 100 pre-packaged tests

Fuego – Fact sheetFuego – Fact sheet

Page 13: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

FuegoFuego

• Fuego is– a Jenkins instance preloaded with

• a lot of tests (ranging from LTP to )• scripts to compile the test for the target• upload and run on the target• grab the results and parse them• partially visualize the results

• Fuego is– a Jenkins instance preloaded with

• a lot of tests (ranging from LTP to )• scripts to compile the test for the target• upload and run on the target• grab the results and parse them• partially visualize the results

Page 14: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

FuegoFuego

• Add pictureClick to edit text– Second level

• Third level– Fourth level

» Fifth level

• Add pictureClick to edit text– Second level

• Third level– Fourth level

» Fifth level

Page 15: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

FuegoFuego

• Add pictureClick to edit text– Second level

• Third level– Fourth level

» Fifth level

• Add pictureClick to edit text– Second level

• Third level– Fourth level

» Fifth level

Page 16: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

FuegoFuego

+ Large set of tests out of the box !!+ No prereqisites on the target beside ssh+ Result parsers so graphing is possible- Assumes board is local (ssh)- Assumes board is deployed with filesystem- Each board needs a separate configuration

+ Large set of tests out of the box !!+ No prereqisites on the target beside ssh+ Result parsers so graphing is possible- Assumes board is local (ssh)- Assumes board is deployed with filesystem- Each board needs a separate configuration

Page 17: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

FuegoFuego

• References:

• http://fuegotest.org/wiki/FrontPage

• http://bit.ly/2q4aPEK - LCJ 2016 slides

• http://fuegotest.org/wiki/Fuego_Quickstart_Guide

• References:

• http://fuegotest.org/wiki/FrontPage

• http://bit.ly/2q4aPEK - LCJ 2016 slides

• http://fuegotest.org/wiki/Fuego_Quickstart_Guide

Page 18: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

LAVALAVA

Page 19: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

LAVALAVA

• Name: LAVA• Project: LAVA Software Community Project

• URL: http://www.lavasoftware.org/

• TLDR: Device automation and testexecution framework

• Name: LAVA• Project: LAVA Software Community Project

• URL: http://www.lavasoftware.org/

• TLDR: Device automation and testexecution framework

Page 20: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

LAVALAVA

• LAVA does• manage deployment of the filesystem

• power-on & booting & test exec on the DUT

• support multiple devices of the same type

• have templates for >= 150 types of boards

• support devices to be remote (master/worker)

• LAVA does• manage deployment of the filesystem

• power-on & booting & test exec on the DUT

• support multiple devices of the same type

• have templates for >= 150 types of boards

• support devices to be remote (master/worker)

Page 21: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

LAVALAVA

Page 22: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

LAVALAVA

Page 23: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

LAVALAVA

+ Multiple instances for each DUT-type+ Master/Worker split allows multiple labs+ Scales up- Initial setup (improved by lava-docker)- Less detailed parsing and presentation

of results compared to Fuego

+ Multiple instances for each DUT-type+ Master/Worker split allows multiple labs+ Scales up- Initial setup (improved by lava-docker)- Less detailed parsing and presentation

of results compared to Fuego

Page 24: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

LAVALAVA

• References• lava documentation:

• https://validation.linaro.org/static/docs/v2/

• lava-docker:

• https://github.com/kernelci/lava-docker

• References• lava documentation:

• https://validation.linaro.org/static/docs/v2/

• lava-docker:

• https://github.com/kernelci/lava-docker

Page 25: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

KernelCIKernelCI

Page 26: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

KernelCIKernelCI

• Name: KernelCI• Project: KernelCI project• URL: http://kernelci.org•• TLDR: Test aggregation and

visualization

• Name: KernelCI• Project: KernelCI project• URL: http://kernelci.org•• TLDR: Test aggregation and

visualization

Page 27: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

KernelCIKernelCI

• KernelCI

• is a database and webfrontend

• lets you upload results in json

• visualizes the results

• KernelCI

• is a database and webfrontend

• lets you upload results in json

• visualizes the results

Page 28: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

Click to edit titleClick to edit title

• Click to edit text– Second level

• Third level– Fourth level

» Fifth level

• Click to edit text– Second level

• Third level– Fourth level

» Fifth level

Page 29: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

KernelCIKernelCI

+ can aggregat results from multiple sources

+ multiple tools can upload results (LAVA/Fuego)

- setup (but kernelci-docker)- UI adaptations not easy

+ can aggregat results from multiple sources

+ multiple tools can upload results (LAVA/Fuego)

- setup (but kernelci-docker)- UI adaptations not easy

Page 30: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

KernelCIKernelCI

• References:

• https://github.com/kernelci/kernelci-docker

• https://github.com/kernelci/kernelci-admin

• http://powerci.org

• References:

• https://github.com/kernelci/kernelci-docker

• https://github.com/kernelci/kernelci-admin

• http://powerci.org

Page 31: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

labgridlabgrid

Page 32: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

labgridlabgrid

• Name: labgrid• Project: labgrid-project• URL: https://labgrid.readthedocs.io/en/latest/

• TLDR: abstraction of the hardware controllayer needed for testing of embedded systems

• Name: labgrid• Project: labgrid-project• URL: https://labgrid.readthedocs.io/en/latest/

• TLDR: abstraction of the hardware controllayer needed for testing of embedded systems

Page 33: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

labgridlabgrid

• Click to edit text– Second level

• Third level– Fourth level

» Fifth level

• Click to edit text– Second level

• Third level– Fourth level

» Fifth level

Page 34: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

labgridlabgrid

• labgrid let's you

• expose the DUT resources

• to $TESTTOOL

• to $DEVELOPER

in a unified manner

• labgrid let's you

• expose the DUT resources

• to $TESTTOOL

• to $DEVELOPER

in a unified manner

Page 35: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

labgridlabgrid

+ allows automated and developer access to the DUTs

+ abstracts the HW specifics- integration with testtools (Lava/Fuego)- setup

+ allows automated and developer access to the DUTs

+ abstracts the HW specifics- integration with testtools (Lava/Fuego)- setup

Page 36: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

labgridlabgrid

• References:

• https://labgrid.readthedocs.io/en/latest/

• https://github.com/labgrid-project

• References:

• https://labgrid.readthedocs.io/en/latest/

• https://github.com/labgrid-project

Page 37: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

r4dr4d

Page 38: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

r4dr4d

• Name: r4d• Project: ci-rt (Real-Time LINUX)• URL: https://github.com/ci-rt/r4d

• TLDR: infrastructure for power-control and console access that plugsinto libvirt

• Name: r4d• Project: ci-rt (Real-Time LINUX)• URL: https://github.com/ci-rt/r4d

• TLDR: infrastructure for power-control and console access that plugsinto libvirt

Page 39: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

r4dr4d

• Name: r4d• Project: ci-rt (Real-Time LINUX)• URL: https://github.com/ci-rt/r4d

• TLDR: infrastructure for power-control and console access that plugsinto libvirt

• Name: r4d• Project: ci-rt (Real-Time LINUX)• URL: https://github.com/ci-rt/r4d

• TLDR: infrastructure for power-control and console access that plugsinto libvirt

Page 40: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

r4dr4d

Page 41: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

r4dr4d

• r4d

• will manage power/serial

• will allow remote control

• plugs into libvirt (Jenkins!)

• r4d

• will manage power/serial

• will allow remote control

• plugs into libvirt (Jenkins!)

Page 42: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

r4dr4d

+ libvirt (!)

+ small

- only selected serial/power switches supported

- libvirt patches not yet upstream (but debian pkgs)

+ libvirt (!)

+ small

- only selected serial/power switches supported

- libvirt patches not yet upstream (but debian pkgs)

Page 43: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

OtherOther

Page 44: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

For all I missed ...For all I missed ...

• There are of course more / other frameworks

• in the time we could just not cover all

• please speak-up in the Q/A and lets discuss

• There are of course more / other frameworks

• in the time we could just not cover all

• please speak-up in the Q/A and lets discuss

Page 45: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

Wrap-up and Q/AWrap-up and Q/A

Page 46: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

Wrap-upWrap-up

• Different frameworks have different strengths• But what is important:

• Collaboration

• Test Results

• Aggregation, Evaluation, Visualization

• More and more boards → LABs

• Different frameworks have different strengths• But what is important:

• Collaboration

• Test Results

• Aggregation, Evaluation, Visualization

• More and more boards → LABs

Page 47: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

Q/AQ/A

• Questions ?• Notes ?

• Questions ?• Notes ?

Page 48: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager

EndEnd

• Thank you for joining!• Thank you for joining!

Page 49: Overview / Scope - Linux Foundation Events€¦ · Fuego, KernelCI and...? Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Jan-Simon Möller AGL Release Manager