[PATCH 0/5] ubi: Enhanced fault injection capability for the UBI driver

ZhaoLong Wang posted 5 patches 2 years, 10 months ago
There is a newer version of this series
drivers/mtd/mtdcore.c   |   6 +-
drivers/mtd/ubi/Kconfig |   8 ++
drivers/mtd/ubi/debug.c | 185 +++++++++++++++++++-------------------
drivers/mtd/ubi/debug.h | 190 ++++++++++++++++++++++++++++++++++++----
drivers/mtd/ubi/io.c    | 101 ++++++++++++++++++---
drivers/mtd/ubi/ubi.h   |  68 +++++---------
6 files changed, 390 insertions(+), 168 deletions(-)
[PATCH 0/5] ubi: Enhanced fault injection capability for the UBI driver
Posted by ZhaoLong Wang 2 years, 10 months ago
The existing fault injection capability of UBI is too simple.
It uses hard-coded fault probability values and lacks other
configurable options. As a result, these interfaces are difficult
to use when digging defects in the abnormal path of code and
reproducing some problems.

The kernel provides a powerful fault injection framework, which
provides rich configurable fault injection attributes during runtime.
So it can be used to improve the fault injection capability of the 
UBI driver.

This series of patches refactor the existing fault injection interface
and add some fault injection types to help testers and developers
find potential problems in the code.

ZhaoLong Wang (5):
  ubi: Using the Fault Injection Framework to refactor the debugfs
    interface
  ubi: Split io_failures into write_failure and erase_failure
  ubi: Add six fault injection type for testing
  ubi: Reserve sufficient buffer length for the input mask
  mtd: Add several functions to the fail_function list

 drivers/mtd/mtdcore.c   |   6 +-
 drivers/mtd/ubi/Kconfig |   8 ++
 drivers/mtd/ubi/debug.c | 185 +++++++++++++++++++-------------------
 drivers/mtd/ubi/debug.h | 190 ++++++++++++++++++++++++++++++++++++----
 drivers/mtd/ubi/io.c    | 101 ++++++++++++++++++---
 drivers/mtd/ubi/ubi.h   |  68 +++++---------
 6 files changed, 390 insertions(+), 168 deletions(-)

-- 
2.31.1
Re: [PATCH 0/5] ubi: Enhanced fault injection capability for the UBI driver
Posted by Richard Weinberger 2 years, 9 months ago
----- Ursprüngliche Mail -----
> Von: "ZhaoLong Wang" <wangzhaolong1@huawei.com>
> The existing fault injection capability of UBI is too simple.
> It uses hard-coded fault probability values and lacks other
> configurable options. As a result, these interfaces are difficult
> to use when digging defects in the abnormal path of code and
> reproducing some problems.
> 
> The kernel provides a powerful fault injection framework, which
> provides rich configurable fault injection attributes during runtime.
> So it can be used to improve the fault injection capability of the
> UBI driver.
> 
> This series of patches refactor the existing fault injection interface
> and add some fault injection types to help testers and developers
> find potential problems in the code.

In general I like having some new and advanced way to test UBI.
But your patches seem to remove the old interface from debugfs,
this will cause breakage of existing test scripts.

So please keep the old interface too.

Thanks,
//richard
Re: [PATCH 0/5] ubi: Enhanced fault injection capability for the UBI driver
Posted by ZhaoLong Wang 2 years, 9 months ago
Thank you very much for replying to my email. I agree with you.

I'll tweak my patch in the next few weeks, try to keep the old interface and
be compatible with the new interface.

Best Regards
ZhaoLong Wang

在 2023/4/22 5:18, Richard Weinberger 写道:
> ----- Ursprüngliche Mail -----
>> Von: "ZhaoLong Wang" <wangzhaolong1@huawei.com>
>> The existing fault injection capability of UBI is too simple.
>> It uses hard-coded fault probability values and lacks other
>> configurable options. As a result, these interfaces are difficult
>> to use when digging defects in the abnormal path of code and
>> reproducing some problems.
>>
>> The kernel provides a powerful fault injection framework, which
>> provides rich configurable fault injection attributes during runtime.
>> So it can be used to improve the fault injection capability of the
>> UBI driver.
>>
>> This series of patches refactor the existing fault injection interface
>> and add some fault injection types to help testers and developers
>> find potential problems in the code.
> In general I like having some new and advanced way to test UBI.
> But your patches seem to remove the old interface from debugfs,
> this will cause breakage of existing test scripts.
>
> So please keep the old interface too.
>
> Thanks,
> //richard
>