• ZhaoLong Wang's avatar
    ubi: Add six fault injection type for testing · 7cd8d1f8
    ZhaoLong Wang authored
    This commit adds six fault injection type for testing to cover the
    abnormal path of the UBI driver.
    
    Inject the following faults when the UBI reads the LEB:
     +----------------------------+-----------------------------------+
     |    Interface name          |       emulate behavior            |
     +----------------------------+-----------------------------------+
     |  emulate_eccerr            | ECC error                         |
     +----------------------------+-----------------------------------+
     |  emulate_read_failure      | read failure                      |
     |----------------------------+-----------------------------------+
     |  emulate_io_ff             | read content as all FF            |
     |----------------------------+-----------------------------------+
     |  emulate_io_ff_bitflips    | content FF with MTD err reported  |
     +----------------------------+-----------------------------------+
     |  emulate_bad_hdr           | bad leb header                    |
     |----------------------------+-----------------------------------+
     |  emulate_bad_hdr_ebadmsg   | bad header with ECC err           |
     +----------------------------+-----------------------------------+
    Signed-off-by: default avatarZhaoLong Wang <wangzhaolong1@huawei.com>
    Reviewed-by: default avatarZhihao Cheng <chengzhihao1@huawei.com>
    Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
    7cd8d1f8
debug.h 11.2 KB