mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/5] ubi: Enhanced fault injection capability for the UBI driver
@ 2023-10-20  6:47 ZhaoLong Wang
  2023-10-20  6:47 ` [PATCH v3 1/5] ubi: Use the fault injection framework to enhance the fault injection capability ZhaoLong Wang
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: ZhaoLong Wang @ 2023-10-20  6:47 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr
  Cc: linux-mtd, linux-kernel, chengzhihao1, wangzhaolong1, yi.zhang,
	yangerkun

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.

This series of patches enhance the existing fault injection interface
and retain the old debugfs interface, and add some fault injection types
to help testers and developers Look for potential problems in the code.

V2:
 - Retain the old fault injection interface.

v3:
 1. Corrects the initialization of the error mask, which should start at 1.
 2. Change the read format of the mask value to readable hexadecimal.
 3. The interface definition style is consistent when the new interface is added.
 4. Redundant CONFIG_MTD_UBI_FAULT_INJECTION macro are removed.
 5. Correct the fault injection hook position error: ubi_io_read_data -> ubi_io_write_data.
 6. UBI_IO_BITFLIPS is returned in ubi_io_read() in advance to prevent the 
    return value from being overwritten.
 7. In the last commit, example of the use of fail_function is given.

ZhaoLong Wang (5):
  ubi: Use the fault injection framework to enhance the fault injection
    capability
  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   |   5 +
 drivers/mtd/ubi/Kconfig |   9 ++
 drivers/mtd/ubi/debug.c | 107 ++++++++++++--
 drivers/mtd/ubi/debug.h | 304 +++++++++++++++++++++++++++++++++++++---
 drivers/mtd/ubi/io.c    |  86 +++++++++++-
 drivers/mtd/ubi/ubi.h   |  45 +++---
 6 files changed, 497 insertions(+), 59 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-10-20  9:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-20  6:47 [PATCH v3 0/5] ubi: Enhanced fault injection capability for the UBI driver ZhaoLong Wang
2023-10-20  6:47 ` [PATCH v3 1/5] ubi: Use the fault injection framework to enhance the fault injection capability ZhaoLong Wang
2023-10-20  8:55   ` Zhihao Cheng
2023-10-20  6:48 ` [PATCH v3 2/5] ubi: Split io_failures into write_failure and erase_failure ZhaoLong Wang
2023-10-20  6:48 ` [PATCH v3 3/5] ubi: Add six fault injection type for testing ZhaoLong Wang
2023-10-20  9:09   ` Zhihao Cheng
2023-10-20  6:48 ` [PATCH v3 4/5] ubi: Reserve sufficient buffer length for the input mask ZhaoLong Wang
2023-10-20  6:48 ` [PATCH v3 5/5] mtd: Add several functions to the fail_function list ZhaoLong Wang
2023-10-20  9:11   ` Zhihao Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®