lkml.org 
[lkml]   [2023]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 5/5] mtd: Add several functions to the fail_function list
From
Date
在 2023/11/3 14:55, 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@huawei.com>
> ---
> drivers/mtd/mtdcore.c | 5 +++++
> 1 file changed, 5 insertions(+)
>

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

\
 
 \ /
  Last update: 2023-11-20 13:47    [W:0.082 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site