Bug 218327

Summary: ubifs repair: Testing summary
Product: File System Reporter: Zhihao Cheng (chengzhihao1)
Component: OtherAssignee: fs_other
Status: NEW ---    
Severity: normal    
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:
Attachments: 0001-ubifs-Add-corruption-injection-support.patch
generate good image
make bad image
test bad image
code coverage report
code coverage report2

Description Zhihao Cheng 2023-12-27 03:22:36 UTC
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.
Comment 1 Zhihao Cheng 2023-12-27 04:54:45 UTC
Created attachment 305660 [details]
0001-ubifs-Add-corruption-injection-support.patch
Comment 2 Zhihao Cheng 2023-12-27 06:09:08 UTC
Created attachment 305661 [details]
generate good image
Comment 3 Zhihao Cheng 2023-12-27 06:12:24 UTC
Created attachment 305662 [details]
make bad image
Comment 4 Zhihao Cheng 2023-12-27 06:12:50 UTC
Created attachment 305663 [details]
test bad image
Comment 5 Zhihao Cheng 2023-12-28 01:37:45 UTC
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.
Comment 6 Zhihao Cheng 2023-12-28 01:40:14 UTC
(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
Comment 7 Zhihao Cheng 2023-12-28 01:46:27 UTC
Created attachment 305665 [details]
code coverage report
Comment 8 Zhihao Cheng 2023-12-28 01:49:05 UTC
Created attachment 305666 [details]
code coverage report2
Comment 9 Zhihao Cheng 2023-12-28 01:51:25 UTC
(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