Provide all necessary information to create/use "Fault Injection Framework" through ltp/README. This is necessary before any test case(s) can be run on this harness. Also describes the general algorithm that would be followed while running LTP tests in "Fault Injection" harness.
Signed-off-by: Subrata Modak <[email protected]> --- --- ltp-full-20090731.orig/README 2009-08-11 21:54:21.000000000 +0530 +++ ltp-full-20090731/README 2009-08-11 21:53:00.000000000 +0530 @@ -272,7 +272,6 @@ The tests also require CUnit Framework t http://sourceforge.net/projects/cunit/ --------------------------------- --------------------------------- - Native language support (nls) testsuite requirements ---------------------------------------------------- CONFIG_NLS=m @@ -287,4 +286,111 @@ CONFIG_CAN_BCM=m # CAN Device Drivers CONFIG_CAN_VCAN=m --------------------------------- +Enabling Fault Injection Support for your kernel (version 2.6.29). +Please check with the original kernel for the fault injection +types it supports. Following supports will be available: + +/debug/fail_io_timeout/interval +/debug/fail_io_timeout/probability +/debug/fail_io_timeout/reject-end +/debug/fail_io_timeout/reject-start +/debug/fail_io_timeout/require-end +/debug/fail_io_timeout/require-start +/debug/fail_io_timeout/space +/debug/fail_io_timeout/stacktrace-depth +/debug/fail_io_timeout/task-filter +/debug/fail_io_timeout/times +/debug/fail_io_timeout/verbose + +/debug/fail_make_request/interval +/debug/fail_make_request/probability +/debug/fail_make_request/reject-end +/debug/fail_make_request/reject-start +/debug/fail_make_request/require-end +/debug/fail_make_request/require-start +/debug/fail_make_request/space +/debug/fail_make_request/stacktrace-depth +/debug/fail_make_request/task-filter +/debug/fail_make_request/times +/debug/fail_make_request/verbose + +/debug/fail_page_alloc/ignore-gfp-highmem +/debug/fail_page_alloc/ignore-gfp-wait +/debug/fail_page_alloc/interval +/debug/fail_page_alloc/min-order +/debug/fail_page_alloc/probability +/debug/fail_page_alloc/reject-end +/debug/fail_page_alloc/reject-start +/debug/fail_page_alloc/require-end +/debug/fail_page_alloc/require-start +/debug/fail_page_alloc/space +/debug/fail_page_alloc/stacktrace-depth +/debug/fail_page_alloc/task-filter +/debug/fail_page_alloc/times +/debug/fail_page_alloc/verbose + +/debug/failslab/ignore-gfp-wait +/debug/failslab/interval +/debug/failslab/probability +/debug/failslab/reject-end +/debug/failslab/reject-start +/debug/failslab/require-end +/debug/failslab/require-start +/debug/failslab/space +/debug/failslab/stacktrace-depth +/debug/failslab/task-filter +/debug/failslab/times +/debug/failslab/verbose + +when the below kernel config options are set: + +CONFIG_FAULT_INJECTION=y +CONFIG_DEBUG_KERNEL=y +CONFIG_FAILSLAB=y (Fault-injection capability for kmalloc) +(CONFIG_SLAB=y || CONFIG_SLUB=y) if CONFIG_FAILSLAB=y +CONFIG_FAIL_PAGE_ALLOC=y (Fault-injection capabilitiy for alloc_pages()) +CONFIG_FAIL_MAKE_REQUEST=y (Fault-injection capability for disk IO) +CONFIG_BLOCK=y if CONFIG_FAIL_MAKE_REQUEST=y +CONFIG_FAIL_IO_TIMEOUT=y (Faul-injection capability for faking disk interrupts) +CONFIG_BLOCK=y if CONFIG_FAIL_IO_TIMEOUT=y +CONFIG_FAULT_INJECTION_DEBUG_FS=y (Debugfs entries for fault-injection capabilities) +(CONFIG_SYSFS=y && CONFIG_DEBUG_FS=y) if CONFIG_FAULT_INJECTION_DEBUG_FS=y +CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y (stacktrace filter for fault-injection capabilities) +(CONFIG_FAULT_INJECTION_DEBUG_FS=y && CONFIG_STACKTRACE_SUPPORT=y && !CONFIG_X86_64) if + CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y + +For more information on Fault injection, please refer to: +linux-2.6/Documentation/fault-injection/fault-injection.txt, + +You should also have made the following entries in your /etc/fstab file +once the kernel is booted with the above CONFIG options set: + +debugfs /debug debugfs + +# How the Kernel Fault Injection works for LTP ? + +1) Build Kernel with all the above possible kernel CONFIG Options, +2) Create the above entry in /etc/fstab file, +3) Reboot in the new kernel, +4) Goto LTPROOT. Build and Install LTP as per ltp/INSTALL file, +5) Choose your own test(or default) to run with fault injection as follows: + ./runltp -f <command_file> -F <LOOPS>,<FAULT_PROBABILITY> + +The agorithm will work as: +loop (for each testcase) +begin + execute_testcase(inside_stable_kernel) + begin + insert_fault_into_kernel() + loop X Times + begin + execute_testcase(inside_fault_kernel) + end + restore_kernel_to_normal() + end +end + +# Eternal TODOs: +1) Add as many framework as they get added/modifed in the kernel +--------------------------------- --- Regards-- Subrata ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
