
Explore how continuous integration and testing safeguard Linux kernel hardware support, using the message tool to verify emergency, critical, and warning logs after installing a new kernel.
Run practical usage tests to verify a Linux kernel's networking, display, and hardware responses, including Wi-Fi connectivity, video and audio checks, file transfers, browsing, emails, and USB devices.
Explore the Linux test project (LTP) and automated testing that validate the reliability, robustness, and stability of the Linux kernel through functional testing and stress testing.
Design goals emphasize simple, self-contained tests that are executable independently, run automatically, and report status via exit codes while printing details to stdout and using environment variables for global parameters.
This lecture covers linux test project tests, ATP roll call with valid and invalid parameters, POSIX confirmation test set, regression vulnerability tests, and network, container, and namespace tests.
Clone the Linux test project from GitHub, explore a large C and shell script codebase, install prerequisites, configure, compile, and install the LTP tools to test the kernel.
Learn how to run LTP tests by executing binaries directly or via the test script, filter for specific or system tests, and read results in the output and results folders.
Explore how runtest and the runltp script locate and execute tests using run test files, default test sets, and test directories, including categorization by system calls and network tests.
Explore the ltp-pan driver within the linux kernel test framework, detailing how tests from scenario groups and default or network files run and exit as pass or fail.
Explore how test cases are organized in the testcases directory, including commands and filesystem system call tests. Learn to modify tests, add new scenarios, and run debugging and scheduling tests.
Learn how ltp releases occur roughly every three to four months, with active development by about 38 members on GitHub, and the option to download specific tags.
Decide when to test the Linux kernel code with patches: avoid testing upstream code until patches exist, use lbb to verify patches and modifications don't break external features.
Change the log file name and understand how to generate human readable versus script readable test outputs, including pass/fail status, timestamps, and exit values.
Learn how to automate Linux kernel test results using scripted readable formats, convert outputs to CSP and ASV files, and generate a lock file with timestamps, durations, and exit statuses.
Learn how to generate an HTML report from test results, using options to name the log file and produce a human-readable, browser-viewable summary with console messages preserved.
Learn to control ltp test execution by filtering with exact test lists, using -f to specify test files, and applying regular expressions and combined options to run targeted tests.
Run the ver_linux script to collect hardware, software, and environment details by reading system files, listing running tools and versions, monitoring processes, ip info, memory, and loaded modules.
Lecture describes how the ltp installation directory contains a detector test that verifies required users and groups for a.p. test and creates them if missing, using group and password files.
Learn the simple template of an ltp test, using C programming or environmental variables or on line parameters, with setup, test, and clean up functions, and exit-value reporting.
Add a new testcase to the linux kernel test framework by declaring a test structure, wiring a function test, and building and running it via make.
Learn how the tst_res API reports test results with pass and fail statuses and optional log messages, and see how the library prints and records outcomes during builds.
Learn the runtest file format for linux kernel testing, featuring a two-column layout: the first column is the test tag for reporting, the second is the executable name with optional arguments.
This lecture explains how test configurations determine pass or fail outcomes in kernel testing, with examples about root permission requirements, configuration satisfaction, and kernel version constraints.
Create and delete temporary test directories with built-in library functions, manage working directories, and safely cleanup files to keep all temporary data within the project data tree.
Create a file in a temporary directory, verify its creation with open, wait 30 seconds to confirm presence, and perform cleanup by removing the file and directory.
Learn how linux kernel tests handle file creation and existence checks, cleanup in the test cleaning function, and interpreting TBROK and TBR scenarios when tests report broken, pass, or fail.
Explore Libbey's safe macros that simplify error checking in kernel code, replacing multi-line checks with single calls, and automatically report file, line, and call details.
Compare test function and test all in the Linux kernel testing framework, explaining when to use each for single vs multiple test cases, including indexed execution.
highlights how the test macro is widely used in Linux kernel test cases, initializes error numbers to zero, executes tests, and reveals results with examples like save and unlink.
Set a duration with the -B option to run a testsuite for a specified time, such as 10 seconds or 60 seconds, and execute tests within that window.
Use the -q option to suppress test logs and reduce on-screen output during Linux kernel testing, and compare with -Q for additional console information.
Explore other LTP options to redirect test output, store console logs to a file, and display the currently running test version information.
Demonstrates stress testing in LTP by using the General Lord binary to generate CPU, memory, and secondary storage loads with various options, enabling validation of test scenarios.
Learn to run LTP on Yocto by cloning the recipe from git, installing it with make install, configuring the environment, and executing the system tests.
This lecture demonstrates flashing an image to the Beaglehole Black, then running LTP tests, comparing options, and diagnosing a failing test across machines using scripts.
Explore the LDP test infrastructure for validating device drivers, memory management, and performance through hundreds of test cases, scripts, and folder hierarchies to ensure reliable kernel testing.
Download the LTP-DDT project source, clone the repository, and follow installation and cross-compile steps for embedded Linux devices on Ubuntu, guided by section six.
Validate the performance and stability of embedded systems and device drivers through LTP-DDT, using open source tools, cross-platform scripts, and adjustable parameters.
Explore enhancements to ltp-ddt, focusing on platform detection to identify hardware and software features, platform-based test filtering, and test-case annotations for streamlined scenario selection.
Run tests in ltp_ddt using the test script, selecting tests and platforms with capital B and capital P. Observe filtering by capabilities and platform files to ensure correct test execution.
Experiment with ltp-ddt tests on BeagleBone Black by loading required drivers and utilities, installing lambent, and evaluating test results while noting failures due to missing components.
Explain runtest format guidelines for linux kernel testing, defining area and scope, test type and id, template usage, and commands separated by semicolons, with pass/fail via exit status.
Add new test cases by creating or updating a test file that calls your tests in the repository, using directory structure, scripts, and templates to configure drivers, platforms, and groups.
Write Linux kernel test cases by dynamically obtaining platform values from proc information and CIS, avoiding hard-coded values, and modularize scripts with machine and driver data.
Explore the Linux kernel self-test framework, a toolset that tests kernel subsystems from userspace, with source in tools, using C and a scripting language to exercise kernel parts.
Kselftest provides kernel developers and kernel users a quick method to run tests against the Linux kernel, with unit tests, system call tests via flags or arguments, and regression tests.
Kselftest automates linux kernel testing for major companies like Intel, covering mainline, stable, and next releases, with upstream continuous integration and visible test results on Leonardo's site.
Explore how ltp and kselftest differ in self-test code location and test structure. Ltp uses kernel-source tests with setup and cleanup, while kselftest builds tests from scratch without common helpers.
Kernel developers add tests to kselftest and self-test for new features and bug fixes, validating that bugs do not recur and covering subsystem tests like C Group and IPCA.
Learn to build and run the linux kernel kselftest, using the makefile to compile tests across subsystems and run underscore_test while managing permissions and clean options.
Learn to run a subset of Linux kernel tests by building only selected targets with make and make targets, using self-test, clean, and breakpoint tests.
Learn how the test anything protocol (tap) structures linux kernel self-tests with version, plan, and test lines, using ok and not ok results, test numbers, and diagnostic messages.
Save kernel test outputs to a separate directory using self-test options, build selected targets, and use silent mode to store logs in a dedicated folder while running tests.
Learn how self-test reports detailed results in default mode, including messages from individual test cases, and how the summary option highlights pass, fail, and skip statuses.
Learn how to install kselftest in any location, generate scripts to run tests, and use make self-test install to set up the environment and execute tests.
Generate a tarball containing self-test utilities to run on an external device, then copy and extract it on your actual machine and run the install script to install the package.
Explore kselftest test examples by building, loading, and running the test user copy module, validating config models, and observing RAM usage and test outputs.
Use the kselftest-merge command to resolve test conflicts by merging configurations, create a merged config with all options available, and rebuild the kernel to ensure all tests pass.
Explore kselftest use cases, including building from source, compiling and installing to run self-tests, using stable releases to test, and generating installation packages for different targets.
Update: New videos are added to this course every week. (26/10/2020). Added videos for LTP-DDT
Testing is an integral and important part of any software development cycle and Linux kernel is no exception to that.
With several developers continuing to
add new features, and
fixing bugs,
Continuous integration and testing is vital to ensure the kernel continues to work on
existing hardware as new hardware support and features get added
New kernels are always released regularly, but in fact, everyone doesn't fully understand how the kernel is tested in depth
In this course, we will be looking into various testing tools available for Linux Kernel:
Linux Test Project (LTP)
LTP-DDT
Kselftest