All testcases can be integrated into mtd-utils by mtd_test_cases.patch, the details can refer to mtd-utils/tests/ubifs_repair-tests/README.txt. There is one testcase named "repair_bad_image.sh", the generating method of inconsistent UBIFS image depends on 0001-ubifs-Add-corruption-injection-support.patch.
Created attachment 305660 [details] 0001-ubifs-Add-corruption-injection-support.patch
Created attachment 305661 [details] generate good image
Created attachment 305662 [details] make bad image
Created attachment 305663 [details] test bad image
mtd_test_cases.patch UBIFS repair testcases are integrated into mtd-utils: https://lore.kernel.org/linux-mtd/20231228013639.2827205-1-chengzhihao1@huawei.com/ The details can refer to mtd-utils/tests/ubifs_repair-tests/README.txt.
(In reply to Zhihao Cheng from comment #5) > mtd_test_cases.patch > UBIFS repair testcases are integrated into mtd-utils: > https://lore.kernel.org/linux-mtd/20231228013639.2827205-1- > chengzhihao1@huawei.com/ > > The details can refer to mtd-utils/tests/ubifs_repair-tests/README.txt. After testing(fs/ubifs/repair.c): Kernel code coverage: 90% kernel function coverage: 100% suggested qemu config: -smp 4/8 -m 16384
Created attachment 305665 [details] code coverage report
Created attachment 305666 [details] code coverage report2
(In reply to Zhihao Cheng from comment #8) > Created attachment 305666 [details] > code coverage report2 This one is right. 'code coverage report' lost .css, html is not rendered