43 lines · 1.3 KB · Text
RawDownload
====================Livepatch Self Tests==================== This is a small set of sanity tests for the kernel livepatching. The test suite loads and unloads several test kernel modules to verifylivepatch behavior.  Debug information is logged to the kernel's messagebuffer and parsed for expected messages.  (Note: the tests will clearthe message buffer between individual tests.)  Config------ Set these config options and their prerequisites: CONFIG_LIVEPATCH=yCONFIG_TEST_LIVEPATCH=m  Running the tests----------------- Test kernel modules are built as part of lib/ (make modules) and need tobe installed (make modules_install) as the test scripts will modprobethem. To run the livepatch selftests, from the top of the kernel source tree:   % make -C tools/testing/selftests TARGETS=livepatch run_tests  Adding tests------------ See the common functions.sh file for the existing collection of utilityfunctions, most importantly set_dynamic_debug() and check_result().  Thelatter function greps the kernel's ring buffer for "livepatch:" and"test_klp" strings, so tests be sure to include one of those strings forresult comparison.  Other utility functions include general moduleloading and livepatch loading helpers (waiting for patch transitions,sysfs entries, etc.)