SlideShare a Scribd company logo
 Linux Distribution Automated Testing
Linux
Distrbution
Automated
Testing
Aleksander Baranowski
EuroLinux
Testwarez 2018
Zakopane, 15th November 2018
[you@host creator]$ ./configure
[you@host creator]$ make
[you@host creator]$ make install
Divide
&&
Conquer
● Making the whole operating
system at once is suicide
mission.
● Split the Linux distribution
into smaller parts, that can
be quite easily produced,
replaced and tested.
● This smaller parts are in most
cases (some people will call
them differently, but the idea
is the same) are called
packages.
The
Basics
Glossary
● Linux – Monolithic Unix-like
computer operating system
**KERNEL**.
● Linux Distribution (Distro) –
GNU/Linux operating system.
● Upstream – original author/s
and/or maintainer/s. May refer
to the project or institution
(ex. Apache).
The
Basics
Glossary
● Repository – Set of Packages
with metadata.
● System Image – File/files that
contains “frozen” version of
system – e.g. Installation
ISO.
●
Cloud Image – System image
that is provided in choosen
cloud solution.
[you@host ]$ pre_check
Please answer following:
1
● Which software should we pack?
● Sample: SSL/TLS – Google
Boring SSL, OpenSSL or BSD
LibreSSL?
● A lot of software depends on
this libraries, and they won't
provide compatible API/ABI.
2 ● Second fundamental problem is
software (package) versioning.
● LTS, ROLLING, HyBriD.
3
4
● How software will be packed?
● Source?
●
Ports?
● Binary?
[you@host ]$ clone packages
Man
Package
+------------+
| Upstream |
+-----> |
| +-----+------+
| |
| +-----v------+
+-----+ Packager |
+-----+------+
|
+-----v------+
| Package |
+-----+------+
|
+-----v------+
| Distro |
+------------+
Man
Packages
● The packager needs to monitor
state of packages.
● The package is no self-
sufficient (dependencies).
● Sometimes the build
environment is much different
than runtime.
● Tests and 0-days
Apropos
Packages
● Dependency HELL!
● Lots of metainfos:
Provides
Requires
Build Requires
[you@host ]$ ./compile groups
The
Repo
●
After making packages, we can
move to the next steps:
● Making repository
●
Making groups (skippable).
● Making environments
(skippable).
● After making packages, we can
move to the next steps:
● Making repository
● Making groups (skippable).
● Making environments
(skippable).
The
Repo
● Packages ID, Name, Version,
Release, etc.
●
Filelist provided by each
package.
● Checksums (e.g. sha256,
sha512)
● Changelogs.
● PGP/GPG keys used to sign
packages.
● Groups and environments.
The
Group
● Logically linked packages.
● Sample groups:
core
FTP Server
HTTP Server
Ruby Development
Python 3.6
The
Environment
● Use cases of our distro.
● Group of groups.
● Sample environments:
Developer Workstation
Gnome3 Desktop
KDE Plasma Desktop
[you@host creator]$ release me
Release
Images
● Holy Installation ISO
● Virtualization Images
● Cloud Images
● Containers
● Automatic installation
●
Release
Updates
● Time Based
● Point Based
●
Automated way
● Security packages can
disturbed the process.
[you@host creator]$ test me
Get(
Current,
State,
*args)
Community
Tested
● Tests Days.
● Testing repositories.
● Beta testing of whole
releases.
● No any meaningful tests/tests
sets on VCS.
● No CI/CD publicly available
solutions.
Community
Tested
● The current state might be
discouraging.
● Testing Linux distribution
means testing thousand of
packages.
[you@host t_utils]$ retest package
Challenges
Of
Package
Testing
● Package testing must be built
in build process.
CoPT
Attitude
Making binaries for Linux
desktop applications is a major
f*****g pain in the a**. You
don’t make binaries for Linux,
you make binaries for Fedora 19,
Fedora 20, maybe even RHEL5 from
10 years ago. You make binaries
for Debian Stable…well no, you
don't make binaries for Debian
Stable because Debian Stable has
libraries that are so old that
anything built in the last
century doesn’t work – Linus
Torvalds
CoPT
Attitude
CoPT
Tests???
● Some project has next to not
existent tests sets.
● This is a common problem with
free/libre software.
●
The pattern is changing :).
CoPT
Tests!!!
● The reverse of the previous
one.
● Too many way to test software!
● Linux Kernel is great example.
CoPT
Less;
More
● Test patches introduced by
distribution.
● Test backported features, that
test cannot be backported.
● Package builders support for
tests.
● These tests are the easiest to
automate.
● Check the chosen attributes:
PGP/GPG
Checksums
License and description
Packager, Vendor, Provider
Build Host
Sources URL.
Test
On
Metadata
● Package builders (the programs
not the physical/virtual
machines) have minimal support
for testing.
● No snapshot, tests, revert
mechanism.
● Build != Runtime Environment.
Test
During
Package
Build
● Each package need different
means to be tested.
Test
During
Package
Build
● Each package need different
means to test.
● Read: How to runtests.
● Build != Runtime Environment.
Test
During
Package
Build
Challenges
Of
Package
Testing
● Package testing must be built
in build process.
[you@host t_utils]$ test repo
● Repositry is the set of
packages with metadata.
● Test CDN.
● Tests metadata.
Test
Repository
Metadata
● There are multiple operations
that can be achived with
working repository: Update,
Downgrade, Install, Group
Install, Env Install, Remove.
● Randomly selected, chained
● Test system consitency;
services (with default
configuration).
Test
Repository
$RANDOM
● We can make graph (V=packages,
E=dependency).
● Check for dependencies.
● Search isolated verticles.
● Extremly useful for updates
testing – neighbourhood.
Test
Repository
Graph
● Repoclosure – check if all
dependencies in repository can
be resolved.
● Make impact score. How many
packages are dependent,
calculated with nested
neighbourhood.
Test
Repository
Graph
[you@host t_utils]$ test use-case
● There are automation platform,
Puppet, Salt, Ansible.
● Puppet -> Puppet Forge, Salt
-> Salt Stack Formulas,
Ansible -> Ansible Galaxy
● Ready to use then test use
cases.
How
To
Obtain
Use Cases
● LAMP (Linux; Apache; MySQL;
PHP)
● NFS
● Samba
● Web server
● HA
Sample
Use Cases
● This is good idea to have core
test suite.
● Minimal acceptance tests that
can be always run.
● Mix of different tests, with
different test levels.
The
core
test
suite
[you@host t_utils]$ test image
● Each distribution finally need
at least one image that allows
to install the system.
● In most cases it’s the first
ISO is made on „donor”
computer.
● Since then most distributions
can be self-hosted.
● Installator that supports
unattended/automatic
deployment FTW!
The
Holy
One
First
ISO
● Installation ISO must go
through multiple tests:
● Install selected groups (about
20 on single ISO).
● Different FS.
● Different HW, bare metal or
virtualized.
The
Holy
One
First
ISO
● Each image should pass the
core test suite.
● The documentation of the
solution is beneficial.
● Sometimes we have to use third
party software and go their
tests.
Tests
On
Different
Images
● Allows testing whole
distribution lifecycle.
● Uses virtual machines to make
reproducible tests.
● Sponsored by SUSE.
● Tests with support for
keyboard, mouse input, gather
information from the serial
console, getting images from
the screen and much more.
OpenQA
open.qa
OpenQA
Like
Selenium
● For Linux Distros.
● With Perl :(.
[you@host t_utils]$ /o_utils list
LSB
● LSB (Linux Stanard Base) was
made to reduce the cost of
support for Linux. Idea is
that it make different Linux
distributions more „unified”.
● ISO/IEC 23360-2 LSB 3.1↔
●
URL: www.linuxbase.org
(redirects to
linuxfoundation.org)
LSB
LSB
FHS
●
Filesystem Hierarchy Standard.
● The most sensible standard in
the Linux world.
●
Part of LSB.
● Must be adopted in the very
beginning.
LTP
● Linux Test Project is most
robust tests suites for Linux
Kernel.
● Run by multiple companies –
IBM, SUSE, Fujitsu, Oracle...
● Few thousands of tests,
syscalls, POSIX compatibility,
Regression tests with CVE.
● http://linux-test-
project.github.io/
[you@host summary]$ ./run.sh
[you@host questions]$ $?

More Related Content

PDF
Testing Docker Images Security -All day dev ops 2017
PDF
Testing Docker Images Security
PDF
Testing Docker Images Security -NcN edition
PDF
Common Docker Problems and Solutions
PDF
Lightweight Virtualization: LXC containers & AUFS
PDF
Linux Internals - Part II
PDF
Postgre sql linuxcontainers by Jignesh Shah
PDF
OpenNebulaConf2017EU: Torturing OpenNebula for Fun and Profit by Carlo Daffar...
Testing Docker Images Security -All day dev ops 2017
Testing Docker Images Security
Testing Docker Images Security -NcN edition
Common Docker Problems and Solutions
Lightweight Virtualization: LXC containers & AUFS
Linux Internals - Part II
Postgre sql linuxcontainers by Jignesh Shah
OpenNebulaConf2017EU: Torturing OpenNebula for Fun and Profit by Carlo Daffar...

What's hot (20)

PDF
LXC, Docker, and the future of software delivery | LinuxCon 2013
PDF
About docker in GDG Seoul
PDF
Kernel Recipes 2015: How to choose a kernel to ship with a product
PDF
Tuning systemd for embedded
PPTX
Linux Container Brief for IEEE WG P2302
PDF
Docker_AGH_v0.1.3
PDF
Systemd: the modern Linux init system you will learn to love
PDF
Introduction to systemd
PDF
Containerization is more than the new Virtualization: enabling separation of ...
ODP
Locally run a FIWARE Lab Instance In another Hypervisors
PDF
Docker storage drivers by Jérôme Petazzoni
PDF
Effective service and resource management with systemd
PPTX
Introduction to containers
PPTX
Device drivers Introduction
PDF
Your first dive into systemd!
PDF
Evoluation of Linux Container Virtualization
PPTX
Device Drivers in Linux
PDF
Deployment of WebObjects applications on CentOS Linux
PDF
U-Boot - An universal bootloader
PDF
IRQs: the Hard, the Soft, the Threaded and the Preemptible
LXC, Docker, and the future of software delivery | LinuxCon 2013
About docker in GDG Seoul
Kernel Recipes 2015: How to choose a kernel to ship with a product
Tuning systemd for embedded
Linux Container Brief for IEEE WG P2302
Docker_AGH_v0.1.3
Systemd: the modern Linux init system you will learn to love
Introduction to systemd
Containerization is more than the new Virtualization: enabling separation of ...
Locally run a FIWARE Lab Instance In another Hypervisors
Docker storage drivers by Jérôme Petazzoni
Effective service and resource management with systemd
Introduction to containers
Device drivers Introduction
Your first dive into systemd!
Evoluation of Linux Container Virtualization
Device Drivers in Linux
Deployment of WebObjects applications on CentOS Linux
U-Boot - An universal bootloader
IRQs: the Hard, the Soft, the Threaded and the Preemptible
Ad

Similar to Linux Distribution Automated Testing (20)

PDF
Wrangling 3rd Party Installers from Puppet
PDF
Brief introduction to kselftest
PDF
OpenNebulaConf 2014 - CentOS, QA and OpenNebula - Christoph Galuschka
PDF
OpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph Galuschka
PDF
The Future of Security and Productivity in Our Newly Remote World
PDF
Deploying software at Scale
PDF
Suse Studio: "How to create a live openSUSE image with OpenFOAM® and CFD tools"
PDF
Maven and j unit introduction
PDF
My "Perfect" Toolchain Setup for Grails Projects
PDF
An Introduction To Linux
PDF
Introduction to Docker, December 2014 "Tour de France" Edition
PDF
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
PDF
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
PDF
Releasing a Distribution in the Age of DevOps.
ODP
Malware analysis
PDF
LISA15: systemd, the Next-Generation Linux System Manager
PPTX
Fluo CICD OpenStack Summit
PDF
VASCAN - Docker and Security
ODP
The Deck by Phil Polstra GrrCON2012
PDF
#OktoCampus - Workshop : An introduction to Ansible
Wrangling 3rd Party Installers from Puppet
Brief introduction to kselftest
OpenNebulaConf 2014 - CentOS, QA and OpenNebula - Christoph Galuschka
OpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph Galuschka
The Future of Security and Productivity in Our Newly Remote World
Deploying software at Scale
Suse Studio: "How to create a live openSUSE image with OpenFOAM® and CFD tools"
Maven and j unit introduction
My "Perfect" Toolchain Setup for Grails Projects
An Introduction To Linux
Introduction to Docker, December 2014 "Tour de France" Edition
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Releasing a Distribution in the Age of DevOps.
Malware analysis
LISA15: systemd, the Next-Generation Linux System Manager
Fluo CICD OpenStack Summit
VASCAN - Docker and Security
The Deck by Phil Polstra GrrCON2012
#OktoCampus - Workshop : An introduction to Ansible
Ad

Recently uploaded (20)

PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Essential Infomation Tech presentation.pptx
PPTX
Transform Your Business with a Software ERP System
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
medical staffing services at VALiNTRY
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
ai tools demonstartion for schools and inter college
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Digital Strategies for Manufacturing Companies
PDF
top salesforce developer skills in 2025.pdf
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
System and Network Administration Chapter 2
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
How to Choose the Right IT Partner for Your Business in Malaysia
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Essential Infomation Tech presentation.pptx
Transform Your Business with a Software ERP System
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
medical staffing services at VALiNTRY
VVF-Customer-Presentation2025-Ver1.9.pptx
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Upgrade and Innovation Strategies for SAP ERP Customers
ai tools demonstartion for schools and inter college
Design an Analysis of Algorithms I-SECS-1021-03
Digital Strategies for Manufacturing Companies
top salesforce developer skills in 2025.pdf
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Operating system designcfffgfgggggggvggggggggg
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
System and Network Administration Chapter 2

Linux Distribution Automated Testing

  • 3. [you@host creator]$ ./configure [you@host creator]$ make [you@host creator]$ make install
  • 4. Divide && Conquer ● Making the whole operating system at once is suicide mission. ● Split the Linux distribution into smaller parts, that can be quite easily produced, replaced and tested. ● This smaller parts are in most cases (some people will call them differently, but the idea is the same) are called packages.
  • 5. The Basics Glossary ● Linux – Monolithic Unix-like computer operating system **KERNEL**. ● Linux Distribution (Distro) – GNU/Linux operating system. ● Upstream – original author/s and/or maintainer/s. May refer to the project or institution (ex. Apache).
  • 6. The Basics Glossary ● Repository – Set of Packages with metadata. ● System Image – File/files that contains “frozen” version of system – e.g. Installation ISO. ● Cloud Image – System image that is provided in choosen cloud solution.
  • 7. [you@host ]$ pre_check Please answer following:
  • 8. 1 ● Which software should we pack? ● Sample: SSL/TLS – Google Boring SSL, OpenSSL or BSD LibreSSL? ● A lot of software depends on this libraries, and they won't provide compatible API/ABI.
  • 9. 2 ● Second fundamental problem is software (package) versioning. ● LTS, ROLLING, HyBriD.
  • 10. 3
  • 11. 4 ● How software will be packed? ● Source? ● Ports? ● Binary?
  • 12. [you@host ]$ clone packages
  • 13. Man Package +------------+ | Upstream | +-----> | | +-----+------+ | | | +-----v------+ +-----+ Packager | +-----+------+ | +-----v------+ | Package | +-----+------+ | +-----v------+ | Distro | +------------+
  • 14. Man Packages ● The packager needs to monitor state of packages. ● The package is no self- sufficient (dependencies). ● Sometimes the build environment is much different than runtime. ● Tests and 0-days
  • 15. Apropos Packages ● Dependency HELL! ● Lots of metainfos: Provides Requires Build Requires
  • 17. The Repo ● After making packages, we can move to the next steps: ● Making repository ● Making groups (skippable). ● Making environments (skippable). ● After making packages, we can move to the next steps: ● Making repository ● Making groups (skippable). ● Making environments (skippable).
  • 18. The Repo ● Packages ID, Name, Version, Release, etc. ● Filelist provided by each package. ● Checksums (e.g. sha256, sha512) ● Changelogs. ● PGP/GPG keys used to sign packages. ● Groups and environments.
  • 19. The Group ● Logically linked packages. ● Sample groups: core FTP Server HTTP Server Ruby Development Python 3.6
  • 20. The Environment ● Use cases of our distro. ● Group of groups. ● Sample environments: Developer Workstation Gnome3 Desktop KDE Plasma Desktop
  • 22. Release Images ● Holy Installation ISO ● Virtualization Images ● Cloud Images ● Containers ● Automatic installation ●
  • 23. Release Updates ● Time Based ● Point Based ● Automated way ● Security packages can disturbed the process.
  • 26. Community Tested ● Tests Days. ● Testing repositories. ● Beta testing of whole releases. ● No any meaningful tests/tests sets on VCS. ● No CI/CD publicly available solutions.
  • 27. Community Tested ● The current state might be discouraging. ● Testing Linux distribution means testing thousand of packages.
  • 29. Challenges Of Package Testing ● Package testing must be built in build process.
  • 30. CoPT Attitude Making binaries for Linux desktop applications is a major f*****g pain in the a**. You don’t make binaries for Linux, you make binaries for Fedora 19, Fedora 20, maybe even RHEL5 from 10 years ago. You make binaries for Debian Stable…well no, you don't make binaries for Debian Stable because Debian Stable has libraries that are so old that anything built in the last century doesn’t work – Linus Torvalds
  • 32. CoPT Tests??? ● Some project has next to not existent tests sets. ● This is a common problem with free/libre software. ● The pattern is changing :).
  • 33. CoPT Tests!!! ● The reverse of the previous one. ● Too many way to test software! ● Linux Kernel is great example.
  • 34. CoPT Less; More ● Test patches introduced by distribution. ● Test backported features, that test cannot be backported. ● Package builders support for tests.
  • 35. ● These tests are the easiest to automate. ● Check the chosen attributes: PGP/GPG Checksums License and description Packager, Vendor, Provider Build Host Sources URL. Test On Metadata
  • 36. ● Package builders (the programs not the physical/virtual machines) have minimal support for testing. ● No snapshot, tests, revert mechanism. ● Build != Runtime Environment. Test During Package Build
  • 37. ● Each package need different means to be tested. Test During Package Build
  • 38. ● Each package need different means to test. ● Read: How to runtests. ● Build != Runtime Environment. Test During Package Build
  • 39. Challenges Of Package Testing ● Package testing must be built in build process.
  • 41. ● Repositry is the set of packages with metadata. ● Test CDN. ● Tests metadata. Test Repository Metadata
  • 42. ● There are multiple operations that can be achived with working repository: Update, Downgrade, Install, Group Install, Env Install, Remove. ● Randomly selected, chained ● Test system consitency; services (with default configuration). Test Repository $RANDOM
  • 43. ● We can make graph (V=packages, E=dependency). ● Check for dependencies. ● Search isolated verticles. ● Extremly useful for updates testing – neighbourhood. Test Repository Graph
  • 44. ● Repoclosure – check if all dependencies in repository can be resolved. ● Make impact score. How many packages are dependent, calculated with nested neighbourhood. Test Repository Graph
  • 46. ● There are automation platform, Puppet, Salt, Ansible. ● Puppet -> Puppet Forge, Salt -> Salt Stack Formulas, Ansible -> Ansible Galaxy ● Ready to use then test use cases. How To Obtain Use Cases
  • 47. ● LAMP (Linux; Apache; MySQL; PHP) ● NFS ● Samba ● Web server ● HA Sample Use Cases
  • 48. ● This is good idea to have core test suite. ● Minimal acceptance tests that can be always run. ● Mix of different tests, with different test levels. The core test suite
  • 50. ● Each distribution finally need at least one image that allows to install the system. ● In most cases it’s the first ISO is made on „donor” computer. ● Since then most distributions can be self-hosted. ● Installator that supports unattended/automatic deployment FTW! The Holy One First ISO
  • 51. ● Installation ISO must go through multiple tests: ● Install selected groups (about 20 on single ISO). ● Different FS. ● Different HW, bare metal or virtualized. The Holy One First ISO
  • 52. ● Each image should pass the core test suite. ● The documentation of the solution is beneficial. ● Sometimes we have to use third party software and go their tests. Tests On Different Images
  • 53. ● Allows testing whole distribution lifecycle. ● Uses virtual machines to make reproducible tests. ● Sponsored by SUSE. ● Tests with support for keyboard, mouse input, gather information from the serial console, getting images from the screen and much more. OpenQA open.qa
  • 54. OpenQA Like Selenium ● For Linux Distros. ● With Perl :(.
  • 56. LSB ● LSB (Linux Stanard Base) was made to reduce the cost of support for Linux. Idea is that it make different Linux distributions more „unified”. ● ISO/IEC 23360-2 LSB 3.1↔ ● URL: www.linuxbase.org (redirects to linuxfoundation.org)
  • 57. LSB
  • 58. LSB
  • 59. FHS ● Filesystem Hierarchy Standard. ● The most sensible standard in the Linux world. ● Part of LSB. ● Must be adopted in the very beginning.
  • 60. LTP ● Linux Test Project is most robust tests suites for Linux Kernel. ● Run by multiple companies – IBM, SUSE, Fujitsu, Oracle... ● Few thousands of tests, syscalls, POSIX compatibility, Regression tests with CVE. ● http://linux-test- project.github.io/