[PATCH v3 5/5] mtd: Add several functions to the fail_function list

Zhihao Cheng chengzhihao1 at huawei.com
Fri Oct 20 02:11:30 PDT 2023


在 2023/10/20 14:48, ZhaoLong Wang 写道:
> add mtd_read(), mtd_write(), mtd_erase(), mtd_block_markbad() to
> fail_function list for testing purpose
> 
> - Specify the function to inject the fault
> echo mtd_read >  /sys/kernel/debug/fail_function/inject
> 
> - Specifies the return value of the function to inject the fault
> printf %#x -12 > /sys/kernel/debug/fail_function/mtd_read/retval
> 
> - Specify other fault injection configuration parameters.
> echo -1 > /sys/kernel/debug/fail_function/times
> echo 100 > /sys/kernel/debug/fail_function/probability
> echo 15 > /sys/kernel/debug/fail_function/space
> 
> Signed-off-by: ZhaoLong Wang <wangzhaolong1 at huawei.com>

Reviewed-by: Zhihao Cheng <chengzhihao1 at huawei.com>




More information about the linux-mtd mailing list