diff options
author | ZhaoLong Wang <wangzhaolong1@huawei.com> | 2023-12-26 09:01:09 +0800 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2024-01-06 23:38:55 +0100 |
commit | 6931fb44858c3b9da9f35fdc8d9cbeef0b4b50a3 (patch) | |
tree | a8792c74526d87e21f2038c1b883d16a83dd955a /tools/testing/selftests/bpf/prog_tests/recursion.c | |
parent | 1e022216dcd248326a5bb95609d12a6815bca4e2 (diff) |
ubi: Use the fault injection framework to enhance the fault injection capability
To make debug parameters configurable at run time, use the
fault injection framework to reconstruct the debugfs interface,
and retain the legacy fault injection interface.
Now, the file emulate_failures and fault_attr files control whether
to enable fault emmulation.
The file emulate_failures receives a mask that controls type and
process of fault injection. Generally, for ease of use, you can
directly enter a mask with all 1s.
echo 0xffff > /sys/kernel/debug/ubi/ubi0/emulate_failures
And you need to configure other fault-injection capabilities for
testing purpose:
echo 100 > /sys/kernel/debug/ubi/fault_inject/emulate_power_cut/probability
echo 15 > /sys/kernel/debug/ubi/fault_inject/emulate_power_cut/space
echo 2 > /sys/kernel/debug/ubi/fault_inject/emulate_power_cut/verbose
echo -1 > /sys/kernel/debug/ubi/fault_inject/emulate_power_cut/times
The CONFIG_MTD_UBI_FAULT_INJECTION to enable the Fault Injection is
added to kconfig.
Signed-off-by: ZhaoLong Wang <wangzhaolong1@huawei.com>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/recursion.c')
0 files changed, 0 insertions, 0 deletions